Skip to contentSkip to conversation

ARM: handle CONFIG_CPU_ENDIAN_BE32 in arch/arm/kernel/head.S

PATCH In review Corentin Labbe 2 participants 4 messages Sep 29, 2021 – Oct 13, 2021 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: handle CONFIG_CPU_ENDIAN_BE32 in arch/arm/kernel/head.S

My intel-ixp42x-welltech-epbx100 no longer boot since 4.14. This is due to commit 463dbba4d189 ("ARM: 9104/2: Fix Keystone 2 kernel mapping regression")
which forgot to handle CONFIG_CPU_ENDIAN_BE32 as possible BE config.

Fixes 463dbba4d189 ("ARM: 9104/2: Fix Keystone 2 kernel mapping regression")
---
 arch/arm/kernel/head.S | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/kernel/head.S +2 -2
index 29070eb8df7d..3fc7f9750ce4 100644
@@ -253,7 +253,7 @@ __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)
-#ifdef CONFIG_CPU_ENDIAN_BE8
+#if defined CONFIG_CPU_ENDIAN_BE8 || defined CONFIG_CPU_ENDIAN_BE32
 	str	r8, [r5, #4]			@ Save physical start of kernel (BE)
 #else
 	str	r8, [r5]			@ Save physical start of kernel (LE)
@@ -266,7 +266,7 @@ __create_page_tables:
 	bls	1b
 	eor	r3, r3, r7			@ Remove the MMU flags
 	adr_l	r5, kernel_sec_end		@ _pa(kernel_sec_end)
-#ifdef CONFIG_CPU_ENDIAN_BE8
+#if defined CONFIG_CPU_ENDIAN_BE8 || defined CONFIG_CPU_ENDIAN_BE32
 	str	r3, [r5, #4]			@ Save physical end of kernel (BE)
 #else
 	str	r3, [r5]			@ Save physical end of kernel (LE)
Signature · 1 line
2.32.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 8 lines · Corentin Labbe

My intel-ixp42x-welltech-epbx100 no longer boot since 4.14. This is due to commit 463dbba4d189 ("ARM: 9104/2: Fix Keystone 2 kernel mapping regression")
which forgot to handle CONFIG_CPU_ENDIAN_BE32 as possible BE config.

Fixes 463dbba4d189 ("ARM: 9104/2: Fix Keystone 2 kernel mapping regression")

Good catch!

Please put this into Russell's patch tracker.

Yours,
Linus Walleij

#2 lore raw
Quoted 8 lines · Linus Walleij
Quoted 5 lines · Corentin Labbe

My intel-ixp42x-welltech-epbx100 no longer boot since 4.14. This is due to commit 463dbba4d189 ("ARM: 9104/2: Fix Keystone 2 kernel mapping regression")
which forgot to handle CONFIG_CPU_ENDIAN_BE32 as possible BE config.

Quoted 8 lines
Quoted 3 lines
Fixes 463dbba4d189 ("ARM: 9104/2: Fix Keystone 2 kernel mapping regression")

Good catch!

Please put this into Russell's patch tracker.

hello

How to achieve that ?
Do you mean https://www.arm.linux.org.uk/developer/patches/add.php ?

Regards

#3 lore raw
Quoted 16 lines · Corentin Labbe
Quoted 15 lines · Linus Walleij
Quoted 8 lines · Corentin Labbe

My intel-ixp42x-welltech-epbx100 no longer boot since 4.14. This is due to commit 463dbba4d189 ("ARM: 9104/2: Fix Keystone 2 kernel mapping regression")
which forgot to handle CONFIG_CPU_ENDIAN_BE32 as possible BE config.

Fixes 463dbba4d189 ("ARM: 9104/2: Fix Keystone 2 kernel mapping regression")

Good catch!

Quoted 6 lines
Quoted 1 line

Please put this into Russell's patch tracker.

hello

How to achieve that ?
Do you mean https://www.arm.linux.org.uk/developer/patches/add.php ?

Yes you need an account and the submit the patches using mail or the web interface.

If it seems troublesome for you, tell me and I can sign it off and put it into the system.

Yours,
Linus Walleij