|
120 | 120 | /* Exception table entry */
|
121 | 121 | #ifdef __ASSEMBLY__
|
122 | 122 | # define _ASM_EXTABLE_HANDLE(from, to, handler) \
|
123 |
| - .pushsection "__ex_table","a" ; \ |
124 |
| - .balign 4 ; \ |
125 |
| - .long (from) - . ; \ |
126 |
| - .long (to) - . ; \ |
127 |
| - .long (handler) - . ; \ |
| 123 | + ASM_EXTABLE_HANDLE from to handler |
| 124 | + |
| 125 | +.macro ASM_EXTABLE_HANDLE from:req to:req handler:req |
| 126 | + .pushsection "__ex_table","a" |
| 127 | + .balign 4 |
| 128 | + .long (\from) - . |
| 129 | + .long (\to) - . |
| 130 | + .long (\handler) - . |
128 | 131 | .popsection
|
| 132 | +.endm |
| 133 | +#else /* __ASSEMBLY__ */ |
| 134 | + |
| 135 | +# define _ASM_EXTABLE_HANDLE(from, to, handler) \ |
| 136 | + "ASM_EXTABLE_HANDLE from=" #from " to=" #to \ |
| 137 | + " handler=\"" #handler "\"\n\t" |
| 138 | + |
| 139 | +/* For C file, we already have NOKPROBE_SYMBOL macro */ |
| 140 | + |
| 141 | +#endif /* __ASSEMBLY__ */ |
129 | 142 |
|
130 | 143 | # define _ASM_EXTABLE(from, to) \
|
131 | 144 | _ASM_EXTABLE_HANDLE(from, to, ex_handler_default)
|
|
148 | 161 | _ASM_PTR (entry); \
|
149 | 162 | .popsection
|
150 | 163 |
|
| 164 | +#ifdef __ASSEMBLY__ |
151 | 165 | .macro ALIGN_DESTINATION
|
152 | 166 | /* check for bad alignment of destination */
|
153 | 167 | movl %edi,%ecx
|
|
171 | 185 | _ASM_EXTABLE_UA(100b, 103b)
|
172 | 186 | _ASM_EXTABLE_UA(101b, 103b)
|
173 | 187 | .endm
|
174 |
| - |
175 |
| -#else |
176 |
| -# define _EXPAND_EXTABLE_HANDLE(x) #x |
177 |
| -# define _ASM_EXTABLE_HANDLE(from, to, handler) \ |
178 |
| - " .pushsection \"__ex_table\",\"a\"\n" \ |
179 |
| - " .balign 4\n" \ |
180 |
| - " .long (" #from ") - .\n" \ |
181 |
| - " .long (" #to ") - .\n" \ |
182 |
| - " .long (" _EXPAND_EXTABLE_HANDLE(handler) ") - .\n" \ |
183 |
| - " .popsection\n" |
184 |
| - |
185 |
| -# define _ASM_EXTABLE(from, to) \ |
186 |
| - _ASM_EXTABLE_HANDLE(from, to, ex_handler_default) |
187 |
| - |
188 |
| -# define _ASM_EXTABLE_UA(from, to) \ |
189 |
| - _ASM_EXTABLE_HANDLE(from, to, ex_handler_uaccess) |
190 |
| - |
191 |
| -# define _ASM_EXTABLE_FAULT(from, to) \ |
192 |
| - _ASM_EXTABLE_HANDLE(from, to, ex_handler_fault) |
193 |
| - |
194 |
| -# define _ASM_EXTABLE_EX(from, to) \ |
195 |
| - _ASM_EXTABLE_HANDLE(from, to, ex_handler_ext) |
196 |
| - |
197 |
| -# define _ASM_EXTABLE_REFCOUNT(from, to) \ |
198 |
| - _ASM_EXTABLE_HANDLE(from, to, ex_handler_refcount) |
199 |
| - |
200 |
| -/* For C file, we already have NOKPROBE_SYMBOL macro */ |
201 |
| -#endif |
| 188 | +#endif /* __ASSEMBLY__ */ |
202 | 189 |
|
203 | 190 | #ifndef __ASSEMBLY__
|
204 | 191 | /*
|
|
0 commit comments