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

TOMOYO Linux Cross Reference
Linux/arch/xtensa/kernel/mcount.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/xtensa/kernel/mcount.S (Architecture sparc64) and /arch/ppc/kernel/mcount.S (Architecture ppc)


  1 /*                                                
  2  * arch/xtensa/kernel/mcount.S                    
  3  *                                                
  4  * Xtensa specific mcount support                 
  5  *                                                
  6  * This file is subject to the terms and condi    
  7  * License.  See the file "COPYING" in the mai    
  8  * for more details.                              
  9  *                                                
 10  * Copyright (C) 2013 Tensilica Inc.              
 11  */                                               
 12                                                   
 13 #include <linux/linkage.h>                        
 14 #include <asm/asmmacro.h>                         
 15 #include <asm/ftrace.h>                           
 16                                                   
 17 /*                                                
 18  * Entry condition:                               
 19  *                                                
 20  *   a2:        a0 of the caller in windowed A    
 21  *   a10:       a0 of the caller in call0 ABI     
 22  *                                                
 23  * In call0 ABI the function _mcount is called    
 24  * its argument is in a10 and all the usual ar    
 25  * must be preserved in addition to callee-sav    
 26  */                                               
 27                                                   
 28 ENTRY(_mcount)                                    
 29 #if defined(__XTENSA_WINDOWED_ABI__)              
 30         abi_entry_default                         
 31                                                   
 32         movi    a4, ftrace_trace_function         
 33         l32i    a4, a4, 0                         
 34         movi    a3, ftrace_stub                   
 35         bne     a3, a4, 1f                        
 36         abi_ret_default                           
 37                                                   
 38 1:      xor     a7, a2, a1                        
 39         movi    a3, 0x3fffffff                    
 40         and     a7, a7, a3                        
 41         xor     a7, a7, a1                        
 42                                                   
 43         xor     a6, a0, a1                        
 44         and     a6, a6, a3                        
 45         xor     a6, a6, a1                        
 46         addi    a6, a6, -MCOUNT_INSN_SIZE         
 47         callx4  a4                                
 48                                                   
 49         abi_ret_default                           
 50 #elif defined(__XTENSA_CALL0_ABI__)               
 51         abi_entry_default                         
 52                                                   
 53         movi    a9, ftrace_trace_function         
 54         l32i    a9, a9, 0                         
 55         movi    a11, ftrace_stub                  
 56         bne     a9, a11, 1f                       
 57         abi_ret_default                           
 58                                                   
 59 1:      abi_entry(28)                             
 60         s32i    a0, sp, 0                         
 61         s32i    a2, sp, 4                         
 62         s32i    a3, sp, 8                         
 63         s32i    a4, sp, 12                        
 64         s32i    a5, sp, 16                        
 65         s32i    a6, sp, 20                        
 66         s32i    a7, sp, 24                        
 67         addi    a2, a10, -MCOUNT_INSN_SIZE        
 68         callx0  a9                                
 69         l32i    a0, sp, 0                         
 70         l32i    a2, sp, 4                         
 71         l32i    a3, sp, 8                         
 72         l32i    a4, sp, 12                        
 73         l32i    a5, sp, 16                        
 74         l32i    a6, sp, 20                        
 75         l32i    a7, sp, 24                        
 76         abi_ret(28)                               
 77 #else                                             
 78 #error Unsupported Xtensa ABI                     
 79 #endif                                            
 80 ENDPROC(_mcount)                                  
 81 EXPORT_SYMBOL(_mcount)                            
 82                                                   
 83 ENTRY(ftrace_stub)                                
 84         abi_entry_default                         
 85         abi_ret_default                           
 86 ENDPROC(ftrace_stub)                              
                                                      

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