Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
pgtable-3level.h File Reference

Go to the source code of this file.

Macros

#define PTRS_PER_PTE   512
 
#define PTRS_PER_PMD   512
 
#define PTRS_PER_PGD   4
 
#define PTE_HWTABLE_PTRS   (PTRS_PER_PTE)
 
#define PTE_HWTABLE_OFF   (0)
 
#define PTE_HWTABLE_SIZE   (PTRS_PER_PTE * sizeof(u64))
 
#define PGDIR_SHIFT   30
 
#define PMD_SHIFT   21
 
#define PMD_SIZE   (1UL << PMD_SHIFT)
 
#define PMD_MASK   (~(PMD_SIZE-1))
 
#define PGDIR_SIZE   (1UL << PGDIR_SHIFT)
 
#define PGDIR_MASK   (~(PGDIR_SIZE-1))
 
#define SECTION_SHIFT   21
 
#define SECTION_SIZE   (1UL << SECTION_SHIFT)
 
#define SECTION_MASK   (~(SECTION_SIZE-1))
 
#define USER_PTRS_PER_PGD   (PAGE_OFFSET / PGDIR_SIZE)
 
#define L_PTE_PRESENT   (_AT(pteval_t, 3) << 0) /* Valid */
 
#define L_PTE_FILE   (_AT(pteval_t, 1) << 2) /* only when !PRESENT */
 
#define L_PTE_USER   (_AT(pteval_t, 1) << 6) /* AP[1] */
 
#define L_PTE_RDONLY   (_AT(pteval_t, 1) << 7) /* AP[2] */
 
#define L_PTE_SHARED   (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */
 
#define L_PTE_YOUNG   (_AT(pteval_t, 1) << 10) /* AF */
 
#define L_PTE_XN   (_AT(pteval_t, 1) << 54) /* XN */
 
#define L_PTE_DIRTY   (_AT(pteval_t, 1) << 55) /* unused */
 
#define L_PTE_SPECIAL   (_AT(pteval_t, 1) << 56) /* unused */
 
#define L_PTE_XN_HIGH   (1 << (54 - 32))
 
#define L_PTE_DIRTY_HIGH   (1 << (55 - 32))
 
#define L_PTE_MT_UNCACHED   (_AT(pteval_t, 0) << 2) /* strongly ordered */
 
#define L_PTE_MT_BUFFERABLE   (_AT(pteval_t, 1) << 2) /* normal non-cacheable */
 
#define L_PTE_MT_WRITETHROUGH   (_AT(pteval_t, 2) << 2) /* normal inner write-through */
 
#define L_PTE_MT_WRITEBACK   (_AT(pteval_t, 3) << 2) /* normal inner write-back */
 
#define L_PTE_MT_WRITEALLOC   (_AT(pteval_t, 7) << 2) /* normal inner write-alloc */
 
#define L_PTE_MT_DEV_SHARED   (_AT(pteval_t, 4) << 2) /* device */
 
#define L_PTE_MT_DEV_NONSHARED   (_AT(pteval_t, 4) << 2) /* device */
 
#define L_PTE_MT_DEV_WC   (_AT(pteval_t, 1) << 2) /* normal non-cacheable */
 
#define L_PTE_MT_DEV_CACHED   (_AT(pteval_t, 3) << 2) /* normal inner write-back */
 
#define L_PTE_MT_MASK   (_AT(pteval_t, 7) << 2)
 
#define L_PGD_SWAPPER   (_AT(pgdval_t, 1) << 55) /* swapper_pg_dir entry */
 
#define pud_none(pud)   (!pud_val(pud))
 
#define pud_bad(pud)   (!(pud_val(pud) & 2))
 
#define pud_present(pud)   (pud_val(pud))
 
#define pud_clear(pudp)
 
#define set_pud(pudp, pud)
 
#define pmd_index(addr)   (((addr) >> PMD_SHIFT) & (PTRS_PER_PMD - 1))
 
#define pmd_bad(pmd)   (!(pmd_val(pmd) & 2))
 
#define copy_pmd(pmdpd, pmdps)
 
#define pmd_clear(pmdp)
 
#define set_pte_ext(ptep, pte, ext)   cpu_set_pte_ext(ptep,__pte(pte_val(pte)|(ext)))
 

Macro Definition Documentation

#define copy_pmd (   pmdpd,
  pmdps 
)
Value:
do { \
*pmdpd = *pmdps; \
flush_pmd_entry(pmdpd); \
} while (0)

Definition at line 137 of file pgtable-3level.h.

#define L_PGD_SWAPPER   (_AT(pgdval_t, 1) << 55) /* swapper_pg_dir entry */

Definition at line 103 of file pgtable-3level.h.

#define L_PTE_DIRTY   (_AT(pteval_t, 1) << 55) /* unused */

Definition at line 77 of file pgtable-3level.h.

#define L_PTE_DIRTY_HIGH   (1 << (55 - 32))

Definition at line 84 of file pgtable-3level.h.

#define L_PTE_FILE   (_AT(pteval_t, 1) << 2) /* only when !PRESENT */

Definition at line 71 of file pgtable-3level.h.

#define L_PTE_MT_BUFFERABLE   (_AT(pteval_t, 1) << 2) /* normal non-cacheable */

Definition at line 90 of file pgtable-3level.h.

#define L_PTE_MT_DEV_CACHED   (_AT(pteval_t, 3) << 2) /* normal inner write-back */

Definition at line 97 of file pgtable-3level.h.

#define L_PTE_MT_DEV_NONSHARED   (_AT(pteval_t, 4) << 2) /* device */

Definition at line 95 of file pgtable-3level.h.

#define L_PTE_MT_DEV_SHARED   (_AT(pteval_t, 4) << 2) /* device */

Definition at line 94 of file pgtable-3level.h.

#define L_PTE_MT_DEV_WC   (_AT(pteval_t, 1) << 2) /* normal non-cacheable */

Definition at line 96 of file pgtable-3level.h.

#define L_PTE_MT_MASK   (_AT(pteval_t, 7) << 2)

Definition at line 98 of file pgtable-3level.h.

#define L_PTE_MT_UNCACHED   (_AT(pteval_t, 0) << 2) /* strongly ordered */

Definition at line 89 of file pgtable-3level.h.

#define L_PTE_MT_WRITEALLOC   (_AT(pteval_t, 7) << 2) /* normal inner write-alloc */

Definition at line 93 of file pgtable-3level.h.

#define L_PTE_MT_WRITEBACK   (_AT(pteval_t, 3) << 2) /* normal inner write-back */

Definition at line 92 of file pgtable-3level.h.

#define L_PTE_MT_WRITETHROUGH   (_AT(pteval_t, 2) << 2) /* normal inner write-through */

Definition at line 91 of file pgtable-3level.h.

#define L_PTE_PRESENT   (_AT(pteval_t, 3) << 0) /* Valid */

Definition at line 70 of file pgtable-3level.h.

#define L_PTE_RDONLY   (_AT(pteval_t, 1) << 7) /* AP[2] */

Definition at line 73 of file pgtable-3level.h.

#define L_PTE_SHARED   (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */

Definition at line 74 of file pgtable-3level.h.

#define L_PTE_SPECIAL   (_AT(pteval_t, 1) << 56) /* unused */

Definition at line 78 of file pgtable-3level.h.

#define L_PTE_USER   (_AT(pteval_t, 1) << 6) /* AP[1] */

Definition at line 72 of file pgtable-3level.h.

#define L_PTE_XN   (_AT(pteval_t, 1) << 54) /* XN */

Definition at line 76 of file pgtable-3level.h.

#define L_PTE_XN_HIGH   (1 << (54 - 32))

Definition at line 83 of file pgtable-3level.h.

#define L_PTE_YOUNG   (_AT(pteval_t, 1) << 10) /* AF */

Definition at line 75 of file pgtable-3level.h.

#define PGDIR_MASK   (~(PGDIR_SIZE-1))

Definition at line 53 of file pgtable-3level.h.

#define PGDIR_SHIFT   30

Definition at line 43 of file pgtable-3level.h.

#define PGDIR_SIZE   (1UL << PGDIR_SHIFT)

Definition at line 52 of file pgtable-3level.h.

#define pmd_bad (   pmd)    (!(pmd_val(pmd) & 2))

Definition at line 135 of file pgtable-3level.h.

#define pmd_clear (   pmdp)
Value:
do { \
*pmdp = __pmd(0); \
clean_pmd_entry(pmdp); \
} while (0)

Definition at line 143 of file pgtable-3level.h.

#define pmd_index (   addr)    (((addr) >> PMD_SHIFT) & (PTRS_PER_PMD - 1))

Definition at line 129 of file pgtable-3level.h.

#define PMD_MASK   (~(PMD_SIZE-1))

Definition at line 51 of file pgtable-3level.h.

#define PMD_SHIFT   21

Definition at line 48 of file pgtable-3level.h.

#define PMD_SIZE   (1UL << PMD_SHIFT)

Definition at line 50 of file pgtable-3level.h.

#define PTE_HWTABLE_OFF   (0)

Definition at line 37 of file pgtable-3level.h.

#define PTE_HWTABLE_PTRS   (PTRS_PER_PTE)

Definition at line 36 of file pgtable-3level.h.

#define PTE_HWTABLE_SIZE   (PTRS_PER_PTE * sizeof(u64))

Definition at line 38 of file pgtable-3level.h.

#define PTRS_PER_PGD   4

Definition at line 34 of file pgtable-3level.h.

#define PTRS_PER_PMD   512

Definition at line 33 of file pgtable-3level.h.

#define PTRS_PER_PTE   512

Definition at line 32 of file pgtable-3level.h.

#define pud_bad (   pud)    (!(pud_val(pud) & 2))

Definition at line 108 of file pgtable-3level.h.

#define pud_clear (   pudp)
Value:
do { \
*pudp = __pud(0); \
clean_pmd_entry(pudp); \
} while (0)

Definition at line 111 of file pgtable-3level.h.

#define pud_none (   pud)    (!pud_val(pud))

Definition at line 107 of file pgtable-3level.h.

#define pud_present (   pud)    (pud_val(pud))

Definition at line 109 of file pgtable-3level.h.

#define SECTION_MASK   (~(SECTION_SIZE-1))

Definition at line 60 of file pgtable-3level.h.

#define SECTION_SHIFT   21

Definition at line 58 of file pgtable-3level.h.

#define SECTION_SIZE   (1UL << SECTION_SHIFT)

Definition at line 59 of file pgtable-3level.h.

#define set_pte_ext (   ptep,
  pte,
  ext 
)    cpu_set_pte_ext(ptep,__pte(pte_val(pte)|(ext)))

Definition at line 149 of file pgtable-3level.h.

#define set_pud (   pudp,
  pud 
)
Value:
do { \
*pudp = pud; \
flush_pmd_entry(pudp); \
} while (0)

Definition at line 117 of file pgtable-3level.h.

#define USER_PTRS_PER_PGD   (PAGE_OFFSET / PGDIR_SIZE)

Definition at line 62 of file pgtable-3level.h.