This source file includes following definitions.
- __pte_needs_invert
- protnone_mask
- flip_protnone_guard
1
2 #ifndef _ASM_PGTABLE_INVERT_H
3 #define _ASM_PGTABLE_INVERT_H 1
4
5 #ifndef __ASSEMBLY__
6
7
8
9
10
11
12
13
14
15
16 static inline bool __pte_needs_invert(u64 val)
17 {
18 return val && !(val & _PAGE_PRESENT);
19 }
20
21
22 static inline u64 protnone_mask(u64 val)
23 {
24 return __pte_needs_invert(val) ? ~0ull : 0;
25 }
26
27 static inline u64 flip_protnone_guard(u64 oldval, u64 val, u64 mask)
28 {
29
30
31
32
33
34 if (__pte_needs_invert(oldval) != __pte_needs_invert(val))
35 val = (val & ~mask) | (~val & mask);
36 return val;
37 }
38
39 #endif
40
41 #endif