WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux/x86: Remove useless wrappers
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Thu, 22 Nov 2007 13:14:26 +0000
Delivery-date: Thu, 22 Nov 2007 05:13:44 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [PATCH] linux/x86: Remove useless wrappers, Jan Beulich <=