linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tomeu.vizoso@collabora.com (Tomeu Vizoso)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: tegra: cpuidle: implement cpuidle_state.enter_freeze()
Date: Tue, 28 Apr 2015 17:07:14 +0200	[thread overview]
Message-ID: <CAAObsKBOZM0qdkrtgQFqMhAq3M2UXUHzZ3jqhrrv0vLrqJgyYA@mail.gmail.com> (raw)
In-Reply-To: <CAAObsKATZy9+Tn0pJcDCaNzpxLX6GqX0TO_t7w8tgirWQgJF9w@mail.gmail.com>

On 17 April 2015 at 17:02, Tomeu Vizoso <tomeu.vizoso@collabora.com> wrote:
> On 17 April 2015 at 16:08, Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> wrote:
>> On Thu, Apr 16, 2015 at 03:37:19PM +0100, Tomeu Vizoso wrote:
>>
>> [...]
>>
>>> >> I don't know what FIQs are. :-)
>>> >
>>> > In short, fast IRQs, it is a separate IRQ line handled as a separate
>>> > exception source with some private (banked) registers that minimize registers
>>> > saving/restoring. They are not identical to NMI on x86, since
>>> > their behaviour (handling) may be overriden by platforms and they
>>> > can be masked.
>>> >
>>> >> ->enter_freeze is entered with interrupts disabled on the local CPU.  It is
>>> >> not supposed to re-enable them.  That is, while in the ->enter_freeze callback
>>> >> routine, the CPU must not be interrupted aby anything other than NMI.
>>> >
>>> > It boils down to what FIQs handlers are allowed to do with tick frozen
>>> > and what they are (may be) currently used for.
>>> >
>>> > Russell has more insights on this than I do, in particular what FIQs are
>>> > currently used for on ARM and if we can leave them enabled safely with tick
>>> > frozen.
>>>
>>> But even if it's currently safe to leave them enabled, is there any
>>> reason for not disabling them?
>>
>> Ok, the point here is: either it is safe, and you leave them enabled,
>> or it is not and we must disable them *before* enter_freeze() is entered.
>>
>> Disabling them in the platform enter_freeze() hook does not make sense,
>> because this means we run with FIQs enabled with tick frozen, either
>> it is safe or it is not, it can't be both.
>
> Sure, that's why I proposed doing it in arch_cpu_idle_enter/exit.
>
>> I would ask Russell opinion on this, before making any decision.
>
> Sure, that would be very welcome.

Hi Russell,

do you think FIQs should be disabled when the tick is frozen when
going to suspend to idle?

Thanks,

Tomeu

  reply	other threads:[~2015-04-28 15:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-08 10:54 [PATCH] ARM: tegra: cpuidle: implement cpuidle_state.enter_freeze() Tomeu Vizoso
2015-04-08 11:55 ` Lorenzo Pieralisi
2015-04-09  9:18   ` Tomeu Vizoso
2015-04-09 21:19     ` Rafael J. Wysocki
2015-04-10 10:08       ` Lorenzo Pieralisi
2015-04-16 14:37         ` Tomeu Vizoso
2015-04-17 14:08           ` Lorenzo Pieralisi
2015-04-17 15:02             ` Tomeu Vizoso
2015-04-28 15:07               ` Tomeu Vizoso [this message]
2015-05-15  9:03             ` Tomeu Vizoso
2015-05-15 23:30               ` Russell King - ARM Linux

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=CAAObsKBOZM0qdkrtgQFqMhAq3M2UXUHzZ3jqhrrv0vLrqJgyYA@mail.gmail.com \
    --to=tomeu.vizoso@collabora.com \
    --cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).