From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yinghai Lu Date: Fri, 17 Dec 2010 03:09:24 +0000 Subject: [PATCH 1/2] x86, acpi: add MAX_LOCAL_APIC for 32bit Message-Id: <4D0AD464.2020408@kernel.org> List-Id: 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> <4D093ABB.4030206@zytor.com> <4D0943D5.1090404@kernel.org> <4D094703.7080701@zytor.com> In-Reply-To: <4D094703.7080701@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: "H. Peter Anvin" 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 We should use MAX_LOCAL_APIC for max apic ids and MAX_APICS as number of local apics. also apic_version[] array should max apic id related. Signed-off-by: Yinghai Lu --- arch/x86/include/asm/apicdef.h | 1 + arch/x86/include/asm/mpspec.h | 2 +- arch/x86/kernel/apic/apic.c | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) Index: linux-2.6/arch/x86/include/asm/apicdef.h =================================--- linux-2.6.orig/arch/x86/include/asm/apicdef.h +++ linux-2.6/arch/x86/include/asm/apicdef.h @@ -145,6 +145,7 @@ #ifdef CONFIG_X86_32 # define MAX_IO_APICS 64 +# define MAX_LOCAL_APIC 256 #else # define MAX_IO_APICS 128 # define MAX_LOCAL_APIC 32768 Index: linux-2.6/arch/x86/kernel/apic/apic.c =================================--- linux-2.6.orig/arch/x86/kernel/apic/apic.c +++ linux-2.6/arch/x86/kernel/apic/apic.c @@ -1689,7 +1689,7 @@ void __init register_lapic_address(unsig * This initializes the IO-APIC and APIC hardware if this is * a UP kernel. */ -int apic_version[MAX_APICS]; +int apic_version[MAX_LOCAL_APIC]; int __init APIC_init_uniprocessor(void) { Index: linux-2.6/arch/x86/include/asm/mpspec.h =================================--- linux-2.6.orig/arch/x86/include/asm/mpspec.h +++ linux-2.6/arch/x86/include/asm/mpspec.h @@ -6,7 +6,7 @@ #include #include -extern int apic_version[MAX_APICS]; +extern int apic_version[]; extern int pic_mode; #ifdef CONFIG_X86_32