Commit 29384295 authored by Stephen Rothwell's avatar Stephen Rothwell Committed by Linus Torvalds

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: default avatarStephen Rothwell <sfr@canb.auug.org.au>
Acked-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent cbee4751
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
# define __acquire(x) __context__(x,1) # define __acquire(x) __context__(x,1)
# define __release(x) __context__(x,-1) # define __release(x) __context__(x,-1)
# define __cond_lock(x,c) ((c) ? ({ __acquire(x); 1; }) : 0) # 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_user_ptr(const volatile void __user *);
extern void __chk_io_ptr(const volatile void __iomem *); extern void __chk_io_ptr(const volatile void __iomem *);
#else #else
...@@ -32,6 +33,7 @@ extern void __chk_io_ptr(const volatile void __iomem *); ...@@ -32,6 +33,7 @@ extern void __chk_io_ptr(const volatile void __iomem *);
# define __acquire(x) (void)0 # define __acquire(x) (void)0
# define __release(x) (void)0 # define __release(x) (void)0
# define __cond_lock(x,c) (c) # define __cond_lock(x,c) (c)
# define __percpu
#endif #endif
#ifdef __KERNEL__ #ifdef __KERNEL__
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment