From: Prarit Bhargava <prarit@redhat.com> Date: Tue, 15 Jul 2008 19:00:15 -0400 Subject: [x86_64] don't call MP_processor_info for disabled cpu Message-id: 20080715225937.11961.5394.sendpatchset@prarit.bos.redhat.com O-Subject: [RHEL5 PATCH]: don't call MP_processor_info for disabled cpu (64bit) Bugzilla: 455427 RH-Acked-by: Brian Maly <bmaly@redhat.com> Backport of 8ccab29ca8c441ae00d878d2f0000275f430f8a5 x86: don't call MP_processor_info for disabled cpu (64bit) Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Ingo Molnar <mingo@elte.hu> ... and fix a bug with the declaration of disabled_cpus which should be __cpuinitdata. Successfully tested by me. Resolves BZ 455427 diff --git a/arch/x86_64/kernel/mpparse.c b/arch/x86_64/kernel/mpparse.c index a1ab419..a3f7db8 100644 --- a/arch/x86_64/kernel/mpparse.c +++ b/arch/x86_64/kernel/mpparse.c @@ -66,7 +66,7 @@ unsigned int boot_cpu_id = -1U; /* Internal processor count */ unsigned int num_processors __initdata = 0; -unsigned disabled_cpus __initdata; +unsigned disabled_cpus __cpuinitdata; /* Bitmask of physically existing CPUs */ physid_mask_t phys_cpu_present_map = PHYSID_MASK_NONE; @@ -694,6 +694,12 @@ void __cpuinit mp_register_lapic ( struct mpc_config_processor processor; int boot_cpu = 0; + + if (!enabled) { + ++disabled_cpus; + return; + } + if (id >= MAX_APICS) { printk(KERN_WARNING "Processor #%d invalid (max %d)\n", id, MAX_APICS);