]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[ARM SMP] Use event instructions for spinlocks
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Thu, 1 Dec 2005 15:47:24 +0000 (15:47 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Thu, 1 Dec 2005 15:47:24 +0000 (15:47 +0000)
commit00b4c90787298349b799069360ced9ca843153dc
treecb135bdb9a408ec771c862caae5d86a2d6754861
parentdf2f5e721ed36e21da27e1f415c71ba0e20f31b5
[ARM SMP] Use event instructions for spinlocks

ARMv6K CPUs have SEV (send event) and WFE (wait for event) instructions
which allow the CPU clock to be suspended until another CPU issues a
SEV, rather than spinning on the lock wasting power.  Make use of these
instructions.

Note that WFE does not wait if an event has been sent since the last WFE
cleared the event status, so although it may look racy, the instruction
implementation ensures that these are dealt with.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
include/asm-arm/spinlock.h