Documentation/mm/arch_pgtable_helpers.rst

Source file repositories/reference/linux-study-clean/Documentation/mm/arch_pgtable_helpers.rst

File Facts

System
Linux kernel
Corpus path
Documentation/mm/arch_pgtable_helpers.rst
Extension
.rst
Size
17982 bytes
Lines
251
Domain
Support Tooling And Documentation
Bucket
Documentation
Inferred role
Support Tooling And Documentation: documentation
Status
atlas-only

Why This File Exists

Repository support layer: documentation, build tooling, samples, user-space helper tools, generated initramfs support, licenses, and validation utilities.

Dependency Surface

Detected Declarations

Annotated Snippet

.. SPDX-License-Identifier: GPL-2.0

===============================
Architecture Page Table Helpers
===============================

Generic MM expects architectures (with MMU) to provide helpers to create, access
and modify page table entries at various level for different memory functions.
These page table helpers need to conform to a common semantics across platforms.
Following tables describe the expected semantics which can also be tested during
boot via CONFIG_DEBUG_VM_PGTABLE option. All future changes in here or the debug
test need to be in sync.


PTE Page Table Helpers
======================

+---------------------------+--------------------------------------------------+
| pte_same                  | Tests whether both PTE entries are the same      |
+---------------------------+--------------------------------------------------+
| pte_present               | Tests a valid mapped PTE                         |
+---------------------------+--------------------------------------------------+
| pte_young                 | Tests a young PTE                                |
+---------------------------+--------------------------------------------------+
| pte_dirty                 | Tests a dirty PTE                                |
+---------------------------+--------------------------------------------------+
| pte_write                 | Tests a writable PTE                             |
+---------------------------+--------------------------------------------------+
| pte_special               | Tests a special PTE                              |
+---------------------------+--------------------------------------------------+
| pte_protnone              | Tests a PROT_NONE PTE                            |
+---------------------------+--------------------------------------------------+
| pte_soft_dirty            | Tests a soft dirty PTE                           |
+---------------------------+--------------------------------------------------+
| pte_swp_soft_dirty        | Tests a soft dirty swapped PTE                   |
+---------------------------+--------------------------------------------------+
| pte_mkyoung               | Creates a young PTE                              |
+---------------------------+--------------------------------------------------+
| pte_mkold                 | Creates an old PTE                               |
+---------------------------+--------------------------------------------------+
| pte_mkdirty               | Creates a dirty PTE                              |
+---------------------------+--------------------------------------------------+
| pte_mkclean               | Creates a clean PTE                              |
+---------------------------+--------------------------------------------------+
| pte_mkwrite               | Creates a writable PTE of the type specified by  |
|                           | the VMA.                                         |
+---------------------------+--------------------------------------------------+
| pte_mkwrite_novma         | Creates a writable PTE, of the conventional type |
|                           | of writable.                                     |
+---------------------------+--------------------------------------------------+
| pte_wrprotect             | Creates a write protected PTE                    |
+---------------------------+--------------------------------------------------+
| pte_mkspecial             | Creates a special PTE                            |
+---------------------------+--------------------------------------------------+
| pte_mksoft_dirty          | Creates a soft dirty PTE                         |
+---------------------------+--------------------------------------------------+
| pte_clear_soft_dirty      | Clears a soft dirty PTE                          |
+---------------------------+--------------------------------------------------+
| pte_swp_mksoft_dirty      | Creates a soft dirty swapped PTE                 |
+---------------------------+--------------------------------------------------+
| pte_swp_clear_soft_dirty  | Clears a soft dirty swapped PTE                  |
+---------------------------+--------------------------------------------------+
| pte_mknotpresent          | Invalidates a mapped PTE                         |
+---------------------------+--------------------------------------------------+
| ptep_clear                | Clears a PTE                                     |
+---------------------------+--------------------------------------------------+
| ptep_get_and_clear        | Clears and returns PTE                           |
+---------------------------+--------------------------------------------------+
| ptep_get_and_clear_full   | Clears and returns PTE (batched PTE unmap)       |
+---------------------------+--------------------------------------------------+

Annotation

Implementation Notes