diff options
author | Zachary Amsden <zach@vmware.com> | 2005-09-03 18:56:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@evo.osdl.org> | 2005-09-05 03:06:12 -0400 |
commit | c9b02a24130e3ff14a553d966a79f46cf806b037 (patch) | |
tree | 1c496ef13e8d2d991f5197ec1c1eb34282beddf0 /include/asm-i386 | |
parent | e7a2ff593c0e48b130434dee4d2fd3452a850e6f (diff) |
[PATCH] i386: use set_pte macros in a couple places where they were missing
Also, setting PDPEs in PAE mode does not require atomic operations, since the
PDPEs are cached by the processor, and only reloaded on an explicit or
implicit reload of CR3.
Since the four PDPEs must always be present in an active root, and the kernel
PDPE is never updated, we are safe even from SMIs and interrupts / NMIs using
task gates (which reload CR3). Actually, much of this is moot, since the user
PDPEs are never updated either, and the only usage of task gates is by the
doublefault handler. It appears the only place PGDs get updated in PAE mode
is in init_low_mappings() / zap_low_mapping() for initial page table creation
and recovery from ACPI sleep state, and these sites are safe by inspection.
Getting rid of the cmpxchg8b saves code space and 720 cycles in pgd_alloc on
P4.
Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-i386')
-rw-r--r-- | include/asm-i386/pgtable-3level.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-i386/pgtable-3level.h b/include/asm-i386/pgtable-3level.h index d609f9c2c1f0..2e3f4a344a2d 100644 --- a/include/asm-i386/pgtable-3level.h +++ b/include/asm-i386/pgtable-3level.h | |||
@@ -64,7 +64,7 @@ static inline void set_pte(pte_t *ptep, pte_t pte) | |||
64 | #define set_pmd(pmdptr,pmdval) \ | 64 | #define set_pmd(pmdptr,pmdval) \ |
65 | set_64bit((unsigned long long *)(pmdptr),pmd_val(pmdval)) | 65 | set_64bit((unsigned long long *)(pmdptr),pmd_val(pmdval)) |
66 | #define set_pud(pudptr,pudval) \ | 66 | #define set_pud(pudptr,pudval) \ |
67 | set_64bit((unsigned long long *)(pudptr),pud_val(pudval)) | 67 | (*(pudptr) = (pudval)) |
68 | 68 | ||
69 | /* | 69 | /* |
70 | * Pentium-II erratum A13: in PAE mode we explicitly have to flush | 70 | * Pentium-II erratum A13: in PAE mode we explicitly have to flush |