summaryrefslogtreecommitdiffstats
path: root/contrib/llvm/tools/clang/lib/Sema/TargetAttributesSema.cpp
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-05-12 13:05:03 +0000
committerian <ian@FreeBSD.org>2014-05-12 13:05:03 +0000
commit7c174746025f7873d253e7212d1973b038763440 (patch)
tree91634e4e4bb9b958b79db142206c7a71357267fd /contrib/llvm/tools/clang/lib/Sema/TargetAttributesSema.cpp
parenteff58a975eba148bbb42f3d3d9cb133935fdbe45 (diff)
downloadFreeBSD-src-7c174746025f7873d253e7212d1973b038763440.zip
FreeBSD-src-7c174746025f7873d253e7212d1973b038763440.tar.gz
Interrupts need to be disabled on entry to cpu_sleep() for ARM. Given
that and the need to be in a critical section when switching to idleclock mode for event timers, use spinlock_enter()/exit() to achieve both needs. The ARM WFI (wait for interrupt) instruction blocks until an interrupt is asserted, and it will unblock even if interrupts are masked, and it will unblock immediately if an interrupt is already pending. It is necessary to execute it with interrupts disabled, otherwise the interrupt that should unblock it may occur and be serviced just prior to executing the instruction. At that point the system is inappropriately asleep until the next timer tick or some other random interrupt happens. In general, interrupts need to be disabled continuously from the time the decision is made that there is no work to be done and sleeping is needed until actually going to sleep, to avoid a race where handling a new interrupt changes the basis for deciding there is no work to be done. Submitted by: hps@ (in slightly different form)
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Sema/TargetAttributesSema.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud