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

[Xen-changelog] page.h:



ChangeSet 1.1385.2.1, 2005/04/28 16:11:15+01:00, cl349@xxxxxxxxxxxxxxxxxxxx

        page.h:
          Revert change to pgd_val to always set the PAGE_PRESENT bit.
        fixup.c:
          Cleanup whitespace.
        setup.c:
          Whitespace cleanup.
          Whitespace cleanups.
        process.c:
          Whitespace.
        pci-dma.c:
          revert part of previous for sync w/ 2.0.
          g/c unused code and cleanup whitespace.
        head.S:
          Break __xen_guest definition up in several lines.
        common.c:
          whitespace cleanup.



 arch/xen/i386/kernel/cpu/common.c |    2 -
 arch/xen/i386/kernel/head.S       |    4 ++-
 arch/xen/i386/kernel/pci-dma.c    |   42 ++++++++++++++------------------------
 arch/xen/i386/kernel/process.c    |    4 +--
 arch/xen/i386/kernel/setup.c      |   32 ++++++++++++----------------
 arch/xen/kernel/fixup.c           |    7 ++----
 include/asm-xen/asm-i386/page.h   |    2 -
 7 files changed, 40 insertions(+), 53 deletions(-)


diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/cpu/common.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/cpu/common.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/cpu/common.c 2005-04-28 
15:03:35 -04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/cpu/common.c 2005-04-28 
15:03:35 -04:00
@@ -600,7 +600,7 @@
         * Set up the per-thread TLS descriptor cache:
         */
        memcpy(thread->tls_array, &get_cpu_gdt_table(cpu)[GDT_ENTRY_TLS_MIN],
-               GDT_ENTRY_TLS_ENTRIES * 8);
+              GDT_ENTRY_TLS_ENTRIES * 8);
 
        cpu_gdt_init(&cpu_gdt_descr[cpu]);
 
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/head.S 
b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/head.S
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/head.S       2005-04-28 
15:03:35 -04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/head.S       2005-04-28 
15:03:35 -04:00
@@ -2,7 +2,9 @@
 #include <linux/config.h>
 
 .section __xen_guest
-       .ascii  "GUEST_OS=linux,GUEST_VER=2.6,XEN_VER=3.0,VIRT_BASE=0xC0000000"
+       .ascii  "GUEST_OS=linux,GUEST_VER=2.6"
+       .ascii  ",XEN_VER=3.0"
+       .ascii  ",VIRT_BASE=0xC0000000"
        .ascii  ",LOADER=generic"
        .byte   0
 
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/pci-dma.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/pci-dma.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/pci-dma.c    2005-04-28 
15:03:35 -04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/pci-dma.c    2005-04-28 
15:03:35 -04:00
@@ -44,13 +44,13 @@
 
        /* 1. Zap current PTEs, giving away the underlying pages. */
        for (i = 0; i < (1<<order); i++) {
-               pgd = pgd_offset_k(   (vstart + (i*PAGE_SIZE)));
-               pud = pud_offset(pgd, (vstart + (i*PAGE_SIZE)));
-               pmd = pmd_offset(pud, (vstart + (i*PAGE_SIZE)));
-               pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE)));
-               pfn = pte->pte_low >> PAGE_SHIFT;
-               HYPERVISOR_update_va_mapping(
-                       vstart + (i*PAGE_SIZE), __pte_ma(0), 0);
+               pgd = pgd_offset_k(vstart + (i*PAGE_SIZE));
+               pud = pud_offset(pgd, vstart + (i*PAGE_SIZE));
+               pmd = pmd_offset(pud, vstart + (i*PAGE_SIZE));
+               pte = pte_offset_kernel(pmd, vstart + (i*PAGE_SIZE));
+               pfn = pte_val_ma(*pte) >> PAGE_SHIFT;
+               HYPERVISOR_update_va_mapping(vstart + (i*PAGE_SIZE),
+                                            __pte_ma(0), 0);
                phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
                        INVALID_P2M_ENTRY;
                if (HYPERVISOR_dom_mem_op(MEMOP_decrease_reservation, 
@@ -61,17 +61,10 @@
                                  &pfn, 1, order) != 1) BUG();
        /* 3. Map the new extent in place of old pages. */
        for (i = 0; i < (1<<order); i++) {
-               pgd = pgd_offset_k(   (vstart + (i*PAGE_SIZE)));
-               pud = pud_offset(pgd, (vstart + (i*PAGE_SIZE)));
-               pmd = pmd_offset(pud, (vstart + (i*PAGE_SIZE)));
-               pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE)));
-               HYPERVISOR_update_va_mapping(
-                       vstart + (i*PAGE_SIZE),
+               HYPERVISOR_update_va_mapping(vstart + (i*PAGE_SIZE),
                        __pte_ma(((pfn+i)<<PAGE_SHIFT)|__PAGE_KERNEL), 0);
-               xen_machphys_update(
-                       pfn+i, (__pa(vstart)>>PAGE_SHIFT)+i);
-               phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] =
-                       pfn+i;
+               xen_machphys_update(pfn+i, (__pa(vstart)>>PAGE_SHIFT)+i);
+               phys_to_machine_mapping[(__pa(vstart)>>PAGE_SHIFT)+i] = pfn+i;
        }
        flush_tlb_all();
 
@@ -82,11 +75,9 @@
                           dma_addr_t *dma_handle, int gfp)
 {
        void *ret;
+       struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
        unsigned int order = get_order(size);
        unsigned long vstart;
-
-       struct dma_coherent_mem *mem = dev ? dev->dma_mem : NULL;
-
        /* ignore region specifiers */
        gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
 
@@ -108,14 +99,13 @@
 
        vstart = __get_free_pages(gfp, order);
        ret = (void *)vstart;
-       if (ret == NULL)
-               return ret;
-
-       xen_contig_memory(vstart, order);
 
-       memset(ret, 0, size);
-       *dma_handle = virt_to_bus(ret);
+       if (ret != NULL) {
+               xen_contig_memory(vstart, order);
 
+               memset(ret, 0, size);
+               *dma_handle = virt_to_bus(ret);
+       }
        return ret;
 }
 
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/process.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/process.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/process.c    2005-04-28 
15:03:35 -04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/process.c    2005-04-28 
15:03:35 -04:00
@@ -329,7 +329,7 @@
                desc->b = LDT_entry_b(&info);
        }
 
-        p->thread.io_pl = current->thread.io_pl;
+       p->thread.io_pl = current->thread.io_pl;
 
        err = 0;
  out:
@@ -445,7 +445,7 @@
        physdev_op_t iopl_op, iobmp_op;
        multicall_entry_t _mcl[8], *mcl = _mcl;
 
-        /* XEN NOTE: FS/GS saved in switch_mm(), not here. */
+       /* XEN NOTE: FS/GS saved in switch_mm(), not here. */
 
        /*
         * This is basically '__unlazy_fpu', except that we queue a
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c      2005-04-28 
15:03:35 -04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/setup.c      2005-04-28 
15:03:35 -04:00
@@ -40,6 +40,7 @@
 #include <linux/efi.h>
 #include <linux/init.h>
 #include <linux/edd.h>
+#include <linux/kernel.h>
 #include <linux/percpu.h>
 #include <linux/notifier.h>
 #include <video/edid.h>
@@ -59,15 +60,11 @@
 /* Allows setting of maximum possible memory size  */
 static unsigned long xen_override_max_pfn;
 
-extern struct notifier_block *panic_notifier_list;
 static int xen_panic_event(struct notifier_block *, unsigned long, void *);
 static struct notifier_block xen_panic_block = {
-       xen_panic_event,
-        NULL,
-        0 /* try to go last */
+       xen_panic_event, NULL, 0 /* try to go last */
 };
 
-
 int disable_pse __initdata = 0;
 
 /*
@@ -901,6 +898,7 @@
        return 0;
 }
 
+
 /*
  * Find the highest page frame number we have available
  */
@@ -1397,22 +1395,21 @@
  */
 void __init setup_arch(char **cmdline_p)
 {
-       int i,j;
+       int i, j;
        physdev_op_t op;
        unsigned long max_low_pfn;
 
        /* Force a quick death if the kernel panics. */
        extern int panic_timeout;
-       if ( panic_timeout == 0 )
+       if (panic_timeout == 0)
                panic_timeout = 1;
 
        /* Register a call for panic conditions. */
        notifier_chain_register(&panic_notifier_list, &xen_panic_block);
 
-       HYPERVISOR_vm_assist(
-               VMASST_CMD_enable, VMASST_TYPE_4gb_segments);
-       HYPERVISOR_vm_assist(
-               VMASST_CMD_enable, VMASST_TYPE_writable_pagetables);
+       HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_4gb_segments);
+       HYPERVISOR_vm_assist(VMASST_CMD_enable,
+                            VMASST_TYPE_writable_pagetables);
 
        memcpy(&boot_cpu_data, &new_cpu_data, sizeof(new_cpu_data));
        early_cpu_init();
@@ -1478,7 +1475,8 @@
        init_mm.start_code = (unsigned long) _text;
        init_mm.end_code = (unsigned long) _etext;
        init_mm.end_data = (unsigned long) _edata;
-       init_mm.brk = (PFN_UP(__pa(xen_start_info.pt_base)) + 
xen_start_info.nr_pt_frames) << PAGE_SHIFT;
+       init_mm.brk = (PFN_UP(__pa(xen_start_info.pt_base)) +
+                      xen_start_info.nr_pt_frames) << PAGE_SHIFT;
 
        /* XEN: This is nonsense: kernel may not even be contiguous in RAM. */
        /*code_resource.start = virt_to_phys(_text);*/
@@ -1511,7 +1509,7 @@
                        max_pfn * sizeof(unsigned long));
 
                if (max_pfn > xen_start_info.nr_pages) {
-                       /* set to INVALID_P2M_ENTRY */                        
+                       /* set to INVALID_P2M_ENTRY */
                        memset(phys_to_machine_mapping, ~0,
                                max_pfn * sizeof(unsigned long));
                        memcpy(phys_to_machine_mapping,
@@ -1617,15 +1615,13 @@
        }
 }
 
-
 static int
 xen_panic_event(struct notifier_block *this, unsigned long event, void *ptr)
 {
-     HYPERVISOR_crash();    
-     /* we're never actually going to get here... */
-     return NOTIFY_DONE;
+       HYPERVISOR_crash();    
+       /* we're never actually going to get here... */
+       return NOTIFY_DONE;
 }
-
 
 #include "setup_arch_post.h"
 /*
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/kernel/fixup.c 
b/linux-2.6.11-xen-sparse/arch/xen/kernel/fixup.c
--- a/linux-2.6.11-xen-sparse/arch/xen/kernel/fixup.c   2005-04-28 15:03:35 
-04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/kernel/fixup.c   2005-04-28 15:03:35 
-04:00
@@ -50,8 +50,8 @@
 
     if ( !test_and_set_bit(0, &printed) )
     {
-        HYPERVISOR_vm_assist(
-            VMASST_CMD_disable, VMASST_TYPE_4gb_segments_notify);
+        HYPERVISOR_vm_assist(VMASST_CMD_disable,
+                            VMASST_TYPE_4gb_segments_notify);
 
         DP("");
         DP("***************************************************************");
@@ -77,8 +77,7 @@
 
 static int __init fixup_init(void)
 {
-    HYPERVISOR_vm_assist(
-        VMASST_CMD_enable, VMASST_TYPE_4gb_segments_notify);
+    HYPERVISOR_vm_assist(VMASST_CMD_enable, VMASST_TYPE_4gb_segments_notify);
     return 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®.