linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Gortmaker <paul.gortmaker@windriver.com>
To: <linux-kernel@vger.kernel.org>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Rusty Russell <rusty@rustcorp.com.au>
Subject: [PATCH 02/32] modpost: remove all traces of cpuinit/cpuexit sections
Date: Mon, 24 Jun 2013 15:30:07 -0400	[thread overview]
Message-ID: <1372102237-8757-3-git-send-email-paul.gortmaker@windriver.com> (raw)
In-Reply-To: <1372102237-8757-1-git-send-email-paul.gortmaker@windriver.com>

Delete all audit rules that were checking how the .cpuXYZ
related sections were inter-operating with other __init
like sections, now that __cpuinit is gone.  Update the linker
script to not have any knowledge of .cpuinit sections.

[lds.h update courtesy of Ralf Baechle <ralf@linux-mips.org>]

Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
---

[This commit is part of the __cpuinit removal work.  If you don't see
 any problems with it, then you don't have to do anything ; it will be
 submitted with all the rest of the __cpuinit removal work.  On the
 other hand, if you want to carry this patch in with your other pending
 changes so as to handle conflicts with other pending work yourself, then
 that is fine too, as the commits can largely be treated independently.
 For more information, please see: https://lkml.org/lkml/2013/6/20/513 ]

 include/asm-generic/vmlinux.lds.h | 12 ---------
 scripts/mod/modpost.c             | 52 +++++++--------------------------------
 2 files changed, 9 insertions(+), 55 deletions(-)

diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 4f27372..796f470 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -174,8 +174,6 @@
 	*(.data)							\
 	*(.ref.data)							\
 	*(.data..shared_aligned) /* percpu related */			\
-	CPU_KEEP(init.data)						\
-	CPU_KEEP(exit.data)						\
 	MEM_KEEP(init.data)						\
 	MEM_KEEP(exit.data)						\
 	*(.data.unlikely)						\
@@ -362,8 +360,6 @@
 	/* __*init sections */						\
 	__init_rodata : AT(ADDR(__init_rodata) - LOAD_OFFSET) {		\
 		*(.ref.rodata)						\
-		CPU_KEEP(init.rodata)					\
-		CPU_KEEP(exit.rodata)					\
 		MEM_KEEP(init.rodata)					\
 		MEM_KEEP(exit.rodata)					\
 	}								\
@@ -404,8 +400,6 @@
 		*(.text.hot)						\
 		*(.text)						\
 		*(.ref.text)						\
-	CPU_KEEP(init.text)						\
-	CPU_KEEP(exit.text)						\
 	MEM_KEEP(init.text)						\
 	MEM_KEEP(exit.text)						\
 		*(.text.unlikely)
@@ -489,14 +483,12 @@
 /* init and exit section handling */
 #define INIT_DATA							\
 	*(.init.data)							\
-	CPU_DISCARD(init.data)						\
 	MEM_DISCARD(init.data)						\
 	KERNEL_CTORS()							\
 	MCOUNT_REC()							\
 	*(.init.rodata)							\
 	FTRACE_EVENTS()							\
 	TRACE_SYSCALLS()						\
-	CPU_DISCARD(init.rodata)					\
 	MEM_DISCARD(init.rodata)					\
 	CLK_OF_TABLES()							\
 	CLKSRC_OF_TABLES()						\
@@ -505,19 +497,15 @@
 
 #define INIT_TEXT							\
 	*(.init.text)							\
-	CPU_DISCARD(init.text)						\
 	MEM_DISCARD(init.text)
 
 #define EXIT_DATA							\
 	*(.exit.data)							\
-	CPU_DISCARD(exit.data)						\
-	CPU_DISCARD(exit.rodata)					\
 	MEM_DISCARD(exit.data)						\
 	MEM_DISCARD(exit.rodata)
 
 #define EXIT_TEXT							\
 	*(.exit.text)							\
-	CPU_DISCARD(exit.text)						\
 	MEM_DISCARD(exit.text)
 
 #define EXIT_CALL							\
diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c
index 3d155dd..6216434 100644
--- a/scripts/mod/modpost.c
+++ b/scripts/mod/modpost.c
@@ -861,24 +861,23 @@ static void check_section(const char *modname, struct elf_info *elf,
 
 
 #define ALL_INIT_DATA_SECTIONS \
-	".init.setup$", ".init.rodata$", \
-	".cpuinit.rodata$", ".meminit.rodata$", \
-	".init.data$", ".cpuinit.data$", ".meminit.data$"
+	".init.setup$", ".init.rodata$", ".meminit.rodata$", \
+	".init.data$", ".meminit.data$"
 #define ALL_EXIT_DATA_SECTIONS \
-	".exit.data$", ".cpuexit.data$", ".memexit.data$"
+	".exit.data$", ".memexit.data$"
 
 #define ALL_INIT_TEXT_SECTIONS \
-	".init.text$", ".cpuinit.text$", ".meminit.text$"
+	".init.text$", ".meminit.text$"
 #define ALL_EXIT_TEXT_SECTIONS \
-	".exit.text$", ".cpuexit.text$", ".memexit.text$"
+	".exit.text$", ".memexit.text$"
 
 #define ALL_PCI_INIT_SECTIONS	\
 	".pci_fixup_early$", ".pci_fixup_header$", ".pci_fixup_final$", \
 	".pci_fixup_enable$", ".pci_fixup_resume$", \
 	".pci_fixup_resume_early$", ".pci_fixup_suspend$"
 
-#define ALL_XXXINIT_SECTIONS CPU_INIT_SECTIONS, MEM_INIT_SECTIONS
-#define ALL_XXXEXIT_SECTIONS CPU_EXIT_SECTIONS, MEM_EXIT_SECTIONS
+#define ALL_XXXINIT_SECTIONS MEM_INIT_SECTIONS
+#define ALL_XXXEXIT_SECTIONS MEM_EXIT_SECTIONS
 
 #define ALL_INIT_SECTIONS INIT_SECTIONS, ALL_XXXINIT_SECTIONS
 #define ALL_EXIT_SECTIONS EXIT_SECTIONS, ALL_XXXEXIT_SECTIONS
@@ -887,11 +886,9 @@ static void check_section(const char *modname, struct elf_info *elf,
 #define TEXT_SECTIONS ".text$", ".text.unlikely$"
 
 #define INIT_SECTIONS      ".init.*"
-#define CPU_INIT_SECTIONS  ".cpuinit.*"
 #define MEM_INIT_SECTIONS  ".meminit.*"
 
 #define EXIT_SECTIONS      ".exit.*"
-#define CPU_EXIT_SECTIONS  ".cpuexit.*"
 #define MEM_EXIT_SECTIONS  ".memexit.*"
 
 /* init data sections */
@@ -979,48 +976,20 @@ const struct sectioncheck sectioncheck[] = {
 	.mismatch = DATA_TO_ANY_EXIT,
 	.symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL },
 },
-/* Do not reference init code/data from cpuinit/meminit code/data */
+/* Do not reference init code/data from meminit code/data */
 {
 	.fromsec = { ALL_XXXINIT_SECTIONS, NULL },
 	.tosec   = { INIT_SECTIONS, NULL },
 	.mismatch = XXXINIT_TO_SOME_INIT,
 	.symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL },
 },
-/* Do not reference cpuinit code/data from meminit code/data */
-{
-	.fromsec = { MEM_INIT_SECTIONS, NULL },
-	.tosec   = { CPU_INIT_SECTIONS, NULL },
-	.mismatch = XXXINIT_TO_SOME_INIT,
-	.symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL },
-},
-/* Do not reference meminit code/data from cpuinit code/data */
-{
-	.fromsec = { CPU_INIT_SECTIONS, NULL },
-	.tosec   = { MEM_INIT_SECTIONS, NULL },
-	.mismatch = XXXINIT_TO_SOME_INIT,
-	.symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL },
-},
-/* Do not reference exit code/data from cpuexit/memexit code/data */
+/* Do not reference exit code/data from memexit code/data */
 {
 	.fromsec = { ALL_XXXEXIT_SECTIONS, NULL },
 	.tosec   = { EXIT_SECTIONS, NULL },
 	.mismatch = XXXEXIT_TO_SOME_EXIT,
 	.symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL },
 },
-/* Do not reference cpuexit code/data from memexit code/data */
-{
-	.fromsec = { MEM_EXIT_SECTIONS, NULL },
-	.tosec   = { CPU_EXIT_SECTIONS, NULL },
-	.mismatch = XXXEXIT_TO_SOME_EXIT,
-	.symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL },
-},
-/* Do not reference memexit code/data from cpuexit code/data */
-{
-	.fromsec = { CPU_EXIT_SECTIONS, NULL },
-	.tosec   = { MEM_EXIT_SECTIONS, NULL },
-	.mismatch = XXXEXIT_TO_SOME_EXIT,
-	.symbol_white_list = { DEFAULT_SYMBOL_WHITE_LIST, NULL },
-},
 /* Do not use exit code/data from init code */
 {
 	.fromsec = { ALL_INIT_SECTIONS, NULL },
@@ -1089,8 +1058,6 @@ static const struct sectioncheck *section_mismatch(
  * Pattern 2:
  *   Many drivers utilise a *driver container with references to
  *   add, remove, probe functions etc.
- *   These functions may often be marked __cpuinit and we do not want to
- *   warn here.
  *   the pattern is identified by:
  *   tosec   = init or exit section
  *   fromsec = data section
@@ -1249,7 +1216,6 @@ static Elf_Sym *find_elf_symbol2(struct elf_info *elf, Elf_Addr addr,
 /*
  * Convert a section name to the function/data attribute
  * .init.text => __init
- * .cpuinit.data => __cpudata
  * .memexitconst => __memconst
  * etc.
  *
-- 
1.8.1.2


  parent reply	other threads:[~2013-06-24 19:40 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1372102237-8757-1-git-send-email-paul.gortmaker@windriver.com>
2013-06-24 19:30 ` [PATCH 01/32] init.h: remove __cpuinit sections from the kernel Paul Gortmaker
2013-06-24 19:51   ` Joe Perches
2013-06-24 22:10     ` Joe Perches
2013-06-24 19:30 ` Paul Gortmaker [this message]
2013-06-24 19:30 ` [PATCH 03/32] alpha: delete __cpuinit usage from all users Paul Gortmaker
2013-06-24 19:30 ` [PATCH 04/32] powerpc: " Paul Gortmaker
2013-06-24 19:30 ` [PATCH 05/32] parisc: " Paul Gortmaker
2013-06-24 19:30 ` [PATCH 06/32] ia64: delete __cpuinit usage from all ia64 users Paul Gortmaker
2013-06-24 19:30 ` [PATCH 07/32] arm: delete __cpuinit/__CPUINIT usage from all ARM users Paul Gortmaker
2013-07-02  8:52   ` Joseph Lo
2013-07-02  8:58     ` Russell King - ARM Linux
2013-07-02 17:53       ` Paul Gortmaker
2013-06-24 19:30 ` [PATCH 08/32] sparc: delete __cpuinit/__CPUINIT usage from all users Paul Gortmaker
2013-06-24 19:30 ` [PATCH 09/32] arm64: delete __cpuinit " Paul Gortmaker
2013-06-25  8:45   ` Catalin Marinas
2013-06-24 19:30 ` [PATCH 10/32] arc: delete __cpuinit usage from all arc files Paul Gortmaker
2013-06-25  4:37   ` Vineet Gupta
2013-06-24 19:30 ` [PATCH 11/32] blackfin: delete __cpuinit usage from all blackfin files Paul Gortmaker
2013-06-24 22:40   ` Mike Frysinger
2013-06-24 19:30 ` [PATCH 12/32] s390: delete __cpuinit usage from all s390 files Paul Gortmaker
2013-06-24 19:30 ` [PATCH 13/32] sh: delete __cpuinit usage from all sh files Paul Gortmaker
2013-06-24 19:30 ` [PATCH 14/32] tile: delete __cpuinit usage from all tile files Paul Gortmaker
2013-06-24 19:30 ` [PATCH 15/32] metag: delete __cpuinit usage from all metag files Paul Gortmaker
2013-06-25 15:10   ` James Hogan
2013-06-24 19:30 ` [PATCH 16/32] cris: delete __cpuinit usage from all cris files Paul Gortmaker
2013-06-25 10:42   ` Jesper Nilsson
2013-06-24 19:30 ` [PATCH 17/32] frv: delete __cpuinit usage from all frv files Paul Gortmaker
2013-06-24 19:30 ` [PATCH 18/32] hexagon: delete __cpuinit usage from all hexagon files Paul Gortmaker
2013-07-08 17:01   ` Richard Kuo
2013-06-24 19:30 ` [PATCH 19/32] m32r: delete __cpuinit usage from all m32r files Paul Gortmaker
2013-06-24 19:30 ` [PATCH 20/32] openrisc: delete __cpuinit usage from all openrisc files Paul Gortmaker
2013-06-24 19:30 ` [PATCH 21/32] xtensa: delete __cpuinit usage from all xtensa files Paul Gortmaker
2013-06-24 19:30 ` [PATCH 22/32] score: delete __cpuinit usage from all score files Paul Gortmaker
2013-06-24 19:30 ` [PATCH 23/32] x86: delete __cpuinit usage from all x86 files Paul Gortmaker
2013-06-24 19:37   ` Ingo Molnar
2013-06-24 19:57   ` Thomas Gleixner
2013-06-24 23:12   ` H. Peter Anvin
2013-06-25  2:16     ` Paul Gortmaker
2013-06-24 19:30 ` [PATCH 24/32] clocksource+irqchip: delete __cpuinit usage from all related files Paul Gortmaker
2013-06-24 19:56   ` Thomas Gleixner
2013-06-24 19:30 ` [PATCH 25/32] cpufreq: delete __cpuinit usage from all cpufreq files Paul Gortmaker
2013-06-24 22:42   ` Dirk Brandewie
2013-06-25  3:31   ` Viresh Kumar
2013-06-25  4:15     ` Joe Perches
2013-06-25  6:44       ` Viresh Kumar
2013-06-25  6:59         ` Joe Perches
2013-06-25  7:01           ` Viresh Kumar
2013-06-25 14:30     ` Paul Gortmaker
2013-06-24 19:30 ` [PATCH 26/32] hwmon: delete __cpuinit usage from all hwmon files Paul Gortmaker
2013-06-24 20:11   ` [lm-sensors] " Guenter Roeck
2013-06-24 19:30 ` [PATCH 27/32] acpi: delete __cpuinit usage from all acpi files Paul Gortmaker
2013-06-24 19:30 ` [PATCH 28/32] net: delete __cpuinit usage from all net files Paul Gortmaker
2013-06-24 19:30 ` [PATCH 29/32] rcu: delete __cpuinit usage from all rcu files Paul Gortmaker
2013-06-25  1:10   ` Josh Triplett
2013-06-25 19:32     ` Paul E. McKenney
2013-06-24 19:30 ` [PATCH 30/32] kernel: delete __cpuinit usage from all core kernel files Paul Gortmaker
2013-06-24 19:30 ` [PATCH 31/32] drivers: delete __cpuinit usage from all remaining drivers files Paul Gortmaker
2013-06-24 20:33   ` Greg Kroah-Hartman
2013-06-24 19:30 ` [PATCH 32/32] block: delete __cpuinit usage from all block files Paul Gortmaker
2013-06-24 20:00 ` [PATCH-next 00/32] Delete support for __cpuinit Paul Gortmaker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1372102237-8757-3-git-send-email-paul.gortmaker@windriver.com \
    --to=paul.gortmaker@windriver.com \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).