aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlauber de Oliveira Costa <gcosta@redhat.com>2008-03-19 13:26:10 -0400
committerIngo Molnar <mingo@elte.hu>2008-04-17 11:41:04 -0400
commit9f3734f631267d2f36008833b62670ca342ac000 (patch)
treead9a7b6c1b0ab765556df7b8716effb7d148ffd8
parent771263d31114adb5e234364a58280c876c2ed182 (diff)
x86: introduce smpboot_clear_io_apic
x86_64 has two nr_ioapics = 0 statements. In 32-bit, it can be done too. We do it through the smpboot_clear_io_apic() inline function, to cope with subarchitectures (visws) that does not compile mpparse in Signed-off-by: Glauber Costa <gcosta@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
-rw-r--r--arch/x86/kernel/smpboot_32.c2
-rw-r--r--arch/x86/kernel/smpboot_64.c4
-rw-r--r--include/asm-x86/mach-default/smpboot_hooks.h5
-rw-r--r--include/asm-x86/mach-visws/smpboot_hooks.h4
4 files changed, 13 insertions, 2 deletions
diff --git a/arch/x86/kernel/smpboot_32.c b/arch/x86/kernel/smpboot_32.c
index ae23b603978c..5a0f57f35191 100644
--- a/arch/x86/kernel/smpboot_32.c
+++ b/arch/x86/kernel/smpboot_32.c
@@ -155,6 +155,7 @@ static int __init smp_sanity_check(unsigned max_cpus)
155 printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n", 155 printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n",
156 boot_cpu_physical_apicid); 156 boot_cpu_physical_apicid);
157 printk(KERN_ERR "... forcing use of dummy APIC emulation. (tell your hw vendor)\n"); 157 printk(KERN_ERR "... forcing use of dummy APIC emulation. (tell your hw vendor)\n");
158 smpboot_clear_io_apic();
158 return -1; 159 return -1;
159 } 160 }
160 161
@@ -173,6 +174,7 @@ static int __init smp_sanity_check(unsigned max_cpus)
173 setup_local_APIC(); 174 setup_local_APIC();
174 end_local_APIC_setup(); 175 end_local_APIC_setup();
175 } 176 }
177 smpboot_clear_io_apic();
176 return -1; 178 return -1;
177 } 179 }
178 return 0; 180 return 0;
diff --git a/arch/x86/kernel/smpboot_64.c b/arch/x86/kernel/smpboot_64.c
index c66fb15b0131..775244545ffa 100644
--- a/arch/x86/kernel/smpboot_64.c
+++ b/arch/x86/kernel/smpboot_64.c
@@ -134,7 +134,7 @@ static int __init smp_sanity_check(unsigned max_cpus)
134 printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n", 134 printk(KERN_ERR "BIOS bug, local APIC #%d not detected!...\n",
135 boot_cpu_physical_apicid); 135 boot_cpu_physical_apicid);
136 printk(KERN_ERR "... forcing use of dummy APIC emulation. (tell your hw vendor)\n"); 136 printk(KERN_ERR "... forcing use of dummy APIC emulation. (tell your hw vendor)\n");
137 nr_ioapics = 0; 137 smpboot_clear_io_apic();
138 return -1; 138 return -1;
139 } 139 }
140 140
@@ -145,7 +145,7 @@ static int __init smp_sanity_check(unsigned max_cpus)
145 */ 145 */
146 if (!max_cpus) { 146 if (!max_cpus) {
147 printk(KERN_INFO "SMP mode deactivated, forcing use of dummy APIC emulation.\n"); 147 printk(KERN_INFO "SMP mode deactivated, forcing use of dummy APIC emulation.\n");
148 nr_ioapics = 0; 148 smpboot_clear_io_apic();
149 return -1; 149 return -1;
150 } 150 }
151 151
diff --git a/include/asm-x86/mach-default/smpboot_hooks.h b/include/asm-x86/mach-default/smpboot_hooks.h
index 8e1c6c06d057..3ff2c5bff93a 100644
--- a/include/asm-x86/mach-default/smpboot_hooks.h
+++ b/include/asm-x86/mach-default/smpboot_hooks.h
@@ -44,3 +44,8 @@ static inline void smpboot_setup_io_apic(void)
44 else 44 else
45 nr_ioapics = 0; 45 nr_ioapics = 0;
46} 46}
47
48static inline void smpboot_clear_io_apic(void)
49{
50 nr_ioapics = 0;
51}
diff --git a/include/asm-x86/mach-visws/smpboot_hooks.h b/include/asm-x86/mach-visws/smpboot_hooks.h
index d926471fa359..c9b83e395a2e 100644
--- a/include/asm-x86/mach-visws/smpboot_hooks.h
+++ b/include/asm-x86/mach-visws/smpboot_hooks.h
@@ -22,3 +22,7 @@ static inline void smpboot_restore_warm_reset_vector(void)
22static inline void smpboot_setup_io_apic(void) 22static inline void smpboot_setup_io_apic(void)
23{ 23{
24} 24}
25
26static inline void smpboot_clear_io_apic(void)
27{
28}