[SPARC64]: Do not call winfix_dax blindly
Verify we really are taking a data access exception trap, at TL1, from one of the window spill/fill handlers. Else call a new function, data_access_exception_tl1, to log the error. Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
5ea68e0276
commit
bde4e4ee9f
|
@ -701,8 +701,24 @@ __do_data_access_exception_tl1:
|
||||||
ldxa [%g5] ASI_DMMU, %g5 ! Get SFAR
|
ldxa [%g5] ASI_DMMU, %g5 ! Get SFAR
|
||||||
stxa %g0, [%g3] ASI_DMMU ! Clear SFSR.FaultValid bit
|
stxa %g0, [%g3] ASI_DMMU ! Clear SFSR.FaultValid bit
|
||||||
membar #Sync
|
membar #Sync
|
||||||
|
rdpr %tt, %g3
|
||||||
|
cmp %g3, 0x80 ! first win spill/fill trap
|
||||||
|
blu,pn %xcc, 1f
|
||||||
|
cmp %g3, 0xff ! last win spill/fill trap
|
||||||
|
bgu,pn %xcc, 1f
|
||||||
|
nop
|
||||||
ba,pt %xcc, winfix_dax
|
ba,pt %xcc, winfix_dax
|
||||||
rdpr %tpc, %g3
|
rdpr %tpc, %g3
|
||||||
|
1: sethi %hi(109f), %g7
|
||||||
|
ba,pt %xcc, etraptl1
|
||||||
|
109: or %g7, %lo(109b), %g7
|
||||||
|
mov %l4, %o1
|
||||||
|
mov %l5, %o2
|
||||||
|
call data_access_exception_tl1
|
||||||
|
add %sp, PTREGS_OFF, %o0
|
||||||
|
ba,pt %xcc, rtrap
|
||||||
|
clr %l6
|
||||||
|
|
||||||
__do_data_access_exception:
|
__do_data_access_exception:
|
||||||
rdpr %pstate, %g4
|
rdpr %pstate, %g4
|
||||||
wrpr %g4, PSTATE_MG|PSTATE_AG, %pstate
|
wrpr %g4, PSTATE_MG|PSTATE_AG, %pstate
|
||||||
|
|
|
@ -220,6 +220,17 @@ void data_access_exception(struct pt_regs *regs,
|
||||||
force_sig_info(SIGSEGV, &info, current);
|
force_sig_info(SIGSEGV, &info, current);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void data_access_exception_tl1(struct pt_regs *regs,
|
||||||
|
unsigned long sfsr, unsigned long sfar)
|
||||||
|
{
|
||||||
|
if (notify_die(DIE_TRAP_TL1, "data access exception tl1", regs,
|
||||||
|
0, 0x30, SIGTRAP) == NOTIFY_STOP)
|
||||||
|
return;
|
||||||
|
|
||||||
|
dump_tl1_traplog((struct tl1_traplog *)(regs + 1));
|
||||||
|
data_access_exception(regs, sfsr, sfar);
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef CONFIG_PCI
|
#ifdef CONFIG_PCI
|
||||||
/* This is really pathetic... */
|
/* This is really pathetic... */
|
||||||
extern volatile int pci_poke_in_progress;
|
extern volatile int pci_poke_in_progress;
|
||||||
|
|
Loading…
Reference in a new issue