NetBSD/sys/arch/arm/ofw
thorpej 165d4e6d83 Rewrite the ARM mutex implementation to be of the simple-mutex variety.
Because pre-v6 ARM lacks support for an atomic compare-and-swap, we
implement _lock_cas() as a restartable atomic squence that is checked
in the IRQ handler right before AST processing.  (This is safe because,
for all practical purposes, there are no SMP pre-v6 ARM systems.)

This can serve as a model for other non-MP platforms that lack the
necessary atomic operations for mutexes (SuperH, for example).

Upshots of this change:
- kmutex_t is now down to 8 bytes on ARM; about as good as we can get.
- ARM2 systems don't have to trap and emulate SWP or SWPB for mutexes.

The acorn26 port is not updated by this commit to do the LOCK_CAS_CHECK.
That is left as an exercise for the port maintainer.

Reviewed and tested by Matt Thomas.
2007-03-09 19:21:57 +00:00
..
files.ofw
files.ofwgencfg
ofw_irq.S Rewrite the ARM mutex implementation to be of the simple-mutex variety. 2007-03-09 19:21:57 +00:00
ofw_irqhandler.c Clean the bitrotting ofw code. Don't export export the underlying irq 2007-03-08 20:48:39 +00:00
ofwgencfg_clock.c Clean the bitrotting ofw code. Don't export export the underlying irq 2007-03-08 20:48:39 +00:00
ofwgencfg_machdep.c Clean the bitrotting ofw code. Don't export export the underlying irq 2007-03-08 20:48:39 +00:00
openfirm.c add OF_setprop() 2007-02-28 20:30:57 +00:00