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

[Xen-changelog] [xen-unstable] linux/x86: Clean up page table handling headers



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1171964492 0
# Node ID 4b9680c58d738fa69b285b80c42e7e245ec1512c
# Parent  832b252f1f6f10019a9473bc881d63dff1d1a643
linux/x86: Clean up page table handling headers

- remove dead code
- fix line breaking and space vs. tab usage
- remove redundant parentheses

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
---
 linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-3level.h |   10 ----
 linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable.h        |   15 
+++---
 linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pgtable.h      |   24 
+++-------
 3 files changed, 19 insertions(+), 30 deletions(-)

diff -r 832b252f1f6f -r 4b9680c58d73 
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-3level.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-3level.h       
Tue Feb 20 09:34:22 2007 +0000
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable-3level.h       
Tue Feb 20 09:41:32 2007 +0000
@@ -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) ||              \
diff -r 832b252f1f6f -r 4b9680c58d73 
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable.h      Tue Feb 
20 09:34:22 2007 +0000
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/pgtable.h      Tue Feb 
20 09:41:32 2007 +0000
@@ -433,12 +433,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)
 
diff -r 832b252f1f6f -r 4b9680c58d73 
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pgtable.h
--- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pgtable.h    Tue Feb 
20 09:34:22 2007 +0000
+++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/pgtable.h    Tue Feb 
20 09:41:32 2007 +0000
@@ -487,24 +487,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-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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