Skip to content

Commit

Permalink
powerpc/mpc85xx: also write addr_h to spin table for 64bit boot entry
Browse files Browse the repository at this point in the history
CPU like P4080 has 36bit physical address, its DDR physical
start address can be configured above 4G by LAW registers.

For such systems in which their physical memory start address was
configured higher than 4G, we need also to write addr_h into the spin
table of the target secondary CPU, so that addr_h and addr_l together
represent a 64bit physical address.
Otherwise the secondary core can not get correct entry to start from.

Signed-off-by: Bai Yingjie <[email protected]>
Acked-by: Scott Wood <[email protected]>
Signed-off-by: Michael Ellerman <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
  • Loading branch information
Bai-Yingjie authored and mpe committed Jan 7, 2020
1 parent 6ad4afc commit eeb0991
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions arch/powerpc/platforms/85xx/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,15 @@ static int smp_85xx_start_cpu(int cpu)
out_be64((u64 *)(&spin_table->addr_h),
__pa(ppc_function_entry(generic_secondary_smp_init)));
#else
#ifdef CONFIG_PHYS_ADDR_T_64BIT
/*
* We need also to write addr_h to spin table for systems
* in which their physical memory start address was configured
* to above 4G, otherwise the secondary core can not get
* correct entry to start from.
*/
out_be32(&spin_table->addr_h, __pa(__early_start) >> 32);
#endif
out_be32(&spin_table->addr_l, __pa(__early_start));
#endif
flush_spin_table(spin_table);
Expand Down

0 comments on commit eeb0991

Please sign in to comment.