linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matti Vaittinen <matti.vaittinen@fi.rohmeurope.com>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
	Rob Herring <robh+dt@kernel.org>, Andy Gross <agross@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org,
	linux-power@fi.rohmeurope.com, linux-arm-msm@vger.kernel.org,
	linux-renesas-soc@vger.kernel.org
Subject: Re: [RFC PATCH v3 3/7] regulator: IRQ based event/error notification helpers
Date: Sun, 04 Apr 2021 19:07:39 +0300	[thread overview]
Message-ID: <15f550542c1c9e808f0ab40ec3032a1408d57c14.camel@fi.rohmeurope.com> (raw)
In-Reply-To: <20210402171139.GB5402@sirena.org.uk>


On Fri, 2021-04-02 at 18:11 +0100, Mark Brown wrote:
> On Thu, Mar 11, 2021 at 12:22:36PM +0200, Matti Vaittinen wrote:
> > +	if (d->fatal_cnt && h->retry_cnt > d->fatal_cnt) {
> > +		if (d->die)
> > +			ret = d->die(rid);
> > +		else
> > +			BUG();
> > +
> > +		/*
> > +		 * If the 'last resort' IC recovery failed we will have
> > +		 * nothing else left to do...
> > +		 */
> > +		BUG_ON(ret);
> 
> This isn't good...  we should be trying to provide more system level
> handling of this, if nothing else it's quite possibly not a software
> bug
> here but rather a hardware failure.  An explicit message about what
> happened would be more likely to be understood as a hardware failure,

I do agree. I'll add a print in next version.

> and something which allows handling such as initiating a system
> shutdown
> would be good as well - I'm not sure if there's any existing
> mechanism
> to plumb userspace into, or perhaps some sort of policy configurable
> via
> sysfs.

I like the idea but don't know of such existing mechanism. The input
system power-key event is closest that comes to my mind - but I don't
think that would be quite right. Additionally, I am unsure what level
of user-space functionality can be expected to work? Maybe the severity
of configured notifications should be used to decide whether to do in-
kernel handling or to alert user-space. Anyways, that is something that
requires further pondering - I'd propose improving this later.

Best Regards
	Matti Vaittinen


  reply	other threads:[~2021-04-04 16:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-11 10:21 [RFC PATCH v3 0/7] Extend regulator notification support Matti Vaittinen
2021-03-11 10:21 ` [RFC PATCH v3 1/7] dt_bindings: Add protection limit properties Matti Vaittinen
2021-03-24 15:08   ` Rob Herring
2021-03-11 10:22 ` [RFC PATCH v3 2/7] regulator: add warning flags Matti Vaittinen
2021-03-11 10:22 ` [RFC PATCH v3 3/7] regulator: IRQ based event/error notification helpers Matti Vaittinen
2021-04-02 17:11   ` Mark Brown
2021-04-04 16:07     ` Matti Vaittinen [this message]
2021-03-11 10:23 ` [RFC PATCH v3 4/7] regulator: add property parsing and callbacks to set protection limits Matti Vaittinen
2021-04-02 17:18   ` Mark Brown
2021-04-04 15:47     ` Vaittinen, Matti
2021-03-11 10:23 ` [RFC PATCH v3 5/7] dt-bindings: regulator: bd9576 add FET ON-resistance for OCW Matti Vaittinen
2021-03-11 16:41   ` Rob Herring
2021-03-11 10:24 ` [RFC PATCH v3 6/7] regulator: bd9576: Support error reporting Matti Vaittinen
2021-03-11 10:24 ` [RFC PATCH v3 7/7] regulator: bd9576: Fix the driver name in id table Matti Vaittinen
2021-04-02 17:19   ` Mark Brown
2021-04-04 15:51     ` Vaittinen, Matti
2021-04-02 17:19 ` [RFC PATCH v3 0/7] Extend regulator notification support 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=15f550542c1c9e808f0ab40ec3032a1408d57c14.camel@fi.rohmeurope.com \
    --to=matti.vaittinen@fi.rohmeurope.com \
    --cc=agross@kernel.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-power@fi.rohmeurope.com \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).