aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/compiler.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2010-02-17 12:27:37 -0500
committerThomas Gleixner <tglx@linutronix.de>2010-02-17 12:28:05 -0500
commitb7e56edba4b02f2079042c326a8cd72a44635817 (patch)
treeb5042002e9747cd8fb1278d61f86d8b92a74c018 /include/linux/compiler.h
parent13ca0fcaa33f6b1984c4111b6ec5df42689fea6f (diff)
parentb0483e78e5c4c9871fc5541875b3bc006846d46b (diff)
Merge branch 'linus' into x86/mm
x86/mm is on 32-rc4 and missing the spinlock namespace changes which are needed for further commits into this topic. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/compiler.h')
-rw-r--r--include/linux/compiler.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 04fb5135b4e1..188fcae10a99 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -15,6 +15,7 @@
15# define __acquire(x) __context__(x,1) 15# define __acquire(x) __context__(x,1)
16# define __release(x) __context__(x,-1) 16# define __release(x) __context__(x,-1)
17# define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0) 17# define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0)
18# define __percpu __attribute__((noderef, address_space(3)))
18extern void __chk_user_ptr(const volatile void __user *); 19extern void __chk_user_ptr(const volatile void __user *);
19extern void __chk_io_ptr(const volatile void __iomem *); 20extern void __chk_io_ptr(const volatile void __iomem *);
20#else 21#else
@@ -32,6 +33,7 @@ extern void __chk_io_ptr(const volatile void __iomem *);
32# define __acquire(x) (void)0 33# define __acquire(x) (void)0
33# define __release(x) (void)0 34# define __release(x) (void)0
34# define __cond_lock(x,c) (c) 35# define __cond_lock(x,c) (c)
36# define __percpu
35#endif 37#endif
36 38
37#ifdef __KERNEL__ 39#ifdef __KERNEL__
@@ -144,6 +146,11 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
144# define barrier() __memory_barrier() 146# define barrier() __memory_barrier()
145#endif 147#endif
146 148
149/* Unreachable code */
150#ifndef unreachable
151# define unreachable() do { } while (1)
152#endif
153
147#ifndef RELOC_HIDE 154#ifndef RELOC_HIDE
148# define RELOC_HIDE(ptr, off) \ 155# define RELOC_HIDE(ptr, off) \
149 ({ unsigned long __ptr; \ 156 ({ unsigned long __ptr; \
@@ -213,6 +220,10 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
213# define __maybe_unused /* unimplemented */ 220# define __maybe_unused /* unimplemented */
214#endif 221#endif
215 222
223#ifndef __always_unused
224# define __always_unused /* unimplemented */
225#endif
226
216#ifndef noinline 227#ifndef noinline
217#define noinline 228#define noinline
218#endif 229#endif
@@ -266,6 +277,17 @@ void ftrace_likely_update(struct ftrace_branch_data *f, int val, int expect);
266# define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b)) 277# define __same_type(a, b) __builtin_types_compatible_p(typeof(a), typeof(b))
267#endif 278#endif
268 279
280/* Compile time object size, -1 for unknown */
281#ifndef __compiletime_object_size
282# define __compiletime_object_size(obj) -1
283#endif
284#ifndef __compiletime_warning
285# define __compiletime_warning(message)
286#endif
287#ifndef __compiletime_error
288# define __compiletime_error(message)
289#endif
290
269/* 291/*
270 * Prevent the compiler from merging or refetching accesses. The compiler 292 * Prevent the compiler from merging or refetching accesses. The compiler
271 * is also forbidden from reordering successive instances of ACCESS_ONCE(), 293 * is also forbidden from reordering successive instances of ACCESS_ONCE(),