On Thu, Jun 15, 2006 at 10:35:53AM -0600, Al Stone wrote:
> On Thu, 2006-06-15 at 11:58 +0900, Isaku Yamahata wrote:
> > diff -r d33add81096b -r ad418fdb1981 xen/arch/ia64/xen/xenmem.c
> > --- a/xen/arch/ia64/xen/xenmem.c Wed Jun 14 16:05:45 2006
> -0600
> > +++ b/xen/arch/ia64/xen/xenmem.c Thu Jun 15 11:33:14 2006
> +0900
> > @@ -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)
> > @@ -140,7 +140,7 @@ create_mpttable_page_table (u64 start, u
> > create_mpttable_page_table (u64 start, u64 end, void *arg)
> > {
> > unsigned long address, start_page, end_page;
> > - unsigned long *map_start, *map_end;
> > + volatile unsigned long *map_start, *map_end;
> > pgd_t *pgd;
> > pud_t *pud;
> > pmd_t *pmd;
>
> [snip...]
>
> I don't understand why map_start and map_end need to be
> volatile here. They only seem to be copying volatile
> values for later use so there is no need for them to be
> volatile; did I miss something?
The below two lines follows.
map_start = mpt_table + (__pa(start) >> PAGE_SHIFT);
map_end = mpt_table + (__pa(end) >> PAGE_SHIFT);
Gcc produces warnings without volatile.
--
yamahata
_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel
|