LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH]: Change sysenter_setup to __cpuinit & improve __INIT, __INITDATA
@ 2007-02-19 20:50 Prarit Bhargava
  2007-02-19 22:45 ` Zwane Mwaikambo
  0 siblings, 1 reply; 3+ messages in thread
From: Prarit Bhargava @ 2007-02-19 20:50 UTC (permalink / raw)
  To: linux-kernel, akpm, mingo; +Cc: Prarit Bhargava

Change sysenter_setup to __cpuinit.
Change __INIT & __INITDATA to be cpu hotplug aware.

Resolve MODPOST warnings similar to:

WARNING: vmlinux - Section mismatch: reference to .init.text:sysenter_setup from
 .text between 'identify_cpu' (at offset 0xc040a380) and 'detect_ht'

and

WARNING: vmlinux - Section mismatch: reference to .init.data:vsyscall_int80_end
from .text between 'sysenter_setup' (at offset 0xc041a269) and 'enable_sep_cpu'
WARNING: vmlinux - Section mismatch: reference to
.init.data:vsyscall_int80_start from .text between 'sysenter_setup' (at offset
0xc041a26e) and 'enable_sep_cpu'
WARNING: vmlinux - Section mismatch: reference to
.init.data:vsyscall_sysenter_end from .text between 'sysenter_setup' (at offset
0xc041a275) and 'enable_sep_cpu'
WARNING: vmlinux - Section mismatch: reference to
.init.data:vsyscall_sysenter_start from .text between 'sysenter_setup' (at
offset 0xc041a27a) and 'enable_sep_cpu'

Signed-off-by: Prarit Bhargava <prarit@redhat.com>

diff --git a/arch/i386/kernel/sysenter.c b/arch/i386/kernel/sysenter.c
index 13ca54a..168f814 100644
--- a/arch/i386/kernel/sysenter.c
+++ b/arch/i386/kernel/sysenter.c
@@ -72,7 +72,7 @@ extern const char vsyscall_int80_start, vsyscall_int80_end;
 extern const char vsyscall_sysenter_start, vsyscall_sysenter_end;
 static struct page *syscall_pages[1];
 
-int __init sysenter_setup(void)
+int __cpuinit sysenter_setup(void)
 {
 	void *syscall_page = (void *)get_zeroed_page(GFP_ATOMIC);
 	syscall_pages[0] = virt_to_page(syscall_page);
diff --git a/include/linux/init.h b/include/linux/init.h
index e290a01..9abf120 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -52,9 +52,14 @@
 #endif
 
 /* For assembly routines */
+#ifdef CONFIG_HOTPLUG_CPU
+#define __INIT		.section	".text","ax"
+#define __INITDATA	.section	".data","aw"
+#else
 #define __INIT		.section	".init.text","ax"
-#define __FINIT		.previous
 #define __INITDATA	.section	".init.data","aw"
+#endif
+#define __FINIT		.previous
 
 #ifndef __ASSEMBLY__
 /*

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

* Re: [PATCH]: Change sysenter_setup to __cpuinit & improve __INIT, __INITDATA
  2007-02-19 20:50 [PATCH]: Change sysenter_setup to __cpuinit & improve __INIT, __INITDATA Prarit Bhargava
@ 2007-02-19 22:45 ` Zwane Mwaikambo
  2007-02-20 14:50   ` Prarit Bhargava
  0 siblings, 1 reply; 3+ messages in thread
From: Zwane Mwaikambo @ 2007-02-19 22:45 UTC (permalink / raw)
  To: Prarit Bhargava; +Cc: Linux Kernel, Andrew Morton, Ingo Molnar

On Mon, 19 Feb 2007, Prarit Bhargava wrote:

>  /* For assembly routines */
> +#ifdef CONFIG_HOTPLUG_CPU
> +#define __INIT		.section	".text","ax"
> +#define __INITDATA	.section	".data","aw"
> +#else
>  #define __INIT		.section	".init.text","ax"
> -#define __FINIT		.previous
>  #define __INITDATA	.section	".init.data","aw"
> +#endif
> +#define __FINIT		.previous
>  
>  #ifndef __ASSEMBLY__

Shouldn't this be __CPUINT/__CPUINITDATA? That way you could also get rid 
of things like in x86_64 head.S;

#ifndef CONFIG_HOTPLUG_CPU
        __INITDATA
#endif

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

* Re: [PATCH]: Change sysenter_setup to __cpuinit & improve __INIT, __INITDATA
  2007-02-19 22:45 ` Zwane Mwaikambo
@ 2007-02-20 14:50   ` Prarit Bhargava
  0 siblings, 0 replies; 3+ messages in thread
From: Prarit Bhargava @ 2007-02-20 14:50 UTC (permalink / raw)
  To: Zwane Mwaikambo; +Cc: Linux Kernel, Andrew Morton, Ingo Molnar

[-- Attachment #1: Type: text/plain, Size: 241 bytes --]



Zwane Mwaikambo wrote:
> Shouldn't this be __CPUINT/__CPUINITDATA? That way you could also get rid  of things like in x86_64 head.S;
>
> #ifndef CONFIG_HOTPLUG_CPU
>         __INITDATA
> #endif
>   
Zwane -- good point.  New patch.

P.




[-- Attachment #2: init-v2.patch --]
[-- Type: text/plain, Size: 2458 bytes --]

Change sysenter_setup to __cpuinit.
Add __CPUINIT & __CPUINITDATA.

Resolve MODPOST warnings similar to:

WARNING: vmlinux - Section mismatch: reference to .init.text:sysenter_setup from
 .text between 'identify_cpu' (at offset 0xc040a380) and 'detect_ht'

and

WARNING: vmlinux - Section mismatch: reference to .init.data:vsyscall_int80_end
from .text between 'sysenter_setup' (at offset 0xc041a269) and 'enable_sep_cpu'
WARNING: vmlinux - Section mismatch: reference to
.init.data:vsyscall_int80_start from .text between 'sysenter_setup' (at offset
0xc041a26e) and 'enable_sep_cpu'
WARNING: vmlinux - Section mismatch: reference to
.init.data:vsyscall_sysenter_end from .text between 'sysenter_setup' (at offset
0xc041a275) and 'enable_sep_cpu'
WARNING: vmlinux - Section mismatch: reference to
.init.data:vsyscall_sysenter_start from .text between 'sysenter_setup' (at
offset 0xc041a27a) and 'enable_sep_cpu'

Signed-off-by: Prarit Bhargava <prarit@redhat.com>

diff --git a/arch/i386/kernel/sysenter.c b/arch/i386/kernel/sysenter.c
index 13ca54a..168f814 100644
--- a/arch/i386/kernel/sysenter.c
+++ b/arch/i386/kernel/sysenter.c
@@ -72,7 +72,7 @@ extern const char vsyscall_int80_start, vsyscall_int80_end;
 extern const char vsyscall_sysenter_start, vsyscall_sysenter_end;
 static struct page *syscall_pages[1];
 
-int __init sysenter_setup(void)
+int __cpuinit sysenter_setup(void)
 {
 	void *syscall_page = (void *)get_zeroed_page(GFP_ATOMIC);
 	syscall_pages[0] = virt_to_page(syscall_page);
diff --git a/arch/x86_64/kernel/head.S b/arch/x86_64/kernel/head.S
index 598a4d0..d3e3db3 100644
--- a/arch/x86_64/kernel/head.S
+++ b/arch/x86_64/kernel/head.S
@@ -324,9 +324,7 @@ ENTRY(wakeup_level4_pgt)
 	.quad	phys_level3_kernel_pgt | 0x007
 #endif
 
-#ifndef CONFIG_HOTPLUG_CPU
-	__INITDATA
-#endif
+	__CPUINITDATA
 	/*
 	 * This default setting generates an ident mapping at address 0x100000
 	 * and a mapping for the kernel that precisely maps virtual address
diff --git a/include/linux/init.h b/include/linux/init.h
index e290a01..6592357 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -56,6 +56,14 @@
 #define __FINIT		.previous
 #define __INITDATA	.section	".init.data","aw"
 
+#ifdef CONFIG_HOTPLUG_CPU
+#define __CPUINIT	.section	".text","ax"
+#define __CPUINITDATA	.section	".data","ax"
+#else
+#define __CPUINIT	__INIT
+#define __CPUINITDATA	__INITDATA
+#endif
+
 #ifndef __ASSEMBLY__
 /*
  * Used for initialization calls..

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

end of thread, other threads:[~2007-02-20 14:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-19 20:50 [PATCH]: Change sysenter_setup to __cpuinit & improve __INIT, __INITDATA Prarit Bhargava
2007-02-19 22:45 ` Zwane Mwaikambo
2007-02-20 14:50   ` Prarit Bhargava

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).