summaryrefslogtreecommitdiff
path: root/arch/powerpc/cpu/mpc8xxx/fdt.c
diff options
context:
space:
mode:
authorYork Sun <yorksun@freescale.com>2012-08-17 08:20:26 +0000
committerAndy Fleming <afleming@freescale.com>2012-08-23 12:16:55 -0500
commit709389b654de05fd6035656f5e082ba1757807b3 (patch)
tree1fee7e92d8155b20351a59eb51ef7d36e337a6f0 /arch/powerpc/cpu/mpc8xxx/fdt.c
parentffdf8890ae2564e8b5af36b1b384ca7e9bcdd7c2 (diff)
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/mpc8xxx/fdt.c')
-rw-r--r--arch/powerpc/cpu/mpc8xxx/fdt.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c
index 09810be7d3..32ab050962 100644
--- a/arch/powerpc/cpu/mpc8xxx/fdt.c
+++ b/arch/powerpc/cpu/mpc8xxx/fdt.c
@@ -62,8 +62,9 @@ void ft_fixup_num_cores(void *blob) {
off = fdt_node_offset_by_prop_value(blob, -1, "device_type", "cpu", 4);
while (off != -FDT_ERR_NOTFOUND) {
u32 *reg = (u32 *)fdt_getprop(blob, off, "reg", 0);
+ u32 phys_cpu_id = thread_to_core(*reg);
- if (!is_core_valid(*reg) || is_core_disabled(*reg)) {
+ if (!is_core_valid(phys_cpu_id) || is_core_disabled(phys_cpu_id)) {
int ph = fdt_get_phandle(blob, off);
/* Delete the cpu node once there are no cpu handles */