mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH V3] ARM: add missing linker section markup to head-common.S
@ 2013-07-05 18:10 Stephen Warren
  2013-07-05 21:32 ` Russell King - ARM Linux
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Warren @ 2013-07-05 18:10 UTC (permalink / raw)
  To: Russell King
  Cc: Paul Gortmaker, Will Deacon, Joseph Lo, linux-kernel,
	linux-arm-kernel, linux-tegra, Stephen Warren

From: Stephen Warren <swarren@nvidia.com>

Macro __INIT is used to place various code in head-common.S into the init
section. This should be matched by a closing __FINIT. Also, add an
explicit ".text" to ensure subsequent code is placed into the correct
section; __FINIT is simply a closing marker to match __INIT and doesn't
guarantee to revert to .text.

This historically caused no problem, because macro __CPUINIT was used at
the exact location where __FINIT was missing, which then placed following
code into the cpuinit section. However, with commit 22f0a2736 "init.h:
remove __cpuinit sections from the kernel" applied, __CPUINIT becomes a
no-op, thus leaving all this code in the init section, rather than the
regular text section. This caused issues such as secondary CPU boot
failures or crashes.

Signed-off-by: Stephen Warren <swarren@nvidia.com>
Acked-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---
v3: Added .text after __FINIT to force the correct section.
v2: Moved __FINIT after lookup_processor_type, to correctly match the
location of __CPUINIT.
---
 arch/arm/kernel/head-common.S | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm/kernel/head-common.S b/arch/arm/kernel/head-common.S
index 529ce99..47cd974 100644
--- a/arch/arm/kernel/head-common.S
+++ b/arch/arm/kernel/head-common.S
@@ -133,6 +133,9 @@ ENTRY(lookup_processor_type)
 	ldmfd	sp!, {r4 - r6, r9, pc}
 ENDPROC(lookup_processor_type)
 
+	__FINIT
+	.text
+
 /*
  * Read processor ID register (CP#15, CR0), and look up in the linker-built
  * supported processor list.  Note that we can't use the absolute addresses
-- 
1.8.1.5


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-07-05 21:33 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-05 18:10 [PATCH V3] ARM: add missing linker section markup to head-common.S Stephen Warren
2013-07-05 21:32 ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®