diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2008-03-17 19:37:14 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-04-24 17:57:31 -0400 |
commit | 85958b465c2e0de315575b1d3d7e7c2ce7126880 (patch) | |
tree | c1d6a062bf74b8e172757f4f4259ac567043b8a1 /include/asm-x86 | |
parent | 68db065c845bd9d0eb96946ab104b4c82d0ae9da (diff) |
x86: unify pgd ctor/dtor
All pagetables need fundamentally the same setup and destruction, so
just use the same code for everything.
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/asm-x86')
-rw-r--r-- | include/asm-x86/pgtable.h | 16 | ||||
-rw-r--r-- | include/asm-x86/pgtable_32.h | 15 | ||||
-rw-r--r-- | include/asm-x86/pgtable_64.h | 2 |
3 files changed, 17 insertions, 16 deletions
diff --git a/include/asm-x86/pgtable.h b/include/asm-x86/pgtable.h index e61075e70a54..b8a08bd7bd48 100644 --- a/include/asm-x86/pgtable.h +++ b/include/asm-x86/pgtable.h | |||
@@ -438,6 +438,22 @@ static inline void ptep_set_wrprotect(struct mm_struct *mm, | |||
438 | pte_update(mm, addr, ptep); | 438 | pte_update(mm, addr, ptep); |
439 | } | 439 | } |
440 | 440 | ||
441 | /* | ||
442 | * clone_pgd_range(pgd_t *dst, pgd_t *src, int count); | ||
443 | * | ||
444 | * dst - pointer to pgd range anwhere on a pgd page | ||
445 | * src - "" | ||
446 | * count - the number of pgds to copy. | ||
447 | * | ||
448 | * dst and src can be on the same page, but the range must not overlap, | ||
449 | * and must not cross a page boundary. | ||
450 | */ | ||
451 | static inline void clone_pgd_range(pgd_t *dst, pgd_t *src, int count) | ||
452 | { | ||
453 | memcpy(dst, src, count * sizeof(pgd_t)); | ||
454 | } | ||
455 | |||
456 | |||
441 | #include <asm-generic/pgtable.h> | 457 | #include <asm-generic/pgtable.h> |
442 | #endif /* __ASSEMBLY__ */ | 458 | #endif /* __ASSEMBLY__ */ |
443 | 459 | ||
diff --git a/include/asm-x86/pgtable_32.h b/include/asm-x86/pgtable_32.h index cc52da32fbe2..168b6447cf18 100644 --- a/include/asm-x86/pgtable_32.h +++ b/include/asm-x86/pgtable_32.h | |||
@@ -106,21 +106,6 @@ extern int pmd_bad(pmd_t pmd); | |||
106 | #endif | 106 | #endif |
107 | 107 | ||
108 | /* | 108 | /* |
109 | * clone_pgd_range(pgd_t *dst, pgd_t *src, int count); | ||
110 | * | ||
111 | * dst - pointer to pgd range anwhere on a pgd page | ||
112 | * src - "" | ||
113 | * count - the number of pgds to copy. | ||
114 | * | ||
115 | * dst and src can be on the same page, but the range must not overlap, | ||
116 | * and must not cross a page boundary. | ||
117 | */ | ||
118 | static inline void clone_pgd_range(pgd_t *dst, pgd_t *src, int count) | ||
119 | { | ||
120 | memcpy(dst, src, count * sizeof(pgd_t)); | ||
121 | } | ||
122 | |||
123 | /* | ||
124 | * Macro to mark a page protection value as "uncacheable". | 109 | * Macro to mark a page protection value as "uncacheable". |
125 | * On processors which do not support it, this is a no-op. | 110 | * On processors which do not support it, this is a no-op. |
126 | */ | 111 | */ |
diff --git a/include/asm-x86/pgtable_64.h b/include/asm-x86/pgtable_64.h index 9fd87d0b6477..a3bbf8766c1d 100644 --- a/include/asm-x86/pgtable_64.h +++ b/include/asm-x86/pgtable_64.h | |||
@@ -24,7 +24,7 @@ extern void paging_init(void); | |||
24 | 24 | ||
25 | #endif /* !__ASSEMBLY__ */ | 25 | #endif /* !__ASSEMBLY__ */ |
26 | 26 | ||
27 | #define SHARED_KERNEL_PMD 1 | 27 | #define SHARED_KERNEL_PMD 0 |
28 | 28 | ||
29 | /* | 29 | /* |
30 | * PGDIR_SHIFT determines what a top-level page table entry can map | 30 | * PGDIR_SHIFT determines what a top-level page table entry can map |