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: Clean up page table handling headers

To: <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH] linux/x86: Clean up page table handling headers
From: "Jan Beulich" <jbeulich@xxxxxxxxxx>
Date: Tue, 13 Feb 2007 15:07:14 +0000
Delivery-date: Tue, 13 Feb 2007 10:30:39 -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
- remove dead code
- fix line breaking and space vs. tab usage
- remove redundant parentheses

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

Index: sle10sp1-2007-01-31/include/asm-i386/mach-xen/asm/pgtable-3level.h
===================================================================
--- sle10sp1-2007-01-31.orig/include/asm-i386/mach-xen/asm/pgtable-3level.h     
2007-02-13 14:14:45.000000000 +0100
+++ sle10sp1-2007-01-31/include/asm-i386/mach-xen/asm/pgtable-3level.h  
2007-02-13 12:28:26.000000000 +0100
@@ -52,22 +52,14 @@ static inline int pte_exec_kernel(pte_t 
  */
 #define __HAVE_ARCH_SET_PTE_ATOMIC
 
-#if 1
-/* use writable pagetables */
 static inline void set_pte(pte_t *ptep, pte_t pte)
 {
        ptep->pte_high = pte.pte_high;
        smp_wmb();
        ptep->pte_low = pte.pte_low;
 }
-# define set_pte_atomic(pteptr,pteval) \
+#define set_pte_atomic(pteptr,pteval) \
                set_64bit((unsigned long long *)(pteptr),pte_val_ma(pteval))
-#else
-/* no writable pagetables */
-# define set_pte(pteptr,pteval)                                \
-               xen_l1_entry_update((pteptr), (pteval))
-# define set_pte_atomic(pteptr,pteval) set_pte(pteptr,pteval)
-#endif
 
 #define set_pte_at(_mm,addr,ptep,pteval) do {                          \
        if (((_mm) != current->mm && (_mm) != &init_mm) ||              \
Index: sle10sp1-2007-01-31/include/asm-i386/mach-xen/asm/pgtable.h
===================================================================
--- sle10sp1-2007-01-31.orig/include/asm-i386/mach-xen/asm/pgtable.h    
2007-02-13 12:27:16.000000000 +0100
+++ sle10sp1-2007-01-31/include/asm-i386/mach-xen/asm/pgtable.h 2007-02-13 
12:28:26.000000000 +0100
@@ -432,12 +432,15 @@ extern void noexec_setup(const char *str
 #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \
        do {                                                              \
                if (__dirty) {                                            \
-                       if ( likely((__vma)->vm_mm == current->mm) ) {    \
-                           BUG_ON(HYPERVISOR_update_va_mapping((__address), 
(__entry), UVMF_INVLPG|UVMF_MULTI|(unsigned
long)((__vma)->vm_mm->cpu_vm_mask.bits))); \
-                       } else {                                          \
-                            xen_l1_entry_update((__ptep), (__entry)); \
-                           flush_tlb_page((__vma), (__address));         \
-                       }                                                 \
+                       if ( likely((__vma)->vm_mm == current->mm) ) {    \
+                               BUG_ON(HYPERVISOR_update_va_mapping(__address, \
+                                       __entry,                          \
+                                       (unsigned 
long)(__vma)->vm_mm->cpu_vm_mask.bits| \
+                                       UVMF_INVLPG|UVMF_MULTI));         \
+                       } else {                                          \
+                               xen_l1_entry_update(__ptep, __entry);     \
+                               flush_tlb_page(__vma, __address);         \
+                       }                                                 \
                }                                                         \
        } while (0)
 
Index: sle10sp1-2007-01-31/include/asm-x86_64/mach-xen/asm/pgtable.h
===================================================================
--- sle10sp1-2007-01-31.orig/include/asm-x86_64/mach-xen/asm/pgtable.h  
2007-02-13 12:27:16.000000000 +0100
+++ sle10sp1-2007-01-31/include/asm-x86_64/mach-xen/asm/pgtable.h       
2007-02-13 12:28:26.000000000 +0100
@@ -479,24 +479,18 @@ static inline pte_t pte_modify(pte_t pte
  * race with other CPU's that might be updating the dirty
  * bit at the same time. */
 #define  __HAVE_ARCH_PTEP_SET_ACCESS_FLAGS
-#if 0
 #define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \
        do {                                                              \
                if (__dirty) {                                            \
-                       set_pte(__ptep, __entry);                         \
-                       flush_tlb_page(__vma, __address);                 \
-               }                                                         \
-       } while (0)
-#endif
-#define ptep_set_access_flags(__vma, __address, __ptep, __entry, __dirty) \
-       do {                                                              \
-               if (__dirty) {                                            \
-                       if ( likely((__vma)->vm_mm == current->mm) ) {    \
-                           BUG_ON(HYPERVISOR_update_va_mapping((__address), 
(__entry), UVMF_INVLPG|UVMF_MULTI|(unsigned
long)((__vma)->vm_mm->cpu_vm_mask.bits))); \
-                       } else {                                          \
-                            xen_l1_entry_update((__ptep), (__entry)); \
-                           flush_tlb_page((__vma), (__address));         \
-                       }                                                 \
+                       if ( likely((__vma)->vm_mm == current->mm) ) {    \
+                               BUG_ON(HYPERVISOR_update_va_mapping(__address, \
+                                       __entry,                          \
+                                       (unsigned 
long)(__vma)->vm_mm->cpu_vm_mask.bits| \
+                                               UVMF_INVLPG|UVMF_MULTI)); \
+                       } else {                                          \
+                               xen_l1_entry_update(__ptep, __entry);     \
+                               flush_tlb_page(__vma, __address);         \
+                       }                                                 \
                }                                                         \
        } while (0)
 



_______________________________________________
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: Clean up page table handling headers, Jan Beulich <=