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

TOMOYO Linux Cross Reference
Linux/arch/powerpc/include/asm/cpuidle.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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /arch/powerpc/include/asm/cpuidle.h (Architecture mips) and /arch/i386/include/asm-i386/cpuidle.h (Architecture i386)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 
  2 #ifndef _ASM_POWERPC_CPUIDLE_H                    
  3 #define _ASM_POWERPC_CPUIDLE_H                    
  4                                                   
  5 #ifdef CONFIG_PPC_POWERNV                         
  6 /* Thread state used in powernv idle state man    
  7 #define PNV_THREAD_RUNNING              0         
  8 #define PNV_THREAD_NAP                  1         
  9 #define PNV_THREAD_SLEEP                2         
 10 #define PNV_THREAD_WINKLE               3         
 11                                                   
 12 /*                                                
 13  * Core state used in powernv idle for POWER8.    
 14  *                                                
 15  * The lock bit synchronizes updates to the st    
 16  * sleep/wake code (see kernel/idle_book3s.S).    
 17  *                                                
 18  * Bottom 8 bits track the idle state of each     
 19  * the thread executes an idle instruction (na    
 20  *                                                
 21  * Then there is winkle tracking. A core does     
 22  * until every thread is in winkle. So the win    
 23  * number of threads in winkle (small window o    
 24  * around the sleep/wake, so long as there are    
 25  *                                                
 26  * When the winkle count reaches 8 (the COUNT_    
 27  * the THREAD_WINKLE_BITS are set, which indic    
 28  * yet woken from the winkle state.               
 29  */                                               
 30 #define NR_PNV_CORE_IDLE_LOCK_BIT                 
 31 #define PNV_CORE_IDLE_LOCK_BIT                    
 32                                                   
 33 #define PNV_CORE_IDLE_WINKLE_COUNT_SHIFT          
 34 #define PNV_CORE_IDLE_WINKLE_COUNT                
 35 #define PNV_CORE_IDLE_WINKLE_COUNT_BITS           
 36 #define PNV_CORE_IDLE_THREAD_WINKLE_BITS_SHIFT    
 37 #define PNV_CORE_IDLE_THREAD_WINKLE_BITS          
 38                                                   
 39 #define PNV_CORE_IDLE_THREAD_BITS                 
 40                                                   
 41 /*                                                
 42  * ============================ NOTE =========    
 43  * The older firmware populates only the RL fi    
 44  * sets the psscr_mask to 0xf. On such a firmw    
 45  * remaining PSSCR fields to default values as    
 46  *                                                
 47  * - ESL and EC bits are to 1. So wakeup from     
 48  *   at vector 0x100.                             
 49  *                                                
 50  * - MTL and PSLL are set to the maximum allow    
 51  *    i.e. 15.                                    
 52  *                                                
 53  * - The Transition Rate, TR is set to the Max    
 54  */                                               
 55 #define PSSCR_HV_DEFAULT_VAL    (PSSCR_ESL | P    
 56                                 PSSCR_PSLL_MAS    
 57                                 PSSCR_MTL_MASK    
 58                                                   
 59 #define PSSCR_HV_DEFAULT_MASK   (PSSCR_ESL | P    
 60                                 PSSCR_PSLL_MAS    
 61                                 PSSCR_MTL_MASK    
 62 #define PSSCR_EC_SHIFT    20                      
 63 #define PSSCR_ESL_SHIFT   21                      
 64 #define GET_PSSCR_EC(x)   (((x) & PSSCR_EC) >>    
 65 #define GET_PSSCR_ESL(x)  (((x) & PSSCR_ESL) >    
 66 #define GET_PSSCR_RL(x)   ((x) & PSSCR_RL_MASK    
 67                                                   
 68 #define ERR_EC_ESL_MISMATCH             -1        
 69 #define ERR_DEEP_STATE_ESL_MISMATCH     -2        
 70                                                   
 71 #ifndef __ASSEMBLY__                              
 72                                                   
 73 #define PNV_IDLE_NAME_LEN    16                   
 74 struct pnv_idle_states_t {                        
 75         char name[PNV_IDLE_NAME_LEN];             
 76         u32 latency_ns;                           
 77         u32 residency_ns;                         
 78         u64 psscr_val;                            
 79         u64 psscr_mask;                           
 80         u32 flags;                                
 81         bool valid;                               
 82 };                                                
 83                                                   
 84 extern struct pnv_idle_states_t *pnv_idle_stat    
 85 extern int nr_pnv_idle_states;                    
 86                                                   
 87 unsigned long pnv_cpu_offline(unsigned int cpu    
 88 int __init validate_psscr_val_mask(u64 *psscr_    
 89 static inline void report_invalid_psscr_val(u6    
 90 {                                                 
 91         switch (err) {                            
 92         case ERR_EC_ESL_MISMATCH:                 
 93                 pr_warn("Invalid psscr 0x%016l    
 94                         psscr_val);               
 95                 break;                            
 96         case ERR_DEEP_STATE_ESL_MISMATCH:         
 97                 pr_warn("Invalid psscr 0x%016l    
 98                         psscr_val);               
 99         }                                         
100 }                                                 
101 #endif                                            
102                                                   
103 #endif                                            
104                                                   
105 #endif                                            
106                                                   

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