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

TOMOYO Linux Cross Reference
Linux/arch/loongarch/kernel/rethook_trampoline.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/loongarch/kernel/rethook_trampoline.S (Architecture mips) and /arch/sparc/kernel/rethook_trampoline.S (Architecture sparc)


  1 /* SPDX-License-Identifier: GPL-2.0+ */           
  2 #include <linux/linkage.h>                        
  3 #include <asm/stackframe.h>                       
  4                                                   
  5         .text                                     
  6                                                   
  7         .macro save_all_base_regs                 
  8         cfi_st  ra, PT_R1                         
  9         cfi_st  tp, PT_R2                         
 10         cfi_st  a0, PT_R4                         
 11         cfi_st  a1, PT_R5                         
 12         cfi_st  a2, PT_R6                         
 13         cfi_st  a3, PT_R7                         
 14         cfi_st  a4, PT_R8                         
 15         cfi_st  a5, PT_R9                         
 16         cfi_st  a6, PT_R10                        
 17         cfi_st  a7, PT_R11                        
 18         cfi_st  t0, PT_R12                        
 19         cfi_st  t1, PT_R13                        
 20         cfi_st  t2, PT_R14                        
 21         cfi_st  t3, PT_R15                        
 22         cfi_st  t4, PT_R16                        
 23         cfi_st  t5, PT_R17                        
 24         cfi_st  t6, PT_R18                        
 25         cfi_st  t7, PT_R19                        
 26         cfi_st  t8, PT_R20                        
 27         cfi_st  u0, PT_R21                        
 28         cfi_st  fp, PT_R22                        
 29         cfi_st  s0, PT_R23                        
 30         cfi_st  s1, PT_R24                        
 31         cfi_st  s2, PT_R25                        
 32         cfi_st  s3, PT_R26                        
 33         cfi_st  s4, PT_R27                        
 34         cfi_st  s5, PT_R28                        
 35         cfi_st  s6, PT_R29                        
 36         cfi_st  s7, PT_R30                        
 37         cfi_st  s8, PT_R31                        
 38         csrrd   t0, LOONGARCH_CSR_CRMD            
 39         andi    t0, t0, 0x7 /* extract bit[1:0    
 40         LONG_S  t0, sp, PT_CRMD                   
 41         .endm                                     
 42                                                   
 43         .macro restore_all_base_regs              
 44         cfi_ld  tp, PT_R2                         
 45         cfi_ld  a0, PT_R4                         
 46         cfi_ld  a1, PT_R5                         
 47         cfi_ld  a2, PT_R6                         
 48         cfi_ld  a3, PT_R7                         
 49         cfi_ld  a4, PT_R8                         
 50         cfi_ld  a5, PT_R9                         
 51         cfi_ld  a6, PT_R10                        
 52         cfi_ld  a7, PT_R11                        
 53         cfi_ld  t0, PT_R12                        
 54         cfi_ld  t1, PT_R13                        
 55         cfi_ld  t2, PT_R14                        
 56         cfi_ld  t3, PT_R15                        
 57         cfi_ld  t4, PT_R16                        
 58         cfi_ld  t5, PT_R17                        
 59         cfi_ld  t6, PT_R18                        
 60         cfi_ld  t7, PT_R19                        
 61         cfi_ld  t8, PT_R20                        
 62         cfi_ld  u0, PT_R21                        
 63         cfi_ld  fp, PT_R22                        
 64         cfi_ld  s0, PT_R23                        
 65         cfi_ld  s1, PT_R24                        
 66         cfi_ld  s2, PT_R25                        
 67         cfi_ld  s3, PT_R26                        
 68         cfi_ld  s4, PT_R27                        
 69         cfi_ld  s5, PT_R28                        
 70         cfi_ld  s6, PT_R29                        
 71         cfi_ld  s7, PT_R30                        
 72         cfi_ld  s8, PT_R31                        
 73         LONG_L  t0, sp, PT_CRMD                   
 74         li.d    t1, 0x7 /* mask bit[1:0] PLV,     
 75         csrxchg t0, t1, LOONGARCH_CSR_CRMD        
 76         .endm                                     
 77                                                   
 78 SYM_CODE_START(arch_rethook_trampoline)           
 79         UNWIND_HINT_UNDEFINED                     
 80         addi.d  sp, sp, -PT_SIZE                  
 81         save_all_base_regs                        
 82                                                   
 83         addi.d  t0, sp, PT_SIZE                   
 84         LONG_S  t0, sp, PT_R3                     
 85                                                   
 86         move a0, sp /* pt_regs */                 
 87                                                   
 88         bl arch_rethook_trampoline_callback       
 89                                                   
 90         /* use the result as the return-addres    
 91         move ra, a0                               
 92                                                   
 93         restore_all_base_regs                     
 94         addi.d  sp, sp, PT_SIZE                   
 95                                                   
 96         jr ra                                     
 97 SYM_CODE_END(arch_rethook_trampoline)             
                                                      

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