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

[Xen-changelog] [xen-unstable] [IA64] add volatile to mpt_table



# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID dcb50b04faecd151b08cbff212bc4c00fa78da20
# Parent  0d1dab1d9b67da2651c9b543b97ee8e5e3c7fed3
[IA64] add volatile to mpt_table

mpt_table is accessed concurrently by cpus, so it needs volatile qualifier

Signed-off-by: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
---
 xen/arch/ia64/xen/xenmem.c |   14 +++++++-------
 xen/include/asm-ia64/mm.h  |    2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff -r 0d1dab1d9b67 -r dcb50b04faec xen/arch/ia64/xen/xenmem.c
--- a/xen/arch/ia64/xen/xenmem.c        Fri Jun 16 10:18:54 2006 -0600
+++ b/xen/arch/ia64/xen/xenmem.c        Mon Jun 19 12:13:11 2006 -0600
@@ -35,7 +35,7 @@ unsigned long max_page;
 /*
  * Set up the page tables.
  */
-unsigned long *mpt_table;
+volatile unsigned long *mpt_table;
 
 void
 paging_init (void)
@@ -139,18 +139,18 @@ static int
 static int
 create_mpttable_page_table (u64 start, u64 end, void *arg)
 {
+       unsigned long map_start, map_end;
        unsigned long address, start_page, end_page;
-       unsigned long *map_start, *map_end;
        pgd_t *pgd;
        pud_t *pud;
        pmd_t *pmd;
        pte_t *pte;
 
-       map_start = mpt_table + (__pa(start) >> PAGE_SHIFT);
-       map_end   = mpt_table + (__pa(end) >> PAGE_SHIFT);
-
-       start_page = (unsigned long) map_start & PAGE_MASK;
-       end_page = PAGE_ALIGN((unsigned long) map_end);
+       map_start = (unsigned long)(mpt_table + (__pa(start) >> PAGE_SHIFT));
+       map_end   = (unsigned long)(mpt_table + (__pa(end) >> PAGE_SHIFT));
+
+       start_page = map_start & PAGE_MASK;
+       end_page = PAGE_ALIGN(map_end);
 
        for (address = start_page; address < end_page; address += PAGE_SIZE) {
                pgd = frametable_pgd_offset(address);
diff -r 0d1dab1d9b67 -r dcb50b04faec xen/include/asm-ia64/mm.h
--- a/xen/include/asm-ia64/mm.h Fri Jun 16 10:18:54 2006 -0600
+++ b/xen/include/asm-ia64/mm.h Mon Jun 19 12:13:11 2006 -0600
@@ -443,7 +443,7 @@ extern unsigned long dom0vp_add_physmap(
 extern unsigned long dom0vp_add_physmap(struct domain* d, unsigned long gpfn, 
unsigned long mfn, unsigned long flags, domid_t domid);
 #endif
 
-extern unsigned long *mpt_table;
+extern volatile unsigned long *mpt_table;
 extern unsigned long gmfn_to_mfn_foreign(struct domain *d, unsigned long gpfn);
 extern u64 translate_domain_pte(u64 pteval, u64 address, u64 itir__, u64* 
logps);
 #define machine_to_phys_mapping        mpt_table

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