All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: fix section mismatch for i386 init code
@ 2009-07-27 17:43 Robert Richter
  2009-07-27 21:19 ` [tip:x86/urgent] " tip-bot for Robert Richter
  2009-07-27 21:21 ` tip-bot for Robert Richter
  0 siblings, 2 replies; 3+ messages in thread
From: Robert Richter @ 2009-07-27 17:43 UTC (permalink / raw)
  To: Ingo Molnar; +Cc: LKML, Robert Richter

Startup code for i386 in arch/x86/kernel/head_32.S is using the
reference variable initial_code that is located in the .cpuinit.data
section. If CONFIG_HOTPLUG_CPU is enabled, startup code is not in an
init section and can be called later too. In this case the reference
initial_code must be kept too. This patch fixes this. See below for
the section mismatch warning.

 WARNING: vmlinux.o(.cpuinit.data+0x0): Section mismatch in reference from the variable initial_code to the function .init.text:i386_start_kernel()
 The variable __cpuinitdata initial_code references
 a function __init i386_start_kernel().
 If i386_start_kernel is only used by initial_code then
 annotate i386_start_kernel with a matching annotation.

Signed-off-by: Robert Richter <robert.richter@amd.com>
---
 arch/x86/kernel/head_32.S |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/head_32.S b/arch/x86/kernel/head_32.S
index 8663afb..0d98a01 100644
--- a/arch/x86/kernel/head_32.S
+++ b/arch/x86/kernel/head_32.S
@@ -602,7 +602,11 @@ ignore_int:
 #endif
 	iret
 
-.section .cpuinit.data,"wa"
+#ifndef CONFIG_HOTPLUG_CPU
+	__CPUINITDATA
+#else
+	__REFDATA
+#endif
 .align 4
 ENTRY(initial_code)
 	.long i386_start_kernel
-- 
1.6.3.3



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

end of thread, other threads:[~2009-07-27 21:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-27 17:43 [PATCH] x86: fix section mismatch for i386 init code Robert Richter
2009-07-27 21:19 ` [tip:x86/urgent] " tip-bot for Robert Richter
2009-07-27 21:21 ` tip-bot for Robert Richter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.