[PATCH] Document Linux's memory barriers [try #2]

Paul Mackerras paulus at samba.org
Thu Mar 9 18:41:04 EST 2006


Jesse Barnes writes:

> Hm, a static checker should be able to find this stuff, shouldn't it?

Good idea.  I wonder if sparse could be extended to do it.

Alternatively, it wouldn't be hard to check dynamically.  Just have a
per-cpu count of outstanding MMIO stores.  Zero it in spin_lock and
mmiowb, increment it in write*, and grizzle if spin_unlock finds it
non-zero.  Should be very little overhead.

Paul.



More information about the Linuxppc64-dev mailing list