aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/init.h77
1 files changed, 38 insertions, 39 deletions
diff --git a/include/linux/init.h b/include/linux/init.h
index 998076818402..dcb66c76bd48 100644
--- a/include/linux/init.h
+++ b/include/linux/init.h
@@ -60,18 +60,54 @@
60#define __exit_refok noinline __section(.exit.text.refok) 60#define __exit_refok noinline __section(.exit.text.refok)
61 61
62#ifdef MODULE 62#ifdef MODULE
63#define __exit __section(.exit.text) __cold 63#define __exitused
64#else 64#else
65#define __exit __attribute_used__ __section(.exit.text) __cold 65#define __exitused __used
66#endif 66#endif
67 67
68#define __exit __section(.exit.text) __exitused __cold
69
70/* Used for HOTPLUG */
71#define __devinit __section(.devinit.text) __cold
72#define __devinitdata __section(.devinit.data)
73#define __devinitconst __section(.devinit.rodata)
74#define __devexit __section(.devexit.text) __exitused __cold
75#define __devexitdata __section(.devexit.data)
76#define __devexitconst __section(.devexit.rodata)
77
78/* Used for HOTPLUG_CPU */
79#define __cpuinit __section(.cpuinit.text) __cold
80#define __cpuinitdata __section(.cpuinit.data)
81#define __cpuinitconst __section(.cpuinit.rodata)
82#define __cpuexit __section(.cpuexit.text) __exitused __cold
83#define __cpuexitdata __section(.cpuexit.data)
84#define __cpuexitconst __section(.cpuexit.rodata)
85
86/* Used for MEMORY_HOTPLUG */
87#define __meminit __section(.meminit.text) __cold
88#define __meminitdata __section(.meminit.data)
89#define __meminitconst __section(.meminit.rodata)
90#define __memexit __section(.memexit.text) __exitused __cold
91#define __memexitdata __section(.memexit.data)
92#define __memexitconst __section(.memexit.rodata)
93
68/* For assembly routines */ 94/* For assembly routines */
69#define __INIT .section ".init.text","ax" 95#define __INIT .section ".init.text","ax"
70#define __INIT_REFOK .section ".text.init.refok","ax" 96#define __INIT_REFOK .section ".text.init.refok","ax"
71#define __FINIT .previous 97#define __FINIT .previous
98
72#define __INITDATA .section ".init.data","aw" 99#define __INITDATA .section ".init.data","aw"
73#define __INITDATA_REFOK .section ".data.init.refok","aw" 100#define __INITDATA_REFOK .section ".data.init.refok","aw"
74 101
102#define __DEVINIT .section ".devinit.text", "ax"
103#define __DEVINITDATA .section ".devinit.data", "aw"
104
105#define __CPUINIT .section ".cpuinit.text", "ax"
106#define __CPUINITDATA .section ".cpuinit.data", "aw"
107
108#define __MEMINIT .section ".meminit.text", "ax"
109#define __MEMINITDATA .section ".meminit.data", "aw"
110
75#ifndef __ASSEMBLY__ 111#ifndef __ASSEMBLY__
76/* 112/*
77 * Used for initialization calls.. 113 * Used for initialization calls..
@@ -254,43 +290,6 @@ void __init parse_early_param(void);
254#define __initdata_or_module __initdata 290#define __initdata_or_module __initdata
255#endif /*CONFIG_MODULES*/ 291#endif /*CONFIG_MODULES*/
256 292
257#ifdef CONFIG_HOTPLUG
258#define __devinit
259#define __devinitdata
260#define __devexit
261#define __devexitdata
262#else
263#define __devinit __init
264#define __devinitdata __initdata
265#define __devexit __exit
266#define __devexitdata __exitdata
267#endif
268
269#ifdef CONFIG_HOTPLUG_CPU
270#define __cpuinit
271#define __cpuinitdata
272#define __cpuexit
273#define __cpuexitdata
274#else
275#define __cpuinit __init
276#define __cpuinitdata __initdata
277#define __cpuexit __exit
278#define __cpuexitdata __exitdata
279#endif
280
281#if defined(CONFIG_MEMORY_HOTPLUG) || defined(CONFIG_ACPI_HOTPLUG_MEMORY) \
282 || defined(CONFIG_ACPI_HOTPLUG_MEMORY_MODULE)
283#define __meminit
284#define __meminitdata
285#define __memexit
286#define __memexitdata
287#else
288#define __meminit __init
289#define __meminitdata __initdata
290#define __memexit __exit
291#define __memexitdata __exitdata
292#endif
293
294/* Functions marked as __devexit may be discarded at kernel link time, depending 293/* Functions marked as __devexit may be discarded at kernel link time, depending
295 on config options. Newer versions of binutils detect references from 294 on config options. Newer versions of binutils detect references from
296 retained sections to discarded sections and flag an error. Pointers to 295 retained sections to discarded sections and flag an error. Pointers to