ia64: add sparse annotation to __ia64_per_cpu_var()
authorTejun Heo <tj@kernel.org>
Wed, 12 May 2010 10:10:39 +0000 (12:10 +0200)
committerTejun Heo <tj@kernel.org>
Wed, 12 May 2010 10:10:39 +0000 (12:10 +0200)
ia64 has its own optimized percpu accessor - __ia64_per_cpu_var().
Add percpu sparse annotations to it.

Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Christoph Lameter <cl@linux-foundation.org>
arch/ia64/include/asm/percpu.h

index f7c00a5e0e2be27f144b40a516215e93cd5d7323..1bd4082656940709a715b69b339b86ea3b80db1e 100644 (file)
@@ -39,7 +39,10 @@ extern void *per_cpu_init(void);
  * On the positive side, using __ia64_per_cpu_var() instead of __get_cpu_var() is slightly
  * more efficient.
  */
-#define __ia64_per_cpu_var(var)        var
+#define __ia64_per_cpu_var(var) (*({                                   \
+       __verify_pcpu_ptr(&(var));                                      \
+       ((typeof(var) __kernel __force *)&(var));                       \
+}))
 
 #include <asm-generic/percpu.h>