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

TOMOYO Linux Cross Reference
Linux/arch/powerpc/include/asm/page_64.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/page_64.h (Version linux-6.12-rc7) and /arch/i386/include/asm-i386/page_64.h (Version linux-5.7.19)


  1 /* SPDX-License-Identifier: GPL-2.0-or-later *      1 
  2 #ifndef _ASM_POWERPC_PAGE_64_H                    
  3 #define _ASM_POWERPC_PAGE_64_H                    
  4                                                   
  5 /*                                                
  6  * Copyright (C) 2001 PPC64 Team, IBM Corp        
  7  */                                               
  8                                                   
  9 #include <asm/asm-const.h>                        
 10                                                   
 11 /*                                                
 12  * We always define HW_PAGE_SHIFT to 12 as use    
 13  * specific, every notion of page number share    
 14  * iommu, etc... still uses a page size of 4K.    
 15  */                                               
 16 #define HW_PAGE_SHIFT           12                
 17 #define HW_PAGE_SIZE            (ASM_CONST(1)     
 18 #define HW_PAGE_MASK            (~(HW_PAGE_SIZ    
 19                                                   
 20 /*                                                
 21  * PAGE_FACTOR is the number of bits factor be    
 22  * HW_PAGE_SHIFT, that is 4K pages.               
 23  */                                               
 24 #define PAGE_FACTOR             (PAGE_SHIFT -     
 25                                                   
 26 /* Segment size; normal 256M segments */          
 27 #define SID_SHIFT               28                
 28 #define SID_MASK                ASM_CONST(0xff    
 29 #define ESID_MASK               0xfffffffff000    
 30 #define GET_ESID(x)             (((x) >> SID_S    
 31                                                   
 32 /* 1T segments */                                 
 33 #define SID_SHIFT_1T            40                
 34 #define SID_MASK_1T             0xffffffUL        
 35 #define ESID_MASK_1T            0xffffff000000    
 36 #define GET_ESID_1T(x)          (((x) >> SID_S    
 37                                                   
 38 #ifndef __ASSEMBLY__                              
 39 #include <asm/cache.h>                            
 40                                                   
 41 typedef unsigned long pte_basic_t;                
 42                                                   
 43 static inline void clear_page(void *addr)         
 44 {                                                 
 45         unsigned long iterations;                 
 46         unsigned long onex, twox, fourx, eight    
 47                                                   
 48         iterations = ppc64_caches.l1d.blocks_p    
 49                                                   
 50         /*                                        
 51          * Some verisions of gcc use multiply     
 52          * calculate the offsets so lets give     
 53          * do better.                             
 54          */                                       
 55         onex = ppc64_caches.l1d.block_size;       
 56         twox = onex << 1;                         
 57         fourx = onex << 2;                        
 58         eightx = onex << 3;                       
 59                                                   
 60         asm volatile(                             
 61         "mtctr  %1      # clear_page\n\           
 62         .balign 16\n\                             
 63 1:      dcbz    0,%0\n\                           
 64         dcbz    %3,%0\n\                          
 65         dcbz    %4,%0\n\                          
 66         dcbz    %5,%0\n\                          
 67         dcbz    %6,%0\n\                          
 68         dcbz    %7,%0\n\                          
 69         dcbz    %8,%0\n\                          
 70         dcbz    %9,%0\n\                          
 71         add     %0,%0,%10\n\                      
 72         bdnz+   1b"                               
 73         : "=&r" (addr)                            
 74         : "r" (iterations), "" (addr), "b" (on    
 75                 "b" (twox+onex), "b" (fourx),     
 76                 "b" (twox+fourx), "b" (eightx-    
 77         : "ctr", "memory");                       
 78 }                                                 
 79                                                   
 80 extern void copy_page(void *to, void *from);      
 81                                                   
 82 /* Log 2 of page table size */                    
 83 extern u64 ppc64_pft_size;                        
 84                                                   
 85 #endif /* __ASSEMBLY__ */                         
 86                                                   
 87 #define VM_DATA_DEFAULT_FLAGS \                   
 88         (is_32bit_task() ? \                      
 89          VM_DATA_DEFAULT_FLAGS32 : VM_DATA_DEF    
 90                                                   
 91 /*                                                
 92  * This is the default if a program doesn't ha    
 93  * program header entry. The PPC64 ELF ABI has    
 94  * stack by default, so in the absence of a PT    
 95  * we turn execute permission off.                
 96  */                                               
 97 #define VM_STACK_DEFAULT_FLAGS32        VM_DAT    
 98 #define VM_STACK_DEFAULT_FLAGS64        VM_DAT    
 99                                                   
100 #define VM_STACK_DEFAULT_FLAGS \                  
101         (is_32bit_task() ? \                      
102          VM_STACK_DEFAULT_FLAGS32 : VM_STACK_D    
103                                                   
104 #include <asm-generic/getorder.h>                 
105                                                   
106 #endif /* _ASM_POWERPC_PAGE_64_H */               
107                                                   

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