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-ia64-devel

Re: [Xen-ia64-devel] [PATCH 1/7][SMP] add volatile to mpt_table

To: Al Stone <ahs3@xxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [PATCH 1/7][SMP] add volatile to mpt_table
From: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Date: Fri, 16 Jun 2006 10:38:44 +0900
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 15 Jun 2006 18:38:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1150389353.22614.75.camel@deimos>
List-help: <mailto:xen-ia64-devel-request@lists.xensource.com?subject=help>
List-id: Discussion of the ia64 port of Xen <xen-ia64-devel.lists.xensource.com>
List-post: <mailto:xen-ia64-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-ia64-devel>, <mailto:xen-ia64-devel-request@lists.xensource.com?subject=unsubscribe>
References: <20060615025851.GA19187%yamahata@xxxxxxxxxxxxx> <1150389353.22614.75.camel@deimos>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.4.2.1i
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