[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>

+27
+16
arch/sparc64/kernel/entry.S
··· 701 701 ldxa [%g5] ASI_DMMU, %g5 ! Get SFAR 702 702 stxa %g0, [%g3] ASI_DMMU ! Clear SFSR.FaultValid bit 703 703 membar #Sync 704 + rdpr %tt, %g3 705 + cmp %g3, 0x80 ! first win spill/fill trap 706 + blu,pn %xcc, 1f 707 + cmp %g3, 0xff ! last win spill/fill trap 708 + bgu,pn %xcc, 1f 709 + nop 704 710 ba,pt %xcc, winfix_dax 705 711 rdpr %tpc, %g3 712 + 1: sethi %hi(109f), %g7 713 + ba,pt %xcc, etraptl1 714 + 109: or %g7, %lo(109b), %g7 715 + mov %l4, %o1 716 + mov %l5, %o2 717 + call data_access_exception_tl1 718 + add %sp, PTREGS_OFF, %o0 719 + ba,pt %xcc, rtrap 720 + clr %l6 721 + 706 722 __do_data_access_exception: 707 723 rdpr %pstate, %g4 708 724 wrpr %g4, PSTATE_MG|PSTATE_AG, %pstate
+11
arch/sparc64/kernel/traps.c
··· 220 220 force_sig_info(SIGSEGV, &info, current); 221 221 } 222 222 223 + void data_access_exception_tl1(struct pt_regs *regs, 224 + unsigned long sfsr, unsigned long sfar) 225 + { 226 + if (notify_die(DIE_TRAP_TL1, "data access exception tl1", regs, 227 + 0, 0x30, SIGTRAP) == NOTIFY_STOP) 228 + return; 229 + 230 + dump_tl1_traplog((struct tl1_traplog *)(regs + 1)); 231 + data_access_exception(regs, sfsr, sfar); 232 + } 233 + 223 234 #ifdef CONFIG_PCI 224 235 /* This is really pathetic... */ 225 236 extern volatile int pci_poke_in_progress;