]> git.baikalelectronics.ru Git - kernel.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)
commit25c1f799a18b20931c5bc9b8d43726ad48583d9b
treea30ecbe79c57eb431e0f9fdce091fd9a8eb8e07b
parente855e2750d35365e95b5e9e15f6cbfa44cab4f86
powerpc: Fix page fault with lockdep regression

commit db3fed999466c489f709c7a871529eaae710f7d3
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