diff options
author | Zachary Amsden <zach@vmware.com> | 2007-05-02 13:27:19 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2007-05-02 13:27:19 -0400 |
commit | 9e5e3162b2d5e4466187ecd63c9eec2de33cb7bc (patch) | |
tree | e0d9231574833f17b509bc2ca1971af90f657eb2 /include/asm-i386/pgtable-3level.h | |
parent | 142dd975911fdd82b1b6f6617cd20ac90a8ccf00 (diff) |
[PATCH] i386: pte simplify ops
Add comment and condense code to make use of native_local_ptep_get_and_clear
function. Also, it turns out the 2-level and 3-level paging definitions were
identical, so move the common definition into pgtable.h
Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andi Kleen <ak@suse.de>
Diffstat (limited to 'include/asm-i386/pgtable-3level.h')
-rw-r--r-- | include/asm-i386/pgtable-3level.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/include/asm-i386/pgtable-3level.h b/include/asm-i386/pgtable-3level.h index 45b024181507..eb0f1d7e96a1 100644 --- a/include/asm-i386/pgtable-3level.h +++ b/include/asm-i386/pgtable-3level.h | |||
@@ -139,16 +139,6 @@ static inline void pud_clear (pud_t * pud) { } | |||
139 | #define pmd_offset(pud, address) ((pmd_t *) pud_page(*(pud)) + \ | 139 | #define pmd_offset(pud, address) ((pmd_t *) pud_page(*(pud)) + \ |
140 | pmd_index(address)) | 140 | pmd_index(address)) |
141 | 141 | ||
142 | /* local pte updates need not use xchg for locking */ | ||
143 | static inline pte_t native_local_ptep_get_and_clear(pte_t *ptep) | ||
144 | { | ||
145 | pte_t res; | ||
146 | |||
147 | res = *ptep; | ||
148 | native_pte_clear(NULL, 0, ptep); | ||
149 | return res; | ||
150 | } | ||
151 | |||
152 | #ifdef CONFIG_SMP | 142 | #ifdef CONFIG_SMP |
153 | static inline pte_t native_ptep_get_and_clear(pte_t *ptep) | 143 | static inline pte_t native_ptep_get_and_clear(pte_t *ptep) |
154 | { | 144 | { |