1 #include <asm/thread_info.h>
2 #include <asm/trap_block.h>
3 #include <asm/spitfire.h>
4 #include <asm/ptrace.h>
9 .globl user_rtt_fill_fixup_common
10 user_rtt_fill_fixup_common:
17 wrpr %g2, 0x0, %wstate
19 /* We know %canrestore and %otherwin are both zero. */
21 sethi %hi(sparc64_kern_pri_context), %g2
22 ldx [%g2 + %lo(sparc64_kern_pri_context)], %g2
23 mov PRIMARY_CONTEXT, %g1
25 661: stxa %g2, [%g1] ASI_DMMU
26 .section .sun4v_1insn_patch, "ax"
28 stxa %g2, [%g1] ASI_MMU
31 sethi %hi(KERNBASE), %g1
39 or %g4, FAULT_CODE_WINFIXUP, %g4
40 stb %g4, [%g6 + TI_FAULT_CODE]
41 stx %g5, [%g6 + TI_FAULT_ADDR]
47 .section .sun4v_1insn_patch, "ax"
52 wrpr %g0, RTRAP_PSTATE, %pstate
55 ldx [%g6 + TI_TASK], %g4
56 LOAD_PER_CPU_BASE(%g5, %g6, %g1, %g2, %g3)
62 add %sp, PTREGS_OFF, %o0
70 sethi %hi(tlb_type), %g1
71 lduw [%g1 + %lo(tlb_type)], %g1
74 add %sp, PTREGS_OFF, %o0
81 call mem_address_unaligned
85 2: sethi %hi(tlb_type), %g1
87 lduw [%g1 + %lo(tlb_type)], %g1
91 add %sp, PTREGS_OFF, %o0
92 call sun4v_data_access_exception
97 1: call spitfire_data_access_exception