aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-generic
diff options
context:
space:
mode:
Diffstat (limited to 'include/asm-generic')
-rw-r--r--include/asm-generic/bitops/sched.h2
-rw-r--r--include/asm-generic/bug.h5
-rw-r--r--include/asm-generic/vmlinux.lds.h35
3 files changed, 40 insertions, 2 deletions
diff --git a/include/asm-generic/bitops/sched.h b/include/asm-generic/bitops/sched.h
index 5ef93a4d009f..815bb0148060 100644
--- a/include/asm-generic/bitops/sched.h
+++ b/include/asm-generic/bitops/sched.h
@@ -15,7 +15,7 @@ static inline int sched_find_first_bit(const unsigned long *b)
15#if BITS_PER_LONG == 64 15#if BITS_PER_LONG == 64
16 if (unlikely(b[0])) 16 if (unlikely(b[0]))
17 return __ffs(b[0]); 17 return __ffs(b[0]);
18 if (unlikely(b[1])) 18 if (likely(b[1]))
19 return __ffs(b[1]) + 64; 19 return __ffs(b[1]) + 64;
20 return __ffs(b[2]) + 128; 20 return __ffs(b[2]) + 128;
21#elif BITS_PER_LONG == 32 21#elif BITS_PER_LONG == 32
diff --git a/include/asm-generic/bug.h b/include/asm-generic/bug.h
index 1d9573cf4a0b..c92ae0f166ff 100644
--- a/include/asm-generic/bug.h
+++ b/include/asm-generic/bug.h
@@ -37,7 +37,10 @@
37#endif 37#endif
38 38
39#ifndef HAVE_ARCH_WARN_ON 39#ifndef HAVE_ARCH_WARN_ON
40#define WARN_ON(condition) unlikely((condition)) 40#define WARN_ON(condition) ({ \
41 typeof(condition) __ret_warn_on = (condition); \
42 unlikely(__ret_warn_on); \
43})
41#endif 44#endif
42#endif 45#endif
43 46
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 69240b52f8e1..e60d6f21fa62 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -125,6 +125,10 @@
125 *(__param) \ 125 *(__param) \
126 VMLINUX_SYMBOL(__stop___param) = .; \ 126 VMLINUX_SYMBOL(__stop___param) = .; \
127 } \ 127 } \
128 \
129 /* Unwind data binary search table */ \
130 EH_FRAME_HDR \
131 \
128 __end_rodata = .; \ 132 __end_rodata = .; \
129 . = ALIGN(4096); 133 . = ALIGN(4096);
130 134
@@ -157,6 +161,18 @@
157 *(.kprobes.text) \ 161 *(.kprobes.text) \
158 VMLINUX_SYMBOL(__kprobes_text_end) = .; 162 VMLINUX_SYMBOL(__kprobes_text_end) = .;
159 163
164#ifdef CONFIG_STACK_UNWIND
165 /* Unwind data binary search table */
166#define EH_FRAME_HDR \
167 .eh_frame_hdr : AT(ADDR(.eh_frame_hdr) - LOAD_OFFSET) { \
168 VMLINUX_SYMBOL(__start_unwind_hdr) = .; \
169 *(.eh_frame_hdr) \
170 VMLINUX_SYMBOL(__end_unwind_hdr) = .; \
171 }
172#else
173#define EH_FRAME_HDR
174#endif
175
160 /* DWARF debug sections. 176 /* DWARF debug sections.
161 Symbols in the DWARF debugging sections are relative to 177 Symbols in the DWARF debugging sections are relative to
162 the beginning of the section so we begin them at 0. */ 178 the beginning of the section so we begin them at 0. */
@@ -197,3 +213,22 @@
197 213
198#define NOTES \ 214#define NOTES \
199 .notes : { *(.note.*) } :note 215 .notes : { *(.note.*) } :note
216
217#define INITCALLS \
218 *(.initcall0.init) \
219 *(.initcall0s.init) \
220 *(.initcall1.init) \
221 *(.initcall1s.init) \
222 *(.initcall2.init) \
223 *(.initcall2s.init) \
224 *(.initcall3.init) \
225 *(.initcall3s.init) \
226 *(.initcall4.init) \
227 *(.initcall4s.init) \
228 *(.initcall5.init) \
229 *(.initcall5s.init) \
230 *(.initcall6.init) \
231 *(.initcall6s.init) \
232 *(.initcall7.init) \
233 *(.initcall7s.init)
234