Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755554Ab0LOWET (ORCPT ); Wed, 15 Dec 2010 17:04:19 -0500 Received: from terminus.zytor.com ([198.137.202.10]:60267 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753851Ab0LOWER (ORCPT ); Wed, 15 Dec 2010 17:04:17 -0500 Message-ID: <4D093ABB.4030206@zytor.com> Date: Wed, 15 Dec 2010 14:01:31 -0800 From: "H. Peter Anvin" User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101209 Fedora/3.1.7-0.35.b3pre.fc13 Thunderbird/3.1.7 MIME-Version: 1.0 To: Yinghai Lu CC: Ingo Molnar , Andrew Morton , Thomas Gleixner , Wu Fengguang , Peter Zijlstra , LKML , Nikanth Karthikesan , David Rientjes , "Zheng, Shaohui" , "linux-hotplug@vger.kernel.org" , Eric Dumazet , Bjorn Helgaas , Venkatesh Pallipadi , Nikhil Rao , Takuya Yoshikawa Subject: Re: [PATCH] x86, acpi: Handle all SRAT cpu entries even have cpu num limitation References: <20101111100628.GA24728@localhost> <1289478978.2084.74.camel@laptop> <20101111124015.GA9706@localhost> <1289480656.2084.80.camel@laptop> <20101113084018.GA23098@localhost> <1289644224.2084.521.camel@laptop> <20101113120030.GA31517@localhost> <1289653078.2084.675.camel@laptop> <20101113131042.GA5522@localhost> <4CDEE314.6090107@kernel.org> <20101113235746.GA9458@localhost> <4CDF3DA1.2090806@kernel.org> In-Reply-To: <4CDF3DA1.2090806@kernel.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2471 Lines: 77 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/