Thread (4 messages) flat view 4 messages, 4 authors, 2021-08-04

Re: [PATCH] ARM: Fix Keystone 2 kernel mapping regression

From: "Russell King (Oracle)" <linux@armlinux.org.uk>
Date: 2021-08-04 14:14:58

Hi Linus,

Looks fine. An improvement:

On Wed, Aug 04, 2021 at 03:57:47PM +0200, Linus Walleij wrote:
quoted hunk ↗ jump to hunk
@@ -250,7 +253,12 @@ __create_page_tables:
 	add	r0, r4, #KERNEL_OFFSET >> (SECTION_SHIFT - PMD_ORDER)
 	ldr	r6, =(_end - 1)
 	adr_l	r5, kernel_sec_start		@ _pa(kernel_sec_start)
-	str	r8, [r5]			@ Save physical start of kernel
+#ifdef CONFIG_CPU_ENDIAN_BE8
+	add	r5, r5, #4			@ Move to the upper 32bit word
+	str	r8, [r5]			@ Save physical start of kernel (BE)
These two instructions can simply be replaced with:

	str	r8, [r5, #4]
quoted hunk ↗ jump to hunk
+#else
+	str	r8, [r5]			@ Save physical start of kernel (LE)
+#endif
 	orr	r3, r8, r7			@ Add the MMU flags
 	add	r6, r4, r6, lsr #(SECTION_SHIFT - PMD_ORDER)
 1:	str	r3, [r0], #1 << PMD_ORDER
@@ -259,7 +267,12 @@ __create_page_tables:
 	bls	1b
 	eor	r3, r3, r7			@ Remove the MMU flags
 	adr_l	r5, kernel_sec_end		@ _pa(kernel_sec_end)
-	str	r3, [r5]			@ Save physical end of kernel
+#ifdef CONFIG_CPU_ENDIAN_BE8
+	add	r5, r5, #4			@ Move to the upper 32bit word
+	str	r8, [r5]			@ Save physical end of kernel (BE)
Same here.

The patch can still usefully be tested by Nishanth without these
changes... it'll tell us if this was indeed the issue.

Thanks!

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help