From: Jia-Wei Chang <jia-wei.chang@mediatek.com>
To: Viresh Kumar <viresh.kumar@linaro.org>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>
Cc: <rafael@kernel.org>, <lgirdwood@gmail.com>, <broonie@kernel.org>,
<matthias.bgg@gmail.com>, <andrew-sh.cheng@mediatek.com>,
<rex-bc.chen@mediatek.com>, <nfraprado@collabora.com>,
<linux-pm@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<linux-mediatek@lists.infradead.org>
Subject: Re: [PATCH] cpufreq: mediatek: Fix KP and lockups on proc/sram regulators error
Date: Fri, 23 Sep 2022 14:38:43 +0800 [thread overview]
Message-ID: <d9e56d6fb6a31ecbd024cfe81e331817fa492331.camel@mediatek.com> (raw)
In-Reply-To: <20220921071913.p7kwsjnnuad2jgvk@vireshk-i7>
On Wed, 2022-09-21 at 12:49 +0530, Viresh Kumar wrote:
> Jia, do you want to reply to this thread as the Fixes patch was added
> by you ?
>
> On 09-09-22, 11:37, AngeloGioacchino Del Regno wrote:
> > Function regulator_get_optional() returns a negative error number
> > on
> > any kind of regulator_get() failure: failing to check for that in
> > the
> > teardown path will lead to a kernel panic due to a call to function
> > regulator_disable().
>
> I don't see how this can happen. The code does check if the
> regulators
> are enabled earlier or not.
>
Hi Angelo,
Could you help provide more details, like the call stack of kernel
panic? and how to reproduce this failure?
> > Besides that, the "proc" regulator does actually provide power to
> > the
> > CPU cluster(s): disabling it will produce a lockup on at least some
> > SoCs, such as MT8173.
>
> We are just dropping the count that we increased earlier, how will
> that disable the regulator which was already enabled ?
>
> > That consideration is also valid for the "sram" regulator,
> > providing
> > power to the CPU caches instead, present on some other SoCs, such
> > as
> > MT8183, MT8186 (and others).
> >
> > Resolve both situations and by simply removing the entire faulty
> > branches responsible for disabling the aforementioned regulators if
> > enabled, keeping in mind that these are enabled (and left enabled)
> > by the bootloader before booting the kernel.
>
> This looks fishy, we just keep on increasing the ref count of the
> regulator but never take it down.
>
Angelo,
Do you mean the ref count of the regulator in the kernel will be
affected if that regulator is enabled earlier in the bootloader?
Thanks.
prev parent reply other threads:[~2022-09-23 6:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-09 9:37 AngeloGioacchino Del Regno
2022-09-21 7:19 ` Viresh Kumar
2022-09-23 6:38 ` Jia-Wei Chang [this message]
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=d9e56d6fb6a31ecbd024cfe81e331817fa492331.camel@mediatek.com \
--to=jia-wei.chang@mediatek.com \
--cc=andrew-sh.cheng@mediatek.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=nfraprado@collabora.com \
--cc=rafael@kernel.org \
--cc=rex-bc.chen@mediatek.com \
--cc=viresh.kumar@linaro.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
all inboxes | Powered by JetHome®