From: Stephen Rothwell Date: Fri, 5 Feb 2010 05:09:11 +0000 (+1100) Subject: percpu: add __percpu for sparse X-Git-Tag: upstream/snapshot3+hdmi~15707 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2938429501b73f6aeb312236eac7ed0416a07cd5;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Acked-by: Tejun Heo Signed-off-by: Linus Torvalds --- diff --git a/include/linux/compiler.h b/include/linux/compiler.h index 5be3dab..188fcae 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__