diff options
author | Jeremy Fitzhardinge <jeremy@goop.org> | 2007-05-02 13:27:15 -0400 |
---|---|---|
committer | Andi Kleen <andi@basil.nowhere.org> | 2007-05-02 13:27:15 -0400 |
commit | a27fe809b82c5e18932fcceded28d0d1481ce7bb (patch) | |
tree | b4d33cd8b3f038a84534d4d3302c0704e3959599 | |
parent | d4c104771a1c58e3de2a888b73b0ba1b54c0ae76 (diff) |
[PATCH] i386: PARAVIRT: revert map_pt_hook.
Back out the map_pt_hook to clear the way for kmap_atomic_pte.
Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Zachary Amsden <zach@vmware.com>
-rw-r--r-- | arch/i386/kernel/paravirt.c | 2 | ||||
-rw-r--r-- | arch/i386/kernel/vmi.c | 2 | ||||
-rw-r--r-- | include/asm-i386/paravirt.h | 7 | ||||
-rw-r--r-- | include/asm-i386/pgtable.h | 23 |
4 files changed, 6 insertions, 28 deletions
diff --git a/arch/i386/kernel/paravirt.c b/arch/i386/kernel/paravirt.c index c7f0cf92925f..13f41b5c887a 100644 --- a/arch/i386/kernel/paravirt.c +++ b/arch/i386/kernel/paravirt.c | |||
@@ -302,8 +302,6 @@ struct paravirt_ops paravirt_ops = { | |||
302 | .flush_tlb_single = native_flush_tlb_single, | 302 | .flush_tlb_single = native_flush_tlb_single, |
303 | .flush_tlb_others = native_flush_tlb_others, | 303 | .flush_tlb_others = native_flush_tlb_others, |
304 | 304 | ||
305 | .map_pt_hook = paravirt_nop, | ||
306 | |||
307 | .alloc_pt = paravirt_nop, | 305 | .alloc_pt = paravirt_nop, |
308 | .alloc_pd = paravirt_nop, | 306 | .alloc_pd = paravirt_nop, |
309 | .alloc_pd_clone = paravirt_nop, | 307 | .alloc_pd_clone = paravirt_nop, |
diff --git a/arch/i386/kernel/vmi.c b/arch/i386/kernel/vmi.c index b8d01c3cbff4..ccad7ee960aa 100644 --- a/arch/i386/kernel/vmi.c +++ b/arch/i386/kernel/vmi.c | |||
@@ -851,8 +851,10 @@ static inline int __init activate_vmi(void) | |||
851 | paravirt_ops.release_pt = vmi_release_pt; | 851 | paravirt_ops.release_pt = vmi_release_pt; |
852 | paravirt_ops.release_pd = vmi_release_pd; | 852 | paravirt_ops.release_pd = vmi_release_pd; |
853 | } | 853 | } |
854 | #if 0 | ||
854 | para_wrap(map_pt_hook, vmi_map_pt_hook, set_linear_mapping, | 855 | para_wrap(map_pt_hook, vmi_map_pt_hook, set_linear_mapping, |
855 | SetLinearMapping); | 856 | SetLinearMapping); |
857 | #endif | ||
856 | 858 | ||
857 | /* | 859 | /* |
858 | * These MUST always be patched. Don't support indirect jumps | 860 | * These MUST always be patched. Don't support indirect jumps |
diff --git a/include/asm-i386/paravirt.h b/include/asm-i386/paravirt.h index f880b06d6d56..10f44af76b49 100644 --- a/include/asm-i386/paravirt.h +++ b/include/asm-i386/paravirt.h | |||
@@ -169,8 +169,6 @@ struct paravirt_ops | |||
169 | void (*flush_tlb_others)(const cpumask_t *cpus, struct mm_struct *mm, | 169 | void (*flush_tlb_others)(const cpumask_t *cpus, struct mm_struct *mm, |
170 | unsigned long va); | 170 | unsigned long va); |
171 | 171 | ||
172 | void (*map_pt_hook)(int type, pte_t *va, u32 pfn); | ||
173 | |||
174 | /* Hooks for allocating/releasing pagetable pages */ | 172 | /* Hooks for allocating/releasing pagetable pages */ |
175 | void (*alloc_pt)(u32 pfn); | 173 | void (*alloc_pt)(u32 pfn); |
176 | void (*alloc_pd)(u32 pfn); | 174 | void (*alloc_pd)(u32 pfn); |
@@ -862,11 +860,6 @@ static inline void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm, | |||
862 | PVOP_VCALL3(flush_tlb_others, &cpumask, mm, va); | 860 | PVOP_VCALL3(flush_tlb_others, &cpumask, mm, va); |
863 | } | 861 | } |
864 | 862 | ||
865 | static inline void paravirt_map_pt_hook(int type, pte_t *va, u32 pfn) | ||
866 | { | ||
867 | PVOP_VCALL3(map_pt_hook, type, va, pfn); | ||
868 | } | ||
869 | |||
870 | static inline void paravirt_alloc_pt(unsigned pfn) | 863 | static inline void paravirt_alloc_pt(unsigned pfn) |
871 | { | 864 | { |
872 | PVOP_VCALL1(alloc_pt, pfn); | 865 | PVOP_VCALL1(alloc_pt, pfn); |
diff --git a/include/asm-i386/pgtable.h b/include/asm-i386/pgtable.h index 5b88a6a1278e..6599f2aa91b7 100644 --- a/include/asm-i386/pgtable.h +++ b/include/asm-i386/pgtable.h | |||
@@ -267,7 +267,6 @@ extern void vmalloc_sync_all(void); | |||
267 | */ | 267 | */ |
268 | #define pte_update(mm, addr, ptep) do { } while (0) | 268 | #define pte_update(mm, addr, ptep) do { } while (0) |
269 | #define pte_update_defer(mm, addr, ptep) do { } while (0) | 269 | #define pte_update_defer(mm, addr, ptep) do { } while (0) |
270 | #define paravirt_map_pt_hook(slot, va, pfn) do { } while (0) | ||
271 | 270 | ||
272 | #define raw_ptep_get_and_clear(xp) native_ptep_get_and_clear(xp) | 271 | #define raw_ptep_get_and_clear(xp) native_ptep_get_and_clear(xp) |
273 | #endif | 272 | #endif |
@@ -476,24 +475,10 @@ extern pte_t *lookup_address(unsigned long address); | |||
476 | #endif | 475 | #endif |
477 | 476 | ||
478 | #if defined(CONFIG_HIGHPTE) | 477 | #if defined(CONFIG_HIGHPTE) |
479 | #define pte_offset_map(dir, address) \ | 478 | #define pte_offset_map(dir, address) \ |
480 | ({ \ | 479 | ((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE0) + pte_index(address)) |
481 | pte_t *__ptep; \ | 480 | #define pte_offset_map_nested(dir, address) \ |
482 | unsigned pfn = pmd_val(*(dir)) >> PAGE_SHIFT; \ | 481 | ((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE1) + pte_index(address)) |
483 | __ptep = (pte_t *)kmap_atomic(pfn_to_page(pfn),KM_PTE0);\ | ||
484 | paravirt_map_pt_hook(KM_PTE0,__ptep, pfn); \ | ||
485 | __ptep = __ptep + pte_index(address); \ | ||
486 | __ptep; \ | ||
487 | }) | ||
488 | #define pte_offset_map_nested(dir, address) \ | ||
489 | ({ \ | ||
490 | pte_t *__ptep; \ | ||
491 | unsigned pfn = pmd_val(*(dir)) >> PAGE_SHIFT; \ | ||
492 | __ptep = (pte_t *)kmap_atomic(pfn_to_page(pfn),KM_PTE1);\ | ||
493 | paravirt_map_pt_hook(KM_PTE1,__ptep, pfn); \ | ||
494 | __ptep = __ptep + pte_index(address); \ | ||
495 | __ptep; \ | ||
496 | }) | ||
497 | #define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0) | 482 | #define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0) |
498 | #define pte_unmap_nested(pte) kunmap_atomic(pte, KM_PTE1) | 483 | #define pte_unmap_nested(pte) kunmap_atomic(pte, KM_PTE1) |
499 | #else | 484 | #else |