Skip to contentSkip to conversation

ARM: NOMMU: Reload __secondary_data after PROCINFO_INITFUNC

PATCH In review Vladimir Murzin 2 participants 3 messages Nov 25, 2021 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: NOMMU: Reload __secondary_data after PROCINFO_INITFUNC

__secondary_data used to reside in r7 around call to PROCINFO_INITFUNC. After commit 95731b8ee63e ("ARM: 9059/1: cache-v7:
get rid of mini-stack") r7 is used as a scratch register, so we have to reload __secondary_data before we setup the stack pointer.

Fixes 95731b8ee63ec9419822a51cd9878fa32582fdd2 ("ARM: 9059/1: cache-v7: get rid of mini-stack")
---
 arch/arm/kernel/head-nommu.S | 1 +
 1 file changed, 1 insertion(+)
arch/arm/kernel/head-nommu.S +1 -0
index 0fc814b..8796a69 100644
@@ -114,6 +114,7 @@ ENTRY(secondary_startup)
 	add	r12, r12, r10
 	ret	r12
 1:	bl	__after_proc_init
+	ldr	r7, __secondary_data		@ reload r7
 	ldr	sp, [r7, #12]			@ set up the stack pointer
 	mov	fp, #0
 	b	secondary_start_kernel
Signature · 7 lines
2.7.4


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#1 lore raw
Quoted 6 lines · Vladimir Murzin

__secondary_data used to reside in r7 around call to PROCINFO_INITFUNC. After commit 95731b8ee63e ("ARM: 9059/1: cache-v7:
get rid of mini-stack") r7 is used as a scratch register, so we have to reload __secondary_data before we setup the stack pointer.

Fixes 95731b8ee63ec9419822a51cd9878fa32582fdd2 ("ARM: 9059/1: cache-v7: get rid of mini-stack")

Documentation/process/submitting-patches.rst requests only 12 digits for the sha1 in the fixes line, which makes this:

Fixes 95731b8ee63e ("ARM: 9059/1: cache-v7: get rid of mini-stack")

and avoids it being unnecessarily long. Please make that change before sending it to the patch system, thanks.

Other than that, patch looks good, thanks.

Quoted 27 lines
---
 arch/arm/kernel/head-nommu.S | 1 +
 1 file changed, 1 insertion(+)
arch/arm/kernel/head-nommu.S +1 -0
index 0fc814b..8796a69 100644
@@ -114,6 +114,7 @@ ENTRY(secondary_startup)
 	add	r12, r12, r10
 	ret	r12
 1:	bl	__after_proc_init
+	ldr	r7, __secondary_data		@ reload r7
 	ldr	sp, [r7, #12]			@ set up the stack pointer
 	mov	fp, #0
 	b	secondary_start_kernel
Signature · 7 lines
2.7.4


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 7 lines
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
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#2 lore raw
Quoted 8 lines · Russell King (Oracle)
Quoted 6 lines · Vladimir Murzin

__secondary_data used to reside in r7 around call to PROCINFO_INITFUNC. After commit 95731b8ee63e ("ARM: 9059/1: cache-v7:
get rid of mini-stack") r7 is used as a scratch register, so we have to reload __secondary_data before we setup the stack pointer.

Fixes 95731b8ee63ec9419822a51cd9878fa32582fdd2 ("ARM: 9059/1: cache-v7: get rid of mini-stack")
Quoted 7 lines

Documentation/process/submitting-patches.rst requests only 12 digits for the sha1 in the fixes line, which makes this:

Fixes 95731b8ee63e ("ARM: 9059/1: cache-v7: get rid of mini-stack")

and avoids it being unnecessarily long. Please make that change before sending it to the patch system, thanks.

Done.

Quoted 2 lines

Other than that, patch looks good, thanks.

Thanks for prompt feedback!

Cheers
Vladimir

Quoted 23 lines
Quoted 23 lines
---
 arch/arm/kernel/head-nommu.S | 1 +
 1 file changed, 1 insertion(+)
arch/arm/kernel/head-nommu.S +1 -0
index 0fc814b..8796a69 100644
@@ -114,6 +114,7 @@ ENTRY(secondary_startup)
 	add	r12, r12, r10
 	ret	r12
 1:	bl	__after_proc_init
+	ldr	r7, __secondary_data		@ reload r7
 	ldr	sp, [r7, #12]			@ set up the stack pointer
 	mov	fp, #0
 	b	secondary_start_kernel
Signature · 1 line
2.7.4
Quoted 6 lines
Quoted 5 lines

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel