linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yinghai Lu <yinghai@kernel.org>
To: "H. Peter Anvin" <hpa@zytor.com>
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: [PATCH 1/2] x86, acpi: add MAX_LOCAL_APIC for 32bit
Date: Fri, 17 Dec 2010 03:09:24 +0000	[thread overview]
Message-ID: <4D0AD464.2020408@kernel.org> (raw)
In-Reply-To: <4D094703.7080701@zytor.com>

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 <yinghai@kernel.org>

---
 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 <asm/mpspec_def.h>
 #include <asm/x86_init.h>
 
-extern int apic_version[MAX_APICS];
+extern int apic_version[];
 extern int pic_mode;
 
 #ifdef CONFIG_X86_32

  parent reply	other threads:[~2010-12-17  3:09 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20101111100628.GA24728@localhost>
     [not found] ` <1289478978.2084.74.camel@laptop>
     [not found]   ` <20101111124015.GA9706@localhost>
     [not found]     ` <1289480656.2084.80.camel@laptop>
     [not found]       ` <20101113084018.GA23098@localhost>
2010-11-13 10:30         ` [BUG 2.6.27-rc1] find_busiest_group() LOCKUP 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
     [not found]                   ` <20101113235746.GA9458@localhost>
2010-11-14  0:18                     ` Yinghai Lu
2010-11-14  1:38                     ` [PATCH] x86, acpi: Handle all SRAT cpu entries even have cpu num Yinghai Lu
2010-11-14 17:32                       ` [PATCH] x86, acpi: Handle all SRAT cpu entries even have cpu 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
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                             ` Yinghai Lu [this message]
2010-12-17  3:09                               ` [PATCH -v2 2/2] x86, acpi: Parse " Yinghai Lu
2010-12-17 18:53                                 ` [PATCH -v2 2/2] x86, acpi: Parse all SRAT cpu entries even have Venkatesh Pallipadi
2010-12-17 19:27                                   ` Yinghai Lu
2010-12-17 19:35                                     ` Kay Sievers
2010-12-17 20:56                               ` [PATCH 1/2] x86, acpi: add MAX_LOCAL_APIC for 32bit David Rientjes

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=4D0AD464.2020408@kernel.org \
    --to=yinghai@kernel.org \
    --cc=akpm@linux-foundation.org \
    --cc=bjorn.helgaas@hp.com \
    --cc=eric.dumazet@gmail.com \
    --cc=fengguang.wu@intel.com \
    --cc=hpa@zytor.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=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;
as well as URLs for NNTP newsgroup(s).