From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jeremy Fitzhardinge Subject: Re: [PATCH][pvops_dom0][2/4] Introduce the external control operation interface for domain0 ACPI parser Date: Tue, 28 Jul 2009 10:38:33 -0700 Message-ID: <4A6F3799.3010408@goop.org> References: <4D05DB80B95B23498C72C700BD6C2E0B2FBF1989@pdsmsx502.ccr.corp.intel.com> <4A64D446.2090000@goop.org> <4D05DB80B95B23498C72C700BD6C2E0B2FBF1F55@pdsmsx502.ccr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4D05DB80B95B23498C72C700BD6C2E0B2FBF1F55@pdsmsx502.ccr.corp.intel.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Yu, Ke" Cc: "Tian, Kevin" , "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org On 07/20/09 20:02, Yu, Ke wrote: >> From: Jeremy Fitzhardinge [mailto:jeremy@goop.org] >> Sent: Tuesday, July 21, 2009 4:32 AM >> To: Yu, Ke >> Cc: xen-devel@lists.xensource.com; 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