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

TOMOYO Linux Cross Reference
Linux/arch/mips/kernel/scall64-n64.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/mips/kernel/scall64-n64.S (Version linux-6.12-rc7) and /arch/ppc/kernel/scall64-n64.S (Version linux-6.2.16)


  1 /*                                                
  2  * This file is subject to the terms and condi    
  3  * License.  See the file "COPYING" in the mai    
  4  * for more details.                              
  5  *                                                
  6  * Copyright (C) 1995, 96, 97, 98, 99, 2000, 0    
  7  * Copyright (C) 1999, 2000 Silicon Graphics,     
  8  * Copyright (C) 2001 MIPS Technologies, Inc.     
  9  */                                               
 10 #include <linux/errno.h>                          
 11 #include <asm/asm.h>                              
 12 #include <asm/asmmacro.h>                         
 13 #include <asm/irqflags.h>                         
 14 #include <asm/mipsregs.h>                         
 15 #include <asm/regdef.h>                           
 16 #include <asm/stackframe.h>                       
 17 #include <asm/asm-offsets.h>                      
 18 #include <asm/sysmips.h>                          
 19 #include <asm/thread_info.h>                      
 20 #include <asm/unistd.h>                           
 21                                                   
 22 #ifndef CONFIG_MIPS32_COMPAT                      
 23 /* Neither O32 nor N32, so define handle_sys h    
 24 #define handle_sys64 handle_sys                   
 25 #endif                                            
 26                                                   
 27         .align  5                                 
 28 NESTED(handle_sys64, PT_SIZE, sp)                 
 29 #if !defined(CONFIG_MIPS32_O32) && !defined(CO    
 30         /*                                        
 31          * When 32-bit compatibility is config    
 32          * already did this.                      
 33          */                                       
 34         .set    noat                              
 35         SAVE_SOME                                 
 36         TRACE_IRQS_ON_RELOAD                      
 37         STI                                       
 38         .set    at                                
 39 #endif                                            
 40                                                   
 41 #if !defined(CONFIG_MIPS32_O32) && !defined(CO    
 42         ld      t1, PT_EPC(sp)          # skip    
 43         daddiu  t1, 4                   # skip    
 44         sd      t1, PT_EPC(sp)                    
 45 #endif                                            
 46                                                   
 47         sd      a3, PT_R26(sp)          # save    
 48                                                   
 49         LONG_S  v0, TI_SYSCALL($28)     # Stor    
 50                                                   
 51         li      t1, _TIF_WORK_SYSCALL_ENTRY       
 52         LONG_L  t0, TI_FLAGS($28)       # sysc    
 53         and     t0, t1, t0                        
 54         bnez    t0, syscall_trace_entry           
 55                                                   
 56 syscall_common:                                   
 57         dsubu   t2, v0, __NR_64_Linux             
 58         sltiu   t0, t2, __NR_64_Linux_syscalls    
 59         beqz    t0, illegal_syscall               
 60                                                   
 61         dsll    t0, t2, 3               # offs    
 62         dla     t2, sys_call_table                
 63         daddu   t0, t2, t0                        
 64         ld      t2, (t0)                # sysc    
 65         beqz    t2, illegal_syscall               
 66                                                   
 67         jalr    t2                      # Do T    
 68                                                   
 69         li      t0, -EMAXERRNO - 1      # erro    
 70         sltu    t0, t0, v0                        
 71         sd      t0, PT_R7(sp)           # set     
 72         beqz    t0, 1f                            
 73                                                   
 74         ld      t1, PT_R2(sp)           # sysc    
 75         dnegu   v0                      # erro    
 76         sd      t1, PT_R0(sp)           # save    
 77 1:      sd      v0, PT_R2(sp)           # resu    
 78                                                   
 79 n64_syscall_exit:                                 
 80         j       syscall_exit_partial              
 81                                                   
 82 /* -------------------------------------------    
 83                                                   
 84 syscall_trace_entry:                              
 85         SAVE_STATIC                               
 86         move    a0, sp                            
 87         jal     syscall_trace_enter               
 88                                                   
 89         bltz    v0, 1f                  # secc    
 90                                                   
 91         RESTORE_STATIC                            
 92         ld      v0, PT_R2(sp)           # Rest    
 93         ld      a0, PT_R4(sp)           # Rest    
 94         ld      a1, PT_R5(sp)                     
 95         ld      a2, PT_R6(sp)                     
 96         ld      a3, PT_R7(sp)                     
 97         ld      a4, PT_R8(sp)                     
 98         ld      a5, PT_R9(sp)                     
 99         j       syscall_common                    
100                                                   
101 1:      j       syscall_exit                      
102                                                   
103 illegal_syscall:                                  
104         /* This also isn't a 64-bit syscall, t    
105         li      v0, ENOSYS                        
106         sd      v0, PT_R2(sp)                     
107         li      t0, 1                             
108         sd      t0, PT_R7(sp)                     
109         j       n64_syscall_exit                  
110         END(handle_sys64)                         
111                                                   
112 #define __SYSCALL(nr, entry)    PTR_WD entry      
113         .align  3                                 
114         .type   sys_call_table, @object           
115 EXPORT(sys_call_table)                            
116 #include <asm/syscall_table_n64.h>                
                                                      

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