diff options
-rw-r--r-- | arch/i386/kernel/mpparse.c | 8 | ||||
-rw-r--r-- | arch/i386/kernel/smpboot.c | 3 | ||||
-rw-r--r-- | arch/i386/mach-voyager/voyager_smp.c | 3 | ||||
-rw-r--r-- | include/asm-i386/smp.h | 2 |
4 files changed, 14 insertions, 2 deletions
diff --git a/arch/i386/kernel/mpparse.c b/arch/i386/kernel/mpparse.c index 788efffa9930..5d0b9a8fc43d 100644 --- a/arch/i386/kernel/mpparse.c +++ b/arch/i386/kernel/mpparse.c | |||
@@ -122,7 +122,7 @@ static int MP_valid_apicid(int apicid, int version) | |||
122 | 122 | ||
123 | static void __init MP_processor_info (struct mpc_config_processor *m) | 123 | static void __init MP_processor_info (struct mpc_config_processor *m) |
124 | { | 124 | { |
125 | int ver, apicid; | 125 | int ver, apicid, cpu, found_bsp = 0; |
126 | physid_mask_t tmp; | 126 | physid_mask_t tmp; |
127 | 127 | ||
128 | if (!(m->mpc_cpuflag & CPU_ENABLED)) | 128 | if (!(m->mpc_cpuflag & CPU_ENABLED)) |
@@ -181,6 +181,7 @@ static void __init MP_processor_info (struct mpc_config_processor *m) | |||
181 | if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { | 181 | if (m->mpc_cpuflag & CPU_BOOTPROCESSOR) { |
182 | Dprintk(" Bootup CPU\n"); | 182 | Dprintk(" Bootup CPU\n"); |
183 | boot_cpu_physical_apicid = m->mpc_apicid; | 183 | boot_cpu_physical_apicid = m->mpc_apicid; |
184 | found_bsp = 1; | ||
184 | } | 185 | } |
185 | 186 | ||
186 | if (num_processors >= NR_CPUS) { | 187 | if (num_processors >= NR_CPUS) { |
@@ -204,6 +205,11 @@ static void __init MP_processor_info (struct mpc_config_processor *m) | |||
204 | return; | 205 | return; |
205 | } | 206 | } |
206 | 207 | ||
208 | if (found_bsp) | ||
209 | cpu = 0; | ||
210 | else | ||
211 | cpu = num_processors - 1; | ||
212 | cpu_set(cpu, cpu_possible_map); | ||
207 | tmp = apicid_to_cpu_present(apicid); | 213 | tmp = apicid_to_cpu_present(apicid); |
208 | physids_or(phys_cpu_present_map, phys_cpu_present_map, tmp); | 214 | physids_or(phys_cpu_present_map, phys_cpu_present_map, tmp); |
209 | 215 | ||
diff --git a/arch/i386/kernel/smpboot.c b/arch/i386/kernel/smpboot.c index 8e950cdff1a0..5e4893d2b9f2 100644 --- a/arch/i386/kernel/smpboot.c +++ b/arch/i386/kernel/smpboot.c | |||
@@ -88,6 +88,8 @@ EXPORT_SYMBOL(cpu_online_map); | |||
88 | cpumask_t cpu_callin_map; | 88 | cpumask_t cpu_callin_map; |
89 | cpumask_t cpu_callout_map; | 89 | cpumask_t cpu_callout_map; |
90 | EXPORT_SYMBOL(cpu_callout_map); | 90 | EXPORT_SYMBOL(cpu_callout_map); |
91 | cpumask_t cpu_possible_map; | ||
92 | EXPORT_SYMBOL(cpu_possible_map); | ||
91 | static cpumask_t smp_commenced_mask; | 93 | static cpumask_t smp_commenced_mask; |
92 | 94 | ||
93 | /* TSC's upper 32 bits can't be written in eariler CPU (before prescott), there | 95 | /* TSC's upper 32 bits can't be written in eariler CPU (before prescott), there |
@@ -1265,6 +1267,7 @@ void __devinit smp_prepare_boot_cpu(void) | |||
1265 | cpu_set(smp_processor_id(), cpu_online_map); | 1267 | cpu_set(smp_processor_id(), cpu_online_map); |
1266 | cpu_set(smp_processor_id(), cpu_callout_map); | 1268 | cpu_set(smp_processor_id(), cpu_callout_map); |
1267 | cpu_set(smp_processor_id(), cpu_present_map); | 1269 | cpu_set(smp_processor_id(), cpu_present_map); |
1270 | cpu_set(smp_processor_id(), cpu_possible_map); | ||
1268 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; | 1271 | per_cpu(cpu_state, smp_processor_id()) = CPU_ONLINE; |
1269 | } | 1272 | } |
1270 | 1273 | ||
diff --git a/arch/i386/mach-voyager/voyager_smp.c b/arch/i386/mach-voyager/voyager_smp.c index 16790b798613..46b0cf4a31e0 100644 --- a/arch/i386/mach-voyager/voyager_smp.c +++ b/arch/i386/mach-voyager/voyager_smp.c | |||
@@ -242,6 +242,8 @@ static cpumask_t smp_commenced_mask = CPU_MASK_NONE; | |||
242 | cpumask_t cpu_callin_map = CPU_MASK_NONE; | 242 | cpumask_t cpu_callin_map = CPU_MASK_NONE; |
243 | cpumask_t cpu_callout_map = CPU_MASK_NONE; | 243 | cpumask_t cpu_callout_map = CPU_MASK_NONE; |
244 | EXPORT_SYMBOL(cpu_callout_map); | 244 | EXPORT_SYMBOL(cpu_callout_map); |
245 | cpumask_t cpu_possible_map = CPU_MASK_ALL; | ||
246 | EXPORT_SYMBOL(cpu_possible_map); | ||
245 | 247 | ||
246 | /* The per processor IRQ masks (these are usually kept in sync) */ | 248 | /* The per processor IRQ masks (these are usually kept in sync) */ |
247 | static __u16 vic_irq_mask[NR_CPUS] __cacheline_aligned; | 249 | static __u16 vic_irq_mask[NR_CPUS] __cacheline_aligned; |
@@ -1910,6 +1912,7 @@ void __devinit smp_prepare_boot_cpu(void) | |||
1910 | { | 1912 | { |
1911 | cpu_set(smp_processor_id(), cpu_online_map); | 1913 | cpu_set(smp_processor_id(), cpu_online_map); |
1912 | cpu_set(smp_processor_id(), cpu_callout_map); | 1914 | cpu_set(smp_processor_id(), cpu_callout_map); |
1915 | cpu_set(smp_processor_id(), cpu_possible_map); | ||
1913 | } | 1916 | } |
1914 | 1917 | ||
1915 | int __devinit | 1918 | int __devinit |
diff --git a/include/asm-i386/smp.h b/include/asm-i386/smp.h index a283738b80b3..13250199976d 100644 --- a/include/asm-i386/smp.h +++ b/include/asm-i386/smp.h | |||
@@ -59,7 +59,7 @@ extern void cpu_uninit(void); | |||
59 | 59 | ||
60 | extern cpumask_t cpu_callout_map; | 60 | extern cpumask_t cpu_callout_map; |
61 | extern cpumask_t cpu_callin_map; | 61 | extern cpumask_t cpu_callin_map; |
62 | #define cpu_possible_map cpu_callout_map | 62 | extern cpumask_t cpu_possible_map; |
63 | 63 | ||
64 | /* We don't mark CPUs online until __cpu_up(), so we need another measure */ | 64 | /* We don't mark CPUs online until __cpu_up(), so we need another measure */ |
65 | static inline int num_booting_cpus(void) | 65 | static inline int num_booting_cpus(void) |