diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-01-30 21:36:17 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-05 16:27:54 -0500 |
commit | 65a4e574d2382d83f71b30ea92f86d2e40a6ef8d (patch) | |
tree | d265ad2f64a3ae35ee3a9ad43b8c55b0e87f6c99 /init/main.c | |
parent | d8106d2e24d54497233ca9cd97fa9bec807de458 (diff) |
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/main.c')
-rw-r--r-- | init/main.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/init/main.c b/init/main.c index bfe4fb0c9842..6441083f8273 100644 --- a/init/main.c +++ b/init/main.c | |||
@@ -136,14 +136,14 @@ unsigned int __initdata setup_max_cpus = NR_CPUS; | |||
136 | * greater than 0, limits the maximum number of CPUs activated in | 136 | * greater than 0, limits the maximum number of CPUs activated in |
137 | * SMP mode to <NUM>. | 137 | * SMP mode to <NUM>. |
138 | */ | 138 | */ |
139 | #ifndef CONFIG_X86_IO_APIC | 139 | |
140 | static inline void disable_ioapic_setup(void) {}; | 140 | void __weak arch_disable_smp_support(void) { } |
141 | #endif | ||
142 | 141 | ||
143 | static int __init nosmp(char *str) | 142 | static int __init nosmp(char *str) |
144 | { | 143 | { |
145 | setup_max_cpus = 0; | 144 | setup_max_cpus = 0; |
146 | disable_ioapic_setup(); | 145 | arch_disable_smp_support(); |
146 | |||
147 | return 0; | 147 | return 0; |
148 | } | 148 | } |
149 | 149 | ||
@@ -153,14 +153,14 @@ static int __init maxcpus(char *str) | |||
153 | { | 153 | { |
154 | get_option(&str, &setup_max_cpus); | 154 | get_option(&str, &setup_max_cpus); |
155 | if (setup_max_cpus == 0) | 155 | if (setup_max_cpus == 0) |
156 | disable_ioapic_setup(); | 156 | arch_disable_smp_support(); |
157 | 157 | ||
158 | return 0; | 158 | return 0; |
159 | } | 159 | } |
160 | 160 | ||
161 | early_param("maxcpus", maxcpus); | 161 | early_param("maxcpus", maxcpus); |
162 | #else | 162 | #else |
163 | #define setup_max_cpus NR_CPUS | 163 | const unsigned int setup_max_cpus = NR_CPUS; |
164 | #endif | 164 | #endif |
165 | 165 | ||
166 | /* | 166 | /* |