Re: [PATCH 65/65] powerpc/mm/radix: Cputable update for radix

From
Michael Ellerman <mpe@ellerman.id.au>
Date
2016-04-01 06:25:08
Reply to
Aneesh Kumar K.V, 2016-03-27
On Sun, 2016-03-27 at 13:54 +0530, Aneesh Kumar K.V wrote:
This patch move the existing p9 hash to a different PVR and add
radix feature with p9 PVR. That implies we will not be able to
runtime select P9 hash. With P9 Radix we need to do

* set UPRT = 0 in cpu setup
* set different TLB set count

We ideally want to use ibm,pa-features to enable disable radix. But
we have already done setup cpu by the time we reach pa-features check.

So for now use this hack.

Not-Signed-off-by: Aneesh Kumar K.V [off-list ref]
...
quoted hunk ↗ jump to hunk
diff --git a/arch/powerpc/kernel/cpu_setup_power.S b/arch/powerpc/kernel/cpu_setup_power.S
index 584e119fa8b0..e9b76c651bd1 100644
--- a/arch/powerpc/kernel/cpu_setup_power.S
+++ b/arch/powerpc/kernel/cpu_setup_power.S
@@ -117,6 +117,41 @@ _GLOBAL(__restore_cpu_power9)
 	mtlr	r11
 	blr
 
+_GLOBAL(__setup_cpu_power9_uprt)
+	mflr	r11
+	bl	__init_FSCR
+	bl	__init_hvmode_206
+	mtlr	r11
+	beqlr
+	li	r0,0
+	mtspr	SPRN_LPID,r0
+	mfspr	r3,SPRN_LPCR
+	ori	r3, r3, LPCR_PECEDH
+	oris	r3,r3,(LPCR_UPRT >> 16)
+	bl	__init_LPCR
I don't see why we *have* to initialise this here.

ie. could we do it later in early_init_mmu() or similar ?

cheers
Thread (92 messages) 92 messages, 7 authors, last reply 2018-06-28
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help