mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Arnd Bergmann" <arnd@arndb.de>
To: "Naresh Kamboju" <naresh.kamboju@linaro.org>,
	"open list" <linux-kernel@vger.kernel.org>,
	lkft-triage@lists.linaro.org,
	"Linux Regressions" <regressions@lists.linux.dev>,
	linux-clk <linux-clk@vger.kernel.org>,
	linux-arm-msm <linux-arm-msm@vger.kernel.org>,
	"Linux Media Mailing List" <linux-media@vger.kernel.org>
Cc: quic_vgarodia@quicinc.com, quic_dikshita@quicinc.com,
	"Bryan O'Donoghue" <bryan.odonoghue@linaro.org>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Anders Roxell" <anders.roxell@linaro.org>,
	"Dan Carpenter" <dan.carpenter@linaro.org>,
	"Benjamin Copeland" <ben.copeland@linaro.org>,
	"Renjiang Han" <quic_renjiang@quicinc.com>
Subject: Re: arm64 dragonboard 410c Internal error Oops dev_pm_opp_put core_clks_enable
Date: Fri, 18 Jul 2025 13:28:42 +0200	[thread overview]
Message-ID: <ef216301-a7e6-4c9d-9153-8ce8b0a4111f@app.fastmail.com> (raw)
In-Reply-To: <CA+G9fYu5=3n84VY+vTbCAcfFKOq7Us5vgBZgpypY4MveM=eVwg@mail.gmail.com>

On Fri, Jul 18, 2025, at 13:13, Naresh Kamboju wrote:
> The following Boot regressions are noticed on the Linux
> next-20250708with gcc-13 and clang-20 toolchains for the dragonboard
> 410c device.

> [   12.629924] x5 : 0000000000000002 x4 : 00000000c0000000 x3 : 
> 0000000000000001
> [   12.629939] x2 : 0000000000000002 x1 : ffffffffffffffde x0 : 
> ffffffffffffffee
> [   12.629956] Call trace:
> [   12.629962]  dev_pm_opp_put+0x24/0x58 (P)
> [   12.629981]  core_clks_enable+0x54/0x148 venus_core
> [   12.630064]  core_power_v1+0x78/0x90 venus_core
> [   12.691130]  venus_runtime_resume+0x6c/0x98 venus_core

> [   12.817608] Code: 910003fd f9000bf3 91004013 aa1303e0 (f9402821)
> All code
> ========
>    0: 910003fd mov x29, sp
>    4: f9000bf3 str x19, [sp, #16]
>    8: 91004013 add x19, x0, #0x10
>    c: aa1303e0 mov x0, x19
>   10:* f9402821 ldr x1, [x1, #80] <-- trapping instruction

It's loading from 'x1', which is an error pointer ffffffffffffffde
(-EISCONN).  The caller was modified by Renjiang Han (added to Cc)
in commit b179234b5e59 ("media: venus: pm_helpers: use opp-table
for the frequency").

The new version of the code is now  

static int core_clks_enable(struct venus_core *core)
 {
        const struct venus_resources *res = core->res;
+       struct device *dev = core->dev;
+       unsigned long freq = 0;
+       struct dev_pm_opp *opp;
        unsigned int i;
        int ret;
 
+       opp = dev_pm_opp_find_freq_ceil(dev, &freq);
+       dev_pm_opp_put(opp);
 
Where the 'opp' pointer is the error code and gets passed
into dev_pm_opp_put() without checking for the error condition.

    Arnd

  reply	other threads:[~2025-07-18 11:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-18 11:13 Naresh Kamboju
2025-07-18 11:28 ` Arnd Bergmann [this message]
2025-07-23 13:28   ` Renjiang Han
2025-07-24  9:59     ` Naresh Kamboju

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=ef216301-a7e6-4c9d-9153-8ce8b0a4111f@app.fastmail.com \
    --to=arnd@arndb.de \
    --cc=anders.roxell@linaro.org \
    --cc=ben.copeland@linaro.org \
    --cc=bryan.odonoghue@linaro.org \
    --cc=dan.carpenter@linaro.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=mchehab@kernel.org \
    --cc=naresh.kamboju@linaro.org \
    --cc=quic_dikshita@quicinc.com \
    --cc=quic_renjiang@quicinc.com \
    --cc=quic_vgarodia@quicinc.com \
    --cc=regressions@lists.linux.dev \
    /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®