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

TOMOYO Linux Cross Reference
Linux/arch/powerpc/include/asm/probes.h

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/powerpc/include/asm/probes.h (Architecture sparc) and /arch/alpha/include/asm-alpha/probes.h (Architecture alpha)


  1 /* SPDX-License-Identifier: GPL-2.0-or-later *      1 
  2 #ifndef _ASM_POWERPC_PROBES_H                     
  3 #define _ASM_POWERPC_PROBES_H                     
  4 #ifdef __KERNEL__                                 
  5 /*                                                
  6  * Definitions common to probes files             
  7  *                                                
  8  * Copyright IBM Corporation, 2012                
  9  */                                               
 10 #include <linux/types.h>                          
 11 #include <asm/disassemble.h>                      
 12 #include <asm/ppc-opcode.h>                       
 13                                                   
 14 #define BREAKPOINT_INSTRUCTION  PPC_RAW_TRAP()    
 15                                                   
 16 /* Trap definitions per ISA */                    
 17 #define IS_TW(instr)            (((instr) & 0x    
 18 #define IS_TD(instr)            (((instr) & 0x    
 19 #define IS_TDI(instr)           (((instr) & 0x    
 20 #define IS_TWI(instr)           (((instr) & 0x    
 21                                                   
 22 #ifdef CONFIG_PPC64                               
 23 #define is_trap(instr)          (IS_TW(instr)     
 24                                 IS_TWI(instr)     
 25 #else                                             
 26 #define is_trap(instr)          (IS_TW(instr)     
 27 #endif /* CONFIG_PPC64 */                         
 28                                                   
 29 #ifdef CONFIG_PPC_ADV_DEBUG_REGS                  
 30 #define MSR_SINGLESTEP  (MSR_DE)                  
 31 #else                                             
 32 #define MSR_SINGLESTEP  (MSR_SE)                  
 33 #endif                                            
 34                                                   
 35 static inline bool can_single_step(u32 inst)      
 36 {                                                 
 37         switch (get_op(inst)) {                   
 38         case OP_TRAP_64:        return false;     
 39         case OP_TRAP:           return false;     
 40         case OP_SC:             return false;     
 41         case OP_19:                               
 42                 switch (get_xop(inst)) {          
 43                 case OP_19_XOP_RFID:              
 44                 case OP_19_XOP_RFMCI:             
 45                 case OP_19_XOP_RFDI:              
 46                 case OP_19_XOP_RFI:               
 47                 case OP_19_XOP_RFCI:              
 48                 case OP_19_XOP_RFSCV:             
 49                 case OP_19_XOP_HRFID:             
 50                 case OP_19_XOP_URFID:             
 51                 case OP_19_XOP_STOP:              
 52                 case OP_19_XOP_DOZE:              
 53                 case OP_19_XOP_NAP:               
 54                 case OP_19_XOP_SLEEP:             
 55                 case OP_19_XOP_RVWINKLE:          
 56                 }                                 
 57                 break;                            
 58         case OP_31:                               
 59                 switch (get_xop(inst)) {          
 60                 case OP_31_XOP_TRAP:              
 61                 case OP_31_XOP_TRAP_64:           
 62                 case OP_31_XOP_MTMSR:             
 63                 case OP_31_XOP_MTMSRD:            
 64                 }                                 
 65                 break;                            
 66         }                                         
 67         return true;                              
 68 }                                                 
 69                                                   
 70 /* Enable single stepping for the current task    
 71 static inline void enable_single_step(struct p    
 72 {                                                 
 73         regs_set_return_msr(regs, regs->msr |     
 74 #ifdef CONFIG_PPC_ADV_DEBUG_REGS                  
 75         /*                                        
 76          * We turn off Critical Input Exceptio    
 77          * step will be for the instruction we    
 78          * it is possible we'd get the single     
 79          */                                       
 80         regs_set_return_msr(regs, regs->msr &     
 81         mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) |     
 82 #ifdef CONFIG_PPC_47x                             
 83         isync();                                  
 84 #endif                                            
 85 #endif                                            
 86 }                                                 
 87                                                   
 88                                                   
 89 #endif /* __KERNEL__ */                           
 90 #endif  /* _ASM_POWERPC_PROBES_H */               
 91                                                   

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