All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tejun Heo <tj@kernel.org>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"'linux-ia64@vger.kernel.org'" <linux-ia64@vger.kernel.org>,
	"Luck, Tony" <tony.luck@intel.com>,
	Christoph Lameter <cl@linux-foundation.org>
Subject: [PATCH percpu#for-next] ia64: add sparse annotation to __ia64_per_cpu_var()
Date: Thu, 29 Oct 2009 14:03:31 +0000	[thread overview]
Message-ID: <4AE9A0B3.4010305@kernel.org> (raw)

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>
 

WARNING: multiple messages have this Message-ID (diff)
From: Tejun Heo <tj@kernel.org>
To: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"'linux-ia64@vger.kernel.org'" <linux-ia64@vger.kernel.org>,
	"Luck, Tony" <tony.luck@intel.com>,
	Christoph Lameter <cl@linux-foundation.org>
Subject: [PATCH percpu#for-next] ia64: add sparse annotation to __ia64_per_cpu_var()
Date: Thu, 29 Oct 2009 15:03:31 +0100	[thread overview]
Message-ID: <4AE9A0B3.4010305@kernel.org> (raw)

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>
 

             reply	other threads:[~2009-10-29 14:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-29 14:03 Tejun Heo [this message]
2009-10-29 14:03 ` [PATCH percpu#for-next] ia64: add sparse annotation to __ia64_per_cpu_var() Tejun Heo
2009-10-29 14:49 ` [PATCH percpu#for-next] ia64: add sparse annotation to Christoph Lameter
2009-10-29 18:44   ` [PATCH percpu#for-next] ia64: add sparse annotation to __ia64_per_cpu_var() Christoph Lameter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4AE9A0B3.4010305@kernel.org \
    --to=tj@kernel.org \
    --cc=cl@linux-foundation.org \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tony.luck@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.