linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: "Vaittinen, Matti" <Matti.Vaittinen@fi.rohmeurope.com>
Cc: "angelogioacchino.delregno@somainline.org" 
	<angelogioacchino.delregno@somainline.org>,
	"lgirdwood@gmail.com" <lgirdwood@gmail.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: short-circuit and over-current IRQs
Date: Thu, 28 Jan 2021 12:10:19 +0000	[thread overview]
Message-ID: <20210128121019.GB4537@sirena.org.uk> (raw)
In-Reply-To: <5bf8b75f3a2f9db5fc200a9418ece5dfa2f91ab5.camel@fi.rohmeurope.com>

[-- Attachment #1: Type: text/plain, Size: 3163 bytes --]

On Thu, Jan 28, 2021 at 09:23:08AM +0000, Vaittinen, Matti wrote:
> On Wed, 2021-01-27 at 16:32 +0000, Mark Brown wrote:

> > Note that the events the API currently has are expected to be for the
> > actual error conditions, not for the warning ones - indicating that
> > the
> > voltage is out of regulation for example.

> I am unsure how to interpret this. What is the criteria of issue being
> an error/warning. When I was talking about warning I meant that the
> issue which is detected is unexpected and abnormal (error?) - but might
> still be recoverable (warning?). I understand the regulator framework
> must not signal same events for different purposes - but I don't really
> know what the current events are used for - I am grateful for any
> guidance!

What the majority of hardware interrupts on is situations where things
have already gone out of spec and there are actual problems with the
output - for example with current limiting there's often an actual
limiter in there so the regulator simply won't supply any more current
than is configured.  With a warning everything is still working fine but
getting close to not doing so.

> > Well, if these things are kicking in the hardware is in serious
> > trouble
> > anyway so it's unclear what the system would be likely to do in
> > software, and also unclear how safe it is to rely on software to be
> > able
> > to take that action given that it let things get into such a bad
> > state
> > in the first place.

> Actually, bear with me but I am unsure why we have these notifications
> if we don't expect SW to be able to do anything? Wouldn't the panic
> print be all that is needed then? I think that setups which have dual

You'll notice that there aren't any actual users of this stuff in tree
at the minute - people don't generally put much effort into software
recovery as they're not expecting to be anywhere near limiting in normal
operation.  What I'd expect people to do where they do implement
handling is something like shutting down all other supplies on the
device, possibly also trying to shut down the system as a whole.  Things
more about preventing physical damage rather than being part of the
normal operation of the system.

For thermal issues systems generally try to apply software limits well
before an individual component starts flagging things up with an
interrupt, the limits that devices have are generally super high and
often there'll be issues at a system level (eg, a case getting unusably
hot) earlier and it can take a while for responses to have an impact.

> limits (one for initiating potential SW recovery - other for HW to
> forcing protection) actually make sense. So does implementing notifiers
> / error statuses for events where SW recovery is potentially helpful.
> But whether the existing event notifications / error flags are correct
> for these is something I can't decide :) Here I ask guidance for Mark &
> others who know what is the idea behind existing error-flags/events.

It's not that we shouldn't implement support for warnings, it's that
they're not the common case for hardware and so won't line up with
behaviour for other users.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2021-01-28 12:11 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-27 12:01 Vaittinen, Matti
2021-01-27 12:27 ` Mark Brown
2021-01-27 12:56   ` Matti Vaittinen
2021-01-27 14:34     ` AngeloGioacchino Del Regno
2021-01-27 14:42       ` Vaittinen, Matti
2021-01-27 16:32       ` Mark Brown
2021-01-28  9:23         ` Vaittinen, Matti
2021-01-28 12:10           ` Mark Brown [this message]
2021-01-28 12:49             ` Vaittinen, Matti
     [not found]             ` <a89bf6f0e6c1e4b9afe980908b7e36b70b304a96.camel@fi.rohmeurope.com>
2021-01-30 15:43               ` AngeloGioacchino Del Regno
2021-02-01  7:14                 ` Matti Vaittinen
2021-02-01 13:17                 ` Mark Brown

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=20210128121019.GB4537@sirena.org.uk \
    --to=broonie@kernel.org \
    --cc=Matti.Vaittinen@fi.rohmeurope.com \
    --cc=angelogioacchino.delregno@somainline.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: short-circuit and over-current IRQs' \
    /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

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).