Re: question on memory barriers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 26 Jul 2011, Oliver Neukum wrote:

> Hi,
> 
> this code made me think:
> 
>                                 /* Give this link TRB to the hardware */
>                                 wmb();
>                                 next->link.control ^= cpu_to_le32(TRB_CYCLE);
> 
> Can you do this or may there be a CPU that speculatively writes before
> it reads next->link.control ?

CPUs never do speculative writes.  And even if they did, the wmb() 
would prevent the speculative write from preceding any statement that 
comes before the memory barrier.

Alan Stern

--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux