Skip to contentSkip to conversation

ARM: fix v7-M setup stack location

PATCH New Rabin Vincent 2 participants 2 messages Apr 21, 2014 – Apr 28, 2014 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: fix v7-M setup stack location

__v7m_setup_stack currently sits in the .proc.info.init section, and thus creates a bogus proc info entry (which by the way matches any unknown CPU IDs, due to the entry's mask being 0). Move it out of there.

---
 arch/arm/mm/proc-v7m.S | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
arch/arm/mm/proc-v7m.S +5 -3
index 0c93588..1ca37c7 100644
@@ -123,6 +123,11 @@ __v7m_setup:
 	mov	pc, lr
 ENDPROC(__v7m_setup)
 
+	.align 2
+__v7m_setup_stack:
+	.space	4 * 8				@ 8 registers
+__v7m_setup_stack_top:
+
 	define_processor_functions v7m, dabort=nommu_early_abort, pabort=legacy_pabort, nommu=1
 
 	.section ".rodata"
@@ -152,6 +157,3 @@ __v7m_proc_info:
 	.long	nop_cache_fns		@ proc_info_list.cache
 	.size	__v7m_proc_info, . - __v7m_proc_info
 
-__v7m_setup_stack:
-	.space	4 * 8				@ 8 registers
-__v7m_setup_stack_top:
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 ARM: fix v7-M setup stack location

Hello,

Quoted 6 lines · Rabin Vincent

__v7m_setup_stack currently sits in the .proc.info.init section, and thus creates a bogus proc info entry (which by the way matches any unknown CPU IDs, due to the entry's mask being 0). Move it out of there.

It seems the unpatched code didn't do any harm as long as you boot the resulting kernel on a v7-M machine. So I'd say it's not a very urgent fix and getting it in during the next merge window is just fine.

Best regards
Uwe

Signature · 2 lines
Pengutronix e.K.                           | Uwe Kleine-K?nig            |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |