ARM: entry: instrument usr exception handlers with irqsoff tracing
authorRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 25 Jun 2011 17:28:19 +0000 (18:28 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sat, 2 Jul 2011 09:56:10 +0000 (10:56 +0100)
commitbc089602d206b2abc2d2e8e5324d90342cc0447b
tree6f5f062109d2756b92eff8545531fb5f12df3929
parentdf295df6c391e322a06dea0d2bc3d22debd15fb9
ARM: entry: instrument usr exception handlers with irqsoff tracing

As we no longer re-enable interrupts in these exception handlers, add
the irqsoff tracing calls to them so that the kernel tracks the state
more accurately.

Note that these calls are conditional on IRQSOFF_TRACER:

  kernel ----------> user ---------> kernel
          ^ irqs enabled   ^ irqs disabled

No kernel code can run on the local CPU until we've re-entered the
kernel through one of the exception handlers - and userspace can not
take any locks etc.  So, the kernel doesn't care about the IRQ mask
state while userspace is running unless we're doing IRQ off latency
tracing.  So, we can (and do) avoid the overhead of updating the IRQ
mask state on every kernel->user and user->kernel transition.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/kernel/entry-armv.S