On Friday 10 March 2006 00:34, you wrote: > David Howells writes: > > > +On some systems, I/O writes are not strongly ordered across all CPUs, and so > > +locking should be used, and mmiowb() should be issued prior to unlocking the > > +critical section. > > I think we should say more strongly that mmiowb() is required where > MMIO accesses are done under a spinlock, and that if your driver is > missing them then that is a bug. I don't think it makes sense to say > that mmiowb is required "on some systems". So what about: #define spin_lock_mmio(lock) spin_lock(lock) #define spin_unlock_mmio(lock) do { spin_unlock(lock); mmiowb(); } while (0) #define spin_lock_mmio_irqsave(lock, flags) spin_lock_irqsave(lock, flags) #define spin_unlock_mmio_irqrestore(lock, flags) do { spin_unlock_irqrestore(lock, flags); mmiowb(); } while (0) -- Greetings Michael.
Attachment:
pgpunIepWPhPW.pgp
Description: PGP signature
- Follow-Ups:
- Re: [PATCH] Document Linux's memory barriers [try #4]
- From: Linus Torvalds <[email protected]>
- Re: [PATCH] Document Linux's memory barriers [try #4]
- References:
- [PATCH] Document Linux's memory barriers [try #4]
- From: David Howells <[email protected]>
- Re: [PATCH] Document Linux's memory barriers [try #4]
- From: Paul Mackerras <[email protected]>
- [PATCH] Document Linux's memory barriers [try #4]
- Prev by Date: Re: [PATCH 17 of 20] ipath - infiniband verbs support
- Next by Date: [PATCH -mm3] x86-64: Eliminate register_die_notifier symbol exported twice
- Previous by thread: Re: [PATCH] Document Linux's memory barriers [try #4]
- Next by thread: Re: [PATCH] Document Linux's memory barriers [try #4]
- Index(es):