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: Alex Williamson <alex.williamson@xxxxxx>, Isaku Yamahata <yamahata@xxxxxxxxxxxxx>
Subject: Re: [Xen-ia64-devel] [PATCH 1/7][SMP] add volatile to mpt_table
From: Tristan Gingold <Tristan.Gingold@xxxxxxxx>
Date: Fri, 16 Jun 2006 16:48:57 +0200
Cc: xen-ia64-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 16 Jun 2006 07:44:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1150468340.5615.33.camel@lappy>
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> <20060616013844.GA6700%yamahata@xxxxxxxxxxxxx> <1150468340.5615.33.camel@lappy>
Sender: xen-ia64-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.5
Le Vendredi 16 Juin 2006 16:32, Alex Williamson a écrit :
> On Fri, 2006-06-16 at 10:38 +0900, Isaku Yamahata wrote:
> > 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.
>
> Isaku,
>
>    I think it would be more clear to cast mpt_table as a non-volatile
> than to introduce new volatile variables to avoid compiler warnings.
> These has me confused as well.  Thanks,
Just my opinion:

I don't see the confusion and I don't like the cast.  I'd prefer to keep the 
qualifier.
If map_start/map_end are not deferred the volatile qualifier has no cost.  If 
they are deferred, the volatile qualifier should be kept.

[Again, this is just my opinion].

Tristan.

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