aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/init.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/init.h')
-rw-r--r--include/linux/init.h27
1 files changed, 17 insertions, 10 deletions
diff --git a/include/linux/init.h b/include/linux/init.h
index de994304e0bb..9146f39cdddf 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -46,16 +46,23 @@
46#define __exitdata __section(.exit.data) 46#define __exitdata __section(.exit.data)
47#define __exit_call __used __section(.exitcall.exit) 47#define __exit_call __used __section(.exitcall.exit)
48 48
49/* modpost check for section mismatches during the kernel build. 49/*
50 * modpost check for section mismatches during the kernel build.
50 * A section mismatch happens when there are references from a 51 * A section mismatch happens when there are references from a
51 * code or data section to an init section (both code or data). 52 * code or data section to an init section (both code or data).
52 * The init sections are (for most archs) discarded by the kernel 53 * The init sections are (for most archs) discarded by the kernel
53 * when early init has completed so all such references are potential bugs. 54 * when early init has completed so all such references are potential bugs.
54 * For exit sections the same issue exists. 55 * For exit sections the same issue exists.
56 *
55 * The following markers are used for the cases where the reference to 57 * The following markers are used for the cases where the reference to
56 * the *init / *exit section (code or data) is valid and will teach 58 * the *init / *exit section (code or data) is valid and will teach
57 * modpost not to issue a warning. 59 * modpost not to issue a warning. Intended semantics is that a code or
58 * The markers follow same syntax rules as __init / __initdata. */ 60 * data tagged __ref* can reference code or data from init section without
61 * producing a warning (of course, no warning does not mean code is
62 * correct, so optimally document why the __ref is needed and why it's OK).
63 *
64 * The markers follow same syntax rules as __init / __initdata.
65 */
59#define __ref __section(.ref.text) noinline 66#define __ref __section(.ref.text) noinline
60#define __refdata __section(.ref.data) 67#define __refdata __section(.ref.data)
61#define __refconst __section(.ref.rodata) 68#define __refconst __section(.ref.rodata)
@@ -72,29 +79,29 @@
72#define __exitused __used 79#define __exitused __used
73#endif 80#endif
74 81
75#define __exit __section(.exit.text) __exitused __cold 82#define __exit __section(.exit.text) __exitused __cold notrace
76 83
77/* Used for HOTPLUG */ 84/* Used for HOTPLUG */
78#define __devinit __section(.devinit.text) __cold 85#define __devinit __section(.devinit.text) __cold notrace
79#define __devinitdata __section(.devinit.data) 86#define __devinitdata __section(.devinit.data)
80#define __devinitconst __section(.devinit.rodata) 87#define __devinitconst __section(.devinit.rodata)
81#define __devexit __section(.devexit.text) __exitused __cold 88#define __devexit __section(.devexit.text) __exitused __cold notrace
82#define __devexitdata __section(.devexit.data) 89#define __devexitdata __section(.devexit.data)
83#define __devexitconst __section(.devexit.rodata) 90#define __devexitconst __section(.devexit.rodata)
84 91
85/* Used for HOTPLUG_CPU */ 92/* Used for HOTPLUG_CPU */
86#define __cpuinit __section(.cpuinit.text) __cold 93#define __cpuinit __section(.cpuinit.text) __cold notrace
87#define __cpuinitdata __section(.cpuinit.data) 94#define __cpuinitdata __section(.cpuinit.data)
88#define __cpuinitconst __section(.cpuinit.rodata) 95#define __cpuinitconst __section(.cpuinit.rodata)
89#define __cpuexit __section(.cpuexit.text) __exitused __cold 96#define __cpuexit __section(.cpuexit.text) __exitused __cold notrace
90#define __cpuexitdata __section(.cpuexit.data) 97#define __cpuexitdata __section(.cpuexit.data)
91#define __cpuexitconst __section(.cpuexit.rodata) 98#define __cpuexitconst __section(.cpuexit.rodata)
92 99
93/* Used for MEMORY_HOTPLUG */ 100/* Used for MEMORY_HOTPLUG */
94#define __meminit __section(.meminit.text) __cold 101#define __meminit __section(.meminit.text) __cold notrace
95#define __meminitdata __section(.meminit.data) 102#define __meminitdata __section(.meminit.data)
96#define __meminitconst __section(.meminit.rodata) 103#define __meminitconst __section(.meminit.rodata)
97#define __memexit __section(.memexit.text) __exitused __cold 104#define __memexit __section(.memexit.text) __exitused __cold notrace
98#define __memexitdata __section(.memexit.data) 105#define __memexitdata __section(.memexit.data)
99#define __memexitconst __section(.memexit.rodata) 106#define __memexitconst __section(.memexit.rodata)
100 107