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

TOMOYO Linux Cross Reference
Linux/arch/powerpc/kernel/idle_85xx.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/powerpc/kernel/idle_85xx.S (Architecture mips) and /arch/sparc64/kernel/idle_85xx.S (Architecture sparc64)


  1 /* SPDX-License-Identifier: GPL-2.0-or-later *    
  2 /*                                                
  3  * Copyright (C) 2008 Freescale Semiconductor,    
  4  * Dave Liu <daveliu@freescale.com>                
  5  * copy from idle_6xx.S and modify for e500 ba    
  6  * implement the power_save function in idle.     
  7  */                                               
  8                                                   
  9 #include <linux/threads.h>                        
 10 #include <asm/reg.h>                              
 11 #include <asm/page.h>                             
 12 #include <asm/cputable.h>                         
 13 #include <asm/thread_info.h>                      
 14 #include <asm/ppc_asm.h>                          
 15 #include <asm/asm-offsets.h>                      
 16 #include <asm/feature-fixups.h>                   
 17                                                   
 18         .text                                     
 19                                                   
 20 _GLOBAL(e500_idle)                                
 21         lwz     r4,TI_LOCAL_FLAGS(r2)   /* set    
 22         ori     r4,r4,_TLF_NAPPING      /* so     
 23         stw     r4,TI_LOCAL_FLAGS(r2)   /* it     
 24                                                   
 25 #ifdef CONFIG_PPC_E500MC                          
 26         wrteei  1                                 
 27 1:      wait                                      
 28                                                   
 29         /*                                        
 30          * Guard against spurious wakeups (e.g    
 31          * any real interrupt will cause us to    
 32          * _TLF_NAPPING.                          
 33          */                                       
 34         b       1b                                
 35 #else                                             
 36         /* Check if we can nap or doze, put HI    
 37         lis     r3,0                              
 38 BEGIN_FTR_SECTION                                 
 39         lis     r3,HID0_DOZE@h                    
 40 END_FTR_SECTION_IFSET(CPU_FTR_CAN_DOZE)           
 41                                                   
 42 BEGIN_FTR_SECTION                                 
 43         /* Now check if user enabled NAP mode     
 44         lis     r4,powersave_nap@ha               
 45         lwz     r4,powersave_nap@l(r4)            
 46         cmpwi   0,r4,0                            
 47         beq     1f                                
 48         stwu    r1,-16(r1)                        
 49         mflr    r0                                
 50         stw     r0,20(r1)                         
 51         bl      flush_dcache_L1                   
 52         lwz     r0,20(r1)                         
 53         addi    r1,r1,16                          
 54         mtlr    r0                                
 55         lis     r3,HID0_NAP@h                     
 56 END_FTR_SECTION_IFSET(CPU_FTR_CAN_NAP)            
 57 1:                                                
 58         /* Go to NAP or DOZE now */               
 59         mfspr   r4,SPRN_HID0                      
 60         rlwinm  r4,r4,0,~(HID0_DOZE|HID0_NAP|H    
 61         or      r4,r4,r3                          
 62         isync                                     
 63         mtspr   SPRN_HID0,r4                      
 64         isync                                     
 65                                                   
 66         mfmsr   r7                                
 67         oris    r7,r7,MSR_WE@h                    
 68         ori     r7,r7,MSR_EE                      
 69         msync                                     
 70         mtmsr   r7                                
 71         isync                                     
 72 2:      b       2b                                
 73 #endif /* !E500MC */                              
 74                                                   
 75 /*                                                
 76  * Return from NAP/DOZE mode, restore some CPU    
 77  * r2 containing address of current.              
 78  * r11 points to the exception frame.             
 79  * We have to preserve r10.                       
 80  */                                               
 81 _GLOBAL(power_save_ppc32_restore)                 
 82         lwz     r9,_LINK(r11)           /* int    
 83         stw     r9,_NIP(r11)            /* mak    
 84         blr                                       
 85 _ASM_NOKPROBE_SYMBOL(power_save_ppc32_restore)    
                                                      

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