linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] powerpc/mpc85xx: also write addr_h to spin table for 64bit boot entry
@ 2019-11-25 15:15 yingjie_bai
  2019-12-19 23:54 ` Scott Wood
  2019-12-22  9:38 ` Michael Ellerman
  0 siblings, 2 replies; 10+ messages in thread
From: yingjie_bai @ 2019-11-25 15:15 UTC (permalink / raw)
  To: Scott Wood, Kumar Gala
  Cc: Benjamin Herrenschmidt, Paul Mackerras, Michael Ellerman,
	linuxppc-dev, linux-kernel, Bai Yingjie

From: Bai Yingjie <byj.tea@gmail.com>

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.

This should do no harm for normal case where addr_h is all 0.

Signed-off-by: Bai Yingjie <byj.tea@gmail.com>
---
 arch/powerpc/platforms/85xx/smp.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/arch/powerpc/platforms/85xx/smp.c b/arch/powerpc/platforms/85xx/smp.c
index 8c7ea2486bc0..f12cdd1e80ff 100644
--- a/arch/powerpc/platforms/85xx/smp.c
+++ b/arch/powerpc/platforms/85xx/smp.c
@@ -252,6 +252,14 @@ static int smp_85xx_start_cpu(int cpu)
 	out_be64((u64 *)(&spin_table->addr_h),
 		__pa(ppc_function_entry(generic_secondary_smp_init)));
 #else
+	/*
+	 * 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.
+	 * This does no harm for normal case where addr_h is all 0.
+	 */
+	out_be32(&spin_table->addr_h, __pa(__early_start) >> 32);
 	out_be32(&spin_table->addr_l, __pa(__early_start));
 #endif
 	flush_spin_table(spin_table);
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-01-06  5:39 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-25 15:15 [PATCH] powerpc/mpc85xx: also write addr_h to spin table for 64bit boot entry yingjie_bai
2019-12-19 23:54 ` Scott Wood
2019-12-22  9:38 ` Michael Ellerman
2019-12-24  1:35   ` Yingjie Bai
2019-12-25  1:23     ` Scott Wood
2019-12-25  3:24       ` Yingjie Bai
2019-12-25  6:51         ` Scott Wood
2019-12-25  7:19           ` Yingjie Bai
2019-12-30  7:41             ` Yingjie Bai
2020-01-06  5:38               ` Yingjie Bai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).