[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] linux/x86: Remove useless wrappers



As usual, written and tested against 2.6.23 and made apply against
2.6.18 without further testing.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>

Index: head-2007-10-26/arch/i386/kernel/smp-xen.c
===================================================================
--- head-2007-10-26.orig/arch/i386/kernel/smp-xen.c     2007-11-21 
15:31:22.000000000 +0100
+++ head-2007-10-26/arch/i386/kernel/smp-xen.c  2007-11-21 14:47:42.000000000 
+0100
@@ -434,21 +434,6 @@ void flush_tlb_all(void)
        on_each_cpu(do_flush_tlb_all, NULL, 1, 1);
 }
 
-#else
-
-irqreturn_t smp_invalidate_interrupt(int irq, void *dev_id,
-                                    struct pt_regs *regs)
-{ return 0; }
-void flush_tlb_current_task(void)
-{ xen_tlb_flush_mask(&current->mm->cpu_vm_mask); }
-void flush_tlb_mm(struct mm_struct * mm)
-{ xen_tlb_flush_mask(&mm->cpu_vm_mask); }
-void flush_tlb_page(struct vm_area_struct *vma, unsigned long va)
-{ xen_invlpg_mask(&vma->vm_mm->cpu_vm_mask, va); }
-EXPORT_SYMBOL(flush_tlb_page);
-void flush_tlb_all(void)
-{ xen_tlb_flush_all(); }
-
 #endif /* XEN */
 
 /*
Index: head-2007-10-26/arch/x86_64/kernel/smp-xen.c
===================================================================
--- head-2007-10-26.orig/arch/x86_64/kernel/smp-xen.c   2007-11-21 
15:31:22.000000000 +0100
+++ head-2007-10-26/arch/x86_64/kernel/smp-xen.c        2007-11-21 
14:38:37.000000000 +0100
@@ -288,17 +288,6 @@ void flush_tlb_all(void)
 {
        on_each_cpu(do_flush_tlb_all, NULL, 1, 1);
 }
-#else
-asmlinkage void smp_invalidate_interrupt (void)
-{ return; }
-void flush_tlb_current_task(void)
-{ xen_tlb_flush_mask(&current->mm->cpu_vm_mask); }
-void flush_tlb_mm (struct mm_struct * mm)
-{ xen_tlb_flush_mask(&mm->cpu_vm_mask); }
-void flush_tlb_page(struct vm_area_struct * vma, unsigned long va)
-{ xen_invlpg_mask(&vma->vm_mm->cpu_vm_mask, va); }
-void flush_tlb_all(void)
-{ xen_tlb_flush_all(); }
 #endif /* Xen */
 
 /*
Index: head-2007-10-26/include/asm-i386/mach-xen/asm/tlbflush.h
===================================================================
--- head-2007-10-26.orig/include/asm-i386/mach-xen/asm/tlbflush.h       
2007-11-21 15:31:22.000000000 +0100
+++ head-2007-10-26/include/asm-i386/mach-xen/asm/tlbflush.h    2007-11-21 
15:32:04.000000000 +0100
@@ -67,10 +67,10 @@ static inline void flush_tlb_range(struc
 #define local_flush_tlb() \
        __flush_tlb()
 
-extern void flush_tlb_all(void);
-extern void flush_tlb_current_task(void);
-extern void flush_tlb_mm(struct mm_struct *);
-extern void flush_tlb_page(struct vm_area_struct *, unsigned long);
+#define flush_tlb_all xen_tlb_flush_all
+#define flush_tlb_current_task() xen_tlb_flush_mask(&current->mm->cpu_vm_mask)
+#define flush_tlb_mm(mm) xen_tlb_flush_mask(&(mm)->cpu_vm_mask)
+#define flush_tlb_page(vma, va) xen_invlpg_mask(&(vma)->vm_mm->cpu_vm_mask, va)
 
 #define flush_tlb()    flush_tlb_current_task()
 
Index: head-2007-10-26/include/asm-x86_64/mach-xen/asm/tlbflush.h
===================================================================
--- head-2007-10-26.orig/include/asm-x86_64/mach-xen/asm/tlbflush.h     
2007-11-21 15:31:22.000000000 +0100
+++ head-2007-10-26/include/asm-x86_64/mach-xen/asm/tlbflush.h  2007-11-21 
15:32:21.000000000 +0100
@@ -71,10 +71,10 @@ static inline void flush_tlb_range(struc
 #define local_flush_tlb() \
        __flush_tlb()
 
-extern void flush_tlb_all(void);
-extern void flush_tlb_current_task(void);
-extern void flush_tlb_mm(struct mm_struct *);
-extern void flush_tlb_page(struct vm_area_struct *, unsigned long);
+#define flush_tlb_all xen_tlb_flush_all
+#define flush_tlb_current_task() xen_tlb_flush_mask(&current->mm->cpu_vm_mask)
+#define flush_tlb_mm(mm) xen_tlb_flush_mask(&(mm)->cpu_vm_mask)
+#define flush_tlb_page(vma, va) xen_invlpg_mask(&(vma)->vm_mm->cpu_vm_mask, va)
 
 #define flush_tlb()    flush_tlb_current_task()
 




_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.