linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alexandre Courbot <acourbot@nvidia.com>
To: Stephen Warren <swarren@wwwdotorg.org>,
	Alexandre Courbot <gnurou@gmail.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	Russell King <linux@arm.linux.org.uk>,
	Olof Johansson <olof@lixom.net>,
	"linux-arm-kernel@lists.infradead.org" 
	<linux-arm-kernel@lists.infradead.org>,
	"linux-tegra@vger.kernel.org" <linux-tegra@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 5/5] ARM: tegra: cpuidle: use firmware call for power down
Date: Thu, 6 Feb 2014 11:28:24 +0900	[thread overview]
Message-ID: <52F2F348.3000502@nvidia.com> (raw)
In-Reply-To: <52F266A2.1030503@wwwdotorg.org>

On 02/06/2014 01:28 AM, Stephen Warren wrote:
> On 01/23/2014 12:39 AM, Alexandre Courbot wrote:
>> On Thu, Jan 23, 2014 at 5:45 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
>>> On 01/21/2014 03:10 AM, Alexandre Courbot wrote:
>>>> Invoke the do_idle() firmware call before suspending a CPU so that the
>>>> underlying firmware (if any) can take necessary action.
>>>
>>>> diff --git a/arch/arm/mach-tegra/cpuidle-tegra114.c b/arch/arm/mach-tegra/cpuidle-tegra114.c
>>>
>>>> @@ -45,6 +46,8 @@ static int tegra114_idle_power_down(struct cpuidle_device *dev,
>>>>
>>>>        clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_ENTER, &dev->cpu);
>>>>
>>>> +     call_firmware_op(do_idle);
>>>> +
>>>>        cpu_suspend(0, tegra30_sleep_cpu_secondary_finish);
>>>>
>>>>        clockevents_notify(CLOCK_EVT_NOTIFY_BROADCAST_EXIT, &dev->cpu);
>>>
>>> Don't you need to have the kernel also *not* do something when entering
>>> idle; doesn't the FW op replace some of the register writes that the
>>> kernel would otherwise be doing?
>>
>> It seems like the operation is actually to inform the firmware that we
>> are going to suspend the CPU. Downstream kernel also uses it that way.
>> But you are right in that we should expect do_idle() to actually
>> perform the suspend operation. Maybe a prepare_idle() operation should
>> be added to the firmware interface for this purpose?
>
> That sounds like a reasonable change. Is it easy to plumb in?

I think so. Will post a v2 of this soon.

Thanks,
Alex.



  reply	other threads:[~2014-02-06  2:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-21 10:10 [PATCH 0/5] ARM: firmware: improvements to Trusted Foundations support Alexandre Courbot
2014-01-21 10:10 ` [PATCH 1/5] ARM: trusted_foundations: fix vendor prefix typos Alexandre Courbot
2014-01-21 10:10 ` [PATCH 2/5] ARM: trusted_foundations: fallback when TF support is missing Alexandre Courbot
2014-01-21 10:10 ` [PATCH 3/5] ARM: firmware: enable Trusted Foundations by default Alexandre Courbot
2014-01-22 20:42   ` Stephen Warren
2014-01-23  7:38     ` Alexandre Courbot
2014-01-21 10:10 ` [PATCH 4/5] ARM: trusted_foundations: implement do_idle() Alexandre Courbot
2014-01-22 20:43   ` Stephen Warren
2014-01-23  7:39     ` Alexandre Courbot
2014-01-21 10:10 ` [PATCH 5/5] ARM: tegra: cpuidle: use firmware call for power down Alexandre Courbot
2014-01-22 20:45   ` Stephen Warren
2014-01-23  7:39     ` Alexandre Courbot
2014-02-05 16:28       ` Stephen Warren
2014-02-06  2:28         ` Alexandre Courbot [this message]
2014-01-22 20:47 ` [PATCH 0/5] ARM: firmware: improvements to Trusted Foundations support Stephen Warren

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=52F2F348.3000502@nvidia.com \
    --to=acourbot@nvidia.com \
    --cc=gnurou@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=olof@lixom.net \
    --cc=swarren@wwwdotorg.org \
    --cc=thierry.reding@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).