diff options
author | Jack Steiner <steiner@sgi.com> | 2008-06-19 22:51:05 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-08 06:23:28 -0400 |
commit | b6df1b8bc1250191cfee15627697111c1cbda53f (patch) | |
tree | b5991eafa0f5f4e155921bd10d4f44696c271b8d /arch/x86/kernel/smpboot.c | |
parent | d400524affeb84bdfc2b00cd561fbfb8c09dadd7 (diff) |
x86: fix stack overflow for large values of MAX_APICS
physid_mask_of_physid() causes a huge stack (12k) to be created if the
number of APICS is large. Replace physid_mask_of_physid() with a
new function that does not create large stacks. This is a problem only
on large x86_64 systems.
this paves the way to increase MAX_APICS.
Signed-off-by: Jack Steiner <steiner@sgi.com>
Cc: linux-mm@kvack.org
Cc: mingo@elte.hu
Cc: tglx@linutronix.de
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/x86/kernel/smpboot.c')
-rw-r--r-- | arch/x86/kernel/smpboot.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 3e1cecedde42..664a5db36d40 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c | |||
@@ -1091,10 +1091,9 @@ static __init void disable_smp(void) | |||
1091 | smpboot_clear_io_apic_irqs(); | 1091 | smpboot_clear_io_apic_irqs(); |
1092 | #endif | 1092 | #endif |
1093 | if (smp_found_config) | 1093 | if (smp_found_config) |
1094 | phys_cpu_present_map = | 1094 | physid_set_mask_of_physid(boot_cpu_physical_apicid, &phys_cpu_present_map); |
1095 | physid_mask_of_physid(boot_cpu_physical_apicid); | ||
1096 | else | 1095 | else |
1097 | phys_cpu_present_map = physid_mask_of_physid(0); | 1096 | physid_set_mask_of_physid(0, &phys_cpu_present_map); |
1098 | map_cpu_to_logical_apicid(); | 1097 | map_cpu_to_logical_apicid(); |
1099 | cpu_set(0, per_cpu(cpu_sibling_map, 0)); | 1098 | cpu_set(0, per_cpu(cpu_sibling_map, 0)); |
1100 | cpu_set(0, per_cpu(cpu_core_map, 0)); | 1099 | cpu_set(0, per_cpu(cpu_core_map, 0)); |