Orange Pi5 kernel

Deprecated Linux kernel 5.10.110 for OrangePi 5/5B/5+ boards

3 Commits   0 Branches   0 Tags
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   1) .. SPDX-License-Identifier: GPL-2.0
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   2) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   3) .. _arch_page_table_helpers:
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   4) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   5) ===============================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   6) Architecture Page Table Helpers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   7) ===============================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   8) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300   9) Generic MM expects architectures (with MMU) to provide helpers to create, access
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  10) and modify page table entries at various level for different memory functions.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  11) These page table helpers need to conform to a common semantics across platforms.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  12) Following tables describe the expected semantics which can also be tested during
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  13) boot via CONFIG_DEBUG_VM_PGTABLE option. All future changes in here or the debug
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  14) test need to be in sync.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  15) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  16) ======================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  17) PTE Page Table Helpers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  18) ======================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  19) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  20) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  21) | pte_same                  | Tests whether both PTE entries are the same      |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  22) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  23) | pte_bad                   | Tests a non-table mapped PTE                     |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  24) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  25) | pte_present               | Tests a valid mapped PTE                         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  26) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  27) | pte_young                 | Tests a young PTE                                |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  28) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  29) | pte_dirty                 | Tests a dirty PTE                                |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  30) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  31) | pte_write                 | Tests a writable PTE                             |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  32) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  33) | pte_special               | Tests a special PTE                              |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  34) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  35) | pte_protnone              | Tests a PROT_NONE PTE                            |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  36) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  37) | pte_devmap                | Tests a ZONE_DEVICE mapped PTE                   |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  38) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  39) | pte_soft_dirty            | Tests a soft dirty PTE                           |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  40) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  41) | pte_swp_soft_dirty        | Tests a soft dirty swapped PTE                   |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  42) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  43) | pte_mkyoung               | Creates a young PTE                              |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  44) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  45) | pte_mkold                 | Creates an old PTE                               |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  46) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  47) | pte_mkdirty               | Creates a dirty PTE                              |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  48) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  49) | pte_mkclean               | Creates a clean PTE                              |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  50) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  51) | pte_mkwrite               | Creates a writable PTE                           |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  52) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  53) | pte_wrprotect             | Creates a write protected PTE                    |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  54) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  55) | pte_mkspecial             | Creates a special PTE                            |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  56) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  57) | pte_mkdevmap              | Creates a ZONE_DEVICE mapped PTE                 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  58) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  59) | pte_mksoft_dirty          | Creates a soft dirty PTE                         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  60) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  61) | pte_clear_soft_dirty      | Clears a soft dirty PTE                          |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  62) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  63) | pte_swp_mksoft_dirty      | Creates a soft dirty swapped PTE                 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  64) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  65) | pte_swp_clear_soft_dirty  | Clears a soft dirty swapped PTE                  |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  66) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  67) | pte_mknotpresent          | Invalidates a mapped PTE                         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  68) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  69) | ptep_get_and_clear        | Clears a PTE                                     |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  70) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  71) | ptep_get_and_clear_full   | Clears a PTE                                     |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  72) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  73) | ptep_test_and_clear_young | Clears young from a PTE                          |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  74) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  75) | ptep_set_wrprotect        | Converts into a write protected PTE              |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  76) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  77) | ptep_set_access_flags     | Converts into a more permissive PTE              |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  78) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  79) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  80) ======================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  81) PMD Page Table Helpers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  82) ======================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  83) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  84) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  85) | pmd_same                  | Tests whether both PMD entries are the same      |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  86) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  87) | pmd_bad                   | Tests a non-table mapped PMD                     |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  88) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  89) | pmd_leaf                  | Tests a leaf mapped PMD                          |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  90) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  91) | pmd_huge                  | Tests a HugeTLB mapped PMD                       |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  92) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  93) | pmd_trans_huge            | Tests a Transparent Huge Page (THP) at PMD       |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  94) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  95) | pmd_present               | Tests a valid mapped PMD                         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  96) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  97) | pmd_young                 | Tests a young PMD                                |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  98) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300  99) | pmd_dirty                 | Tests a dirty PMD                                |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 100) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 101) | pmd_write                 | Tests a writable PMD                             |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 102) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 103) | pmd_special               | Tests a special PMD                              |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 104) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 105) | pmd_protnone              | Tests a PROT_NONE PMD                            |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 106) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 107) | pmd_devmap                | Tests a ZONE_DEVICE mapped PMD                   |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 108) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 109) | pmd_soft_dirty            | Tests a soft dirty PMD                           |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 110) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 111) | pmd_swp_soft_dirty        | Tests a soft dirty swapped PMD                   |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 112) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 113) | pmd_mkyoung               | Creates a young PMD                              |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 114) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 115) | pmd_mkold                 | Creates an old PMD                               |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 116) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 117) | pmd_mkdirty               | Creates a dirty PMD                              |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 118) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 119) | pmd_mkclean               | Creates a clean PMD                              |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 120) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 121) | pmd_mkwrite               | Creates a writable PMD                           |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 122) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 123) | pmd_wrprotect             | Creates a write protected PMD                    |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 124) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 125) | pmd_mkspecial             | Creates a special PMD                            |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 126) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 127) | pmd_mkdevmap              | Creates a ZONE_DEVICE mapped PMD                 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 128) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 129) | pmd_mksoft_dirty          | Creates a soft dirty PMD                         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 130) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 131) | pmd_clear_soft_dirty      | Clears a soft dirty PMD                          |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 132) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 133) | pmd_swp_mksoft_dirty      | Creates a soft dirty swapped PMD                 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 134) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 135) | pmd_swp_clear_soft_dirty  | Clears a soft dirty swapped PMD                  |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 136) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 137) | pmd_mkinvalid             | Invalidates a mapped PMD [1]                     |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 138) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 139) | pmd_set_huge              | Creates a PMD huge mapping                       |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 140) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 141) | pmd_clear_huge            | Clears a PMD huge mapping                        |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 142) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 143) | pmdp_get_and_clear        | Clears a PMD                                     |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 144) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 145) | pmdp_get_and_clear_full   | Clears a PMD                                     |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 146) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 147) | pmdp_test_and_clear_young | Clears young from a PMD                          |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 148) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 149) | pmdp_set_wrprotect        | Converts into a write protected PMD              |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 150) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 151) | pmdp_set_access_flags     | Converts into a more permissive PMD              |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 152) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 153) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 154) ======================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 155) PUD Page Table Helpers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 156) ======================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 157) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 158) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 159) | pud_same                  | Tests whether both PUD entries are the same      |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 160) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 161) | pud_bad                   | Tests a non-table mapped PUD                     |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 162) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 163) | pud_leaf                  | Tests a leaf mapped PUD                          |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 164) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 165) | pud_huge                  | Tests a HugeTLB mapped PUD                       |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 166) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 167) | pud_trans_huge            | Tests a Transparent Huge Page (THP) at PUD       |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 168) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 169) | pud_present               | Tests a valid mapped PUD                         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 170) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 171) | pud_young                 | Tests a young PUD                                |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 172) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 173) | pud_dirty                 | Tests a dirty PUD                                |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 174) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 175) | pud_write                 | Tests a writable PUD                             |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 176) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 177) | pud_devmap                | Tests a ZONE_DEVICE mapped PUD                   |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 178) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 179) | pud_mkyoung               | Creates a young PUD                              |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 180) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 181) | pud_mkold                 | Creates an old PUD                               |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 182) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 183) | pud_mkdirty               | Creates a dirty PUD                              |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 184) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 185) | pud_mkclean               | Creates a clean PUD                              |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 186) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 187) | pud_mkwrite               | Creates a writable PUD                           |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 188) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 189) | pud_wrprotect             | Creates a write protected PUD                    |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 190) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 191) | pud_mkdevmap              | Creates a ZONE_DEVICE mapped PUD                 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 192) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 193) | pud_mkinvalid             | Invalidates a mapped PUD [1]                     |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 194) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 195) | pud_set_huge              | Creates a PUD huge mapping                       |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 196) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 197) | pud_clear_huge            | Clears a PUD huge mapping                        |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 198) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 199) | pudp_get_and_clear        | Clears a PUD                                     |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 200) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 201) | pudp_get_and_clear_full   | Clears a PUD                                     |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 202) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 203) | pudp_test_and_clear_young | Clears young from a PUD                          |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 204) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 205) | pudp_set_wrprotect        | Converts into a write protected PUD              |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 206) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 207) | pudp_set_access_flags     | Converts into a more permissive PUD              |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 208) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 209) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 210) ==========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 211) HugeTLB Page Table Helpers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 212) ==========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 213) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 214) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 215) | pte_huge                  | Tests a HugeTLB                                  |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 216) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 217) | pte_mkhuge                | Creates a HugeTLB                                |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 218) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 219) | huge_pte_dirty            | Tests a dirty HugeTLB                            |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 220) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 221) | huge_pte_write            | Tests a writable HugeTLB                         |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 222) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 223) | huge_pte_mkdirty          | Creates a dirty HugeTLB                          |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 224) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 225) | huge_pte_mkwrite          | Creates a writable HugeTLB                       |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 226) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 227) | huge_pte_wrprotect        | Creates a write protected HugeTLB                |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 228) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 229) | huge_ptep_get_and_clear   | Clears a HugeTLB                                 |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 230) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 231) | huge_ptep_set_wrprotect   | Converts into a write protected HugeTLB          |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 232) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 233) | huge_ptep_set_access_flags  | Converts into a more permissive HugeTLB        |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 234) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 235) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 236) ========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 237) SWAP Page Table Helpers
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 238) ========================
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 239) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 240) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 241) | __pte_to_swp_entry        | Creates a swapped entry (arch) from a mapped PTE |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 242) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 243) | __swp_to_pte_entry        | Creates a mapped PTE from a swapped entry (arch) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 244) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 245) | __pmd_to_swp_entry        | Creates a swapped entry (arch) from a mapped PMD |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 246) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 247) | __swp_to_pmd_entry        | Creates a mapped PMD from a swapped entry (arch) |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 248) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 249) | is_migration_entry        | Tests a migration (read or write) swapped entry  |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 250) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 251) | is_write_migration_entry  | Tests a write migration swapped entry            |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 252) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 253) | make_migration_entry_read | Converts into read migration swapped entry       |
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 254) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 255) | make_migration_entry      | Creates a migration swapped entry (read or write)|
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 256) +---------------------------+--------------------------------------------------+
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 257) 
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 258) [1] https://lore.kernel.org/linux-mm/20181017020930.GN30832@redhat.com/