From: Jeff Garzik <jgarzik@pobox.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Add sparse "__iomem" infrastructure to check PCI address usage
Date: Sun, 12 Sep 2004 22:41:58 -0400 [thread overview]
Message-ID: <414508F6.7020301@pobox.com> (raw)
In-Reply-To: <Pine.LNX.4.58.0409121922450.13491@ppc970.osdl.org>
Linus Torvalds wrote:
> On Sun, 12 Sep 2004, Jeff Garzik wrote:
>>1) what does force do? it doesn't appear to be in gcc 3.3.3 docs.
> It doesn't do anything for gcc. You're looking at the sparse-only code.
doh, and thanks for the info.
>>2) is "volatile ... __force" redundant?
> No, although it's likely to be a strange combination. If you want to force
> a static address space conversion to a volatile pointer, you can do so. I
> don't see _why_ you'd want to do it ;)
Well the reason I ask....
static inline void writeb(unsigned char b, volatile void __iomem *addr)
{
*(volatile unsigned char __force *) addr = b;
}
static inline void writew(unsigned short b, volatile void __iomem *addr)
{
*(volatile unsigned short __force *) addr = b;
}
static inline void writel(unsigned int b, volatile void __iomem *addr)
{
*(volatile unsigned int __force *) addr = b;
}
>>3) can we use 'malloc' attribute on kmalloc?
> Since we can't use the gcc alias analysis anyway (it's too broken until
> very late gcc versions), the gcc 'malloc' attribute shouldn't make any
> difference that I can tell.
>
> But there wouldn't be anything _wrong_ in adding it to kmalloc(), if
> that's what you're asking.
That's what I'm asking.
Thanks,
Jeff
next prev parent reply other threads:[~2004-09-13 2:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <200409110726.i8B7QTGn009468@hera.kernel.org>
2004-09-13 0:26 ` Add sparse "__iomem" infrastructure to check PCI address usage Jeff Garzik
2004-09-13 0:50 ` David S. Miller
2004-09-13 2:31 ` Linus Torvalds
2004-09-13 2:41 ` Jeff Garzik [this message]
2004-09-13 3:00 ` Linus Torvalds
2004-09-13 14:22 ` Geert Uytterhoeven
2004-09-13 14:33 ` Linus Torvalds
2004-09-13 18:31 ` Tonnerre
2004-09-13 18:48 ` Linus Torvalds
2004-09-13 18:51 ` viro
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=414508F6.7020301@pobox.com \
--to=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/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.