public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/8] cleanup old init and refok sections
@ 2009-04-27 18:02 Tim Abbott
  2009-04-27 18:02 ` [PATCH 1/8] frv: Remove unused header asm/init.h Tim Abbott
  0 siblings, 1 reply; 19+ messages in thread
From: Tim Abbott @ 2009-04-27 18:02 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Linus Torvalds, Linux kernel mailing list, Anders Kaseorg,
	Waseem Daher, Denys Vlasenko, Jeff Arnold, Paul Mundt, Tim Abbott

Sam,

This patch series cleans up the use of the deprecated section names
.text.init, .text.init.refok, .exit.text.refok, and .data.init.refok
in the Linux kernel, replacing them with the appropriate macros that
reference the current names for these sections.

The long-term goal here is to be able to change the kernel's magic
section names to those that are compatible with -ffunction-sections
-fdata-sections.  Doing so requires renaming all magic sections with
names of the form ".text.foo" or ".data.bar".

--

Tim Abbott (8):
  frv: Remove unused header asm/init.h.
  frv: Use __INIT macro instead of .text.init.
  arm: Use __INIT macro instead of .text.init.
  powerpc: Use TEXT_TEXT macro in linker script.
  powerpc: Use __REF macro instead of old .text.init.refok.
  sh: Use __INIT macro instead of .text.init.
  sparc: cleanup references to deprecated .text.init* sections.
  Remove unused support code for refok sections.

 arch/arm/mm/proc-v6.S              |    3 ++-
 arch/arm/mm/proc-v7.S              |    3 ++-
 arch/arm/mm/tlb-v6.S               |    3 ++-
 arch/arm/mm/tlb-v7.S               |    3 ++-
 arch/frv/include/asm/init.h        |   12 ------------
 arch/frv/kernel/head-mmu-fr451.S   |    3 ++-
 arch/frv/kernel/head-uc-fr401.S    |    3 ++-
 arch/frv/kernel/head-uc-fr451.S    |    3 ++-
 arch/frv/kernel/head-uc-fr555.S    |    3 ++-
 arch/powerpc/include/asm/ppc_asm.h |    5 +++--
 arch/powerpc/kernel/vmlinux.lds.S  |    3 ++-
 arch/sh/kernel/cpu/sh5/entry.S     |    5 +++--
 arch/sparc/kernel/head_32.S        |    2 +-
 arch/sparc/kernel/head_64.S        |    2 +-
 include/asm-generic/vmlinux.lds.h  |    3 ---
 include/linux/init.h               |    8 --------
 scripts/mod/modpost.c              |   18 ------------------
 17 files changed, 26 insertions(+), 56 deletions(-)
 delete mode 100644 arch/frv/include/asm/init.h


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

* [PATCH 1/8] frv: Remove unused header asm/init.h.
  2009-04-27 18:02 [PATCH 0/8] cleanup old init and refok sections Tim Abbott
@ 2009-04-27 18:02 ` Tim Abbott
  2009-04-27 18:02   ` [PATCH 2/8] frv: Use __INIT macro instead of .text.init Tim Abbott
  2009-04-27 18:31   ` [PATCH 1/8] frv: Remove unused header asm/init.h Sam Ravnborg
  0 siblings, 2 replies; 19+ messages in thread
From: Tim Abbott @ 2009-04-27 18:02 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Linus Torvalds, Linux kernel mailing list, Anders Kaseorg,
	Waseem Daher, Denys Vlasenko, Jeff Arnold, Paul Mundt, Tim Abbott,
	David Howells

It seems nothing has included the frv asm/init.h header for some time,
and its actual contents are out of date with include/linux/init.h.  So
just delete it.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: David Howells <dhowells@redhat.com>
---
 arch/frv/include/asm/init.h |   12 ------------
 1 files changed, 0 insertions(+), 12 deletions(-)
 delete mode 100644 arch/frv/include/asm/init.h

diff --git a/arch/frv/include/asm/init.h b/arch/frv/include/asm/init.h
deleted file mode 100644
index 8b15838..0000000
--- a/arch/frv/include/asm/init.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#ifndef _ASM_INIT_H
-#define _ASM_INIT_H
-
-#define __init __attribute__ ((__section__ (".text.init")))
-#define __initdata __attribute__ ((__section__ (".data.init")))
-/* For assembly routines */
-#define __INIT		.section	".text.init",#alloc,#execinstr
-#define __FINIT		.previous
-#define __INITDATA	.section	".data.init",#alloc,#write
-
-#endif
-
-- 
1.6.2.1


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

* [PATCH 2/8] frv: Use __INIT macro instead of .text.init.
  2009-04-27 18:02 ` [PATCH 1/8] frv: Remove unused header asm/init.h Tim Abbott
@ 2009-04-27 18:02   ` Tim Abbott
  2009-04-27 18:02     ` [PATCH 3/8] arm: " Tim Abbott
  2009-04-27 18:37     ` [PATCH 2/8] frv: " Sam Ravnborg
  2009-04-27 18:31   ` [PATCH 1/8] frv: Remove unused header asm/init.h Sam Ravnborg
  1 sibling, 2 replies; 19+ messages in thread
From: Tim Abbott @ 2009-04-27 18:02 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Linus Torvalds, Linux kernel mailing list, Anders Kaseorg,
	Waseem Daher, Denys Vlasenko, Jeff Arnold, Paul Mundt, Tim Abbott,
	David Howells

frv is placing some code in the .text.init section but does not
reference that section in its linker scripts.

This change moves this code from the .text.init section to the
.init.text section, which is presumably where it belongs.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: David Howells <dhowells@redhat.com>
---
 arch/frv/kernel/head-mmu-fr451.S |    3 ++-
 arch/frv/kernel/head-uc-fr401.S  |    3 ++-
 arch/frv/kernel/head-uc-fr451.S  |    3 ++-
 arch/frv/kernel/head-uc-fr555.S  |    3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/frv/kernel/head-mmu-fr451.S b/arch/frv/kernel/head-mmu-fr451.S
index c8f210d..98f87d5 100644
--- a/arch/frv/kernel/head-mmu-fr451.S
+++ b/arch/frv/kernel/head-mmu-fr451.S
@@ -9,6 +9,7 @@
  * 2 of the License, or (at your option) any later version.
  */
 
+#include <linux/init.h>
 #include <linux/threads.h>
 #include <linux/linkage.h>
 #include <asm/ptrace.h>
@@ -31,7 +32,7 @@
 #define __400_LCR	0xfe000100
 #define __400_LSBR	0xfe000c00
 
-	.section	.text.init,"ax"
+	__INIT
 	.balign		4
 
 ###############################################################################
diff --git a/arch/frv/kernel/head-uc-fr401.S b/arch/frv/kernel/head-uc-fr401.S
index ee282be..438643c 100644
--- a/arch/frv/kernel/head-uc-fr401.S
+++ b/arch/frv/kernel/head-uc-fr401.S
@@ -9,6 +9,7 @@
  * 2 of the License, or (at your option) any later version.
  */
 
+#include <linux/init.h>
 #include <linux/threads.h>
 #include <linux/linkage.h>
 #include <asm/ptrace.h>
@@ -30,7 +31,7 @@
 #define __400_LCR	0xfe000100
 #define __400_LSBR	0xfe000c00
 
-	.section	.text.init,"ax"
+	__INIT
 	.balign		4
 
 ###############################################################################
diff --git a/arch/frv/kernel/head-uc-fr451.S b/arch/frv/kernel/head-uc-fr451.S
index b10d9c8..b2a76c4 100644
--- a/arch/frv/kernel/head-uc-fr451.S
+++ b/arch/frv/kernel/head-uc-fr451.S
@@ -9,6 +9,7 @@
  * 2 of the License, or (at your option) any later version.
  */
 
+#include <linux/init.h>
 #include <linux/threads.h>
 #include <linux/linkage.h>
 #include <asm/ptrace.h>
@@ -30,7 +31,7 @@
 #define __400_LCR	0xfe000100
 #define __400_LSBR	0xfe000c00
 
-	.section	.text.init,"ax"
+	__INIT
 	.balign		4
 
 ###############################################################################
diff --git a/arch/frv/kernel/head-uc-fr555.S b/arch/frv/kernel/head-uc-fr555.S
index 39937c1..5497aaf 100644
--- a/arch/frv/kernel/head-uc-fr555.S
+++ b/arch/frv/kernel/head-uc-fr555.S
@@ -9,6 +9,7 @@
  * 2 of the License, or (at your option) any later version.
  */
 
+#include <linux/init.h>
 #include <linux/threads.h>
 #include <linux/linkage.h>
 #include <asm/ptrace.h>
@@ -29,7 +30,7 @@
 #define __551_LCR	0xfeff1100
 #define __551_LSBR	0xfeff1c00
 
-	.section	.text.init,"ax"
+	__INIT
 	.balign		4
 
 ###############################################################################
-- 
1.6.2.1


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

* [PATCH 3/8] arm: Use __INIT macro instead of .text.init.
  2009-04-27 18:02   ` [PATCH 2/8] frv: Use __INIT macro instead of .text.init Tim Abbott
@ 2009-04-27 18:02     ` Tim Abbott
  2009-04-27 18:02       ` [PATCH 4/8] powerpc: Use TEXT_TEXT macro in linker script Tim Abbott
  2009-04-27 18:43       ` [PATCH 3/8] arm: Use __INIT macro instead of .text.init Sam Ravnborg
  2009-04-27 18:37     ` [PATCH 2/8] frv: " Sam Ravnborg
  1 sibling, 2 replies; 19+ messages in thread
From: Tim Abbott @ 2009-04-27 18:02 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Linus Torvalds, Linux kernel mailing list, Anders Kaseorg,
	Waseem Daher, Denys Vlasenko, Jeff Arnold, Paul Mundt, Tim Abbott,
	Russell King

arm is placing some code in the .text.init section, but it does not
reference that section in its linker scripts.

This change moves this code from the .text.init section to the
.init.text section, which is presumably where it belongs.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
---
 arch/arm/mm/proc-v6.S |    3 ++-
 arch/arm/mm/proc-v7.S |    3 ++-
 arch/arm/mm/tlb-v6.S  |    3 ++-
 arch/arm/mm/tlb-v7.S  |    3 ++-
 4 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/arch/arm/mm/proc-v6.S b/arch/arm/mm/proc-v6.S
index f0cc599..087e239 100644
--- a/arch/arm/mm/proc-v6.S
+++ b/arch/arm/mm/proc-v6.S
@@ -10,6 +10,7 @@
  *
  *  This is the "shell" of the ARMv6 processor support.
  */
+#include <linux/init.h>
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
@@ -132,7 +133,7 @@ cpu_v6_name:
 	.asciz	"ARMv6-compatible processor"
 	.align
 
-	.section ".text.init", #alloc, #execinstr
+	__INIT
 
 /*
  *	__v6_setup
diff --git a/arch/arm/mm/proc-v7.S b/arch/arm/mm/proc-v7.S
index d1ebec4..c221e26 100644
--- a/arch/arm/mm/proc-v7.S
+++ b/arch/arm/mm/proc-v7.S
@@ -9,6 +9,7 @@
  *
  *  This is the "shell" of the ARMv7 processor support.
  */
+#include <linux/init.h>
 #include <linux/linkage.h>
 #include <asm/assembler.h>
 #include <asm/asm-offsets.h>
@@ -153,7 +154,7 @@ cpu_v7_name:
 	.ascii	"ARMv7 Processor"
 	.align
 
-	.section ".text.init", #alloc, #execinstr
+	__INIT
 
 /*
  *	__v7_setup
diff --git a/arch/arm/mm/tlb-v6.S b/arch/arm/mm/tlb-v6.S
index 20f84bb..73d7d89 100644
--- a/arch/arm/mm/tlb-v6.S
+++ b/arch/arm/mm/tlb-v6.S
@@ -10,6 +10,7 @@
  *  ARM architecture version 6 TLB handling functions.
  *  These assume a split I/D TLB.
  */
+#include <linux/init.h>
 #include <linux/linkage.h>
 #include <asm/asm-offsets.h>
 #include <asm/page.h>
@@ -87,7 +88,7 @@ ENTRY(v6wbi_flush_kern_tlb_range)
 	mcr	p15, 0, r2, c7, c5, 4		@ prefetch flush
 	mov	pc, lr
 
-	.section ".text.init", #alloc, #execinstr
+	__INIT
 
 	.type	v6wbi_tlb_fns, #object
 ENTRY(v6wbi_tlb_fns)
diff --git a/arch/arm/mm/tlb-v7.S b/arch/arm/mm/tlb-v7.S
index 24ba510..b637e73 100644
--- a/arch/arm/mm/tlb-v7.S
+++ b/arch/arm/mm/tlb-v7.S
@@ -11,6 +11,7 @@
  *  ARM architecture version 6 TLB handling functions.
  *  These assume a split I/D TLB.
  */
+#include <linux/init.h>
 #include <linux/linkage.h>
 #include <asm/asm-offsets.h>
 #include <asm/page.h>
@@ -80,7 +81,7 @@ ENTRY(v7wbi_flush_kern_tlb_range)
 	mov	pc, lr
 ENDPROC(v7wbi_flush_kern_tlb_range)
 
-	.section ".text.init", #alloc, #execinstr
+	__INIT
 
 	.type	v7wbi_tlb_fns, #object
 ENTRY(v7wbi_tlb_fns)
-- 
1.6.2.1


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

* [PATCH 4/8] powerpc: Use TEXT_TEXT macro in linker script.
  2009-04-27 18:02     ` [PATCH 3/8] arm: " Tim Abbott
@ 2009-04-27 18:02       ` Tim Abbott
  2009-04-27 18:02         ` [PATCH 5/8] powerpc: Use __REF macro instead of old .text.init.refok Tim Abbott
  2009-04-27 18:44         ` [PATCH 4/8] powerpc: Use TEXT_TEXT macro in linker script Sam Ravnborg
  2009-04-27 18:43       ` [PATCH 3/8] arm: Use __INIT macro instead of .text.init Sam Ravnborg
  1 sibling, 2 replies; 19+ messages in thread
From: Tim Abbott @ 2009-04-27 18:02 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Linus Torvalds, Linux kernel mailing list, Anders Kaseorg,
	Waseem Daher, Denys Vlasenko, Jeff Arnold, Paul Mundt, Tim Abbott,
	Benjamin Herrenschmidt

Rather than adding .ref.text to the powerpc linker script so that we
can use __REF on the powerpc architecture, it seems simpler to switch
to using the generic TEXT_TEXT macro.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/kernel/vmlinux.lds.S |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
index d7425ff..433ae11 100644
--- a/arch/powerpc/kernel/vmlinux.lds.S
+++ b/arch/powerpc/kernel/vmlinux.lds.S
@@ -54,7 +54,8 @@ SECTIONS
 		ALIGN_FUNCTION();
 		HEAD_TEXT
 		_text = .;
-		*(.text .fixup .text.init.refok .exit.text.refok __ftr_alt_*)
+		TEXT_TEXT
+		*(.fixup __ftr_alt_*)
 		SCHED_TEXT
 		LOCK_TEXT
 		KPROBES_TEXT
-- 
1.6.2.1


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

* [PATCH 5/8] powerpc: Use __REF macro instead of old .text.init.refok.
  2009-04-27 18:02       ` [PATCH 4/8] powerpc: Use TEXT_TEXT macro in linker script Tim Abbott
@ 2009-04-27 18:02         ` Tim Abbott
  2009-04-27 18:02           ` [PATCH 6/8] sh: Use __INIT macro instead of .text.init Tim Abbott
  2009-04-27 18:44           ` [PATCH 5/8] powerpc: Use __REF macro instead of old .text.init.refok Sam Ravnborg
  2009-04-27 18:44         ` [PATCH 4/8] powerpc: Use TEXT_TEXT macro in linker script Sam Ravnborg
  1 sibling, 2 replies; 19+ messages in thread
From: Tim Abbott @ 2009-04-27 18:02 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Linus Torvalds, Linux kernel mailing list, Anders Kaseorg,
	Waseem Daher, Denys Vlasenko, Jeff Arnold, Paul Mundt, Tim Abbott,
	Benjamin Herrenschmidt

The section .text.init.refok is deprecated and __REF (.ref.text)
should be used in assembly files instead.  This patch cleans up a few
uses of .text.init.refok in the powerpc architecture.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
---
 arch/powerpc/include/asm/ppc_asm.h |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h
index f59a666..384d90c 100644
--- a/arch/powerpc/include/asm/ppc_asm.h
+++ b/arch/powerpc/include/asm/ppc_asm.h
@@ -4,6 +4,7 @@
 #ifndef _ASM_POWERPC_PPC_ASM_H
 #define _ASM_POWERPC_PPC_ASM_H
 
+#include <linux/init.h>
 #include <linux/stringify.h>
 #include <asm/asm-compat.h>
 #include <asm/processor.h>
@@ -189,7 +190,7 @@ name: \
 GLUE(.,name):
 
 #define _INIT_GLOBAL(name) \
-	.section ".text.init.refok"; \
+	__REF; \
 	.align 2 ; \
 	.globl name; \
 	.globl GLUE(.,name); \
@@ -229,7 +230,7 @@ name: \
 GLUE(.,name):
 
 #define _INIT_STATIC(name) \
-	.section ".text.init.refok"; \
+	__REF; \
 	.align 2 ; \
 	.section ".opd","aw"; \
 name: \
-- 
1.6.2.1


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

* [PATCH 6/8] sh: Use __INIT macro instead of .text.init.
  2009-04-27 18:02         ` [PATCH 5/8] powerpc: Use __REF macro instead of old .text.init.refok Tim Abbott
@ 2009-04-27 18:02           ` Tim Abbott
  2009-04-27 18:02             ` [PATCH 7/8] sparc: cleanup references to deprecated .text.init* sections Tim Abbott
                               ` (2 more replies)
  2009-04-27 18:44           ` [PATCH 5/8] powerpc: Use __REF macro instead of old .text.init.refok Sam Ravnborg
  1 sibling, 3 replies; 19+ messages in thread
From: Tim Abbott @ 2009-04-27 18:02 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Linus Torvalds, Linux kernel mailing list, Anders Kaseorg,
	Waseem Daher, Denys Vlasenko, Jeff Arnold, Paul Mundt, Tim Abbott

The sh architecture has some code in the .text.init section, but it
does not reference that section in its linker scripts.

This change moves this code from the .text.init section to the
.init.text section, which is presumably where it belongs.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Paul Mundt <lethal@linux-sh.org>
---
 arch/sh/kernel/cpu/sh5/entry.S |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/sh/kernel/cpu/sh5/entry.S b/arch/sh/kernel/cpu/sh5/entry.S
index e640c63..7e49cb8 100644
--- a/arch/sh/kernel/cpu/sh5/entry.S
+++ b/arch/sh/kernel/cpu/sh5/entry.S
@@ -10,6 +10,7 @@
  * for more details.
  */
 #include <linux/errno.h>
+#include <linux/init.h>
 #include <linux/sys.h>
 #include <cpu/registers.h>
 #include <asm/processor.h>
@@ -2058,10 +2059,10 @@ asm_uaccess_end:
 
 
 /*
- * --- .text.init Section
+ * --- .init.text Section
  */
 
-	.section	.text.init, "ax"
+	__INIT
 
 /*
  * void trap_init (void)
-- 
1.6.2.1


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

* [PATCH 7/8] sparc: cleanup references to deprecated .text.init* sections.
  2009-04-27 18:02           ` [PATCH 6/8] sh: Use __INIT macro instead of .text.init Tim Abbott
@ 2009-04-27 18:02             ` Tim Abbott
  2009-04-27 18:02               ` [PATCH 8/8] Remove unused support code for refok sections Tim Abbott
  2009-04-27 18:50               ` [PATCH 7/8] sparc: cleanup references to deprecated .text.init* sections Sam Ravnborg
  2009-04-27 18:47             ` [PATCH 6/8] sh: Use __INIT macro instead of .text.init Sam Ravnborg
  2009-04-27 21:54             ` Paul Mundt
  2 siblings, 2 replies; 19+ messages in thread
From: Tim Abbott @ 2009-04-27 18:02 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Linus Torvalds, Linux kernel mailing list, Anders Kaseorg,
	Waseem Daher, Denys Vlasenko, Jeff Arnold, Paul Mundt, Tim Abbott,
	David S. Miller

The section .text.init.refok is deprecated and __REF (.ref.text)
should be used in assembly files instead.  This patch cleans up a few
uses of .text.init.refok in the sparc architecture.

Also fix a reference to .text.init in a comment that wasn't updated to
.init.text.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: David S. Miller <davem@davemloft.net>
---
 arch/sparc/kernel/head_32.S |    2 +-
 arch/sparc/kernel/head_64.S |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/sparc/kernel/head_32.S b/arch/sparc/kernel/head_32.S
index e91f01a..6b4d8ac 100644
--- a/arch/sparc/kernel/head_32.S
+++ b/arch/sparc/kernel/head_32.S
@@ -735,7 +735,7 @@ go_to_highmem:
 		 nop
 
 /* The code above should be at beginning and we have to take care about
- * short jumps, as branching to .text.init section from .text is usually
+ * short jumps, as branching to .init.text section from .text is usually
  * impossible */
 		__INIT
 /* Acquire boot time privileged register values, this will help debugging.
diff --git a/arch/sparc/kernel/head_64.S b/arch/sparc/kernel/head_64.S
index 3a1b7bf..91bf4c7 100644
--- a/arch/sparc/kernel/head_64.S
+++ b/arch/sparc/kernel/head_64.S
@@ -467,7 +467,7 @@ jump_to_sun4u_init:
 	jmpl    %g2 + %g0, %g0
 	 nop
 
-	.section	.text.init.refok
+	__REF
 sun4u_init:
 	BRANCH_IF_SUN4V(g1, sun4v_init)
 
-- 
1.6.2.1


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

* [PATCH 8/8] Remove unused support code for refok sections.
  2009-04-27 18:02             ` [PATCH 7/8] sparc: cleanup references to deprecated .text.init* sections Tim Abbott
@ 2009-04-27 18:02               ` Tim Abbott
  2009-04-27 18:51                 ` Sam Ravnborg
  2009-04-27 18:50               ` [PATCH 7/8] sparc: cleanup references to deprecated .text.init* sections Sam Ravnborg
  1 sibling, 1 reply; 19+ messages in thread
From: Tim Abbott @ 2009-04-27 18:02 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Linus Torvalds, Linux kernel mailing list, Anders Kaseorg,
	Waseem Daher, Denys Vlasenko, Jeff Arnold, Paul Mundt, Tim Abbott,
	Sam Ravnborg

The old refok sections

  .text.init.refok
  .data.init.refok
  .exit.text.refok

have been deprecated since commit
312b1485fb509c9bc32eda28ad29537896658cb8.  After the other patches in
this patch series nothing is put in these sections, so clean things up
by eliminating all the remaining references to them.

Signed-off-by: Tim Abbott <tabbott@mit.edu>
Cc: Sam Ravnborg <sam@ravnborg.org>
---
 include/asm-generic/vmlinux.lds.h |    3 ---
 include/linux/init.h              |    8 --------
 scripts/mod/modpost.c             |   18 ------------------
 3 files changed, 0 insertions(+), 29 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index eaa06ef..89853bc 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -90,7 +90,6 @@
 /* .data section */
 #define DATA_DATA							\
 	*(.data)							\
-	*(.data.init.refok)						\
 	*(.ref.data)							\
 	DEV_KEEP(init.data)						\
 	DEV_KEEP(exit.data)						\
@@ -289,8 +288,6 @@
 		*(.text.hot)						\
 		*(.text)						\
 		*(.ref.text)						\
-		*(.text.init.refok)					\
-		*(.exit.text.refok)					\
 	DEV_KEEP(init.text)						\
 	DEV_KEEP(exit.text)						\
 	CPU_KEEP(init.text)						\
diff --git a/include/linux/init.h b/include/linux/init.h
index 20a1334..0e06c17 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -62,14 +62,6 @@
 #define __refdata        __section(.ref.data)
 #define __refconst       __section(.ref.rodata)
 
-/* backward compatibility note
- *  A few places hardcode the old section names:
- *  .text.init.refok
- *  .data.init.refok
- *  .exit.text.refok
- *  They should be converted to use the defines from this file
- */
-
 /* compatibility defines */
 #define __init_refok     __ref
 #define __initdata_refok __refdata
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index df6e628..8d46ea7 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -794,15 +794,6 @@ static const char *init_exit_sections[] =
 /* data section */
 static const char *data_sections[] = { DATA_SECTIONS, NULL };
 
-/* sections that may refer to an init/exit section with no warning */
-static const char *initref_sections[] =
-{
-	".text.init.refok*",
-	".exit.text.refok*",
-	".data.init.refok*",
-	NULL
-};
-
 
 /* symbols in .data that may refer to init/exit sections */
 static const char *symbol_white_list[] =
@@ -915,11 +906,6 @@ static int section_mismatch(const char *fromsec, const char *tosec)
 /**
  * Whitelist to allow certain references to pass with no warning.
  *
- * Pattern 0:
- *   Do not warn if funtion/data are marked with __init_refok/__initdata_refok.
- *   The pattern is identified by:
- *   fromsec = .text.init.refok* | .data.init.refok*
- *
  * Pattern 1:
  *   If a module parameter is declared __initdata and permissions=0
  *   then this is legal despite the warning generated.
@@ -958,10 +944,6 @@ static int section_mismatch(const char *fromsec, const char *tosec)
 static int secref_whitelist(const char *fromsec, const char *fromsym,
 			    const char *tosec, const char *tosym)
 {
-	/* Check for pattern 0 */
-	if (match(fromsec, initref_sections))
-		return 0;
-
 	/* Check for pattern 1 */
 	if (match(tosec, init_data_sections) &&
 	    match(fromsec, data_sections) &&
-- 
1.6.2.1


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

* Re: [PATCH 1/8] frv: Remove unused header asm/init.h.
  2009-04-27 18:02 ` [PATCH 1/8] frv: Remove unused header asm/init.h Tim Abbott
  2009-04-27 18:02   ` [PATCH 2/8] frv: Use __INIT macro instead of .text.init Tim Abbott
@ 2009-04-27 18:31   ` Sam Ravnborg
  1 sibling, 0 replies; 19+ messages in thread
From: Sam Ravnborg @ 2009-04-27 18:31 UTC (permalink / raw)
  To: Tim Abbott
  Cc: Linus Torvalds, Linux kernel mailing list, Anders Kaseorg,
	Waseem Daher, Denys Vlasenko, Jeff Arnold, Paul Mundt,
	David Howells

On Mon, Apr 27, 2009 at 02:02:20PM -0400, Tim Abbott wrote:
> It seems nothing has included the frv asm/init.h header for some time,
> and its actual contents are out of date with include/linux/init.h.  So
> just delete it.

git grep 'asm/init.h' agree with you.

> 
> Signed-off-by: Tim Abbott <tabbott@mit.edu>
> Cc: David Howells <dhowells@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
> ---
>  arch/frv/include/asm/init.h |   12 ------------
>  1 files changed, 0 insertions(+), 12 deletions(-)
>  delete mode 100644 arch/frv/include/asm/init.h
> 
> diff --git a/arch/frv/include/asm/init.h b/arch/frv/include/asm/init.h
> deleted file mode 100644
> index 8b15838..0000000
> --- a/arch/frv/include/asm/init.h
> +++ /dev/null
> @@ -1,12 +0,0 @@
> -#ifndef _ASM_INIT_H
> -#define _ASM_INIT_H
> -
> -#define __init __attribute__ ((__section__ (".text.init")))
> -#define __initdata __attribute__ ((__section__ (".data.init")))
> -/* For assembly routines */
> -#define __INIT		.section	".text.init",#alloc,#execinstr
> -#define __FINIT		.previous
> -#define __INITDATA	.section	".data.init",#alloc,#write
> -
> -#endif
> -
> -- 
> 1.6.2.1
> 

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

* Re: [PATCH 2/8] frv: Use __INIT macro instead of .text.init.
  2009-04-27 18:02   ` [PATCH 2/8] frv: Use __INIT macro instead of .text.init Tim Abbott
  2009-04-27 18:02     ` [PATCH 3/8] arm: " Tim Abbott
@ 2009-04-27 18:37     ` Sam Ravnborg
  1 sibling, 0 replies; 19+ messages in thread
From: Sam Ravnborg @ 2009-04-27 18:37 UTC (permalink / raw)
  To: Tim Abbott
  Cc: Linus Torvalds, Linux kernel mailing list, Anders Kaseorg,
	Waseem Daher, Denys Vlasenko, Jeff Arnold, Paul Mundt,
	David Howells

On Mon, Apr 27, 2009 at 02:02:21PM -0400, Tim Abbott wrote:
> frv is placing some code in the .text.init section but does not
> reference that section in its linker scripts.
> 
> This change moves this code from the .text.init section to the
> .init.text section, which is presumably where it belongs.

I checked a few of the assembler entries - they where all
called from __HEAD section.
So this change looks good.

> 
> Signed-off-by: Tim Abbott <tabbott@mit.edu>
> Cc: David Howells <dhowells@redhat.com>
Acked-by: Sam Ravnborg <sam@ravnborg.org>

> ---
>  arch/frv/kernel/head-mmu-fr451.S |    3 ++-
>  arch/frv/kernel/head-uc-fr401.S  |    3 ++-
>  arch/frv/kernel/head-uc-fr451.S  |    3 ++-
>  arch/frv/kernel/head-uc-fr555.S  |    3 ++-
>  4 files changed, 8 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/frv/kernel/head-mmu-fr451.S b/arch/frv/kernel/head-mmu-fr451.S
> index c8f210d..98f87d5 100644
> --- a/arch/frv/kernel/head-mmu-fr451.S
> +++ b/arch/frv/kernel/head-mmu-fr451.S
> @@ -9,6 +9,7 @@
>   * 2 of the License, or (at your option) any later version.
>   */
>  
> +#include <linux/init.h>
>  #include <linux/threads.h>
>  #include <linux/linkage.h>
>  #include <asm/ptrace.h>
> @@ -31,7 +32,7 @@
>  #define __400_LCR	0xfe000100
>  #define __400_LSBR	0xfe000c00
>  
> -	.section	.text.init,"ax"
> +	__INIT
>  	.balign		4
>  
>  ###############################################################################
> diff --git a/arch/frv/kernel/head-uc-fr401.S b/arch/frv/kernel/head-uc-fr401.S
> index ee282be..438643c 100644
> --- a/arch/frv/kernel/head-uc-fr401.S
> +++ b/arch/frv/kernel/head-uc-fr401.S
> @@ -9,6 +9,7 @@
>   * 2 of the License, or (at your option) any later version.
>   */
>  
> +#include <linux/init.h>
>  #include <linux/threads.h>
>  #include <linux/linkage.h>
>  #include <asm/ptrace.h>
> @@ -30,7 +31,7 @@
>  #define __400_LCR	0xfe000100
>  #define __400_LSBR	0xfe000c00
>  
> -	.section	.text.init,"ax"
> +	__INIT
>  	.balign		4
>  
>  ###############################################################################
> diff --git a/arch/frv/kernel/head-uc-fr451.S b/arch/frv/kernel/head-uc-fr451.S
> index b10d9c8..b2a76c4 100644
> --- a/arch/frv/kernel/head-uc-fr451.S
> +++ b/arch/frv/kernel/head-uc-fr451.S
> @@ -9,6 +9,7 @@
>   * 2 of the License, or (at your option) any later version.
>   */
>  
> +#include <linux/init.h>
>  #include <linux/threads.h>
>  #include <linux/linkage.h>
>  #include <asm/ptrace.h>
> @@ -30,7 +31,7 @@
>  #define __400_LCR	0xfe000100
>  #define __400_LSBR	0xfe000c00
>  
> -	.section	.text.init,"ax"
> +	__INIT
>  	.balign		4
>  
>  ###############################################################################
> diff --git a/arch/frv/kernel/head-uc-fr555.S b/arch/frv/kernel/head-uc-fr555.S
> index 39937c1..5497aaf 100644
> --- a/arch/frv/kernel/head-uc-fr555.S
> +++ b/arch/frv/kernel/head-uc-fr555.S
> @@ -9,6 +9,7 @@
>   * 2 of the License, or (at your option) any later version.
>   */
>  
> +#include <linux/init.h>
>  #include <linux/threads.h>
>  #include <linux/linkage.h>
>  #include <asm/ptrace.h>
> @@ -29,7 +30,7 @@
>  #define __551_LCR	0xfeff1100
>  #define __551_LSBR	0xfeff1c00
>  
> -	.section	.text.init,"ax"
> +	__INIT
>  	.balign		4
>  
>  ###############################################################################
> -- 
> 1.6.2.1
> 

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

* Re: [PATCH 3/8] arm: Use __INIT macro instead of .text.init.
  2009-04-27 18:02     ` [PATCH 3/8] arm: " Tim Abbott
  2009-04-27 18:02       ` [PATCH 4/8] powerpc: Use TEXT_TEXT macro in linker script Tim Abbott
@ 2009-04-27 18:43       ` Sam Ravnborg
  2009-04-27 18:44         ` Russell King
  1 sibling, 1 reply; 19+ messages in thread
From: Sam Ravnborg @ 2009-04-27 18:43 UTC (permalink / raw)
  To: Tim Abbott
  Cc: Linus Torvalds, Linux kernel mailing list, Anders Kaseorg,
	Waseem Daher, Denys Vlasenko, Jeff Arnold, Paul Mundt,
	Russell King

On Mon, Apr 27, 2009 at 02:02:22PM -0400, Tim Abbott wrote:
> arm is placing some code in the .text.init section, but it does not
> reference that section in its linker scripts.
> 
> This change moves this code from the .text.init section to the
> .init.text section, which is presumably where it belongs.

It looks obviously correct.
But I tried and failed to follow the chain of usage.

So we need an ack from Russell on this one.

	Sam

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

* Re: [PATCH 4/8] powerpc: Use TEXT_TEXT macro in linker script.
  2009-04-27 18:02       ` [PATCH 4/8] powerpc: Use TEXT_TEXT macro in linker script Tim Abbott
  2009-04-27 18:02         ` [PATCH 5/8] powerpc: Use __REF macro instead of old .text.init.refok Tim Abbott
@ 2009-04-27 18:44         ` Sam Ravnborg
  1 sibling, 0 replies; 19+ messages in thread
From: Sam Ravnborg @ 2009-04-27 18:44 UTC (permalink / raw)
  To: Tim Abbott
  Cc: Linus Torvalds, Linux kernel mailing list, Anders Kaseorg,
	Waseem Daher, Denys Vlasenko, Jeff Arnold, Paul Mundt,
	Benjamin Herrenschmidt

On Mon, Apr 27, 2009 at 02:02:23PM -0400, Tim Abbott wrote:
> Rather than adding .ref.text to the powerpc linker script so that we
> can use __REF on the powerpc architecture, it seems simpler to switch
> to using the generic TEXT_TEXT macro.
> 
> Signed-off-by: Tim Abbott <tabbott@mit.edu>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
> ---
>  arch/powerpc/kernel/vmlinux.lds.S |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/powerpc/kernel/vmlinux.lds.S b/arch/powerpc/kernel/vmlinux.lds.S
> index d7425ff..433ae11 100644
> --- a/arch/powerpc/kernel/vmlinux.lds.S
> +++ b/arch/powerpc/kernel/vmlinux.lds.S
> @@ -54,7 +54,8 @@ SECTIONS
>  		ALIGN_FUNCTION();
>  		HEAD_TEXT
>  		_text = .;
> -		*(.text .fixup .text.init.refok .exit.text.refok __ftr_alt_*)
> +		TEXT_TEXT
> +		*(.fixup __ftr_alt_*)
>  		SCHED_TEXT
>  		LOCK_TEXT
>  		KPROBES_TEXT
> -- 
> 1.6.2.1
> 

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

* Re: [PATCH 3/8] arm: Use __INIT macro instead of .text.init.
  2009-04-27 18:43       ` [PATCH 3/8] arm: Use __INIT macro instead of .text.init Sam Ravnborg
@ 2009-04-27 18:44         ` Russell King
  0 siblings, 0 replies; 19+ messages in thread
From: Russell King @ 2009-04-27 18:44 UTC (permalink / raw)
  To: Sam Ravnborg
  Cc: Tim Abbott, Linus Torvalds, Linux kernel mailing list,
	Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold,
	Paul Mundt

On Mon, Apr 27, 2009 at 08:43:13PM +0200, Sam Ravnborg wrote:
> On Mon, Apr 27, 2009 at 02:02:22PM -0400, Tim Abbott wrote:
> > arm is placing some code in the .text.init section, but it does not
> > reference that section in its linker scripts.
> > 
> > This change moves this code from the .text.init section to the
> > .init.text section, which is presumably where it belongs.
> 
> It looks obviously correct.
> But I tried and failed to follow the chain of usage.

Yup, I did something similar with the other files some year ago, but
these new files got missed.

> So we need an ack from Russell on this one.

Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:

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

* Re: [PATCH 5/8] powerpc: Use __REF macro instead of old .text.init.refok.
  2009-04-27 18:02         ` [PATCH 5/8] powerpc: Use __REF macro instead of old .text.init.refok Tim Abbott
  2009-04-27 18:02           ` [PATCH 6/8] sh: Use __INIT macro instead of .text.init Tim Abbott
@ 2009-04-27 18:44           ` Sam Ravnborg
  1 sibling, 0 replies; 19+ messages in thread
From: Sam Ravnborg @ 2009-04-27 18:44 UTC (permalink / raw)
  To: Tim Abbott
  Cc: Linus Torvalds, Linux kernel mailing list, Anders Kaseorg,
	Waseem Daher, Denys Vlasenko, Jeff Arnold, Paul Mundt,
	Benjamin Herrenschmidt

On Mon, Apr 27, 2009 at 02:02:24PM -0400, Tim Abbott wrote:
> The section .text.init.refok is deprecated and __REF (.ref.text)
> should be used in assembly files instead.  This patch cleans up a few
> uses of .text.init.refok in the powerpc architecture.
> 
> Signed-off-by: Tim Abbott <tabbott@mit.edu>
> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
> ---
>  arch/powerpc/include/asm/ppc_asm.h |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/powerpc/include/asm/ppc_asm.h b/arch/powerpc/include/asm/ppc_asm.h
> index f59a666..384d90c 100644
> --- a/arch/powerpc/include/asm/ppc_asm.h
> +++ b/arch/powerpc/include/asm/ppc_asm.h
> @@ -4,6 +4,7 @@
>  #ifndef _ASM_POWERPC_PPC_ASM_H
>  #define _ASM_POWERPC_PPC_ASM_H
>  
> +#include <linux/init.h>
>  #include <linux/stringify.h>
>  #include <asm/asm-compat.h>
>  #include <asm/processor.h>
> @@ -189,7 +190,7 @@ name: \
>  GLUE(.,name):
>  
>  #define _INIT_GLOBAL(name) \
> -	.section ".text.init.refok"; \
> +	__REF; \
>  	.align 2 ; \
>  	.globl name; \
>  	.globl GLUE(.,name); \
> @@ -229,7 +230,7 @@ name: \
>  GLUE(.,name):
>  
>  #define _INIT_STATIC(name) \
> -	.section ".text.init.refok"; \
> +	__REF; \
>  	.align 2 ; \
>  	.section ".opd","aw"; \
>  name: \
> -- 
> 1.6.2.1
> 

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

* Re: [PATCH 6/8] sh: Use __INIT macro instead of .text.init.
  2009-04-27 18:02           ` [PATCH 6/8] sh: Use __INIT macro instead of .text.init Tim Abbott
  2009-04-27 18:02             ` [PATCH 7/8] sparc: cleanup references to deprecated .text.init* sections Tim Abbott
@ 2009-04-27 18:47             ` Sam Ravnborg
  2009-04-27 21:54             ` Paul Mundt
  2 siblings, 0 replies; 19+ messages in thread
From: Sam Ravnborg @ 2009-04-27 18:47 UTC (permalink / raw)
  To: Tim Abbott
  Cc: Linus Torvalds, Linux kernel mailing list, Anders Kaseorg,
	Waseem Daher, Denys Vlasenko, Jeff Arnold, Paul Mundt

On Mon, Apr 27, 2009 at 02:02:25PM -0400, Tim Abbott wrote:
> The sh architecture has some code in the .text.init section, but it
> does not reference that section in its linker scripts.
> 
> This change moves this code from the .text.init section to the
> .init.text section, which is presumably where it belongs.
> 
> Signed-off-by: Tim Abbott <tabbott@mit.edu>
> Cc: Paul Mundt <lethal@linux-sh.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>

> ---
>  arch/sh/kernel/cpu/sh5/entry.S |    5 +++--
>  1 files changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/sh/kernel/cpu/sh5/entry.S b/arch/sh/kernel/cpu/sh5/entry.S
> index e640c63..7e49cb8 100644
> --- a/arch/sh/kernel/cpu/sh5/entry.S
> +++ b/arch/sh/kernel/cpu/sh5/entry.S
> @@ -10,6 +10,7 @@
>   * for more details.
>   */
>  #include <linux/errno.h>
> +#include <linux/init.h>
>  #include <linux/sys.h>
>  #include <cpu/registers.h>
>  #include <asm/processor.h>
> @@ -2058,10 +2059,10 @@ asm_uaccess_end:
>  
>  
>  /*
> - * --- .text.init Section
> + * --- .init.text Section
>   */
>  
> -	.section	.text.init, "ax"
> +	__INIT
>  
>  /*
>   * void trap_init (void)
> -- 
> 1.6.2.1
> 

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

* Re: [PATCH 7/8] sparc: cleanup references to deprecated .text.init* sections.
  2009-04-27 18:02             ` [PATCH 7/8] sparc: cleanup references to deprecated .text.init* sections Tim Abbott
  2009-04-27 18:02               ` [PATCH 8/8] Remove unused support code for refok sections Tim Abbott
@ 2009-04-27 18:50               ` Sam Ravnborg
  1 sibling, 0 replies; 19+ messages in thread
From: Sam Ravnborg @ 2009-04-27 18:50 UTC (permalink / raw)
  To: Tim Abbott
  Cc: Linus Torvalds, Linux kernel mailing list, Anders Kaseorg,
	Waseem Daher, Denys Vlasenko, Jeff Arnold, Paul Mundt,
	David S. Miller

On Mon, Apr 27, 2009 at 02:02:26PM -0400, Tim Abbott wrote:
> The section .text.init.refok is deprecated and __REF (.ref.text)
> should be used in assembly files instead.  This patch cleans up a few
> uses of .text.init.refok in the sparc architecture.
> 
> Also fix a reference to .text.init in a comment that wasn't updated to
> .init.text.
> 
> Signed-off-by: Tim Abbott <tabbott@mit.edu>
> Cc: David S. Miller <davem@davemloft.net>
Acked-by: Sam Ravnborg <sam@ravnborg.org>

> ---
>  arch/sparc/kernel/head_32.S |    2 +-
>  arch/sparc/kernel/head_64.S |    2 +-
>  2 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/sparc/kernel/head_32.S b/arch/sparc/kernel/head_32.S
> index e91f01a..6b4d8ac 100644
> --- a/arch/sparc/kernel/head_32.S
> +++ b/arch/sparc/kernel/head_32.S
> @@ -735,7 +735,7 @@ go_to_highmem:
>  		 nop
>  
>  /* The code above should be at beginning and we have to take care about
> - * short jumps, as branching to .text.init section from .text is usually
> + * short jumps, as branching to .init.text section from .text is usually
>   * impossible */
>  		__INIT
>  /* Acquire boot time privileged register values, this will help debugging.
> diff --git a/arch/sparc/kernel/head_64.S b/arch/sparc/kernel/head_64.S
> index 3a1b7bf..91bf4c7 100644
> --- a/arch/sparc/kernel/head_64.S
> +++ b/arch/sparc/kernel/head_64.S
> @@ -467,7 +467,7 @@ jump_to_sun4u_init:
>  	jmpl    %g2 + %g0, %g0
>  	 nop
>  
> -	.section	.text.init.refok
> +	__REF
>  sun4u_init:
>  	BRANCH_IF_SUN4V(g1, sun4v_init)
>  
> -- 
> 1.6.2.1
> 

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

* Re: [PATCH 8/8] Remove unused support code for refok sections.
  2009-04-27 18:02               ` [PATCH 8/8] Remove unused support code for refok sections Tim Abbott
@ 2009-04-27 18:51                 ` Sam Ravnborg
  0 siblings, 0 replies; 19+ messages in thread
From: Sam Ravnborg @ 2009-04-27 18:51 UTC (permalink / raw)
  To: Tim Abbott
  Cc: Linus Torvalds, Linux kernel mailing list, Anders Kaseorg,
	Waseem Daher, Denys Vlasenko, Jeff Arnold, Paul Mundt

On Mon, Apr 27, 2009 at 02:02:27PM -0400, Tim Abbott wrote:
> The old refok sections
> 
>   .text.init.refok
>   .data.init.refok
>   .exit.text.refok
> 
> have been deprecated since commit
> 312b1485fb509c9bc32eda28ad29537896658cb8.  After the other patches in
> this patch series nothing is put in these sections, so clean things up
> by eliminating all the remaining references to them.
> 
> Signed-off-by: Tim Abbott <tabbott@mit.edu>
> Cc: Sam Ravnborg <sam@ravnborg.org>

I like this cleanup!
Acked-by: Sam Ravnborg <sam@ravnborg.org>

> ---
>  include/asm-generic/vmlinux.lds.h |    3 ---
>  include/linux/init.h              |    8 --------
>  scripts/mod/modpost.c             |   18 ------------------
>  3 files changed, 0 insertions(+), 29 deletions(-)
> 
> diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
> index eaa06ef..89853bc 100644
> --- a/include/asm-generic/vmlinux.lds.h
> +++ b/include/asm-generic/vmlinux.lds.h
> @@ -90,7 +90,6 @@
>  /* .data section */
>  #define DATA_DATA							\
>  	*(.data)							\
> -	*(.data.init.refok)						\
>  	*(.ref.data)							\
>  	DEV_KEEP(init.data)						\
>  	DEV_KEEP(exit.data)						\
> @@ -289,8 +288,6 @@
>  		*(.text.hot)						\
>  		*(.text)						\
>  		*(.ref.text)						\
> -		*(.text.init.refok)					\
> -		*(.exit.text.refok)					\
>  	DEV_KEEP(init.text)						\
>  	DEV_KEEP(exit.text)						\
>  	CPU_KEEP(init.text)						\
> diff --git a/include/linux/init.h b/include/linux/init.h
> index 20a1334..0e06c17 100644
> --- a/include/linux/init.h
> +++ b/include/linux/init.h
> @@ -62,14 +62,6 @@
>  #define __refdata        __section(.ref.data)
>  #define __refconst       __section(.ref.rodata)
>  
> -/* backward compatibility note
> - *  A few places hardcode the old section names:
> - *  .text.init.refok
> - *  .data.init.refok
> - *  .exit.text.refok
> - *  They should be converted to use the defines from this file
> - */
> -
>  /* compatibility defines */
>  #define __init_refok     __ref
>  #define __initdata_refok __refdata
> diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
> index df6e628..8d46ea7 100644
> --- a/scripts/mod/modpost.c
> +++ b/scripts/mod/modpost.c
> @@ -794,15 +794,6 @@ static const char *init_exit_sections[] =
>  /* data section */
>  static const char *data_sections[] = { DATA_SECTIONS, NULL };
>  
> -/* sections that may refer to an init/exit section with no warning */
> -static const char *initref_sections[] =
> -{
> -	".text.init.refok*",
> -	".exit.text.refok*",
> -	".data.init.refok*",
> -	NULL
> -};
> -
>  
>  /* symbols in .data that may refer to init/exit sections */
>  static const char *symbol_white_list[] =
> @@ -915,11 +906,6 @@ static int section_mismatch(const char *fromsec, const char *tosec)
>  /**
>   * Whitelist to allow certain references to pass with no warning.
>   *
> - * Pattern 0:
> - *   Do not warn if funtion/data are marked with __init_refok/__initdata_refok.
> - *   The pattern is identified by:
> - *   fromsec = .text.init.refok* | .data.init.refok*
> - *
>   * Pattern 1:
>   *   If a module parameter is declared __initdata and permissions=0
>   *   then this is legal despite the warning generated.
> @@ -958,10 +944,6 @@ static int section_mismatch(const char *fromsec, const char *tosec)
>  static int secref_whitelist(const char *fromsec, const char *fromsym,
>  			    const char *tosec, const char *tosym)
>  {
> -	/* Check for pattern 0 */
> -	if (match(fromsec, initref_sections))
> -		return 0;
> -
>  	/* Check for pattern 1 */
>  	if (match(tosec, init_data_sections) &&
>  	    match(fromsec, data_sections) &&
> -- 
> 1.6.2.1
> 

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

* Re: [PATCH 6/8] sh: Use __INIT macro instead of .text.init.
  2009-04-27 18:02           ` [PATCH 6/8] sh: Use __INIT macro instead of .text.init Tim Abbott
  2009-04-27 18:02             ` [PATCH 7/8] sparc: cleanup references to deprecated .text.init* sections Tim Abbott
  2009-04-27 18:47             ` [PATCH 6/8] sh: Use __INIT macro instead of .text.init Sam Ravnborg
@ 2009-04-27 21:54             ` Paul Mundt
  2 siblings, 0 replies; 19+ messages in thread
From: Paul Mundt @ 2009-04-27 21:54 UTC (permalink / raw)
  To: Tim Abbott
  Cc: Sam Ravnborg, Linus Torvalds, Linux kernel mailing list,
	Anders Kaseorg, Waseem Daher, Denys Vlasenko, Jeff Arnold

On Mon, Apr 27, 2009 at 02:02:25PM -0400, Tim Abbott wrote:
> The sh architecture has some code in the .text.init section, but it
> does not reference that section in its linker scripts.
> 
> This change moves this code from the .text.init section to the
> .init.text section, which is presumably where it belongs.
> 
> Signed-off-by: Tim Abbott <tabbott@mit.edu>
> Cc: Paul Mundt <lethal@linux-sh.org>

Acked-by: Paul Mundt <lethal@linux-sh.org>

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

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

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-27 18:02 [PATCH 0/8] cleanup old init and refok sections Tim Abbott
2009-04-27 18:02 ` [PATCH 1/8] frv: Remove unused header asm/init.h Tim Abbott
2009-04-27 18:02   ` [PATCH 2/8] frv: Use __INIT macro instead of .text.init Tim Abbott
2009-04-27 18:02     ` [PATCH 3/8] arm: " Tim Abbott
2009-04-27 18:02       ` [PATCH 4/8] powerpc: Use TEXT_TEXT macro in linker script Tim Abbott
2009-04-27 18:02         ` [PATCH 5/8] powerpc: Use __REF macro instead of old .text.init.refok Tim Abbott
2009-04-27 18:02           ` [PATCH 6/8] sh: Use __INIT macro instead of .text.init Tim Abbott
2009-04-27 18:02             ` [PATCH 7/8] sparc: cleanup references to deprecated .text.init* sections Tim Abbott
2009-04-27 18:02               ` [PATCH 8/8] Remove unused support code for refok sections Tim Abbott
2009-04-27 18:51                 ` Sam Ravnborg
2009-04-27 18:50               ` [PATCH 7/8] sparc: cleanup references to deprecated .text.init* sections Sam Ravnborg
2009-04-27 18:47             ` [PATCH 6/8] sh: Use __INIT macro instead of .text.init Sam Ravnborg
2009-04-27 21:54             ` Paul Mundt
2009-04-27 18:44           ` [PATCH 5/8] powerpc: Use __REF macro instead of old .text.init.refok Sam Ravnborg
2009-04-27 18:44         ` [PATCH 4/8] powerpc: Use TEXT_TEXT macro in linker script Sam Ravnborg
2009-04-27 18:43       ` [PATCH 3/8] arm: Use __INIT macro instead of .text.init Sam Ravnborg
2009-04-27 18:44         ` Russell King
2009-04-27 18:37     ` [PATCH 2/8] frv: " Sam Ravnborg
2009-04-27 18:31   ` [PATCH 1/8] frv: Remove unused header asm/init.h Sam Ravnborg

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