[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4D093ABB.4030206@zytor.com>
Date: Wed, 15 Dec 2010 14:01:31 -0800
From: "H. Peter Anvin" <hpa@...or.com>
To: Yinghai Lu <yinghai@...nel.org>
CC: Ingo Molnar <mingo@...e.hu>,
Andrew Morton <akpm@...ux-foundation.org>,
Thomas Gleixner <tglx@...utronix.de>,
Wu Fengguang <fengguang.wu@...el.com>,
Peter Zijlstra <peterz@...radead.org>,
LKML <linux-kernel@...r.kernel.org>,
Nikanth Karthikesan <knikanth@...e.de>,
David Rientjes <rientjes@...gle.com>,
"Zheng, Shaohui" <shaohui.zheng@...el.com>,
"linux-hotplug@...r.kernel.org" <linux-hotplug@...r.kernel.org>,
Eric Dumazet <eric.dumazet@...il.com>,
Bjorn Helgaas <bjorn.helgaas@...com>,
Venkatesh Pallipadi <venki@...gle.com>,
Nikhil Rao <ncrao@...gle.com>,
Takuya Yoshikawa <yoshikawa.takuya@....ntt.co.jp>
Subject: Re: [PATCH] x86, acpi: Handle all SRAT cpu entries even have cpu
num limitation
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists