summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2010-02-05 06:09:11 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2010-02-05 16:35:05 +0100
commit2938429501b73f6aeb312236eac7ed0416a07cd5 (patch)
tree59d92b0d2a5063fa8c93216750f83d1fe3822a2c /include
parentMerge branch 'drm-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/air... (diff)
downloadlinux-2938429501b73f6aeb312236eac7ed0416a07cd5.tar.xz
linux-2938429501b73f6aeb312236eac7ed0416a07cd5.zip
percpu: add __percpu for sparse
This is to make the annotation of percpu variables during the next merge window less painfull. Extracted from a patch by Rusty Russell. Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au> Acked-by: Tejun Heo <tj@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include')
-rw-r--r--include/linux/compiler.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/compiler.h b/include/linux/compiler.h
index 5be3dab4a695..188fcae10a99 100644
--- a/include/linux/compiler.h
+++ b/include/linux/compiler.h
@@ -15,6 +15,7 @@
# define __acquire(x) __context__(x,1)
# define __release(x) __context__(x,-1)
# define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0)
+# define __percpu __attribute__((noderef, address_space(3)))
extern void __chk_user_ptr(const volatile void __user *);
extern void __chk_io_ptr(const volatile void __iomem *);
#else
@@ -32,6 +33,7 @@ extern void __chk_io_ptr(const volatile void __iomem *);
# define __acquire(x) (void)0
# define __release(x) (void)0
# define __cond_lock(x,c) (c)
+# define __percpu
#endif
#ifdef __KERNEL__