From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Lezcano Subject: Re: [PATCH 3/3] cpuidle, ACPI: remove unused CPUIDLE_FLAG_TIME_INVALID Date: Tue, 16 Dec 2014 12:08:25 +0100 Message-ID: <549012A9.6070408@linaro.org> References: <1418712728-2193-1-git-send-email-lenb@kernel.org> <2d1595ea66f8eadeb1e337354b311c4f5282e2a1.1418712225.git.len.brown@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: Received: from mail-wi0-f178.google.com ([209.85.212.178]:37592 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751235AbaLPLI1 (ORCPT ); Tue, 16 Dec 2014 06:08:27 -0500 Received: by mail-wi0-f178.google.com with SMTP id em10so12027425wid.11 for ; Tue, 16 Dec 2014 03:08:26 -0800 (PST) In-Reply-To: <2d1595ea66f8eadeb1e337354b311c4f5282e2a1.1418712225.git.len.brown@intel.com> Sender: linux-pm-owner@vger.kernel.org List-Id: linux-pm@vger.kernel.org To: Len Brown , linux-pm@vger.kernel.org, linux-acpi@vger.kernel.org Cc: Len Brown On 12/16/2014 07:52 AM, Len Brown wrote: > From: Len Brown > > CPUIDLE_FLAG_TIME_INVALID is no longer checked > by menu or ladder cpuidle governors, so don't > bother setting or defining it. > > It was originally invented to account for the fact that > acpi_safe_halt() enables interrupts to invoke HLT. > That would allow interrupt service routines to be included > in the last_idle duration measurements made in cpuidle_enter_state(), > potentially returning a duration much larger than reality. > > But menu and ladder can gracefully handle erroneously large duration > intervals without checking for CPUIDLE_FLAG_TIME_INVALID. > Further, if they don't check CPUIDLE_FLAG_TIME_INVALID, they > can also benefit from the instances when the duration interval > is not erroneously large. > > Signed-off-by: Len Brown > Cc: Daniel Lezcano Acked-by: Daniel Lezcano > --- > drivers/acpi/processor_idle.c | 2 -- > include/linux/cpuidle.h | 3 --- > 2 files changed, 5 deletions(-) > > diff --git a/drivers/acpi/processor_idle.c b/drivers/acpi/processor_i= dle.c > index 4995365..87b704e 100644 > --- a/drivers/acpi/processor_idle.c > +++ b/drivers/acpi/processor_idle.c > @@ -985,8 +985,6 @@ static int acpi_processor_setup_cpuidle_states(st= ruct acpi_processor *pr) > state->flags =3D 0; > switch (cx->type) { > case ACPI_STATE_C1: > - if (cx->entry_method !=3D ACPI_CSTATE_FFH) > - state->flags |=3D CPUIDLE_FLAG_TIME_INVALID; > > state->enter =3D acpi_idle_enter_c1; > state->enter_dead =3D acpi_idle_play_dead; > diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h > index a07e087..ab70f3b 100644 > --- a/include/linux/cpuidle.h > +++ b/include/linux/cpuidle.h > @@ -53,7 +53,6 @@ struct cpuidle_state { > }; > > /* Idle State Flags */ > -#define CPUIDLE_FLAG_TIME_INVALID (0x01) /* is residency time measur= able? */ > #define CPUIDLE_FLAG_COUPLED (0x02) /* state applies to multiple cp= us */ > #define CPUIDLE_FLAG_TIMER_STOP (0x04) /* timer is stopped on this= state */ > > @@ -89,8 +88,6 @@ DECLARE_PER_CPU(struct cpuidle_device, cpuidle_dev)= ; > /** > * cpuidle_get_last_residency - retrieves the last state's residenc= y time > * @dev: the target CPU > - * > - * NOTE: this value is invalid if CPUIDLE_FLAG_TIME_INVALID is set > */ > static inline int cpuidle_get_last_residency(struct cpuidle_device = *dev) > { > --=20 Linaro.org =E2=94=82 Open source software fo= r ARM SoCs =46ollow Linaro: Facebook | Twitter | Blog