[PATCH 1/3] powerpc/fsl_booke: replace PAGE_OFFSET with KERNELBASE

Jason Yan yanaijie at huawei.com
Fri Jul 5 16:39:52 AEST 2019


We setup a mapping in PAGE_OFFSET and jump to KERNELBASE. This is not a
problem when PAGE_OFFSET = KERNELBASE. Replace PAGE_OFFSET with
KERNELBASE here to make it consistent.

Signed-off-by: Jason Yan <yanaijie at huawei.com>
---
 arch/powerpc/kernel/fsl_booke_entry_mapping.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/fsl_booke_entry_mapping.S b/arch/powerpc/kernel/fsl_booke_entry_mapping.S
index ea065282b303..235ae622e2ab 100644
--- a/arch/powerpc/kernel/fsl_booke_entry_mapping.S
+++ b/arch/powerpc/kernel/fsl_booke_entry_mapping.S
@@ -171,8 +171,8 @@ skpinv:	addi	r6,r6,1				/* Increment */
 	lis	r6,(MAS1_VALID|MAS1_IPROT)@h
 	ori	r6,r6,(MAS1_TSIZE(BOOK3E_PAGESZ_64M))@l
 	mtspr	SPRN_MAS1,r6
-	lis	r6,MAS2_VAL(PAGE_OFFSET, BOOK3E_PAGESZ_64M, M_IF_NEEDED)@h
-	ori	r6,r6,MAS2_VAL(PAGE_OFFSET, BOOK3E_PAGESZ_64M, M_IF_NEEDED)@l
+	lis	r6,MAS2_VAL(KERNELBASE, BOOK3E_PAGESZ_64M, M_IF_NEEDED)@h
+	ori	r6,r6,MAS2_VAL(KERNELBASE, BOOK3E_PAGESZ_64M, M_IF_NEEDED)@l
 	mtspr	SPRN_MAS2,r6
 	mtspr	SPRN_MAS3,r8
 	tlbwe
-- 
2.17.2



More information about the Linuxppc-dev mailing list