]> git.baikalelectronics.ru Git - kernel.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)
commitf0aa29a1a46f3468ec3f1a56b64f3e7afb0393e9
treecb135bdb9a408ec771c862caae5d86a2d6754861
parentfc6c058c1025faa4b711efcfa031782fa87b3396
[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