From: Tejun Heo <tj@kernel.org>
To: Namhyung Kim <namhyung@gmail.com>
Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [PATCH] percpu: remove address_space attribute if !SMP
Date: Fri, 06 Aug 2010 12:57:10 +0000 [thread overview]
Message-ID: <4C5C06A6.7070206@kernel.org> (raw)
In-Reply-To: <1281099197.1655.11.camel@leonhard>
Hello,
On 08/06/2010 02:53 PM, Namhyung Kim wrote:
>> But they should still be accessed through the accessors and if they
>> are accessed through accessors, there shouldn't be sparse warnings
>> regarding them. Maybe UP accessors are missing proper markups? Do
>> those warnings only happen on UP config?
>>
>
> They do nothing on UP.
> quoting from include/asm-generic.h:
>
> #else /* ! SMP */
>
> #define per_cpu(var, cpu) (*((void)(cpu), &(var)))
> #define __get_cpu_var(var) (var)
> #define __raw_get_cpu_var(var) (var)
> #define this_cpu_ptr(ptr) per_cpu_ptr(ptr, 0)
> #define __this_cpu_ptr(ptr) this_cpu_ptr(ptr)
>
> #endif /* SMP */
Ah, I see. Then, the right thing to do is to add proper checking and
markups to UP accessors matching the SMP ones.
ie. __verify_pcpu_ptr() verification followed by __kernel __force
casting. Are you interested in doing it?
Thanks.
--
tejun
next prev parent reply other threads:[~2010-08-06 12:57 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-06 12:46 [PATCH] percpu: remove address_space attribute if !SMP Namhyung Kim
2010-08-06 12:49 ` Tejun Heo
2010-08-06 12:53 ` Namhyung Kim
2010-08-06 12:57 ` Tejun Heo [this message]
2010-08-06 13:23 ` Namhyung Kim
2010-08-06 13:37 ` Tejun Heo
2010-08-06 13:46 ` Namhyung Kim
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=4C5C06A6.7070206@kernel.org \
--to=tj@kernel.org \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=namhyung@gmail.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;
as well as URLs for NNTP newsgroup(s).