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

[Xen-devel] Re: [PATCH][pvops_dom0][2/4] Introduce the external control

To: "Yu, Ke" <ke.yu@xxxxxxxxx>
Subject: [Xen-devel] Re: [PATCH][pvops_dom0][2/4] Introduce the external control operation interface for domain0 ACPI parser
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Tue, 28 Jul 2009 10:38:33 -0700
Cc: "Tian, Kevin" <kevin.tian@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Tue, 28 Jul 2009 10:38:55 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4D05DB80B95B23498C72C700BD6C2E0B2FBF1F55@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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <4D05DB80B95B23498C72C700BD6C2E0B2FBF1989@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <4A64D446.2090000@xxxxxxxx> <4D05DB80B95B23498C72C700BD6C2E0B2FBF1F55@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2
On 07/20/09 20:02, Yu, Ke wrote:
>> From: Jeremy Fitzhardinge [mailto:jeremy@xxxxxxxx]
>> Sent: Tuesday, July 21, 2009 4:32 AM
>> To: Yu, Ke
>> Cc: xen-devel@xxxxxxxxxxxxxxxxxxx; Tian, Kevin
>> Subject: Re: [PATCH][pvops_dom0][2/4] Introduce the external control
>> operation interface for domain0 ACPI parser
>>
>> On 07/18/09 23:46, Yu, Ke wrote:
>>     
>>> diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_idle.c
>>> index abbe2bb..49ccb84 100644
>>> --- a/drivers/acpi/processor_idle.c
>>> +++ b/drivers/acpi/processor_idle.c
>>> @@ -425,6 +425,12 @@ static int
>>>       
>> acpi_processor_get_power_info_cst(struct acpi_processor *pr)
>>     
>>>                 cx.power = obj->integer.value;
>>>
>>> +#ifdef CONFIG_PROCESSOR_EXTERNAL_CONTROL
>>> +               /* cache control methods to notify external logic */
>>> +               if (processor_pm_external())
>>> +                       memcpy(&cx.reg, reg, sizeof(*reg));
>>> +#endif /* CONFIG_PROCESSOR_EXTERNAL_CONTROL */
>>>
>>>       
>> This #ifdef should be unnecessary.
>>     
>
> This "#ifdef" is the counterpart of the following patch. The cx.reg 
> definition is embraced by CONFIG_PROCESSOR_EXTERNAL_CONTROL, so the code 
> manipulating on the cx.reg also need "#ifdef 
> CONFIG_PROCESSOR_EXTERNAL_CONTROL"
>   

I see.  In that case it might be better to wrap the memcpy up with an
inline function which can be defined either way, to keep the #ifdef out
of the code itself.

    J

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