From: Al Viro <viro@ZenIV.linux.org.uk>
To: Tejun Heo <tj@kernel.org>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
Frederic Weisbecker <fweisbec@gmail.com>,
linux-kernel@vger.kernel.org, axboe@kernel.dk,
rusty@rustcorp.com.au, akpm@linux-foundation.org,
ebiederm@xmission.com, tytso@mit.edu, Trond.Myklebust@netapp.com,
aelder@sgi.com, hch@infradead.org, davem@davemloft.net,
netdev@vger.kernel.org, x86@kernel.org, mingo@redhat.com,
dan.j.williams@intel.com, borislav.petkov@amd.com,
ying.huang@intel.com, lenb@kernel.org, neilb@suse.de,
cl@linux-foundation.org
Subject: Re: [PATCH 7/8] percpu: add __percpu sparse annotations to hw_breakpoint
Date: Tue, 26 Jan 2010 02:32:38 +0000 [thread overview]
Message-ID: <20100126023238.GC19799@ZenIV.linux.org.uk> (raw)
In-Reply-To: <4B5E508A.1030305@kernel.org>
On Tue, Jan 26, 2010 at 11:16:42AM +0900, Tejun Heo wrote:
> # define RELOC_HIDE(ptr, off) \
> ({ unsigned long __ptr; \
> __ptr = (unsigned long) (ptr); \
> (typeof(ptr)) (__ptr + (off)); })
>
> #define __verify_pcpu_ptr(ptr) do { \
> const void __percpu *__vpp_verify = (typeof(ptr))NULL; \
> (void)__vpp_verify; \
> } while (0)
>
> /* Weird cast keeps both GCC and sparse happy. */
> #define SHIFT_PERCPU_PTR(__p, __offset) ({ \
> __verify_pcpu_ptr((__p)); \
> RELOC_HIDE((typeof(*(__p)) __kernel __force *)(__p), (__offset)); \
> })
>
> #define per_cpu(var, cpu) \
> (*SHIFT_PERCPU_PTR(&(var), per_cpu_offset(cpu)))
Eh... You are leaving that noderef in place in case of array. And _that_
is not an address space, so casts to AS 0 won't do you any good.
next prev parent reply other threads:[~2010-01-26 2:33 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-25 15:22 [PATCHSET] percpu: add __percpu sparse annotations Tejun Heo
2010-01-25 15:22 ` [PATCH 1/8] percpu: add __percpu sparse annotations to core kernel subsystems Tejun Heo
2010-01-25 21:58 ` Christoph Lameter
2010-01-31 11:42 ` Paul E. McKenney
2010-01-25 15:22 ` [PATCH 2/8] percpu: add __percpu sparse annotations to fs Tejun Heo
2010-01-25 15:22 ` [PATCH 3/8] percpu: add __percpu sparse annotations to net Tejun Heo
2010-01-25 21:32 ` David Miller
2010-01-25 15:22 ` [PATCH 4/8] percpu: add __percpu sparse annotations to net drivers Tejun Heo
2010-01-25 21:33 ` David Miller
2010-01-25 15:22 ` [PATCH 5/8] percpu: add __percpu sparse annotations to x86 Tejun Heo
2010-01-26 1:06 ` H. Peter Anvin
2010-01-26 2:17 ` Tejun Heo
2010-02-01 3:30 ` H. Peter Anvin
2010-01-25 15:22 ` [PATCH 6/8] percpu: add __percpu sparse annotations to trace Tejun Heo
2010-01-25 15:35 ` Steven Rostedt
2010-01-25 15:22 ` [PATCH 7/8] percpu: add __percpu sparse annotations to hw_breakpoint Tejun Heo
2010-01-26 0:19 ` Frederic Weisbecker
2010-01-26 0:48 ` Tejun Heo
2010-01-26 1:02 ` Frederic Weisbecker
2010-01-26 1:19 ` Tejun Heo
2010-01-26 2:01 ` Frederic Weisbecker
2010-01-26 2:10 ` Frederic Weisbecker
2010-01-26 2:13 ` Tejun Heo
2010-01-26 2:18 ` Frederic Weisbecker
2010-01-26 2:22 ` Frederic Weisbecker
2010-01-26 2:34 ` Tejun Heo
2010-01-26 2:35 ` Frederic Weisbecker
2010-01-26 2:47 ` Tejun Heo
2010-01-26 1:02 ` H. Peter Anvin
2010-01-26 2:06 ` Tejun Heo
2010-01-26 2:04 ` Al Viro
2010-01-26 2:16 ` Tejun Heo
2010-01-26 2:32 ` Al Viro [this message]
2010-01-26 2:43 ` Tejun Heo
2010-01-26 2:48 ` Al Viro
2010-01-26 3:10 ` Tejun Heo
2010-01-26 3:56 ` Al Viro
2010-01-26 1:06 ` H. Peter Anvin
2010-01-26 1:12 ` Frederic Weisbecker
2010-01-26 2:10 ` Tejun Heo
2010-01-25 15:22 ` [PATCH 8/8] percpu: add __percpu sparse annotations to what's left Tejun Heo
2010-01-25 15:54 ` Borislav Petkov
2010-01-25 23:14 ` [PATCHSET] percpu: add __percpu sparse annotations Al Viro
2010-01-26 0:30 ` Tejun Heo
2010-02-02 5:37 ` Tejun Heo
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=20100126023238.GC19799@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=Trond.Myklebust@netapp.com \
--cc=aelder@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=borislav.petkov@amd.com \
--cc=cl@linux-foundation.org \
--cc=dan.j.williams@intel.com \
--cc=davem@davemloft.net \
--cc=ebiederm@xmission.com \
--cc=fweisbec@gmail.com \
--cc=hch@infradead.org \
--cc=hpa@zytor.com \
--cc=lenb@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=neilb@suse.de \
--cc=netdev@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--cc=tj@kernel.org \
--cc=tytso@mit.edu \
--cc=x86@kernel.org \
--cc=ying.huang@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox