public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH percpu#for-next] ia64: add sparse annotation to __ia64_per_cpu_var()
@ 2009-10-29 14:03 Tejun Heo
  2009-10-29 18:44 ` Christoph Lameter
  0 siblings, 1 reply; 2+ messages in thread
From: Tejun Heo @ 2009-10-29 14:03 UTC (permalink / raw)
  To: Linux Kernel Mailing List, 'linux-ia64@vger.kernel.org',
	Luck, Tony, Christoph Lameter

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>
---
 arch/ia64/include/asm/percpu.h |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Index: work/arch/ia64/include/asm/percpu.h
===================================================================
--- work.orig/arch/ia64/include/asm/percpu.h
+++ work/arch/ia64/include/asm/percpu.h
@@ -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>
 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-10-29 14:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-29 14:03 [PATCH percpu#for-next] ia64: add sparse annotation to __ia64_per_cpu_var() Tejun Heo
2009-10-29 18:44 ` Christoph Lameter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox