[PATCH] ARM: Fix Keystone 2 kernel mapping regression
Russell King (Oracle)
linux at armlinux.org.uk
Wed Aug 4 07:10:42 PDT 2021
Hi Linus,
Looks fine. An improvement:
On Wed, Aug 04, 2021 at 03:57:47PM +0200, Linus Walleij wrote:
> @@ -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]
> +#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!
More information about the linux-arm-kernel
mailing list