linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: Driver supported smp linux kernel need use smp_wmb/smp_rmb, nor wmb/rmb?
Date: Thu, 26 Aug 2010 10:18:04 +0100	[thread overview]
Message-ID: <20100826091804.GA8212@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <AANLkTimOaRrEGCYH6k_3wfDixnk1RkJ5JCSi_hv8PQsC@mail.gmail.com>

On Thu, Aug 26, 2010 at 03:43:29PM +0800, David Yang wrote:
> Start with linux 2.6.33,  the DMA coherent buffers are mapped as Normal
> Non-cacheable, so our drivers using dma_alloc_coherent() add the
> barriers (e.g. wmb/rmb) to ensure that read/wirte coherence with
> devices.
> 
> Now our drivers are stable at the non-smp linux 2.6.33,  if our driver
> need support the smp linux 2.6.33, we need replace wmb()/rmb() to
> smp_wmb()/smp_rmb()?

No.  smp_* barriers are compiler barriers on uniprocessor, and mandatory
barriers on SMP systems.

If you definitely need a barrier for UP, then use the non-smp_ versions.

      reply	other threads:[~2010-08-26  9:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-26  7:43 Driver supported smp linux kernel need use smp_wmb/smp_rmb, nor wmb/rmb? David Yang
2010-08-26  9:18 ` Russell King - ARM Linux [this message]

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=20100826091804.GA8212@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=linux-arm-kernel@lists.infradead.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 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).