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-changelog

[Xen-changelog] Fix build.

# HG changeset patch
# User sos22@xxxxxxxxxxxxxxxxxxxx
# Node ID 3e7bcf1b6f706bb1fc2d51391fe656471542ff0d
# Parent  5a9efc35feb2e2d7e0a8664543350179fac5040a
Fix build.

Signed-off-by: Steven Smith, sos22@xxxxxxxxx

diff -r 5a9efc35feb2 -r 3e7bcf1b6f70 
linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c
--- a/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c    Fri Jan 27 21:18:15 2006
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c    Sat Jan 28 10:09:18 2006
@@ -93,13 +93,10 @@
                BUG();
 }
 
-void make_mmu_page_readonly(void *va)
+void make_page_readonly(void *va)
 {
        pgd_t *pgd; pud_t *pud; pmd_t *pmd; pte_t pte, *ptep;
        unsigned long addr = (unsigned long) va;
-
-       if (xen_feature(writable_mmu_structures))
-               return;
 
        pgd = pgd_offset_k(addr);
        pud = pud_offset(pgd, addr);
@@ -111,16 +108,20 @@
                xen_l1_entry_update(ptep, pte); /* fallback */
 
        if ((addr >= VMALLOC_START) && (addr < VMALLOC_END))
-               make_mmu_page_readonly(__va(pte_pfn(pte) << PAGE_SHIFT));
-}
-
-void make_mmu_page_writable(void *va)
+               make_page_readonly(__va(pte_pfn(pte) << PAGE_SHIFT));
+}
+
+void make_mmu_page_readonly(void *va)
+{
+       if (xen_feature(writable_mmu_structures))
+               return;
+       make_page_readonly(va);
+}
+
+void make_page_writable(void *va)
 {
        pgd_t *pgd; pud_t *pud; pmd_t *pmd; pte_t pte, *ptep;
        unsigned long addr = (unsigned long) va;
-
-       if (xen_feature(writable_mmu_structures))
-               return;
 
        pgd = pgd_offset_k(addr);
        pud = pud_offset(pgd, addr);
@@ -132,28 +133,44 @@
                xen_l1_entry_update(ptep, pte); /* fallback */
 
        if ((addr >= VMALLOC_START) && (addr < VMALLOC_END))
-               make_mmu_page_writable(__va(pte_pfn(pte) << PAGE_SHIFT));
-}
-
-void make_mmu_pages_readonly(void *va, unsigned nr)
+               make_page_writable(__va(pte_pfn(pte) << PAGE_SHIFT));
+}
+
+void make_mmu_page_writable(void *va)
 {
        if (xen_feature(writable_mmu_structures))
                return;
-
+       make_page_writable(va);
+}
+
+void make_pages_readonly(void *va, unsigned nr)
+{
        while (nr-- != 0) {
-               make_mmu_page_readonly(va);
+               make_page_readonly(va);
                va = (void*)((unsigned long)va + PAGE_SIZE);
        }
 }
 
-void make_mmu_pages_writable(void *va, unsigned nr)
+void make_mmu_pages_readonly(void *va, unsigned nr)
 {
        if (xen_feature(writable_mmu_structures))
                return;
+       make_pages_readonly(va, nr);
+}
+
+void make_pages_writable(void *va, unsigned nr)
+{
        while (nr-- != 0) {
-               make_mmu_page_writable(va);
+               make_page_writable(va);
                va = (void*)((unsigned long)va + PAGE_SIZE);
        }
+}
+
+void make_mmu_pages_writable(void *va, unsigned nr)
+{
+       if (xen_feature(writable_mmu_structures))
+               return;
+       make_pages_writable(va, nr);
 }
 
 /*

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Fix build., Xen patchbot -unstable <=