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: Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [PATCH 1/7][SMP] add volatile to mpt_table
From: Al Stone <ahs3@xxxxxxxxx>
Date: Thu, 15 Jun 2006 10:35:53 -0600
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Thu, 15 Jun 2006 09:34:56 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20060615025851.GA19187%yamahata@xxxxxxxxxxxxx>
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>
Organization: Hewlett-Packard
References: <20060615025851.GA19187%yamahata@xxxxxxxxxxxxx>
Reply-to: ahs3@xxxxxxxxx
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, 2006-06-15 at 11:58 +0900, Isaku Yamahata wrote:
>  1 / 7 
> _# HG changeset patch
>  # User yamahata@xxxxxxxxxxxxx
>  # Node ID ad418fdb1981be2108d84bafbd294a9db9899396
>  # Parent  d33add81096b057f98fa740ab88d6c17426f8d68
>  mpt_table is accessed concurrently by cpus, so it needs volatile
>  qualifier
>  PATCHNAME: volatile_mpt_table
>  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?

Thanks for the clarification.

-- 
Ciao,
al
----------------------------------------------------------------------
Al Stone                                      Alter Ego:
Open Source and Linux R&D                     Debian Developer
Hewlett-Packard Company                       http://www.debian.org
E-mail: ahs3@xxxxxxxxx                        ahs3@xxxxxxxxxx
----------------------------------------------------------------------


_______________________________________________
Xen-ia64-devel mailing list
Xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-ia64-devel