public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: lorenzo.pieralisi@arm.com (Lorenzo Pieralisi)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: tegra: cpuidle: implement cpuidle_state.enter_freeze()
Date: Fri, 17 Apr 2015 15:08:19 +0100	[thread overview]
Message-ID: <20150417140819.GB2347@red-moon> (raw)
In-Reply-To: <CAAObsKAihF1k1yzZxQEs_jpPnCdV3HQbLaYHWu1QNsNd5zqiOg@mail.gmail.com>

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.

I would ask Russell opinion on this, before making any decision.

Lorenzo

  reply	other threads:[~2015-04-17 14:08 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 [this message]
2015-04-17 15:02             ` Tomeu Vizoso
2015-04-28 15:07               ` Tomeu Vizoso
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=20150417140819.GB2347@red-moon \
    --to=lorenzo.pieralisi@arm.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