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

[Xen-changelog] Remove __set_fixmap_ma and handle difference in installing machine-address



ChangeSet 1.1442, 2005/05/05 17:13:43+01:00, cl349@xxxxxxxxxxxxxxxxxxxx

        Remove __set_fixmap_ma and handle difference in installing 
machine-address
        and pseudo-physical-address fixmap entries inside __set_fixmap.
        fixmap.h, pgtable.c:
          Remove __set_fixmap_ma and handle difference in installing 
machine-address
          and pseudo-physical-address fixmap entries inside __set_fixmap.
        reboot.c, gnttab.c, ioremap.c:
          Change set_fixmap_ma call to set_fixmap call.
        init.c:
          Change set_fixmap_ma calls to set_fixmap calls and set_fixmap_ma_ro 
call to
          __set_fixmap(,, PAGE_KERNEL_RO) call.
        boot.c:
          Change __set_fixmap_ma calls to set_fixmap calls.
        Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>



 arch/xen/i386/kernel/acpi/boot.c  |    7 +++----
 arch/xen/i386/mm/init.c           |    9 +++++----
 arch/xen/i386/mm/ioremap.c        |    2 +-
 arch/xen/i386/mm/pgtable.c        |   22 +++++++++++-----------
 arch/xen/kernel/gnttab.c          |    6 +-----
 arch/xen/kernel/reboot.c          |    4 ----
 include/asm-xen/asm-i386/fixmap.h |    8 +-------
 7 files changed, 22 insertions(+), 36 deletions(-)


diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/boot.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/boot.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/boot.c  2005-05-05 
14:06:03 -04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/acpi/boot.c  2005-05-05 
14:06:03 -04:00
@@ -113,9 +113,8 @@
 
        j = PAGE_ALIGN(size) >> PAGE_SHIFT;
        for (i = 0; (i < FIX_ACPI_PAGES) && j ; i++, j--) {
-               __set_fixmap_ma(FIX_ACPI_END - i,
-                               (phys_addr & PAGE_MASK) + (i << PAGE_SHIFT),
-                               PAGE_KERNEL);
+               set_fixmap(FIX_ACPI_END - i,
+                          (phys_addr & PAGE_MASK) + (i << PAGE_SHIFT));
        }
 
        return (char *) __fix_to_virt(FIX_ACPI_END) + (phys_addr & ~PAGE_MASK);
@@ -658,7 +657,7 @@
        if (!rsdp_phys)
                rsdp_phys = acpi_scan_rsdp (0xE0000, 0x20000);
 
-       __set_fixmap_ma(FIX_ACPI_RSDP_PAGE, rsdp_phys, PAGE_KERNEL);
+       set_fixmap(FIX_ACPI_RSDP_PAGE, rsdp_phys);
 
        return rsdp_phys;
 }
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c   2005-05-05 14:06:03 
-04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/init.c   2005-05-05 14:06:03 
-04:00
@@ -562,7 +562,7 @@
        zone_sizes_init();
 
        /* Switch to the real shared_info page, and clear the dummy page. */
-       set_fixmap_ma(FIX_SHARED_INFO, xen_start_info.shared_info);
+       set_fixmap(FIX_SHARED_INFO, xen_start_info.shared_info);
        HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
        memset(empty_zero_page, 0, sizeof(empty_zero_page));
 
@@ -570,10 +570,11 @@
        /* Setup mapping of lower 1st MB */
        for (i = 0; i < NR_FIX_ISAMAPS; i++)
                if (xen_start_info.flags & SIF_PRIVILEGED)
-                       set_fixmap_ma(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE);
+                       set_fixmap(FIX_ISAMAP_BEGIN - i, i * PAGE_SIZE);
                else
-                       set_fixmap_ma_ro(FIX_ISAMAP_BEGIN - i,
-                                        virt_to_machine(empty_zero_page));
+                       __set_fixmap(FIX_ISAMAP_BEGIN - i,
+                                    virt_to_machine(empty_zero_page),
+                                    PAGE_KERNEL_RO);
 #endif
 }
 
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/ioremap.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/ioremap.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/ioremap.c        2005-05-05 
14:06:03 -04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/ioremap.c        2005-05-05 
14:06:03 -04:00
@@ -256,7 +256,7 @@
         */
        idx = FIX_BTMAP_BEGIN;
        while (nrpages > 0) {
-               set_fixmap_ma(idx, phys_addr);
+               set_fixmap(idx, phys_addr);
                phys_addr += PAGE_SIZE;
                --idx;
                --nrpages;
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c 
b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c
--- a/linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c        2005-05-05 
14:06:03 -04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/i386/mm/pgtable.c        2005-05-05 
14:06:03 -04:00
@@ -176,18 +176,18 @@
                BUG();
                return;
        }
-       set_pte_pfn(address, phys >> PAGE_SHIFT, flags);
-}
-
-void __set_fixmap_ma (enum fixed_addresses idx, unsigned long phys, pgprot_t 
flags)
-{
-       unsigned long address = __fix_to_virt(idx);
-
-       if (idx >= __end_of_fixed_addresses) {
-               BUG();
-               return;
+       switch (idx) {
+       case FIX_WP_TEST:
+       case FIX_VSYSCALL:
+#ifdef CONFIG_X86_F00F_BUG
+       case FIX_F00F_IDT:
+#endif
+               set_pte_pfn(address, phys >> PAGE_SHIFT, flags);
+               break;
+       default:
+               set_pte_pfn_ma(address, phys >> PAGE_SHIFT, flags);
+               break;
        }
-       set_pte_pfn_ma(address, phys >> PAGE_SHIFT, flags);
 }
 
 pte_t *pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c 
b/linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c
--- a/linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c  2005-05-05 14:06:03 
-04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/kernel/gnttab.c  2005-05-05 14:06:03 
-04:00
@@ -20,10 +20,6 @@
 #include <asm-xen/linux-public/privcmd.h>
 #include <asm-xen/gnttab.h>
 
-#ifndef set_fixmap_ma
-#define set_fixmap_ma set_fixmap
-#endif
-
 #if 1
 #define ASSERT(_p) \
     if ( !(_p) ) { printk(KERN_ALERT"Assertion '%s': line %d, file %s\n", \
@@ -339,7 +335,7 @@
     BUG_ON(setup.status != 0);
 
     for ( i = 0; i < NR_GRANT_FRAMES; i++ )
-        set_fixmap_ma(FIX_GNTTAB_END - i, frames[i] << PAGE_SHIFT);
+        set_fixmap(FIX_GNTTAB_END - i, frames[i] << PAGE_SHIFT);
 
     return 0;
 }
diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c 
b/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c
--- a/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c  2005-05-05 14:06:03 
-04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/kernel/reboot.c  2005-05-05 14:06:03 
-04:00
@@ -129,11 +129,7 @@
     memcpy(&xen_start_info, &suspend_record->resume_info,
            sizeof(xen_start_info));
 
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
-    set_fixmap_ma(FIX_SHARED_INFO, xen_start_info.shared_info);
-#else
     set_fixmap(FIX_SHARED_INFO, xen_start_info.shared_info);
-#endif
 
     HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
 
diff -Nru a/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/fixmap.h 
b/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/fixmap.h
--- a/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/fixmap.h 2005-05-05 
14:06:03 -04:00
+++ b/linux-2.6.11-xen-sparse/include/asm-xen/asm-i386/fixmap.h 2005-05-05 
14:06:03 -04:00
@@ -104,20 +104,14 @@
 
 extern void __set_fixmap (enum fixed_addresses idx,
                                        unsigned long phys, pgprot_t flags);
-extern void __set_fixmap_ma (enum fixed_addresses idx,
-                                       unsigned long mach, pgprot_t flags);
 
 #define set_fixmap(idx, phys) \
                __set_fixmap(idx, phys, PAGE_KERNEL)
-#define set_fixmap_ma(idx, phys) \
-               __set_fixmap_ma(idx, phys, PAGE_KERNEL)
-#define set_fixmap_ma_ro(idx, phys) \
-               __set_fixmap_ma(idx, phys, PAGE_KERNEL_RO)
 /*
  * Some hardware wants to get fixmapped without caching.
  */
 #define set_fixmap_nocache(idx, phys) \
-               __set_fixmap_ma(idx, phys, PAGE_KERNEL_NOCACHE)
+               __set_fixmap(idx, phys, PAGE_KERNEL_NOCACHE)
 
 #define clear_fixmap(idx) \
                __set_fixmap(idx, 0, __pgprot(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®.