diff options
Diffstat (limited to 'arch/powerpc/platforms/85xx/smp.c')
-rw-r--r-- | arch/powerpc/platforms/85xx/smp.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c index 5b9b901f6443..2df4785ffd4e 100644 --- a/arch/powerpc/platforms/85xx/smp.c +++ b/arch/powerpc/platforms/85xx/smp.c | |||
@@ -48,10 +48,11 @@ smp_85xx_kick_cpu(int nr) | |||
48 | const u64 *cpu_rel_addr; | 48 | const u64 *cpu_rel_addr; |
49 | __iomem u32 *bptr_vaddr; | 49 | __iomem u32 *bptr_vaddr; |
50 | struct device_node *np; | 50 | struct device_node *np; |
51 | int n = 0; | 51 | int n = 0, hw_cpu = get_hard_smp_processor_id(nr); |
52 | int ioremappable; | 52 | int ioremappable; |
53 | 53 | ||
54 | WARN_ON (nr < 0 || nr >= NR_CPUS); | 54 | WARN_ON(nr < 0 || nr >= NR_CPUS); |
55 | WARN_ON(hw_cpu < 0 || hw_cpu >= NR_CPUS); | ||
55 | 56 | ||
56 | pr_debug("smp_85xx_kick_cpu: kick CPU #%d\n", nr); | 57 | pr_debug("smp_85xx_kick_cpu: kick CPU #%d\n", nr); |
57 | 58 | ||
@@ -79,7 +80,7 @@ smp_85xx_kick_cpu(int nr) | |||
79 | 80 | ||
80 | local_irq_save(flags); | 81 | local_irq_save(flags); |
81 | 82 | ||
82 | out_be32(bptr_vaddr + BOOT_ENTRY_PIR, nr); | 83 | out_be32(bptr_vaddr + BOOT_ENTRY_PIR, hw_cpu); |
83 | #ifdef CONFIG_PPC32 | 84 | #ifdef CONFIG_PPC32 |
84 | out_be32(bptr_vaddr + BOOT_ENTRY_ADDR_LOWER, __pa(__early_start)); | 85 | out_be32(bptr_vaddr + BOOT_ENTRY_ADDR_LOWER, __pa(__early_start)); |
85 | 86 | ||
@@ -88,7 +89,7 @@ smp_85xx_kick_cpu(int nr) | |||
88 | (ulong)(bptr_vaddr + SIZE_BOOT_ENTRY)); | 89 | (ulong)(bptr_vaddr + SIZE_BOOT_ENTRY)); |
89 | 90 | ||
90 | /* Wait a bit for the CPU to ack. */ | 91 | /* Wait a bit for the CPU to ack. */ |
91 | while ((__secondary_hold_acknowledge != nr) && (++n < 1000)) | 92 | while ((__secondary_hold_acknowledge != hw_cpu) && (++n < 1000)) |
92 | mdelay(1); | 93 | mdelay(1); |
93 | #else | 94 | #else |
94 | smp_generic_kick_cpu(nr); | 95 | smp_generic_kick_cpu(nr); |
@@ -206,7 +207,7 @@ static void mpc85xx_smp_machine_kexec(struct kimage *image) | |||
206 | if ( !timeout ) | 207 | if ( !timeout ) |
207 | printk(KERN_ERR "Unable to bring down secondary cpu(s)"); | 208 | printk(KERN_ERR "Unable to bring down secondary cpu(s)"); |
208 | 209 | ||
209 | for (i = 0; i < num_cpus; i++) | 210 | for_each_online_cpu(i) |
210 | { | 211 | { |
211 | if ( i == smp_processor_id() ) continue; | 212 | if ( i == smp_processor_id() ) continue; |
212 | mpic_reset_core(i); | 213 | mpic_reset_core(i); |
@@ -243,6 +244,7 @@ void __init mpc85xx_smp_init(void) | |||
243 | * If left NULL, .message_pass defaults to | 244 | * If left NULL, .message_pass defaults to |
244 | * smp_muxed_ipi_message_pass | 245 | * smp_muxed_ipi_message_pass |
245 | */ | 246 | */ |
247 | smp_85xx_ops.message_pass = NULL; | ||
246 | smp_85xx_ops.cause_ipi = doorbell_cause_ipi; | 248 | smp_85xx_ops.cause_ipi = doorbell_cause_ipi; |
247 | } | 249 | } |
248 | 250 | ||