This source file includes following definitions.
- pte_wrprotect
- pte_write
- pte_mkwrite
- pte_user
- pte_mkprivileged
- pte_mkuser
- pte_mkhuge
   1 
   2 #ifndef _ASM_POWERPC_NOHASH_32_PTE_8xx_H
   3 #define _ASM_POWERPC_NOHASH_32_PTE_8xx_H
   4 #ifdef __KERNEL__
   5 
   6 
   7 
   8 
   9 
  10 
  11 
  12 
  13 
  14 
  15 
  16 
  17 
  18 
  19 
  20 
  21 
  22 
  23 
  24 
  25 
  26 
  27 
  28 
  29 
  30 
  31 
  32 #define _PAGE_PRESENT   0x0001  
  33 #define _PAGE_NO_CACHE  0x0002  
  34 #define _PAGE_SH        0x0004  
  35 #define _PAGE_SPS       0x0008  
  36 #define _PAGE_DIRTY     0x0100  
  37 
  38 
  39 
  40 
  41 #define _PAGE_GUARDED   0x0010  
  42 #define _PAGE_SPECIAL   0x0020  
  43 #define _PAGE_EXEC      0x0040  
  44 #define _PAGE_ACCESSED  0x0080  
  45 
  46 #define _PAGE_NA        0x0200  
  47 #define _PAGE_RO        0x0600  
  48 
  49 
  50 #define _PAGE_COHERENT  0
  51 #define _PAGE_WRITETHRU 0
  52 
  53 #define _PAGE_KERNEL_RO         (_PAGE_SH | _PAGE_RO)
  54 #define _PAGE_KERNEL_ROX        (_PAGE_SH | _PAGE_RO | _PAGE_EXEC)
  55 #define _PAGE_KERNEL_RW         (_PAGE_SH | _PAGE_DIRTY)
  56 #define _PAGE_KERNEL_RWX        (_PAGE_SH | _PAGE_DIRTY | _PAGE_EXEC)
  57 
  58 #define _PMD_PRESENT    0x0001
  59 #define _PMD_PRESENT_MASK       _PMD_PRESENT
  60 #define _PMD_BAD        0x0fd0
  61 #define _PMD_PAGE_MASK  0x000c
  62 #define _PMD_PAGE_8M    0x000c
  63 #define _PMD_PAGE_512K  0x0004
  64 #define _PMD_USER       0x0020  
  65 
  66 #define _PTE_NONE_MASK  0
  67 
  68 #ifdef CONFIG_PPC_16K_PAGES
  69 #define _PAGE_PSIZE     _PAGE_SPS
  70 #else
  71 #define _PAGE_PSIZE             0
  72 #endif
  73 
  74 #define _PAGE_BASE_NC   (_PAGE_PRESENT | _PAGE_ACCESSED | _PAGE_PSIZE)
  75 #define _PAGE_BASE      (_PAGE_BASE_NC)
  76 
  77 
  78 #define PAGE_NONE       __pgprot(_PAGE_BASE | _PAGE_NA)
  79 #define PAGE_SHARED     __pgprot(_PAGE_BASE)
  80 #define PAGE_SHARED_X   __pgprot(_PAGE_BASE | _PAGE_EXEC)
  81 #define PAGE_COPY       __pgprot(_PAGE_BASE | _PAGE_RO)
  82 #define PAGE_COPY_X     __pgprot(_PAGE_BASE | _PAGE_RO | _PAGE_EXEC)
  83 #define PAGE_READONLY   __pgprot(_PAGE_BASE | _PAGE_RO)
  84 #define PAGE_READONLY_X __pgprot(_PAGE_BASE | _PAGE_RO | _PAGE_EXEC)
  85 
  86 #ifndef __ASSEMBLY__
  87 static inline pte_t pte_wrprotect(pte_t pte)
  88 {
  89         return __pte(pte_val(pte) | _PAGE_RO);
  90 }
  91 
  92 #define pte_wrprotect pte_wrprotect
  93 
  94 static inline int pte_write(pte_t pte)
  95 {
  96         return !(pte_val(pte) & _PAGE_RO);
  97 }
  98 
  99 #define pte_write pte_write
 100 
 101 static inline pte_t pte_mkwrite(pte_t pte)
 102 {
 103         return __pte(pte_val(pte) & ~_PAGE_RO);
 104 }
 105 
 106 #define pte_mkwrite pte_mkwrite
 107 
 108 static inline bool pte_user(pte_t pte)
 109 {
 110         return !(pte_val(pte) & _PAGE_SH);
 111 }
 112 
 113 #define pte_user pte_user
 114 
 115 static inline pte_t pte_mkprivileged(pte_t pte)
 116 {
 117         return __pte(pte_val(pte) | _PAGE_SH);
 118 }
 119 
 120 #define pte_mkprivileged pte_mkprivileged
 121 
 122 static inline pte_t pte_mkuser(pte_t pte)
 123 {
 124         return __pte(pte_val(pte) & ~_PAGE_SH);
 125 }
 126 
 127 #define pte_mkuser pte_mkuser
 128 
 129 static inline pte_t pte_mkhuge(pte_t pte)
 130 {
 131         return __pte(pte_val(pte) | _PAGE_SPS);
 132 }
 133 
 134 #define pte_mkhuge pte_mkhuge
 135 #endif
 136 
 137 #endif 
 138 #endif