[PATCH] i386: PARAVIRT: revert map_pt_hook.
authorJeremy Fitzhardinge <jeremy@goop.org>
Wed, 2 May 2007 17:27:15 +0000 (19:27 +0200)
committerAndi Kleen <andi@basil.nowhere.org>
Wed, 2 May 2007 17:27:15 +0000 (19:27 +0200)
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>
arch/i386/kernel/paravirt.c
arch/i386/kernel/vmi.c
include/asm-i386/paravirt.h
include/asm-i386/pgtable.h

index c7f0cf92925f46dc4dd3c70952108002d4a8f7f3..13f41b5c887a746e48488518febe3985fce4792a 100644 (file)
@@ -302,8 +302,6 @@ struct paravirt_ops paravirt_ops = {
        .flush_tlb_single = native_flush_tlb_single,
        .flush_tlb_others = native_flush_tlb_others,
 
-       .map_pt_hook = paravirt_nop,
-
        .alloc_pt = paravirt_nop,
        .alloc_pd = paravirt_nop,
        .alloc_pd_clone = paravirt_nop,
index b8d01c3cbff4dd213f8d394531ec6716e855f875..ccad7ee960aa69402dc4f69649ddfe3ae8f019b8 100644 (file)
@@ -851,8 +851,10 @@ static inline int __init activate_vmi(void)
                paravirt_ops.release_pt = vmi_release_pt;
                paravirt_ops.release_pd = vmi_release_pd;
        }
+#if 0
        para_wrap(map_pt_hook, vmi_map_pt_hook, set_linear_mapping,
                  SetLinearMapping);
+#endif
 
        /*
         * These MUST always be patched.  Don't support indirect jumps
index f880b06d6d568b10b8edd2bd33f6cff97620d0cd..10f44af76b49ecd011027e372e4e84814e28c26b 100644 (file)
@@ -169,8 +169,6 @@ struct paravirt_ops
        void (*flush_tlb_others)(const cpumask_t *cpus, struct mm_struct *mm,
                                 unsigned long va);
 
-       void (*map_pt_hook)(int type, pte_t *va, u32 pfn);
-
        /* Hooks for allocating/releasing pagetable pages */
        void (*alloc_pt)(u32 pfn);
        void (*alloc_pd)(u32 pfn);
@@ -862,11 +860,6 @@ static inline void flush_tlb_others(cpumask_t cpumask, struct mm_struct *mm,
        PVOP_VCALL3(flush_tlb_others, &cpumask, mm, va);
 }
 
-static inline void paravirt_map_pt_hook(int type, pte_t *va, u32 pfn)
-{
-       PVOP_VCALL3(map_pt_hook, type, va, pfn);
-}
-
 static inline void paravirt_alloc_pt(unsigned pfn)
 {
        PVOP_VCALL1(alloc_pt, pfn);
index 5b88a6a1278ed2f01961bd4c7b8b52daa5a078c3..6599f2aa91b75315ff30595ec47d94d7eb9c0353 100644 (file)
@@ -267,7 +267,6 @@ extern void vmalloc_sync_all(void);
  */
 #define pte_update(mm, addr, ptep)             do { } while (0)
 #define pte_update_defer(mm, addr, ptep)       do { } while (0)
-#define paravirt_map_pt_hook(slot, va, pfn)    do { } while (0)
 
 #define raw_ptep_get_and_clear(xp)     native_ptep_get_and_clear(xp)
 #endif
@@ -476,24 +475,10 @@ extern pte_t *lookup_address(unsigned long address);
 #endif
 
 #if defined(CONFIG_HIGHPTE)
-#define pte_offset_map(dir, address)                           \
-({                                                             \
-       pte_t *__ptep;                                          \
-       unsigned pfn = pmd_val(*(dir)) >> PAGE_SHIFT;           \
-       __ptep = (pte_t *)kmap_atomic(pfn_to_page(pfn),KM_PTE0);\
-       paravirt_map_pt_hook(KM_PTE0,__ptep, pfn);              \
-       __ptep = __ptep + pte_index(address);                   \
-       __ptep;                                                 \
-})
-#define pte_offset_map_nested(dir, address)                    \
-({                                                             \
-       pte_t *__ptep;                                          \
-       unsigned pfn = pmd_val(*(dir)) >> PAGE_SHIFT;           \
-       __ptep = (pte_t *)kmap_atomic(pfn_to_page(pfn),KM_PTE1);\
-       paravirt_map_pt_hook(KM_PTE1,__ptep, pfn);              \
-       __ptep = __ptep + pte_index(address);                   \
-       __ptep;                                                 \
-})
+#define pte_offset_map(dir, address) \
+       ((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE0) + pte_index(address))
+#define pte_offset_map_nested(dir, address) \
+       ((pte_t *)kmap_atomic(pmd_page(*(dir)),KM_PTE1) + pte_index(address))
 #define pte_unmap(pte) kunmap_atomic(pte, KM_PTE0)
 #define pte_unmap_nested(pte) kunmap_atomic(pte, KM_PTE1)
 #else