diff options
Diffstat (limited to 'arch/x86/include/asm/pgtable-2level.h')
-rw-r--r-- | arch/x86/include/asm/pgtable-2level.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/x86/include/asm/pgtable-2level.h b/arch/x86/include/asm/pgtable-2level.h index fd74a11959de..a8b96e708c2b 100644 --- a/arch/x86/include/asm/pgtable-2level.h +++ b/arch/x86/include/asm/pgtable-2level.h | |||
@@ -21,6 +21,10 @@ static inline void native_set_pmd(pmd_t *pmdp, pmd_t pmd) | |||
21 | *pmdp = pmd; | 21 | *pmdp = pmd; |
22 | } | 22 | } |
23 | 23 | ||
24 | static inline void native_set_pud(pud_t *pudp, pud_t pud) | ||
25 | { | ||
26 | } | ||
27 | |||
24 | static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte) | 28 | static inline void native_set_pte_atomic(pte_t *ptep, pte_t pte) |
25 | { | 29 | { |
26 | native_set_pte(ptep, pte); | 30 | native_set_pte(ptep, pte); |
@@ -31,6 +35,10 @@ static inline void native_pmd_clear(pmd_t *pmdp) | |||
31 | native_set_pmd(pmdp, __pmd(0)); | 35 | native_set_pmd(pmdp, __pmd(0)); |
32 | } | 36 | } |
33 | 37 | ||
38 | static inline void native_pud_clear(pud_t *pudp) | ||
39 | { | ||
40 | } | ||
41 | |||
34 | static inline void native_pte_clear(struct mm_struct *mm, | 42 | static inline void native_pte_clear(struct mm_struct *mm, |
35 | unsigned long addr, pte_t *xp) | 43 | unsigned long addr, pte_t *xp) |
36 | { | 44 | { |
@@ -55,6 +63,15 @@ static inline pmd_t native_pmdp_get_and_clear(pmd_t *xp) | |||
55 | #define native_pmdp_get_and_clear(xp) native_local_pmdp_get_and_clear(xp) | 63 | #define native_pmdp_get_and_clear(xp) native_local_pmdp_get_and_clear(xp) |
56 | #endif | 64 | #endif |
57 | 65 | ||
66 | #ifdef CONFIG_SMP | ||
67 | static inline pud_t native_pudp_get_and_clear(pud_t *xp) | ||
68 | { | ||
69 | return __pud(xchg((pudval_t *)xp, 0)); | ||
70 | } | ||
71 | #else | ||
72 | #define native_pudp_get_and_clear(xp) native_local_pudp_get_and_clear(xp) | ||
73 | #endif | ||
74 | |||
58 | /* Bit manipulation helper on pte/pgoff entry */ | 75 | /* Bit manipulation helper on pte/pgoff entry */ |
59 | static inline unsigned long pte_bitop(unsigned long value, unsigned int rightshift, | 76 | static inline unsigned long pte_bitop(unsigned long value, unsigned int rightshift, |
60 | unsigned long mask, unsigned int leftshift) | 77 | unsigned long mask, unsigned int leftshift) |