~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/sparc/kernel/urtt_fill.S

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/sparc/kernel/urtt_fill.S (Architecture i386) and /arch/sparc/kernel/urtt_fill.S (Architecture sparc)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #include <asm/thread_info.h>                        2 #include <asm/thread_info.h>
  3 #include <asm/trap_block.h>                         3 #include <asm/trap_block.h>
  4 #include <asm/spitfire.h>                           4 #include <asm/spitfire.h>
  5 #include <asm/ptrace.h>                             5 #include <asm/ptrace.h>
  6 #include <asm/head.h>                               6 #include <asm/head.h>
  7                                                     7 
  8                 .text                               8                 .text
  9                 .align  8                           9                 .align  8
 10                 .globl  user_rtt_fill_fixup_co     10                 .globl  user_rtt_fill_fixup_common
 11 user_rtt_fill_fixup_common:                        11 user_rtt_fill_fixup_common:
 12                 rdpr    %cwp, %g1                  12                 rdpr    %cwp, %g1
 13                 add     %g1, 1, %g1                13                 add     %g1, 1, %g1
 14                 wrpr    %g1, 0x0, %cwp             14                 wrpr    %g1, 0x0, %cwp
 15                                                    15 
 16                 rdpr    %wstate, %g2               16                 rdpr    %wstate, %g2
 17                 sll     %g2, 3, %g2                17                 sll     %g2, 3, %g2
 18                 wrpr    %g2, 0x0, %wstate          18                 wrpr    %g2, 0x0, %wstate
 19                                                    19 
 20                 /* We know %canrestore and %ot     20                 /* We know %canrestore and %otherwin are both zero.  */
 21                                                    21 
 22                 sethi   %hi(sparc64_kern_pri_c     22                 sethi   %hi(sparc64_kern_pri_context), %g2
 23                 ldx     [%g2 + %lo(sparc64_ker     23                 ldx     [%g2 + %lo(sparc64_kern_pri_context)], %g2
 24                 mov     PRIMARY_CONTEXT, %g1       24                 mov     PRIMARY_CONTEXT, %g1
 25                                                    25 
 26 661:            stxa    %g2, [%g1] ASI_DMMU        26 661:            stxa    %g2, [%g1] ASI_DMMU
 27                 .section .sun4v_1insn_patch, "     27                 .section .sun4v_1insn_patch, "ax"
 28                 .word   661b                       28                 .word   661b
 29                 stxa    %g2, [%g1] ASI_MMU         29                 stxa    %g2, [%g1] ASI_MMU
 30                 .previous                          30                 .previous
 31                                                    31 
 32                 sethi   %hi(KERNBASE), %g1         32                 sethi   %hi(KERNBASE), %g1
 33                 flush   %g1                        33                 flush   %g1
 34                                                    34 
 35                 mov     %g4, %l4                   35                 mov     %g4, %l4
 36                 mov     %g5, %l5                   36                 mov     %g5, %l5
 37                 brnz,pn %g3, 1f                    37                 brnz,pn %g3, 1f
 38                  mov    %g3, %l3                   38                  mov    %g3, %l3
 39                                                    39 
 40                 or      %g4, FAULT_CODE_WINFIX     40                 or      %g4, FAULT_CODE_WINFIXUP, %g4
 41                 stb     %g4, [%g6 + TI_FAULT_C     41                 stb     %g4, [%g6 + TI_FAULT_CODE]
 42                 stx     %g5, [%g6 + TI_FAULT_A     42                 stx     %g5, [%g6 + TI_FAULT_ADDR]
 43 1:                                                 43 1:
 44                 mov     %g6, %l1                   44                 mov     %g6, %l1
 45                 wrpr    %g0, 0x0, %tl              45                 wrpr    %g0, 0x0, %tl
 46                                                    46 
 47 661:            nop                                47 661:            nop
 48                 .section                .sun4v     48                 .section                .sun4v_1insn_patch, "ax"
 49                 .word                   661b       49                 .word                   661b
 50                 SET_GL(0)                          50                 SET_GL(0)
 51                 .previous                          51                 .previous
 52                                                    52 
 53 661:            wrpr    %g0, RTRAP_PSTATE, %ps     53 661:            wrpr    %g0, RTRAP_PSTATE, %pstate
 54                 .section                .sun_m     54                 .section                .sun_m7_1insn_patch, "ax"
 55                 .word                   661b       55                 .word                   661b
 56                 /* Re-enable PSTATE.mcde to ma     56                 /* Re-enable PSTATE.mcde to maintain ADI security */
 57                 wrpr    %g0, RTRAP_PSTATE|PSTA     57                 wrpr    %g0, RTRAP_PSTATE|PSTATE_MCDE, %pstate
 58                 .previous                          58                 .previous
 59                                                    59 
 60                 mov     %l1, %g6                   60                 mov     %l1, %g6
 61                 ldx     [%g6 + TI_TASK], %g4       61                 ldx     [%g6 + TI_TASK], %g4
 62                 LOAD_PER_CPU_BASE(%g5, %g6, %g     62                 LOAD_PER_CPU_BASE(%g5, %g6, %g1, %g2, %g3)
 63                                                    63 
 64                 brnz,pn %l3, 1f                    64                 brnz,pn %l3, 1f
 65                  nop                               65                  nop
 66                                                    66 
 67                 call    do_sparc64_fault           67                 call    do_sparc64_fault
 68                  add    %sp, PTREGS_OFF, %o0       68                  add    %sp, PTREGS_OFF, %o0
 69                 ba,pt   %xcc, rtrap                69                 ba,pt   %xcc, rtrap
 70                  nop                               70                  nop
 71                                                    71 
 72 1:              cmp     %g3, 2                     72 1:              cmp     %g3, 2
 73                 bne,pn  %xcc, 2f                   73                 bne,pn  %xcc, 2f
 74                  nop                               74                  nop
 75                                                    75 
 76                 sethi   %hi(tlb_type), %g1         76                 sethi   %hi(tlb_type), %g1
 77                 lduw    [%g1 + %lo(tlb_type)],     77                 lduw    [%g1 + %lo(tlb_type)], %g1
 78                 cmp     %g1, 3                     78                 cmp     %g1, 3
 79                 bne,pt  %icc, 1f                   79                 bne,pt  %icc, 1f
 80                  add    %sp, PTREGS_OFF, %o0       80                  add    %sp, PTREGS_OFF, %o0
 81                 mov     %l4, %o2                   81                 mov     %l4, %o2
 82                 call    sun4v_do_mna               82                 call    sun4v_do_mna
 83                  mov    %l5, %o1                   83                  mov    %l5, %o1
 84                 ba,a,pt %xcc, rtrap                84                 ba,a,pt %xcc, rtrap
 85 1:              mov     %l4, %o1                   85 1:              mov     %l4, %o1
 86                 mov     %l5, %o2                   86                 mov     %l5, %o2
 87                 call    mem_address_unaligned      87                 call    mem_address_unaligned
 88                  nop                               88                  nop
 89                 ba,a,pt %xcc, rtrap                89                 ba,a,pt %xcc, rtrap
 90                                                    90 
 91 2:              sethi   %hi(tlb_type), %g1         91 2:              sethi   %hi(tlb_type), %g1
 92                 mov     %l4, %o1                   92                 mov     %l4, %o1
 93                 lduw    [%g1 + %lo(tlb_type)],     93                 lduw    [%g1 + %lo(tlb_type)], %g1
 94                 mov     %l5, %o2                   94                 mov     %l5, %o2
 95                 cmp     %g1, 3                     95                 cmp     %g1, 3
 96                 bne,pt  %icc, 1f                   96                 bne,pt  %icc, 1f
 97                  add    %sp, PTREGS_OFF, %o0       97                  add    %sp, PTREGS_OFF, %o0
 98                 call    sun4v_data_access_exce     98                 call    sun4v_data_access_exception
 99                  nop                               99                  nop
100                 ba,a,pt %xcc, rtrap               100                 ba,a,pt %xcc, rtrap
101                  nop                              101                  nop
102                                                   102 
103 1:              call    spitfire_data_access_e    103 1:              call    spitfire_data_access_exception
104                  nop                              104                  nop
105                 ba,a,pt %xcc, rtrap               105                 ba,a,pt %xcc, rtrap
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php