From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758004AbcJHKZO (ORCPT ); Sat, 8 Oct 2016 06:25:14 -0400 Received: from terminus.zytor.com ([198.137.202.10]:38356 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754693AbcJHKZE (ORCPT ); Sat, 8 Oct 2016 06:25:04 -0400 Date: Sat, 8 Oct 2016 03:24:39 -0700 From: tip-bot for Thomas Gleixner Message-ID: Cc: hpa@zytor.com, mingo@kernel.org, douly.fnst@cn.fujitsu.com, guz.fnst@cn.fujitsu.com, markus@trippelsdorf.de, tglx@linutronix.de, linux-kernel@vger.kernel.org, gnomes@lxorguk.ukuu.org.uk Reply-To: mingo@kernel.org, hpa@zytor.com, douly.fnst@cn.fujitsu.com, guz.fnst@cn.fujitsu.com, markus@trippelsdorf.de, tglx@linutronix.de, linux-kernel@vger.kernel.org, gnomes@lxorguk.ukuu.org.uk In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/urgent] x86/apic: Prevent pointless warning messages Git-Commit-ID: df610d678893c85b82d3a68eea0d87dd4e03e615 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: df610d678893c85b82d3a68eea0d87dd4e03e615 Gitweb: http://git.kernel.org/tip/df610d678893c85b82d3a68eea0d87dd4e03e615 Author: Thomas Gleixner AuthorDate: Fri, 7 Oct 2016 15:55:13 +0200 Committer: Thomas Gleixner CommitDate: Sat, 8 Oct 2016 12:18:36 +0200 x86/apic: Prevent pointless warning messages Markus reported that he sees new warnings: APIC: NR_CPUS/possible_cpus limit of 4 reached. Processor 4/0x84 ignored. APIC: NR_CPUS/possible_cpus limit of 4 reached. Processor 5/0x85 ignored. This comes from the recent persistant cpuid - nodeid changes. The code which emits the warning has been called prior to these changes only for enabled processors. Now it's called for disabled processors as well to get the possible cpu accounting correct. So if the kernel is compiled for the number of actual available/enabled CPUs and the BIOS reports disabled CPUs as well then the above warnings are printed. That's a pointless exercise as it only makes sense if there are more CPUs enabled than the kernel supports. Nake the warning conditional on enabled processors so we are back to the state before these changes. Fixes: 8f54969dc8d6 ("x86/acpi: Introduce persistent storage for cpuid <-> apicid mapping") Reported-and-tested-by: Markus Trippelsdorf Cc: One Thousand Gnomes Cc: Dou Liyang Cc: linux-acpi@vger.kernel.org Cc: Gu Zheng Link: http://lkml.kernel.org/r/alpine.DEB.2.20.1610071549330.19804@nanos Signed-off-by: Thomas Gleixner --- arch/x86/kernel/apic/apic.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c index f266b8a..88c657b 100644 --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c @@ -2128,9 +2128,11 @@ int __generic_processor_info(int apicid, int version, bool enabled) if (num_processors >= nr_cpu_ids) { int thiscpu = max + disabled_cpus; - pr_warning( - "APIC: NR_CPUS/possible_cpus limit of %i reached." - " Processor %d/0x%x ignored.\n", max, thiscpu, apicid); + if (enabled) { + pr_warning("APIC: NR_CPUS/possible_cpus limit of %i " + "reached. Processor %d/0x%x ignored.\n", + max, thiscpu, apicid); + } disabled_cpus++; return -EINVAL;