From patchwork Sat Dec 3 13:51:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 29281 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1377691wrr; Sat, 3 Dec 2022 05:56:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf4zbPWdXXPTDYqfBIS+I5uWmadoBjaA7ZdyjBI2xDbHlL8FW+RlAqSCOoxW7MYhwu2wiBay X-Received: by 2002:a05:6402:321e:b0:469:ebc0:2247 with SMTP id g30-20020a056402321e00b00469ebc02247mr47768631eda.217.1670075776664; Sat, 03 Dec 2022 05:56:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670075776; cv=none; d=google.com; s=arc-20160816; b=sV4tZFPTxs6J9yWFoz3dIOVGJR6Z0ZyMlMUFLAmCo1yQa6vIEjJIjRFXoI4pggsWIV xBsnSFliPhd/9RtQLsp9++nmdo+qdSDAp6M0sZNamejxVP+0B1AnuqnkP45Kv+FlSCjH j1e74T5IKl8WQt5oa4B8A2O5vh8hdW3glH4wXmE8pFdVn4nuN4nTW/vuZ4VhurRbdKs6 YYAIxPFCFfbFM2+3NYDoTVMs9MUaIW8CwmKYF310wEXWZOECRbfShx3htc1sl6zVm5Nn 4FzZMBhXEGs0owl8kI1GZFuhSHRzk4PvN2zwh1WnWGUy5870WwhjIEySpatViRJQuvMD CZfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=+XUwHrsrE6DfDCNkWoJz1FGQB8HJEOn2bw8jH7Zsoy8=; b=wmXGlQKWIA7LzyiaS+qxd5srqAiCR5BMHRSvGnIm1bMLfVOA7WJ4i8qGGk41e3qC67 ECLakPpM+wwWJ+/t5rIqPuaPkltQhr3ZDl1JMnsG6Oad/ChSP4VWF2QPWfk2dJeQ4NI0 npnUmN6TJWOroHdWmhX5/1uuqDHwpqRzPsi7lCTvkMBQ6Tl/xLxOgUvzAU0+mYD+RkOh 8lPNn+RHEYqYrRKflfoOCabswB3zU+tttEm+MkJ8Xlx5HRGMd06AJfI2Bd4ugqi2wWIo Omyl6xJyfOO44CYTLRm2ZO8AcuGRT27dMxHDhERxLIDJZXznKIhLqdBiGlBXCToNASMp 3S2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ASMHKnA9; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z13-20020a05640240cd00b00461f0d84ee1si8890736edb.228.2022.12.03.05.55.51; Sat, 03 Dec 2022 05:56:16 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=ASMHKnA9; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229715AbiLCNvS (ORCPT + 99 others); Sat, 3 Dec 2022 08:51:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44674 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229609AbiLCNvR (ORCPT ); Sat, 3 Dec 2022 08:51:17 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B038122B34; Sat, 3 Dec 2022 05:51:15 -0800 (PST) Date: Sat, 03 Dec 2022 13:51:12 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1670075473; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+XUwHrsrE6DfDCNkWoJz1FGQB8HJEOn2bw8jH7Zsoy8=; b=ASMHKnA9rhxXeLDKq6Ag2vtLejeG33U4JgIedX65g7JM2s29LRuw5ZGZx9atAKt37ZGFRy LiQvKiUXeemntG+iSQzJ06DR9lqfwyxr/M9Tl3JLEOu0oMIKMaAF/pGuqhsdJAb2JK6Cc6 37pyyHvFEUgddNv4cpD7wg+xGzRIpCHByWIDqHze0DZKN+gmVQx9ctUvVa1VbtUag4fgIQ VKElhP7F2ZKPfr9EdDrAHujBKNwFQvbZhSLW/yeH09VPiRjfFy1s141S74fQ6/aXyUFrQ/ sx/JNvKahTh0Lt99V0Zvd3JlEamJYlXBqJX8a3+JbrEi5Hd+cJo+Y91atm/J6A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1670075473; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+XUwHrsrE6DfDCNkWoJz1FGQB8HJEOn2bw8jH7Zsoy8=; b=YviRu5o/EuWfGn6Etokb2Ohb3rKN8fM3hJvxHKa1xsO8BMiKuW1tWqr/xchzFqSAShiSdI NeTAWrjC0Tq2cCDg== From: "tip-bot2 for Ashok Raj" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/microcode] x86/microcode/intel: Do not print microcode revision and processor flags Cc: Tony Luck , Ashok Raj , "Borislav Petkov (AMD)" , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20221103175901.164783-2-ashok.raj@intel.com> References: <20221103175901.164783-2-ashok.raj@intel.com> MIME-Version: 1.0 Message-ID: <167007547263.4906.10472927215347122978.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1751201377836688831?= X-GMAIL-MSGID: =?utf-8?q?1751201377836688831?= The following commit has been merged into the x86/microcode branch of tip: Commit-ID: 5b1586ab064ca24c6a7a6be7a9d0cb9e237ef39a Gitweb: https://git.kernel.org/tip/5b1586ab064ca24c6a7a6be7a9d0cb9e237ef39a Author: Ashok Raj AuthorDate: Tue, 29 Nov 2022 13:08:26 -08:00 Committer: Borislav Petkov (AMD) CommitterDate: Sat, 03 Dec 2022 14:41:06 +01:00 x86/microcode/intel: Do not print microcode revision and processor flags collect_cpu_info() is used to collect the current microcode revision and processor flags on every CPU. It had a weird mechanism to try to mimick a "once" functionality in the sense that, that information should be issued only when it is differing from the previous CPU. However (1): the new calling sequence started doing that in parallel: microcode_init() |-> schedule_on_each_cpu(setup_online_cpu) |-> collect_cpu_info() resulting in multiple redundant prints: microcode: sig=0x50654, pf=0x80, revision=0x2006e05 microcode: sig=0x50654, pf=0x80, revision=0x2006e05 microcode: sig=0x50654, pf=0x80, revision=0x2006e05 However (2): dumping this here is not that important because the kernel does not support mixed silicon steppings microcode. Finally! Besides, there is already a pr_info() in microcode_reload_late() that shows both the old and new revisions. What is more, the CPU signature (sig=0x50654) and Processor Flags (pf=0x80) above aren't that useful to the end user, they are available via /proc/cpuinfo and they don't change anyway. Remove the redundant pr_info(). [ bp: Heavily massage. ] Fixes: b6f86689d5b7 ("x86/microcode: Rip out the subsys interface gunk") Reported-by: Tony Luck Signed-off-by: Ashok Raj Signed-off-by: Borislav Petkov (AMD) Link: https://lore.kernel.org/r/20221103175901.164783-2-ashok.raj@intel.com --- arch/x86/kernel/cpu/microcode/intel.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/arch/x86/kernel/cpu/microcode/intel.c b/arch/x86/kernel/cpu/microcode/intel.c index c4a00fb..4f93875 100644 --- a/arch/x86/kernel/cpu/microcode/intel.c +++ b/arch/x86/kernel/cpu/microcode/intel.c @@ -554,7 +554,6 @@ void reload_ucode_intel(void) static int collect_cpu_info(int cpu_num, struct cpu_signature *csig) { - static struct cpu_signature prev; struct cpuinfo_x86 *c = &cpu_data(cpu_num); unsigned int val[2]; @@ -570,13 +569,6 @@ static int collect_cpu_info(int cpu_num, struct cpu_signature *csig) csig->rev = c->microcode; - /* No extra locking on prev, races are harmless. */ - if (csig->sig != prev.sig || csig->pf != prev.pf || csig->rev != prev.rev) { - pr_info("sig=0x%x, pf=0x%x, revision=0x%x\n", - csig->sig, csig->pf, csig->rev); - prev = *csig; - } - return 0; }