mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Yinghai Lu <yinghai@kernel.org>
Cc: Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Wu Fengguang <fengguang.wu@intel.com>,
	Peter Zijlstra <peterz@infradead.org>,
	LKML <linux-kernel@vger.kernel.org>,
	Nikanth Karthikesan <knikanth@suse.de>,
	David Rientjes <rientjes@google.com>,
	"Zheng, Shaohui" <shaohui.zheng@intel.com>,
	"linux-hotplug@vger.kernel.org" <linux-hotplug@vger.kernel.org>,
	Eric Dumazet <eric.dumazet@gmail.com>,
	Bjorn Helgaas <bjorn.helgaas@hp.com>,
	Venkatesh Pallipadi <venki@google.com>,
	Nikhil Rao <ncrao@google.com>,
	Takuya Yoshikawa <yoshikawa.takuya@oss.ntt.co.jp>
Subject: Re: [PATCH] x86, acpi: Handle all SRAT cpu entries even have cpu num limitation
Date: Wed, 15 Dec 2010 14:01:31 -0800	[thread overview]
Message-ID: <4D093ABB.4030206@zytor.com> (raw)
In-Reply-To: <4CDF3DA1.2090806@kernel.org>

On 11/13/2010 05:38 PM, Yinghai Lu wrote:
> Index: linux-2.6/arch/x86/kernel/acpi/boot.c
> ===================================================================
> --- linux-2.6.orig/arch/x86/kernel/acpi/boot.c
> +++ linux-2.6/arch/x86/kernel/acpi/boot.c
> @@ -198,6 +198,13 @@ static void __cpuinit acpi_register_lapi
>  {
>  	unsigned int ver = 0;
>  
> +#ifdef CONFIG_X86_64
> +	if (id >= (MAX_APICS-1)) {
> +		printk(KERN_INFO PREFIX "skipped apicid that is too big\n");
> +		return;
> +	}
> +#endif
> +
>  	if (!enabled) {
>  		++disabled_cpus;
>  		return;

Why the #ifdef?


> Index: linux-2.6/arch/x86/mm/srat_64.c
> ===================================================================
> --- linux-2.6.orig/arch/x86/mm/srat_64.c
> +++ linux-2.6/arch/x86/mm/srat_64.c
> @@ -134,6 +134,10 @@ acpi_numa_x2apic_affinity_init(struct ac
>  	}
>  
>  	apic_id = pa->apic_id;
> +	if (apic_id >= MAX_LOCAL_APIC) {
> +		printk(KERN_INFO "SRAT: PXM %u -> APIC 0x%04x -> Node %u skipped that apicid too big\n", pxm, apic_id, node);
> +		return;
> +	}
>  	apicid_to_node[apic_id] = node;
>  	node_set(node, cpu_nodes_parsed);
>  	acpi_numa = 1;
> @@ -168,6 +172,10 @@ acpi_numa_processor_affinity_init(struct
>  		apic_id = (pa->apic_id << 8) | pa->local_sapic_eid;
>  	else
>  		apic_id = pa->apic_id;
> +	if (apic_id >= MAX_LOCAL_APIC) {
> +		printk(KERN_INFO "SRAT: PXM %u -> APIC 0x%02x -> Node %u skipped apicid that is too big\n", pxm, apic_id, node);
> +		return;
> +	}
>  	apicid_to_node[apic_id] = node;
>  	node_set(node, cpu_nodes_parsed);
>  	acpi_numa = 1;
> Index: linux-2.6/drivers/acpi/numa.c
> ===================================================================
> --- linux-2.6.orig/drivers/acpi/numa.c
> +++ linux-2.6/drivers/acpi/numa.c
> @@ -275,13 +275,23 @@ acpi_table_parse_srat(enum acpi_srat_typ
>  int __init acpi_numa_init(void)
>  {
>  	int ret = 0;
> +	int nr_cpu_entries = nr_cpu_ids;
> +
> +#ifdef CONFIG_X86_64
> +	/*
> +	 * Should not limit number with cpu num that will handle,
> +	 * SRAT cpu entries could have different order with that in MADT.
> +	 * So go over all cpu entries in SRAT to get apicid to node mapping.
> +	 */
> +	nr_cpu_entries = MAX_LOCAL_APIC;
> +#endif
>  

Same here...

	-hpa

  parent reply	other threads:[~2010-12-15 22:04 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-11 10:06 [BUG 2.6.27-rc1] find_busiest_group() LOCKUP Wu Fengguang
2010-11-11 10:09 ` Wu Fengguang
2010-11-11 12:36 ` Peter Zijlstra
2010-11-11 12:40   ` Wu Fengguang
2010-11-11 13:04     ` Peter Zijlstra
2010-11-13  8:40       ` Wu Fengguang
2010-11-13 10:30         ` Peter Zijlstra
2010-11-13 12:00           ` Wu Fengguang
2010-11-13 12:57             ` Peter Zijlstra
2010-11-13 13:10               ` Wu Fengguang
2010-11-13 19:12                 ` Yinghai Lu
2010-11-13 19:41                   ` Peter Zijlstra
2010-11-13 23:57                   ` Wu Fengguang
2010-11-14  0:18                     ` Yinghai Lu
2010-11-14  0:55                       ` Wu Fengguang
2010-11-14  1:38                     ` [PATCH] x86, acpi: Handle all SRAT cpu entries even have cpu num limitation Yinghai Lu
2010-11-14 17:32                       ` Wu Fengguang
2010-11-14 18:02                         ` Yinghai Lu
2010-11-14 18:19                         ` Yinghai Lu
2010-11-15  1:22                           ` Wu Fengguang
2010-12-15 22:01                       ` H. Peter Anvin [this message]
2010-12-15 22:40                         ` Yinghai Lu
2010-12-15 22:53                           ` H. Peter Anvin
2010-12-15 22:57                             ` Yinghai Lu
2010-12-17  3:09                             ` [PATCH 1/2] x86, acpi: add MAX_LOCAL_APIC for 32bit Yinghai Lu
2010-12-17  3:09                               ` [PATCH -v2 2/2] x86, acpi: Parse all SRAT cpu entries even have cpu num limitation Yinghai Lu
2010-12-17 18:53                                 ` Venkatesh Pallipadi
2010-12-17 19:27                                   ` Yinghai Lu
2010-12-17 19:35                                     ` Kay Sievers
2010-12-17 23:32                                     ` Venkatesh Pallipadi
2010-12-21  4:31                                       ` Venkatesh Pallipadi
2010-12-22  6:43                                         ` David Rientjes
2010-12-22 20:28                                           ` Venkatesh Pallipadi
2010-12-22 22:51                                             ` David Rientjes
2010-12-27 18:43                                               ` H. Peter Anvin
2010-12-23 23:22                                 ` [tip:x86/apic] x86, acpi: Parse all SRAT cpu entries even above the cpu number limitation tip-bot for Yinghai Lu
2010-12-17 20:56                               ` [PATCH 1/2] x86, acpi: add MAX_LOCAL_APIC for 32bit David Rientjes
2010-12-23 23:21                               ` [tip:x86/apic] x86, acpi: Add " tip-bot for Yinghai Lu
2010-11-11 12:42   ` [BUG 2.6.27-rc1] find_busiest_group() LOCKUP Wu Fengguang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D093ABB.4030206@zytor.com \
    --to=hpa@zytor.com \
    --cc=akpm@linux-foundation.org \
    --cc=bjorn.helgaas@hp.com \
    --cc=eric.dumazet@gmail.com \
    --cc=fengguang.wu@intel.com \
    --cc=knikanth@suse.de \
    --cc=linux-hotplug@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=ncrao@google.com \
    --cc=peterz@infradead.org \
    --cc=rientjes@google.com \
    --cc=shaohui.zheng@intel.com \
    --cc=tglx@linutronix.de \
    --cc=venki@google.com \
    --cc=yinghai@kernel.org \
    --cc=yoshikawa.takuya@oss.ntt.co.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome