From: chris@basementcode.com (Christopher Harvey)
To: kernelnewbies@lists.kernelnewbies.org
Subject: IRQs and memory consistency
Date: Wed, 11 Apr 2012 06:59:28 -0500 [thread overview]
Message-ID: <a47a749b9165d01a18b7a4aeb8f28f7c@basementcode.com> (raw)
In-Reply-To: <CAKk8iso9+aV5s8shc3Pde9PQRe78bgC-80J2cc4OoaD=T2ai+w@mail.gmail.com>
On 10.04.2012 19:58, Wink Saville wrote:
> Sounds to me like there needs to be a flush of the processor cache
> by using memory barriers.
I used a wmb(); right after I set the value I wanted.
> I'm guessing that the IRQ is taken on a different thread and possibly
> a different processor and the value needs to be flushed. You might
> try having devid be an atomic_t and then use atomic_set
> and atomic_read so that the "proper" memory barriers are used.
should I use atomic ops instead of a wmb?
The interrupt can't happen until the value is assigned completely in
one thread. I'm sure.
next prev parent reply other threads:[~2012-04-11 11:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-10 20:22 IRQs and memory consistency Christopher Harvey
2012-04-11 0:58 ` Wink Saville
2012-04-11 11:59 ` Christopher Harvey [this message]
2012-04-11 15:35 ` Wink Saville
2012-04-11 20:14 ` Christopher Harvey
2012-04-11 3:18 ` Mulyadi Santosa
2012-04-11 11:53 ` Christopher Harvey
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=a47a749b9165d01a18b7a4aeb8f28f7c@basementcode.com \
--to=chris@basementcode.com \
--cc=kernelnewbies@lists.kernelnewbies.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.