From: Christoph Hellwig <hch@infradead.org>
To: Paul Fulghum <paulkf@microgate.com>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [patch] synclink.c compiler optimiation fix
Date: Thu, 8 Sep 2005 14:52:12 +0100 [thread overview]
Message-ID: <20050908135211.GB8676@infradead.org> (raw)
In-Reply-To: <1126112543.3984.17.camel@deimos.microgate.com>
On Wed, Sep 07, 2005 at 12:02:23PM -0500, Paul Fulghum wrote:
> - u16 count; /* buffer size/data count */
> - u16 status; /* Control/status field */
> - u16 rcc; /* character count field */
> + volatile u16 count; /* buffer size/data count */
> + volatile u16 status; /* Control/status field */
> + volatile u16 rcc; /* character count field */
this is wrong. The structure is in ioremaped memory so you must
use reads/writes to access them instead. volatile usage in drivers
is never okay - if you are accessing I/O memory you need to use
proper acessors, if it is normal memory and you want atomic sematics
you need to use the atomic_t type and the operators defined on it.
next prev parent reply other threads:[~2005-09-08 13:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-07 17:02 Paul Fulghum
2005-09-08 13:52 ` Christoph Hellwig [this message]
2005-09-08 15:32 ` Paul Fulghum
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=20050908135211.GB8676@infradead.org \
--to=hch@infradead.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paulkf@microgate.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
all inboxes | Powered by JetHome®