public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* HELP:  Is writeq an atomic operation??
@ 2008-05-02 22:40 Moore, Eric
  2008-05-02 22:46 ` Roland Dreier
                   ` (4 more replies)
  0 siblings, 5 replies; 23+ messages in thread
From: Moore, Eric @ 2008-05-02 22:40 UTC (permalink / raw)
  To: linux-kernel

Is a 64bit write to MMIO registers an atomic operation when using the
writeq API?  

My concern is when I send 64bit data via writeq, will it be sent out as
two 32 bit writes?  If so, is it possible that another CPU be sending
the data at the same time.  Meaning can I write the 1st 32bit data from
CPU-A, meanwhile CPU-B is writing his 32bit data at the same time, and
CPU-A didn't complete the full 64bit in one shot.  If this could occur,
is there an API that I can use to make sure the entire data sent in one
atomic operation?


Here is a trace from pci express analyzer.   I'm sending
0x0800010000000000 to the adress DD1400C0 using writeq.   Notice that in
the TLP header it sent a 32bit Memory write with data length of two.

Trace follows:

Link Tra(597) Downstream 2.5(x1) TLP(1992) Mem MWr(32)(10:00000) TC(0)
TD(0) 
_______| EP(0) Attributes(01) Length(2) RequesterID(000:02:0) Tag(8) 
_______| Address(DD1400C0) 1st BE(1111) Last BE(1111) Data(08000100
00000000) 
_______| VC ID(0) Explicit ACK(Packet #1195) Metrics # Packets(2) 
_______| Time Stamp(0003 . 120 181 840 s) 

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

end of thread, other threads:[~2008-05-04 17:02 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <0631C836DBF79F42B5A60C8C8D4E822901047B1D@NAMAIL2.ad.lsil.com>
2008-05-02 22:32 ` HELP: Is writeq an atomic operation?? David Miller
2008-05-02 22:43   ` Roland Dreier
2008-05-02 22:49     ` David Miller
2008-05-02 22:49     ` Moore, Eric
2008-05-02 22:53       ` Roland Dreier
2008-05-02 23:13         ` Moore, Eric
2008-05-02 23:21           ` Roland Dreier
2008-05-02 23:31             ` Moore, Eric
2008-05-02 22:40 Moore, Eric
2008-05-02 22:46 ` Roland Dreier
2008-05-03  0:42   ` H. Peter Anvin
2008-05-03 14:35     ` Alan Cox
2008-05-03 17:40       ` H. Peter Anvin
2008-05-03 22:37   ` Benjamin Herrenschmidt
2008-05-04 17:01     ` Roland Dreier
2008-05-02 22:50 ` Andi Kleen
2008-05-02 23:03   ` Moore, Eric
2008-05-02 23:13     ` Andi Kleen
2008-05-02 23:04 ` Roland Dreier
2008-05-02 23:20   ` Moore, Eric
2008-05-03  0:10     ` Roland Dreier
2008-05-02 23:12 ` Jesse Barnes
2008-05-03  0:41 ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox