Re: [rfc PATCH] ieee1394: ohci1394: delete bogus spinlock, flush MMIO writes

2006-11-28 Thread Alan
On Wed, 29 Nov 2006 00:50:43 +0100
Stefan Richter <[EMAIL PROTECTED]> wrote:

> Alan wrote:
> > On Tue, 28 Nov 2006 22:24:11 +0100 (CET)
> > Stefan Richter <[EMAIL PROTECTED]> wrote:
> >> All MMIO writes which were surrounded by the spinlock as well as the
> >> very last MMIO write of the IRQ handler are now explicitly flushed by
> >> MMIO reads of the respective register.
> > 
> > MMIO is ordered anyway on the bus, you just need mmiowb() to force
> > ordering to the bus controller in case you are on a big numa box.
> 
> The mmiowb is a checkpoint to ensure ordering between different threads
> of MMIO writes; i.e. it doesn't halt the thread until the write actually
> reached the device like a read would do, right?

It guarantees that no other mmio will sneak past it from another thread
but doesn't guarantee the previous I/O has hit the hardware. It's a much
weaker (and thus far faster) guarantee which is usually sufficient as it
can be combined with spin_unlock to enforce I/O ordering matching the
lock ordering.

Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [rfc PATCH] ieee1394: ohci1394: delete bogus spinlock, flush MMIO writes

2006-11-28 Thread Stefan Richter
Alan wrote:
> On Tue, 28 Nov 2006 22:24:11 +0100 (CET)
> Stefan Richter <[EMAIL PROTECTED]> wrote:
>> All MMIO writes which were surrounded by the spinlock as well as the
>> very last MMIO write of the IRQ handler are now explicitly flushed by
>> MMIO reads of the respective register.
> 
> MMIO is ordered anyway on the bus, you just need mmiowb() to force
> ordering to the bus controller in case you are on a big numa box.

The mmiowb is a checkpoint to ensure ordering between different threads
of MMIO writes; i.e. it doesn't halt the thread until the write actually
reached the device like a read would do, right?
-- 
Stefan Richter
-=-=-==- =-== ===-=
http://arcgraph.de/sr/
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


Re: [rfc PATCH] ieee1394: ohci1394: delete bogus spinlock, flush MMIO writes

2006-11-28 Thread Alan
On Tue, 28 Nov 2006 22:24:11 +0100 (CET)
Stefan Richter <[EMAIL PROTECTED]> wrote:

> All MMIO writes which were surrounded by the spinlock as well as the
> very last MMIO write of the IRQ handler are now explicitly flushed by
> MMIO reads of the respective register.

MMIO is ordered anyway on the bus, you just need mmiowb() to force
ordering to the bus controller in case you are on a big numa box.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/