/linux-4.1.27/arch/arm/include/asm/ |
H A D | pgtable-2level-hwdef.h | 59 #define PTE_TYPE_MASK (_AT(pteval_t, 3) << 0) 60 #define PTE_TYPE_FAULT (_AT(pteval_t, 0) << 0) 61 #define PTE_TYPE_LARGE (_AT(pteval_t, 1) << 0) 62 #define PTE_TYPE_SMALL (_AT(pteval_t, 2) << 0) 63 #define PTE_TYPE_EXT (_AT(pteval_t, 3) << 0) /* v5 */ 64 #define PTE_BUFFERABLE (_AT(pteval_t, 1) << 2) 65 #define PTE_CACHEABLE (_AT(pteval_t, 1) << 3) 70 #define PTE_EXT_XN (_AT(pteval_t, 1) << 0) /* v6 */ 71 #define PTE_EXT_AP_MASK (_AT(pteval_t, 3) << 4) 72 #define PTE_EXT_AP0 (_AT(pteval_t, 1) << 4) 73 #define PTE_EXT_AP1 (_AT(pteval_t, 2) << 4) 74 #define PTE_EXT_AP_UNO_SRO (_AT(pteval_t, 0) << 4) 78 #define PTE_EXT_TEX(x) (_AT(pteval_t, (x)) << 6) /* v5 */ 79 #define PTE_EXT_APX (_AT(pteval_t, 1) << 9) /* v6 */ 80 #define PTE_EXT_COHERENT (_AT(pteval_t, 1) << 9) /* XScale3 */ 81 #define PTE_EXT_SHARED (_AT(pteval_t, 1) << 10) /* v6 */ 82 #define PTE_EXT_NG (_AT(pteval_t, 1) << 11) /* v6 */ 87 #define PTE_SMALL_AP_MASK (_AT(pteval_t, 0xff) << 4) 88 #define PTE_SMALL_AP_UNO_SRO (_AT(pteval_t, 0x00) << 4) 89 #define PTE_SMALL_AP_UNO_SRW (_AT(pteval_t, 0x55) << 4) 90 #define PTE_SMALL_AP_URO_SRW (_AT(pteval_t, 0xaa) << 4) 91 #define PTE_SMALL_AP_URW_SRW (_AT(pteval_t, 0xff) << 4)
|
H A D | pgtable-3level-hwdef.h | 69 #define PTE_TYPE_MASK (_AT(pteval_t, 3) << 0) 70 #define PTE_TYPE_FAULT (_AT(pteval_t, 0) << 0) 71 #define PTE_TYPE_PAGE (_AT(pteval_t, 3) << 0) 72 #define PTE_TABLE_BIT (_AT(pteval_t, 1) << 1) 73 #define PTE_BUFFERABLE (_AT(pteval_t, 1) << 2) /* AttrIndx[0] */ 74 #define PTE_CACHEABLE (_AT(pteval_t, 1) << 3) /* AttrIndx[1] */ 75 #define PTE_AP2 (_AT(pteval_t, 1) << 7) /* AP[2] */ 76 #define PTE_EXT_SHARED (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */ 77 #define PTE_EXT_AF (_AT(pteval_t, 1) << 10) /* Access Flag */ 78 #define PTE_EXT_NG (_AT(pteval_t, 1) << 11) /* nG */ 79 #define PTE_EXT_PXN (_AT(pteval_t, 1) << 53) /* PXN */ 80 #define PTE_EXT_XN (_AT(pteval_t, 1) << 54) /* XN */
|
H A D | pgtable-3level.h | 78 #define L_PTE_VALID (_AT(pteval_t, 1) << 0) /* Valid */ 79 #define L_PTE_PRESENT (_AT(pteval_t, 3) << 0) /* Present */ 80 #define L_PTE_USER (_AT(pteval_t, 1) << 6) /* AP[1] */ 81 #define L_PTE_SHARED (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */ 82 #define L_PTE_YOUNG (_AT(pteval_t, 1) << 10) /* AF */ 83 #define L_PTE_XN (_AT(pteval_t, 1) << 54) /* XN */ 84 #define L_PTE_DIRTY (_AT(pteval_t, 1) << 55) 85 #define L_PTE_SPECIAL (_AT(pteval_t, 1) << 56) 86 #define L_PTE_NONE (_AT(pteval_t, 1) << 57) /* PROT_NONE */ 87 #define L_PTE_RDONLY (_AT(pteval_t, 1) << 58) /* READ ONLY */ 93 #define L_PMD_SECT_RDONLY (_AT(pteval_t, 1) << 58) 104 #define L_PTE_MT_UNCACHED (_AT(pteval_t, 0) << 2) /* strongly ordered */ 105 #define L_PTE_MT_BUFFERABLE (_AT(pteval_t, 1) << 2) /* normal non-cacheable */ 106 #define L_PTE_MT_WRITETHROUGH (_AT(pteval_t, 2) << 2) /* normal inner write-through */ 107 #define L_PTE_MT_WRITEBACK (_AT(pteval_t, 3) << 2) /* normal inner write-back */ 108 #define L_PTE_MT_WRITEALLOC (_AT(pteval_t, 7) << 2) /* normal inner write-alloc */ 109 #define L_PTE_MT_DEV_SHARED (_AT(pteval_t, 4) << 2) /* device */ 110 #define L_PTE_MT_DEV_NONSHARED (_AT(pteval_t, 4) << 2) /* device */ 111 #define L_PTE_MT_DEV_WC (_AT(pteval_t, 1) << 2) /* normal non-cacheable */ 112 #define L_PTE_MT_DEV_CACHED (_AT(pteval_t, 3) << 2) /* normal inner write-back */ 113 #define L_PTE_MT_MASK (_AT(pteval_t, 7) << 2) 123 #define L_PTE_S2_MT_UNCACHED (_AT(pteval_t, 0x0) << 2) /* strongly ordered */ 124 #define L_PTE_S2_MT_WRITETHROUGH (_AT(pteval_t, 0xa) << 2) /* normal inner write-through */ 125 #define L_PTE_S2_MT_WRITEBACK (_AT(pteval_t, 0xf) << 2) /* normal inner write-back */ 126 #define L_PTE_S2_MT_DEV_SHARED (_AT(pteval_t, 0x1) << 2) /* device */ 127 #define L_PTE_S2_MT_MASK (_AT(pteval_t, 0xf) << 2) 129 #define L_PTE_S2_RDONLY (_AT(pteval_t, 1) << 6) /* HAP[1] */ 130 #define L_PTE_S2_RDWR (_AT(pteval_t, 3) << 6) /* HAP[2:1] */
|
H A D | pgtable-2level.h | 120 #define L_PTE_VALID (_AT(pteval_t, 1) << 0) /* Valid */ 121 #define L_PTE_PRESENT (_AT(pteval_t, 1) << 0) 122 #define L_PTE_YOUNG (_AT(pteval_t, 1) << 1) 123 #define L_PTE_DIRTY (_AT(pteval_t, 1) << 6) 124 #define L_PTE_RDONLY (_AT(pteval_t, 1) << 7) 125 #define L_PTE_USER (_AT(pteval_t, 1) << 8) 126 #define L_PTE_XN (_AT(pteval_t, 1) << 9) 127 #define L_PTE_SHARED (_AT(pteval_t, 1) << 10) /* shared(v6), coherent(xsc3) */ 128 #define L_PTE_NONE (_AT(pteval_t, 1) << 11) 134 #define L_PTE_MT_UNCACHED (_AT(pteval_t, 0x00) << 2) /* 0000 */ 135 #define L_PTE_MT_BUFFERABLE (_AT(pteval_t, 0x01) << 2) /* 0001 */ 136 #define L_PTE_MT_WRITETHROUGH (_AT(pteval_t, 0x02) << 2) /* 0010 */ 137 #define L_PTE_MT_WRITEBACK (_AT(pteval_t, 0x03) << 2) /* 0011 */ 138 #define L_PTE_MT_MINICACHE (_AT(pteval_t, 0x06) << 2) /* 0110 (sa1100, xscale) */ 139 #define L_PTE_MT_WRITEALLOC (_AT(pteval_t, 0x07) << 2) /* 0111 */ 140 #define L_PTE_MT_DEV_SHARED (_AT(pteval_t, 0x04) << 2) /* 0100 */ 141 #define L_PTE_MT_DEV_NONSHARED (_AT(pteval_t, 0x0c) << 2) /* 1100 */ 142 #define L_PTE_MT_DEV_WC (_AT(pteval_t, 0x09) << 2) /* 1001 */ 143 #define L_PTE_MT_DEV_CACHED (_AT(pteval_t, 0x0b) << 2) /* 1011 */ 144 #define L_PTE_MT_VECTORS (_AT(pteval_t, 0x0f) << 2) /* 1111 */ 145 #define L_PTE_MT_MASK (_AT(pteval_t, 0x0f) << 2)
|
H A D | pgtable-2level-types.h | 24 typedef u32 pteval_t; typedef 33 typedef struct { pteval_t pte; } pte_t; 36 typedef struct { pteval_t pgprot; } pgprot_t; 51 typedef pteval_t pte_t; 54 typedef pteval_t pgprot_t;
|
H A D | pgtable-3level-types.h | 25 typedef u64 pteval_t; typedef 36 typedef struct { pteval_t pte; } pte_t; 39 typedef struct { pteval_t pgprot; } pgprot_t; 53 typedef pteval_t pte_t; 56 typedef pteval_t pgprot_t;
|
H A D | pgtable.h | 309 const pteval_t mask = L_PTE_XN | L_PTE_RDONLY | L_PTE_USER | pte_modify()
|
/linux-4.1.27/arch/x86/include/asm/ |
H A D | pgtable-2level_types.h | 7 typedef unsigned long pteval_t; typedef 14 pteval_t pte; 15 pteval_t pte_low;
|
H A D | pgtable_types.h | 34 #define _PAGE_PRESENT (_AT(pteval_t, 1) << _PAGE_BIT_PRESENT) 35 #define _PAGE_RW (_AT(pteval_t, 1) << _PAGE_BIT_RW) 36 #define _PAGE_USER (_AT(pteval_t, 1) << _PAGE_BIT_USER) 37 #define _PAGE_PWT (_AT(pteval_t, 1) << _PAGE_BIT_PWT) 38 #define _PAGE_PCD (_AT(pteval_t, 1) << _PAGE_BIT_PCD) 39 #define _PAGE_ACCESSED (_AT(pteval_t, 1) << _PAGE_BIT_ACCESSED) 40 #define _PAGE_DIRTY (_AT(pteval_t, 1) << _PAGE_BIT_DIRTY) 41 #define _PAGE_PSE (_AT(pteval_t, 1) << _PAGE_BIT_PSE) 42 #define _PAGE_GLOBAL (_AT(pteval_t, 1) << _PAGE_BIT_GLOBAL) 43 #define _PAGE_SOFTW1 (_AT(pteval_t, 1) << _PAGE_BIT_SOFTW1) 44 #define _PAGE_SOFTW2 (_AT(pteval_t, 1) << _PAGE_BIT_SOFTW2) 45 #define _PAGE_PAT (_AT(pteval_t, 1) << _PAGE_BIT_PAT) 46 #define _PAGE_PAT_LARGE (_AT(pteval_t, 1) << _PAGE_BIT_PAT_LARGE) 47 #define _PAGE_SPECIAL (_AT(pteval_t, 1) << _PAGE_BIT_SPECIAL) 48 #define _PAGE_CPA_TEST (_AT(pteval_t, 1) << _PAGE_BIT_CPA_TEST) 49 #define _PAGE_SPLITTING (_AT(pteval_t, 1) << _PAGE_BIT_SPLITTING) 53 #define _PAGE_HIDDEN (_AT(pteval_t, 1) << _PAGE_BIT_HIDDEN) 55 #define _PAGE_HIDDEN (_AT(pteval_t, 0)) 65 #define _PAGE_SOFT_DIRTY (_AT(pteval_t, 1) << _PAGE_BIT_SOFT_DIRTY) 67 #define _PAGE_SOFT_DIRTY (_AT(pteval_t, 0)) 83 #define _PAGE_SWP_SOFT_DIRTY (_AT(pteval_t, 0)) 87 #define _PAGE_NX (_AT(pteval_t, 1) << _PAGE_BIT_NX) 89 #define _PAGE_NX (_AT(pteval_t, 0)) 92 #define _PAGE_PROTNONE (_AT(pteval_t, 1) << _PAGE_BIT_PROTNONE) 213 #define PTE_PFN_MASK ((pteval_t)PHYSICAL_PAGE_MASK) 289 static inline pte_t native_make_pte(pteval_t val) native_make_pte() 294 static inline pteval_t native_pte_val(pte_t pte) native_pte_val() 299 static inline pteval_t pte_flags(pte_t pte) pte_flags() 361 extern pteval_t __supported_pte_mask;
|
H A D | pgtable-3level_types.h | 7 typedef u64 pteval_t; typedef 17 pteval_t pte;
|
H A D | pgtable_64_types.h | 12 typedef unsigned long pteval_t; typedef 18 typedef struct { pteval_t pte; } pte_t;
|
H A D | paravirt.h | 426 static inline pte_t __pte(pteval_t val) __pte() 428 pteval_t ret; __pte() 430 if (sizeof(pteval_t) > sizeof(long)) __pte() 431 ret = PVOP_CALLEE2(pteval_t, __pte() 435 ret = PVOP_CALLEE1(pteval_t, __pte() 442 static inline pteval_t pte_val(pte_t pte) pte_val() 444 pteval_t ret; pte_val() 446 if (sizeof(pteval_t) > sizeof(long)) pte_val() 447 ret = PVOP_CALLEE2(pteval_t, pv_mmu_ops.pte_val, pte_val() 450 ret = PVOP_CALLEE1(pteval_t, pv_mmu_ops.pte_val, pte_val() 488 pteval_t ret; ptep_modify_prot_start() 490 ret = PVOP_CALL3(pteval_t, pv_mmu_ops.ptep_modify_prot_start, ptep_modify_prot_start() 499 if (sizeof(pteval_t) > sizeof(long)) ptep_modify_prot_commit() 509 if (sizeof(pteval_t) > sizeof(long)) set_pte() 520 if (sizeof(pteval_t) > sizeof(long)) set_pte_at()
|
H A D | pgtable.h | 177 static inline pte_t pte_set_flags(pte_t pte, pteval_t set) pte_set_flags() 179 pteval_t v = native_pte_val(pte); pte_set_flags() 184 static inline pte_t pte_clear_flags(pte_t pte, pteval_t clear) pte_clear_flags() 186 pteval_t v = native_pte_val(pte); pte_clear_flags() 351 pteval_t val = pte_val(pte); pte_modify()
|
H A D | pgalloc.h | 75 set_pmd(pmd, __pmd(((pteval_t)pfn << PAGE_SHIFT) | _PAGE_TABLE)); pmd_populate()
|
/linux-4.1.27/arch/arm64/include/asm/ |
H A D | pgtable-hwdef.h | 97 #define PTE_TYPE_MASK (_AT(pteval_t, 3) << 0) 98 #define PTE_TYPE_FAULT (_AT(pteval_t, 0) << 0) 99 #define PTE_TYPE_PAGE (_AT(pteval_t, 3) << 0) 100 #define PTE_TABLE_BIT (_AT(pteval_t, 1) << 1) 101 #define PTE_USER (_AT(pteval_t, 1) << 6) /* AP[1] */ 102 #define PTE_RDONLY (_AT(pteval_t, 1) << 7) /* AP[2] */ 103 #define PTE_SHARED (_AT(pteval_t, 3) << 8) /* SH[1:0], inner shareable */ 104 #define PTE_AF (_AT(pteval_t, 1) << 10) /* Access Flag */ 105 #define PTE_NG (_AT(pteval_t, 1) << 11) /* nG */ 106 #define PTE_PXN (_AT(pteval_t, 1) << 53) /* Privileged XN */ 107 #define PTE_UXN (_AT(pteval_t, 1) << 54) /* User XN */ 112 #define PTE_ATTRINDX(t) (_AT(pteval_t, (t)) << 2) 113 #define PTE_ATTRINDX_MASK (_AT(pteval_t, 7) << 2) 118 #define PTE_S2_RDONLY (_AT(pteval_t, 1) << 6) /* HAP[2:1] */ 119 #define PTE_S2_RDWR (_AT(pteval_t, 3) << 6) /* HAP[2:1] */ 127 #define PTE_S2_MEMATTR(t) (_AT(pteval_t, (t)) << 2) 128 #define PTE_S2_MEMATTR_MASK (_AT(pteval_t, 0xf) << 2)
|
H A D | pgtable-types.h | 25 typedef u64 pteval_t; typedef 37 typedef struct { pteval_t pte; } pte_t; 57 typedef struct { pteval_t pgprot; } pgprot_t; 63 typedef pteval_t pte_t; 83 typedef pteval_t pgprot_t;
|
H A D | pgtable.h | 27 #define PTE_VALID (_AT(pteval_t, 1) << 0) 28 #define PTE_DIRTY (_AT(pteval_t, 1) << 55) 29 #define PTE_SPECIAL (_AT(pteval_t, 1) << 56) 30 #define PTE_WRITE (_AT(pteval_t, 1) << 57) 31 #define PTE_PROT_NONE (_AT(pteval_t, 1) << 58) /* only when !PTE_VALID */ 464 const pteval_t mask = PTE_USER | PTE_PXN | PTE_UXN | PTE_RDONLY | pte_modify()
|
/linux-4.1.27/include/trace/events/ |
H A D | xen.h | 131 __field(pteval_t, pteval) 137 (int)sizeof(pteval_t) * 2, (unsigned long long)pte_val(native_make_pte(__entry->pteval)), 138 (int)sizeof(pteval_t) * 2, (unsigned long long)__entry->pteval) 154 __field(pteval_t, pteval) 162 (int)sizeof(pteval_t) * 2, (unsigned long long)pte_val(native_make_pte(__entry->pteval)), 163 (int)sizeof(pteval_t) * 2, (unsigned long long)__entry->pteval, 175 __field(pteval_t, pteval) 183 (int)sizeof(pteval_t) * 2, (unsigned long long)pte_val(native_make_pte(__entry->pteval)), 184 (int)sizeof(pteval_t) * 2, (unsigned long long)__entry->pteval) 307 __field(pteval_t, pteval) 315 (int)sizeof(pteval_t) * 2, (unsigned long long)pte_val(native_make_pte(__entry->pteval)), 316 (int)sizeof(pteval_t) * 2, (unsigned long long)__entry->pteval)
|
/linux-4.1.27/arch/arm/mm/ |
H A D | mm.h | 42 pteval_t prot_pte; 43 pteval_t prot_pte_s2;
|
H A D | fault-armv.c | 28 static pteval_t shared_pte_mask = L_PTE_MT_BUFFERABLE;
|
H A D | mmu.c | 79 pteval_t pte; 80 pteval_t pte_s2; 390 pteval_t user_pgprot, kern_pgprot, vecs_pgprot; build_mem_type_table() 391 pteval_t hyp_device_pgprot, s2_pgprot, s2_device_pgprot; build_mem_type_table() 613 pteval_t v = pgprot_val(protection_map[i]); build_mem_type_table()
|
/linux-4.1.27/arch/x86/include/asm/xen/ |
H A D | page.h | 235 static inline pteval_t pte_val_ma(pte_t pte) pte_val_ma() 240 static inline pte_t __pte_ma(pteval_t x) __pte_ma()
|
/linux-4.1.27/arch/x86/mm/ |
H A D | kmmio.c | 37 pteval_t old_presence; /* page presence prior to arming */ 126 static void clear_pte_presence(pte_t *pte, bool clear, pteval_t *old) clear_pte_presence() 128 pteval_t v = pte_val(*pte); clear_pte_presence()
|
H A D | kasan_init_64.c | 184 pteval_t pte_val = __pa_nodebug(kasan_zero_page) | __PAGE_KERNEL; kasan_early_init()
|
H A D | init_32.c | 541 pteval_t __supported_pte_mask __read_mostly = ~(_PAGE_NX | _PAGE_GLOBAL);
|
H A D | init_64.c | 139 pteval_t __supported_pte_mask __read_mostly = ~0;
|
/linux-4.1.27/arch/x86/xen/ |
H A D | mmu.c | 365 /* Assume pteval_t is equivalent to all the other *val_t types. */ pte_mfn_to_pfn() 366 static pteval_t pte_mfn_to_pfn(pteval_t val) pte_mfn_to_pfn() 372 pteval_t flags = val & PTE_FLAGS_MASK; pte_mfn_to_pfn() 376 val = ((pteval_t)pfn << PAGE_SHIFT) | flags; pte_mfn_to_pfn() 382 static pteval_t pte_pfn_to_mfn(pteval_t val) pte_pfn_to_mfn() 386 pteval_t flags = val & PTE_FLAGS_MASK; pte_pfn_to_mfn() 404 val = ((pteval_t)mfn << PAGE_SHIFT) | flags; pte_pfn_to_mfn() 410 __visible pteval_t xen_pte_val(pte_t pte) xen_pte_val() 412 pteval_t pteval = pte.pte; xen_pte_val() 424 __visible pte_t xen_make_pte(pteval_t pte) xen_make_pte()
|
/linux-4.1.27/arch/x86/kernel/ |
H A D | espfix_64.c | 146 pteval_t ptemask; init_espfix_ap()
|