[PATCH] SPARC64: Set g4/g5 properly in sun4v dtlb-prot handling.
commit0af78db8bf4cab644b0e458d476b124712b876bf
authorDavid S. Miller <davem@sunset.davemloft.net>
Sat, 27 Jan 2007 03:17:10 +0000 (26 19:17 -0800)
committerChris Wright <chrisw@sous-sol.org>
Mon, 5 Feb 2007 16:31:42 +0000 (5 08:31 -0800)
treed7af3ee4650d17c719a89ff9fb609b1b852ce43f
parentea813cd4d76976e63cba0f27110ddf7abb8dcf69
[PATCH] SPARC64: Set g4/g5 properly in sun4v dtlb-prot handling.

Mirror the logic in the sun4u handler, we have to update
both registers even when we branch out to window fault
fixup handling.

The way it works is that if we are in etrap processing a
fault already, g4/g5 holds the original fault information.
If we take a window spill fault while doing etrap, then
we put the window spill fault info into g4/g5 and this is
what the top-level fault handler ends up processing first.

Then we retry the originally faulting instruction, and
process the original fault at that time.

This is all necessary because of how constrained the trap
registers are in these code paths.  These cases trigger
very rarely, so even if there is some performance implication
it's doesn't happen very often.  In fact the rarity is why
it took so long to trigger and find this particular bug.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
arch/sparc64/kernel/sun4v_tlb_miss.S