summaryrefslogtreecommitdiffstats
path: root/init
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2009-01-31 03:36:17 +0100
committerIngo Molnar <mingo@elte.hu>2009-02-05 22:27:54 +0100
commit65a4e574d2382d83f71b30ea92f86d2e40a6ef8d (patch)
treed265ad2f64a3ae35ee3a9ad43b8c55b0e87f6c99 /init
parentd8106d2e24d54497233ca9cd97fa9bec807de458 (diff)
downloadop-kernel-dev-65a4e574d2382d83f71b30ea92f86d2e40a6ef8d.zip
op-kernel-dev-65a4e574d2382d83f71b30ea92f86d2e40a6ef8d.tar.gz
smp, generic: introduce arch_disable_smp_support() instead of disable_ioapic_setup()
Impact: cleanup disable_ioapic_setup() in init/main.c is ugly as the function is x86-specific. The #ifdef inline prototype there is ugly too. Replace it with a generic arch_disable_smp_support() function - which has a weak alias for non-x86 architectures and for non-ioapic x86 builds. Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'init')
-rw-r--r--init/main.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/init/main.c b/init/main.c
index bfe4fb0..6441083 100644
--- a/init/main.c
+++ b/init/main.c
@@ -136,14 +136,14 @@ unsigned int __initdata setup_max_cpus = NR_CPUS;
* greater than 0, limits the maximum number of CPUs activated in
* SMP mode to <NUM>.
*/
-#ifndef CONFIG_X86_IO_APIC
-static inline void disable_ioapic_setup(void) {};
-#endif
+
+void __weak arch_disable_smp_support(void) { }
static int __init nosmp(char *str)
{
setup_max_cpus = 0;
- disable_ioapic_setup();
+ arch_disable_smp_support();
+
return 0;
}
@@ -153,14 +153,14 @@ static int __init maxcpus(char *str)
{
get_option(&str, &setup_max_cpus);
if (setup_max_cpus == 0)
- disable_ioapic_setup();
+ arch_disable_smp_support();
return 0;
}
early_param("maxcpus", maxcpus);
#else
-#define setup_max_cpus NR_CPUS
+const unsigned int setup_max_cpus = NR_CPUS;
#endif
/*
OpenPOWER on IntegriCloud