From ab9c0bb8a8c1d71dd303abdaa61ec496128e2fbe Mon Sep 17 00:00:00 2001 From: Jack Steiner Date: Mon, 16 Jun 2008 12:09:10 -0500 Subject: [PATCH] x86: increase MAX_APICS for very large x86-64 configs Increase the maximum number of apics when running very large configurations. This patch has no affect on most systems. The patch has no effect on any 32-bit kernel. It adds ~4k to the size of 64-bit kernels but only if NR_CPUS > 255. Signed-off-by: Jack Steiner Signed-off-by: Ingo Molnar --- include/asm-x86/mpspec_def.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/include/asm-x86/mpspec_def.h b/include/asm-x86/mpspec_def.h index dc6ef85e3624..38d1e73b49e4 100644 --- a/include/asm-x86/mpspec_def.h +++ b/include/asm-x86/mpspec_def.h @@ -17,10 +17,11 @@ # define MAX_MPC_ENTRY 1024 # define MAX_APICS 256 #else -/* - * A maximum of 255 APICs with the current APIC ID architecture. - */ -# define MAX_APICS 255 +# if NR_CPUS <= 255 +# define MAX_APICS 255 +# else +# define MAX_APICS 32768 +# endif #endif struct intel_mp_floating { -- 2.20.1