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

TOMOYO Linux Cross Reference
Linux/arch/loongarch/include/asm/pgtable-bits.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/loongarch/include/asm/pgtable-bits.h (Version linux-6.12-rc7) and /arch/i386/include/asm-i386/pgtable-bits.h (Version linux-4.19.322)


** Warning: Cannot open xref database.

  1 /* SPDX-License-Identifier: GPL-2.0 */              1 
  2 /*                                                
  3  * Copyright (C) 2020-2022 Loongson Technology    
  4  */                                               
  5 #ifndef _ASM_PGTABLE_BITS_H                       
  6 #define _ASM_PGTABLE_BITS_H                       
  7                                                   
  8 /* Page table bits */                             
  9 #define _PAGE_VALID_SHIFT       0                 
 10 #define _PAGE_ACCESSED_SHIFT    0  /* Reuse Va    
 11 #define _PAGE_DIRTY_SHIFT       1                 
 12 #define _PAGE_PLV_SHIFT         2  /* 2~3, two    
 13 #define _CACHE_SHIFT            4  /* 4~5, two    
 14 #define _PAGE_GLOBAL_SHIFT      6                 
 15 #define _PAGE_HUGE_SHIFT        6  /* HUGE is     
 16 #define _PAGE_PRESENT_SHIFT     7                 
 17 #define _PAGE_WRITE_SHIFT       8                 
 18 #define _PAGE_MODIFIED_SHIFT    9                 
 19 #define _PAGE_PROTNONE_SHIFT    10                
 20 #define _PAGE_SPECIAL_SHIFT     11                
 21 #define _PAGE_HGLOBAL_SHIFT     12 /* HGlobal     
 22 #define _PAGE_PFN_SHIFT         12                
 23 #define _PAGE_SWP_EXCLUSIVE_SHIFT 23              
 24 #define _PAGE_PFN_END_SHIFT     48                
 25 #define _PAGE_DEVMAP_SHIFT      59                
 26 #define _PAGE_PRESENT_INVALID_SHIFT 60            
 27 #define _PAGE_NO_READ_SHIFT     61                
 28 #define _PAGE_NO_EXEC_SHIFT     62                
 29 #define _PAGE_RPLV_SHIFT        63                
 30                                                   
 31 /* Used by software */                            
 32 #define _PAGE_PRESENT           (_ULCAST_(1) <    
 33 #define _PAGE_PRESENT_INVALID   (_ULCAST_(1) <    
 34 #define _PAGE_WRITE             (_ULCAST_(1) <    
 35 #define _PAGE_ACCESSED          (_ULCAST_(1) <    
 36 #define _PAGE_MODIFIED          (_ULCAST_(1) <    
 37 #define _PAGE_PROTNONE          (_ULCAST_(1) <    
 38 #define _PAGE_SPECIAL           (_ULCAST_(1) <    
 39 #define _PAGE_DEVMAP            (_ULCAST_(1) <    
 40                                                   
 41 /* We borrow bit 23 to store the exclusive mar    
 42 #define _PAGE_SWP_EXCLUSIVE     (_ULCAST_(1) <    
 43                                                   
 44 /* Used by TLB hardware (placed in EntryLo*) *    
 45 #define _PAGE_VALID             (_ULCAST_(1) <    
 46 #define _PAGE_DIRTY             (_ULCAST_(1) <    
 47 #define _PAGE_PLV               (_ULCAST_(3) <    
 48 #define _PAGE_GLOBAL            (_ULCAST_(1) <    
 49 #define _PAGE_HUGE              (_ULCAST_(1) <    
 50 #define _PAGE_HGLOBAL           (_ULCAST_(1) <    
 51 #define _PAGE_NO_READ           (_ULCAST_(1) <    
 52 #define _PAGE_NO_EXEC           (_ULCAST_(1) <    
 53 #define _PAGE_RPLV              (_ULCAST_(1) <    
 54 #define _CACHE_MASK             (_ULCAST_(3) <    
 55 #define PFN_PTE_SHIFT           (PAGE_SHIFT -     
 56                                                   
 57 #define _PAGE_USER      (PLV_USER << _PAGE_PLV    
 58 #define _PAGE_KERN      (PLV_KERN << _PAGE_PLV    
 59                                                   
 60 #define _PFN_MASK (~((_ULCAST_(1) << (PFN_PTE_    
 61                   ((_ULCAST_(1) << (_PAGE_PFN_    
 62                                                   
 63 /*                                                
 64  * Cache attributes                               
 65  */                                               
 66 #ifndef _CACHE_SUC                                
 67 #define _CACHE_SUC                      (0<<_C    
 68 #endif                                            
 69 #ifndef _CACHE_CC                                 
 70 #define _CACHE_CC                       (1<<_C    
 71 #endif                                            
 72 #ifndef _CACHE_WUC                                
 73 #define _CACHE_WUC                      (2<<_C    
 74 #endif                                            
 75                                                   
 76 #define __READABLE      (_PAGE_VALID)             
 77 #define __WRITEABLE     (_PAGE_DIRTY | _PAGE_W    
 78                                                   
 79 #define _PAGE_CHG_MASK  (_PAGE_MODIFIED | _PAG    
 80 #define _HPAGE_CHG_MASK (_PAGE_MODIFIED | _PAG    
 81                                                   
 82 #define PAGE_NONE       __pgprot(_PAGE_PROTNON    
 83                                  _PAGE_USER |     
 84 #define PAGE_SHARED     __pgprot(_PAGE_PRESENT    
 85                                  _PAGE_USER |     
 86 #define PAGE_READONLY   __pgprot(_PAGE_PRESENT    
 87                                                   
 88 #define PAGE_KERNEL     __pgprot(_PAGE_PRESENT    
 89                                  _PAGE_GLOBAL     
 90 #define PAGE_KERNEL_SUC __pgprot(_PAGE_PRESENT    
 91                                  _PAGE_GLOBAL     
 92 #define PAGE_KERNEL_WUC __pgprot(_PAGE_PRESENT    
 93                                  _PAGE_GLOBAL     
 94                                                   
 95 #ifndef __ASSEMBLY__                              
 96                                                   
 97 #define _PAGE_IOREMAP           pgprot_val(PAG    
 98                                                   
 99 #define pgprot_noncached pgprot_noncached         
100                                                   
101 static inline pgprot_t pgprot_noncached(pgprot    
102 {                                                 
103         unsigned long prot = pgprot_val(_prot)    
104                                                   
105         prot = (prot & ~_CACHE_MASK) | _CACHE_    
106                                                   
107         return __pgprot(prot);                    
108 }                                                 
109                                                   
110 extern bool wc_enabled;                           
111                                                   
112 #define pgprot_writecombine pgprot_writecombin    
113                                                   
114 static inline pgprot_t pgprot_writecombine(pgp    
115 {                                                 
116         unsigned long prot = pgprot_val(_prot)    
117                                                   
118         prot = (prot & ~_CACHE_MASK) | (wc_ena    
119                                                   
120         return __pgprot(prot);                    
121 }                                                 
122                                                   
123 #endif /* !__ASSEMBLY__ */                        
124                                                   
125 #endif /* _ASM_PGTABLE_BITS_H */                  
126                                                   

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