From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [PATCH] x86/cpuidle: restrict scope of mwait_ptr in acpi_dead_idle() Date: Tue, 06 Mar 2012 15:01:09 +0000 Message-ID: References: <4F56341A0200007800076ACC@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <4F56341A0200007800076ACC@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich , xen-devel List-Id: xen-devel@lists.xenproject.org On 06/03/2012 14:58, "Jan Beulich" wrote: > ... just to make sure it doesn't get used improperly (resulting from > the discussion around what became c/s 24968:8964c223836c). > > Signed-off-by: Jan Beulich Acked-by: Keir Fraser > --- a/xen/arch/x86/acpi/cpu_idle.c > +++ b/xen/arch/x86/acpi/cpu_idle.c > @@ -565,7 +565,6 @@ static void acpi_dead_idle(void) > { > struct acpi_processor_power *power; > struct acpi_processor_cx *cx; > - void *mwait_ptr; > > if ( (power = processor_powers[smp_processor_id()]) == NULL ) > goto default_halt; > @@ -573,10 +572,10 @@ static void acpi_dead_idle(void) > if ( (cx = &power->states[power->count-1]) == NULL ) > goto default_halt; > > - mwait_ptr = (void *)&mwait_wakeup(smp_processor_id()); > - > if ( cx->entry_method == ACPI_CSTATE_EM_FFH ) > { > + void *mwait_ptr = &mwait_wakeup(smp_processor_id()); > + > /* > * Cache must be flushed as the last operation before sleeping. > * Otherwise, CPU may still hold dirty data, breaking cache > coherency, > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xen.org > http://lists.xen.org/xen-devel