]> git.karo-electronics.de Git - mv-sheeva.git/commit
powerpc: Fix page fault with lockdep regression
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 10 Apr 2012 07:21:35 +0000 (17:21 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 10 Apr 2012 07:21:35 +0000 (17:21 +1000)
commit08f1ec8a594c60bf3856e3c45b6d15fd691d90bb
treea30ecbe79c57eb431e0f9fdce091fd9a8eb8e07b
parentb1a808ff436343956a6ae63178ea1810c5e5a3a1
powerpc: Fix page fault with lockdep regression

commit a546498f3bf9aac311c66f965186373aee2ca0b0
introduced a regression on 32-bit when irq tracing
is enabled by exposing an old bug in our irq tracing
code for exception entry.

The code would save and restore some GPRs around the
calls to the C lockdep code, however, it tries to be
too smart for its own good and restores some of the
GPRs from the exception frame (as saved there on
exception entry).

However, for page faults, we do replace those GPRs with
arguments to do_page_fault before we call transfer_to_handler
and so restoring from the exception frame is plain wrong in
this case.

This was fine as long as we didn't touch the interrupt state
when taking page fault, but when I started doing it, it would
trigger the lockdep calls and the bug.

This fixes it by cleaning up that code a bit. It did create
a small stack frame for the sake of backtraces, so let's
make it a bit bigger and use it to save and restore the
stuff we care about.

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