direct-io.hg

changeset 10582:dcb50b04faec

[IA64] add volatile to mpt_table

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

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
author awilliam@xenbuild.aw
date Mon Jun 19 12:13:11 2006 -0600 (2006-06-19)
parents 0d1dab1d9b67
children f02d59f9b11f
files xen/arch/ia64/xen/xenmem.c xen/include/asm-ia64/mm.h
line diff
     1.1 --- a/xen/arch/ia64/xen/xenmem.c	Fri Jun 16 10:18:54 2006 -0600
     1.2 +++ b/xen/arch/ia64/xen/xenmem.c	Mon Jun 19 12:13:11 2006 -0600
     1.3 @@ -35,7 +35,7 @@ unsigned long max_page;
     1.4  /*
     1.5   * Set up the page tables.
     1.6   */
     1.7 -unsigned long *mpt_table;
     1.8 +volatile unsigned long *mpt_table;
     1.9  
    1.10  void
    1.11  paging_init (void)
    1.12 @@ -139,18 +139,18 @@ create_frametable_page_table (u64 start,
    1.13  static int
    1.14  create_mpttable_page_table (u64 start, u64 end, void *arg)
    1.15  {
    1.16 +	unsigned long map_start, map_end;
    1.17  	unsigned long address, start_page, end_page;
    1.18 -	unsigned long *map_start, *map_end;
    1.19  	pgd_t *pgd;
    1.20  	pud_t *pud;
    1.21  	pmd_t *pmd;
    1.22  	pte_t *pte;
    1.23  
    1.24 -	map_start = mpt_table + (__pa(start) >> PAGE_SHIFT);
    1.25 -	map_end   = mpt_table + (__pa(end) >> PAGE_SHIFT);
    1.26 +	map_start = (unsigned long)(mpt_table + (__pa(start) >> PAGE_SHIFT));
    1.27 +	map_end   = (unsigned long)(mpt_table + (__pa(end) >> PAGE_SHIFT));
    1.28  
    1.29 -	start_page = (unsigned long) map_start & PAGE_MASK;
    1.30 -	end_page = PAGE_ALIGN((unsigned long) map_end);
    1.31 +	start_page = map_start & PAGE_MASK;
    1.32 +	end_page = PAGE_ALIGN(map_end);
    1.33  
    1.34  	for (address = start_page; address < end_page; address += PAGE_SIZE) {
    1.35  		pgd = frametable_pgd_offset(address);
     2.1 --- a/xen/include/asm-ia64/mm.h	Fri Jun 16 10:18:54 2006 -0600
     2.2 +++ b/xen/include/asm-ia64/mm.h	Mon Jun 19 12:13:11 2006 -0600
     2.3 @@ -443,7 +443,7 @@ extern unsigned long dom0vp_zap_physmap(
     2.4  extern unsigned long dom0vp_add_physmap(struct domain* d, unsigned long gpfn, unsigned long mfn, unsigned long flags, domid_t domid);
     2.5  #endif
     2.6  
     2.7 -extern unsigned long *mpt_table;
     2.8 +extern volatile unsigned long *mpt_table;
     2.9  extern unsigned long gmfn_to_mfn_foreign(struct domain *d, unsigned long gpfn);
    2.10  extern u64 translate_domain_pte(u64 pteval, u64 address, u64 itir__, u64* logps);
    2.11  #define machine_to_phys_mapping	mpt_table