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

[Xen-changelog] Fix the x86_64 build after the PAE check-in.



# HG changeset patch
# User kaf24@xxxxxxxxxxxxxxxxxxxx
# Node ID 308329b4e88316f095528db5dc2084034edc0653
# Parent  8de4591d112f77867b4dec1c1391ce7984dea2d9

Fix the x86_64 build after the PAE check-in.
Signed-off-by: Jun Nakajima <jun.nakajima@xxxxxxxxx>

diff -r 8de4591d112f -r 308329b4e883 
linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c
--- a/linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c        Tue Jul 12 
07:45:57 2005
+++ b/linux-2.6-xen-sparse/arch/xen/i386/mm/hypervisor.c        Tue Jul 12 
07:47:21 2005
@@ -343,7 +343,7 @@
         pte = pte_offset_kernel(pmd, (vstart + (i*PAGE_SIZE))); 
         pfn_array[i] = pte_mfn(*pte);
 #ifdef CONFIG_X86_64
-        xen_l1_entry_update(pte, 0);
+        xen_l1_entry_update(pte, __pte(0));
 #else
         HYPERVISOR_update_va_mapping(vstart + (i*PAGE_SIZE), __pte_ma(0), 0);
 #endif
diff -r 8de4591d112f -r 308329b4e883 
linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/mach_time.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/mach_time.h      
Tue Jul 12 07:45:57 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/mach-xen/mach_time.h      
Tue Jul 12 07:47:21 2005
@@ -7,7 +7,7 @@
 #ifndef _MACH_TIME_H
 #define _MACH_TIME_H
 
-#include <linux/mc146818rtc.h>
+#include <asm-i386/mc146818rtc.h>
 
 /* for check timing call set_rtc_mmss() 500ms     */
 /* used in arch/i386/time.c::do_timer_interrupt() */
diff -r 8de4591d112f -r 308329b4e883 
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    Tue Jul 12 07:45:57 2005
+++ b/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c    Tue Jul 12 07:47:21 2005
@@ -67,7 +67,7 @@
 static void __make_page_readonly(unsigned long va)
 {
         unsigned long addr;
-        pte_t *pte;
+        pte_t pte, *ptep;
        unsigned long *page = (unsigned long *) init_level4_pgt;
 
        addr = (unsigned long) page[pgd_index(va)];
@@ -79,15 +79,16 @@
        addr = page[pmd_index(va)];
        addr_to_page(addr, page);
 
-       pte = (pte_t *) &page[pte_index(va)];
-       xen_l1_entry_update(pte, (*(unsigned long*)pte) & ~_PAGE_RW);
+       ptep = (pte_t *) &page[pte_index(va)];
+       pte.pte = (ptep->pte & ~_PAGE_RW);
+       xen_l1_entry_update(ptep, pte);
        __flush_tlb_one(addr);
 }
 
 static void __make_page_writable(unsigned long va)
 {
         unsigned long addr;
-        pte_t *pte;
+        pte_t pte, *ptep;
         unsigned long *page = (unsigned long *) init_level4_pgt;
 
         addr = (unsigned long) page[pgd_index(va)];
@@ -99,8 +100,9 @@
         addr = page[pmd_index(va)];
         addr_to_page(addr, page);
 
-        pte = (pte_t *) &page[pte_index(va)];
-        xen_l1_entry_update(pte, (*(unsigned long*)pte)| _PAGE_RW);
+        ptep = (pte_t *) &page[pte_index(va)];
+       pte.pte = (ptep->pte | _PAGE_RW);
+        xen_l1_entry_update(ptep, pte);
        __flush_tlb_one(addr);
 }
 
@@ -110,7 +112,7 @@
  */
 void make_page_readonly(void *va)
 {
-        pgd_t* pgd; pud_t *pud; pmd_t* pmd; pte_t *pte;
+       pgd_t* pgd; pud_t *pud; pmd_t* pmd; pte_t pte, *ptep;
         unsigned long addr = (unsigned long) va;
 
         if (!init_mapping_done) {
@@ -121,14 +123,15 @@
         pgd = pgd_offset_k(addr);
         pud = pud_offset(pgd, addr);
         pmd = pmd_offset(pud, addr);
-        pte = pte_offset_kernel(pmd, addr);
-        xen_l1_entry_update(pte, (*(unsigned long*)pte)&~_PAGE_RW);
+        ptep = pte_offset_kernel(pmd, addr);
+       pte.pte = (ptep->pte & ~_PAGE_RW);
+        xen_l1_entry_update(ptep, pte);
        __flush_tlb_one(addr);
 }
 
 void make_page_writable(void *va)
 {
-        pgd_t* pgd; pud_t *pud; pmd_t* pmd; pte_t *pte;
+        pgd_t* pgd; pud_t *pud; pmd_t* pmd; pte_t pte, *ptep;
         unsigned long addr = (unsigned long) va;
 
         if (!init_mapping_done) {
@@ -139,8 +142,9 @@
         pgd = pgd_offset_k(addr);
         pud = pud_offset(pgd, addr);
         pmd = pmd_offset(pud, addr);
-        pte = pte_offset_kernel(pmd, addr);
-        xen_l1_entry_update(pte, (*(unsigned long*)pte)|_PAGE_RW);
+        ptep = pte_offset_kernel(pmd, addr);
+       pte.pte = (ptep->pte | _PAGE_RW);
+        xen_l1_entry_update(ptep, pte);
        __flush_tlb_one(addr);
 }
 
@@ -276,7 +280,7 @@
        if (!pte_none(*pte) &&
            pte_val(*pte) != (pte_val(new_pte) & __supported_pte_mask))
                pte_ERROR(*pte);
-        xen_l1_entry_update(pte, new_pte.pte);
+        xen_l1_entry_update(pte, new_pte);
 
        /*
         * It's enough to flush this one mapping.
@@ -331,16 +335,12 @@
        new_pte = pfn_pte_ma(phys >> PAGE_SHIFT, prot);
        pte = pte_offset_kernel(pmd, vaddr);
 
-       if (!pte_none(*pte) &&
-           pte_val_ma(*pte) != (pte_val_ma(new_pte) & __supported_pte_mask))
-               pte_ERROR(*pte);
-
         /* 
          * Note that the pte page is already RO, thus we want to use
          * xen_l1_entry_update(), not set_pte().
          */
         xen_l1_entry_update(pte, 
-                            (pfn_pte_ma(phys >> PAGE_SHIFT, prot).pte));
+                            pfn_pte_ma(phys >> PAGE_SHIFT, prot));
 
        /*
         * It's enough to flush this one mapping.
@@ -575,7 +575,7 @@
                                                  __pgprot(_KERNPG_TABLE | 
_PAGE_USER));
 
                                pte = (pte_t *) &pte_page[pte_index(va)];
-                               xen_l1_entry_update(pte, new_pte.pte);
+                               xen_l1_entry_update(pte, new_pte);
                                extended_size += PAGE_SIZE;
                        }
                } 
diff -r 8de4591d112f -r 308329b4e883 
linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h
--- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h Tue Jul 12 
07:45:57 2005
+++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/pgtable.h Tue Jul 12 
07:47:21 2005
@@ -91,10 +91,10 @@
 extern inline int pud_present(pud_t pud)       { return !pud_none(pud); }
 
 #ifdef CONFIG_SMP
-#define set_pte(pteptr, pteval) xen_l1_entry_update(pteptr, (pteval).pte)
+#define set_pte(pteptr, pteval) xen_l1_entry_update(pteptr, (pteval))
 
 #else
-#define set_pte(pteptr, pteval) xen_l1_entry_update(pteptr, (pteval.pte))
+#define set_pte(pteptr, pteval) xen_l1_entry_update(pteptr, (pteval))
 #if 0
 static inline void set_pte(pte_t *dst, pte_t val)
 {
@@ -347,7 +347,7 @@
        pte_t pte = *ptep;
        int ret = pte_dirty(pte);
        if (ret)
-               xen_l1_entry_update(ptep, pte_mkclean(pte).pte);
+               xen_l1_entry_update(ptep, pte_mkclean(pte));
        return ret;
 }
 
@@ -356,7 +356,7 @@
        pte_t pte = *ptep;
        int ret = pte_young(pte);
        if (ret)
-               xen_l1_entry_update(ptep, pte_mkold(pte).pte);
+               xen_l1_entry_update(ptep, pte_mkold(pte));
        return ret;
 }
 

_______________________________________________
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®.