[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.1443, 2005/05/05 17:46:07+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:
          Remove __set_fixmap_ma and handle difference in installing 
machine-address
          and pseudo-physical-address fixmap entries inside __set_fixmap.
        ioremap.c:
          Change set_fixmap_ma call to set_fixmap call.
        init.c:
          Remove __set_fixmap_ma and handle difference in installing 
machine-address
          and pseudo-physical-address fixmap entries inside __set_fixmap.
          Change __set_fixmap_ma calls to set_fixmap calls and set_fixmap_ma_ro 
call
          to __set_fixmap(,, PAGE_KERNEL_RO) call.
        Signed-off-by: Christian Limpach <Christian.Limpach@xxxxxxxxxxxx>



 arch/xen/x86_64/mm/init.c           |   32 +++++++++++++-------------------
 arch/xen/x86_64/mm/ioremap.c        |    2 +-
 include/asm-xen/asm-x86_64/fixmap.h |   11 +----------
 3 files changed, 15 insertions(+), 30 deletions(-)


diff -Nru a/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/init.c 
b/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/init.c
--- a/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/init.c 2005-05-05 14:06:14 
-04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/init.c 2005-05-05 14:06:14 
-04:00
@@ -361,7 +361,14 @@
                printk("Invalid __set_fixmap\n");
                return;
        }
-       set_pte_phys(address, phys, prot, SET_FIXMAP_KERNEL);
+       switch (idx) {
+       case VSYSCALL_FIRST_PAGE:
+               set_pte_phys(address, phys, prot, SET_FIXMAP_KERNEL);
+               break;
+       default:
+               set_pte_phys_ma(address, phys, prot);
+               break;
+       }
 }
 
 
@@ -414,18 +421,6 @@
 
 }
 
-
-void __set_fixmap_ma (enum fixed_addresses idx, unsigned long phys, pgprot_t 
prot)
-{ 
-       unsigned long address = __fix_to_virt(idx);
-
-       if (idx >= __end_of_fixed_addresses) {
-               printk("Invalid __set_fixmap\n");
-               return;
-       }
-       set_pte_phys_ma(address, phys, prot);
-}
-
 unsigned long __initdata table_start, table_end, tables_reserved; 
 
 #if 0
@@ -632,8 +627,7 @@
                free_area_init(zones_size);
        }
 
-        __set_fixmap_ma(FIX_SHARED_INFO, xen_start_info.shared_info, 
-                        __pgprot(_KERNPG_TABLE));
+        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));
@@ -642,11 +636,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,
-                                __pgprot(_KERNPG_TABLE));
+                        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/x86_64/mm/ioremap.c 
b/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/ioremap.c
--- a/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/ioremap.c      2005-05-05 
14:06:14 -04:00
+++ b/linux-2.6.11-xen-sparse/arch/xen/x86_64/mm/ioremap.c      2005-05-05 
14:06:14 -04:00
@@ -273,7 +273,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/include/asm-xen/asm-x86_64/fixmap.h 
b/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/fixmap.h
--- a/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/fixmap.h       
2005-05-05 14:06:14 -04:00
+++ b/linux-2.6.11-xen-sparse/include/asm-xen/asm-x86_64/fixmap.h       
2005-05-05 14:06:14 -04:00
@@ -60,22 +60,13 @@
 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®.