|
52 | 52 | * when early init has completed so all such references are potential bugs.
|
53 | 53 | * For exit sections the same issue exists.
|
54 | 54 | * The following markers are used for the cases where the reference to
|
55 |
| - * the init/exit section (code or data) is valid and will teach modpost |
56 |
| - * not to issue a warning. |
| 55 | + * the *init / *exit section (code or data) is valid and will teach |
| 56 | + * modpost not to issue a warning. |
57 | 57 | * The markers follow same syntax rules as __init / __initdata. */
|
58 |
| -#define __init_refok noinline __section(.text.init.refok) |
59 |
| -#define __initdata_refok __section(.data.init.refok) |
60 |
| -#define __exit_refok noinline __section(.exit.text.refok) |
| 58 | +#define __ref __section(.ref.text) noinline |
| 59 | +#define __refdata __section(.ref.data) |
| 60 | +#define __refconst __section(.ref.rodata) |
| 61 | + |
| 62 | +/* backward compatibility note |
| 63 | + * A few places hardcode the old section names: |
| 64 | + * .text.init.refok |
| 65 | + * .data.init.refok |
| 66 | + * .exit.text.refok |
| 67 | + * They should be converted to use the defines from this file |
| 68 | + */ |
| 69 | + |
| 70 | +/* compatibility defines */ |
| 71 | +#define __init_refok __ref |
| 72 | +#define __initdata_refok __refdata |
| 73 | +#define __exit_refok __ref |
| 74 | + |
61 | 75 |
|
62 | 76 | #ifdef MODULE
|
63 | 77 | #define __exitused
|
|
93 | 107 |
|
94 | 108 | /* For assembly routines */
|
95 | 109 | #define __INIT .section ".init.text","ax"
|
96 |
| -#define __INIT_REFOK .section ".text.init.refok","ax" |
97 | 110 | #define __FINIT .previous
|
98 | 111 |
|
99 | 112 | #define __INITDATA .section ".init.data","aw"
|
100 |
| -#define __INITDATA_REFOK .section ".data.init.refok","aw" |
101 | 113 |
|
102 | 114 | #define __DEVINIT .section ".devinit.text", "ax"
|
103 | 115 | #define __DEVINITDATA .section ".devinit.data", "aw"
|
|
108 | 120 | #define __MEMINIT .section ".meminit.text", "ax"
|
109 | 121 | #define __MEMINITDATA .section ".meminit.data", "aw"
|
110 | 122 |
|
| 123 | +/* silence warnings when references are OK */ |
| 124 | +#define __REF .section ".ref.text", "ax" |
| 125 | +#define __REFDATA .section ".ref.data", "aw" |
| 126 | +#define __REFCONST .section ".ref.rodata", "aw" |
| 127 | +/* backward compatibility */ |
| 128 | +#define __INIT_REFOK .section __REF |
| 129 | +#define __INITDATA_REFOK .section __REFDATA |
| 130 | + |
111 | 131 | #ifndef __ASSEMBLY__
|
112 | 132 | /*
|
113 | 133 | * Used for initialization calls..
|
|
0 commit comments