aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorKumar Gala <galak@kernel.crashing.org>2011-10-13 11:13:09 -0400
committerKumar Gala <galak@kernel.crashing.org>2011-10-13 11:19:22 -0400
commit45116806139743cf35baa01a584e5972e5d833f6 (patch)
tree436f27cf1b0de84ec0432b8077953d0fc2e0bf9d /arch/powerpc
parent4559424a0c34f0cb22fa31bc24015a06dc064b32 (diff)
powerpc/85xx: Setup secondary cores PIR with hard SMP id
Normally logical and hard cpu ID are the same, however in same cases like on the P3060 they may differ. Where the logical is 0..5, the hard id goes 0,1,4..7. This can causes issues for places we utilize PIR to index into array like in debug exception handlers for finding the exception stack. Move to setting up PIR with hard_smp_processor_id fixes the issue. Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/platforms/85xx/smp.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c
index d6e47464a0d4..190d111fc117 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);