summaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu/mpc85xx/fdt.c
diff options
context:
space:
mode:
authorYork Sun <yorksun@freescale.com>2012-08-17 08:20:26 (GMT)
committerAndy Fleming <afleming@freescale.com>2012-08-23 17:16:55 (GMT)
commit709389b654de05fd6035656f5e082ba1757807b3 (patch)
tree1fee7e92d8155b20351a59eb51ef7d36e337a6f0 /arch/powerpc/cpu/mpc85xx/fdt.c
parentffdf8890ae2564e8b5af36b1b384ca7e9bcdd7c2 (diff)
downloadu-boot-709389b654de05fd6035656f5e082ba1757807b3.tar.xz
powerpc/mpc8xxx: fix core id for multicore booting
For the cores with multiple threads, we need to figure out which physical core a thread belongs. To match the core ids, update PIR registers and spin tables. Signed-off-by: York Sun <yorksun@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Andy Fleming <afleming@freescale.com>
Diffstat (limited to 'arch/powerpc/cpu/mpc85xx/fdt.c')
-rw-r--r--arch/powerpc/cpu/mpc85xx/fdt.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/arch/powerpc/cpu/mpc85xx/fdt.c b/arch/powerpc/cpu/mpc85xx/fdt.c
index 2ef2078..a0a9b4c 100644
--- a/arch/powerpc/cpu/mpc85xx/fdt.c
+++ b/arch/powerpc/cpu/mpc85xx/fdt.c
@@ -57,8 +57,9 @@ void ft_fixup_cpu(void *blob, u64 memory_limit)
u32 *reg = (u32 *)fdt_getprop(blob, off, "reg", 0);
if (reg) {
- u64 val = *reg * SIZE_BOOT_ENTRY + spin_tbl_addr;
- val = cpu_to_fdt32(val);
+ u32 phys_cpu_id = thread_to_core(*reg);
+ u64 val = phys_cpu_id * SIZE_BOOT_ENTRY + spin_tbl_addr;
+ val = cpu_to_fdt64(val);
if (*reg == id) {
fdt_setprop_string(blob, off, "status",
"okay");