All of lore.kernel.org
 help / color / mirror / Atom feed
* Driver supported smp linux kernel need use smp_wmb/smp_rmb, nor wmb/rmb?
@ 2010-08-26  7:43 David Yang
  2010-08-26  9:18 ` Russell King - ARM Linux
  0 siblings, 1 reply; 2+ messages in thread
From: David Yang @ 2010-08-26  7:43 UTC (permalink / raw)
  To: linux-arm-kernel

Hello all,

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()?


Thank for any help

David

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Driver supported smp linux kernel need use smp_wmb/smp_rmb, nor wmb/rmb?
  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
  0 siblings, 0 replies; 2+ messages in thread
From: Russell King - ARM Linux @ 2010-08-26  9:18 UTC (permalink / raw)
  To: linux-arm-kernel

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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-08-26  9:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.