]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
powerpc: Disable interrupts early in Program Check
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Mon, 13 Feb 2012 20:42:18 +0000 (20:42 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Thu, 16 Feb 2012 05:15:10 +0000 (16:15 +1100)
commit54321242afe6fcf8b7e589bc21ecf832bc5a206a
treedfc1d3bd73cd1c28421e27bbbbcad60368a69907
parenta1a1d1bfc9be2a5ea8cce78ebd0f17c79489f053
powerpc: Disable interrupts early in Program Check

Program Check exceptions are the result of WARNs, BUGs, some
type of breakpoints, kprobe, and other illegal instructions.

We want interrupts (and thus preemption) to remain disabled
while doing the initial stage of testing the reason and
branching off to a debugger or kprobe, so we are still on
the original CPU which makes debugging easier in various cases.

This is how the code was intended, hence the local_irq_enable()
right in the middle of program_check_exception().

However, the assembly exception prologue for that exception was
incorrectly marked as enabling interrupts, which defeats that
(and records a redundant enable with lockdep).

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
arch/powerpc/kernel/exceptions-64s.S