Linux Power Management development
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Derek Basehore <dbasehore@chromium.org>
Cc: linux-kernel@vger.kernel.org, Ingo Molnar <mingo@redhat.com>,
	Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>,
	x86@kernel.org, platform-driver-x86@vger.kernel.org,
	"Rafael J . Wysocki" <rjw@rjwysocki.net>,
	Len Brown <len.brown@intel.com>,
	linux-pm@vger.kernel.org
Subject: Re: [PATCH v5 3/5] x86, apic: Add freeze event support
Date: Thu, 13 Jul 2017 07:13:05 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1707130712030.2332@nanos> (raw)
In-Reply-To: <20170708000303.21863-3-dbasehore@chromium.org>

On Fri, 7 Jul 2017, Derek Basehore wrote:

> This adds support to the clock event devices created by apic to use
> freeze events. The apic is able to run a timer during freeze with near
> zero power impact on modern CPUs such as skylake. This will allow
> S0ix, suspend-to-idle, to be validated on Intel CPUs that support it.
> 
> This is needed because bugs with power settings on the SoC can prevent
> S0ix entry. There is also no way to check this before idling all of
> the CPUs.
> 
> Signed-off-by: Derek Basehore <dbasehore@chromium.org>
> ---
>  arch/x86/kernel/apic/apic.c | 24 +++++++++++++++++++++++-
>  1 file changed, 23 insertions(+), 1 deletion(-)
> 
> diff --git a/arch/x86/kernel/apic/apic.c b/arch/x86/kernel/apic/apic.c
> index 98b3dd8cf2bf..adc69d2f11ce 100644
> --- a/arch/x86/kernel/apic/apic.c
> +++ b/arch/x86/kernel/apic/apic.c
> @@ -480,6 +480,26 @@ static int lapic_next_deadline(unsigned long delta,
>  	return 0;
>  }
>  
> +static int lapic_event_expired(struct clock_event_device *evt)

That want's to have a boolean return.

> +{
> +	u32 cct;
> +
> +	cct = apic_read(APIC_TMCCT);
> +	return cct == 0 ? 1 : 0;

which makes that:

      	return !cct;

> +}

Thanks,

	tglx

  reply	other threads:[~2017-07-13  5:13 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-08  0:02 [PATCH v5 1/5] x86: stub out pmc function Derek Basehore
2017-07-08  0:03 ` [PATCH v5 2/5] tick: Add freeze timer events Derek Basehore
2017-07-08 16:05   ` Andy Shevchenko
2017-07-10 21:11     ` dbasehore .
2017-07-10 12:53   ` Rafael J. Wysocki
2017-07-12 21:25   ` Thomas Gleixner
2017-07-13  1:18     ` dbasehore .
2017-07-13  4:54       ` Thomas Gleixner
2017-07-13  7:32   ` Peter Zijlstra
2017-07-13 15:09     ` Rafael J. Wysocki
2017-07-13 22:58       ` dbasehore .
2017-07-15 12:39         ` Rafael J. Wysocki
2017-07-18  0:30           ` dbasehore .
2017-07-18  1:33             ` Rafael J. Wysocki
2017-07-18  3:52               ` dbasehore .
2017-07-18  6:40                 ` Thomas Gleixner
2017-07-18 20:09                   ` dbasehore .
2017-07-18 21:53                     ` Thomas Gleixner
2017-07-18 22:03                       ` dbasehore .
2017-07-18 22:22                         ` Thomas Gleixner
2017-07-18 22:37                           ` dbasehore .
2017-07-18 22:39                             ` Thomas Gleixner
2017-07-08  0:03 ` [PATCH v5 3/5] x86, apic: Add freeze event support Derek Basehore
2017-07-13  5:13   ` Thomas Gleixner [this message]
2017-07-08  0:03 ` [PATCH v5 4/5] freeze: Add error reporting Derek Basehore
2017-07-08  0:03 ` [PATCH v5 5/5] intel_idle: Add S0ix validation Derek Basehore
2017-07-09  7:13   ` kbuild test robot
2017-07-10 13:33   ` Rafael J. Wysocki
2017-07-10 21:57     ` dbasehore .
2017-07-10 22:09       ` Rafael J. Wysocki
2017-07-10 22:24         ` dbasehore .
2017-07-11 14:57           ` Rafael J. Wysocki
2017-07-11 15:43             ` Len Brown
2017-07-12 22:16   ` Thomas Gleixner
2017-07-12 23:14     ` dbasehore .
2017-07-13  5:11       ` Thomas Gleixner
2017-07-13 22:49         ` dbasehore .
2017-07-13  1:06     ` dbasehore .
2017-07-08 16:00 ` [PATCH v5 1/5] x86: stub out pmc function Andy Shevchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1707130712030.2332@nanos \
    --to=tglx@linutronix.de \
    --cc=dbasehore@chromium.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=rajneesh.bhardwaj@intel.com \
    --cc=rjw@rjwysocki.net \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox