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

Re: [Xen-devel][PATCH 3/5] Add cpufreq pwr mgmt to Xen

To: "Liu, Jinsong" <jinsong.liu@xxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: Re: [Xen-devel][PATCH 3/5] Add cpufreq pwr mgmt to Xen
From: Keir Fraser <keir.fraser@xxxxxxxxxxxxx>
Date: Tue, 13 May 2008 10:44:20 +0100
Delivery-date: Tue, 13 May 2008 02:44:57 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <9D7649D18729DE4BB2BD7B494F7FEDC2014010DD@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Aci0pum5DchKJJryTjCAyBnEoEeG2AAMDsoTAAEUb1AAAJ0Lyg==
Thread-topic: [Xen-devel][PATCH 3/5] Add cpufreq pwr mgmt to Xen
User-agent: Microsoft-Entourage/11.4.0.080122
On 13/5/08 10:34, "Liu, Jinsong" <jinsong.liu@xxxxxxxxx> wrote:

> I add a local variable 'a' in common/domain.c, since need to do '
> xen_processor_pmbits &= (~a);'
> If we directly use ' xen_processor_pmbits &= (~XEN_PROCESSOR_PM_PX)' may
> result in some align issue if xen_processor_pmbits is not 32bits
> variable.
> So I add 'a' with same type as 'xen_processor_pmbits'.

If this is a concern then cast XEN_PROCESSOR_PM_PX before applying ~.
Actually the right thing will happen without that since XEN_PROCESSOR_PM_PX
is a signed constant, so when the bitwise-negated value is widened it will
be sign extended.

 -- Keir



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