Re: [git pull] x86 updates

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linus Torvalds <torvalds@...>
Cc: Ingo Molnar <mingo@...>, Thomas Gleixner <tglx@...>, H. Peter Anvin <hpa@...>, <linux-kernel@...>
Date: Tuesday, February 5, 2008 - 3:22 pm

On Tue, Feb 05, 2008 at 10:47:07AM -0800, Linus Torvalds wrote:

With a bit of help from the bin-utils people (Alan Modra) I recently
discovered that the linker generate sections with different names
when the flags differs, so fogetting "aw" casues the linekr to generate
a section named .init.data.1 (or some other number).
But I nevet got to investigate if ld does something magically
with these autogenerated section names.
But I added a check in modpost and it should warn about the
code below.

I would prefer the use of
__CPUINITDATA
__FINITDATA

as defined in linux/init.h but otherwise - yes it should be fixed.
With the use of __CPUINITDATA we can kill the ifdef too.

	Sam

So something like this (untested - sorry):
I sneaked an extra ENTRY() in just to clean up a bit.

diff --git a/arch/x86/kernel/head_64.S b/arch/x86/kernel/head_64.S
index 4f283ad..09b38d5 100644
--- a/arch/x86/kernel/head_64.S
+++ b/arch/x86/kernel/head_64.S
@@ -250,18 +250,13 @@ ENTRY(secondary_startup_64)
 	lretq
 
 	/* SMP bootup changes these two */
-#ifndef CONFIG_HOTPLUG_CPU
-	.pushsection .init.data
-#endif
+	__CPUINITDATA
 	.align	8
-	.globl	initial_code
-initial_code:
+	ENTRY(initial_code)
 	.quad	x86_64_start_kernel
-#ifndef CONFIG_HOTPLUG_CPU
-	.popsection
-#endif
-	.globl init_rsp
-init_rsp:
+	__FINITDATA
+
+	ENTRY(init_rsp)
 	.quad  init_thread_union+THREAD_SIZE-8
 
 bad_address:
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[git pull] x86 updates, Ingo Molnar, (Mon Feb 4, 12:12 pm)
Re: [git pull] x86 updates, Linus Torvalds, (Tue Feb 5, 2:47 pm)
Re: [git pull] x86 updates, Ingo Molnar, (Tue Feb 5, 5:36 pm)
Re: [git pull] x86 updates, H. Peter Anvin, (Tue Feb 5, 4:12 pm)
Re: [git pull] x86 updates, Sam Ravnborg, (Tue Feb 5, 3:22 pm)
Re: [git pull] x86 updates, Ingo Molnar, (Tue Feb 5, 5:05 pm)
Re: [git pull] x86 updates, Sam Ravnborg, (Tue Feb 5, 5:17 pm)
Re: [git pull] x86 updates, Ingo Molnar, (Tue Feb 5, 5:54 pm)
Re: [git pull] x86 updates, H. Peter Anvin, (Tue Feb 5, 6:03 pm)
Re: [git pull] x86 updates, H. Peter Anvin, (Tue Feb 5, 5:09 pm)
Re: [git pull] x86 updates, Sam Ravnborg, (Tue Feb 5, 5:18 pm)
Re: [git pull] x86 updates, H. Peter Anvin, (Tue Feb 5, 5:23 pm)
Re: [git pull] x86 updates, Linus Torvalds, (Tue Feb 5, 5:32 pm)
Re: [git pull] x86 updates, H. Peter Anvin, (Tue Feb 5, 5:42 pm)