mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Shawn Guo <shengchao.guo@oss.qualcomm.com>
To: Abel Vesa <abel.vesa@oss.qualcomm.com>
Cc: Bjorn Andersson <andersson@kernel.org>,
	Mathieu Poirier <mathieu.poirier@linaro.org>,
	Stephan Gerhold <stephan.gerhold@linaro.org>,
	linux-arm-msm@vger.kernel.org, linux-remoteproc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] remoteproc: qcom: q6v5: Make handover IRQ one-shot
Date: Fri, 31 Jul 2026 09:35:47 +0800	[thread overview]
Message-ID: <amv781piw4R6txhF@QCOM-aGQu4IUr3Y> (raw)
In-Reply-To: <20260612-rproc-q6v5-handover-irq-one-shot-v1-1-bb688f4446b3@oss.qualcomm.com>

On Fri, Jun 12, 2026 at 02:09:08PM +0300, Abel Vesa wrote:
> The handover interrupt is expected to be consumed once during each prepare
> cycle. If the remote processor keeps signalling handover after the first
> event, qcom_q6v5 currently logs the duplicate interrupt repeatedly while
> leaving the IRQ enabled.
> 
> Track the handover IRQ enable state explicitly and route all handover IRQ
> enable/disable operations through idempotent helpers. Request the handover
> IRQ with IRQF_NO_AUTOEN so it is only enabled through the helper during
> prepare. The handover handler disables it after marking handover as issued,
> while unprepare disables and synchronizes it before checking whether
> handover was issued.
> 
> Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com>
> ---
>  drivers/remoteproc/qcom_q6v5.c | 54 ++++++++++++++++++++++++++++++++++--------
>  drivers/remoteproc/qcom_q6v5.h |  4 ++++
>  2 files changed, 48 insertions(+), 10 deletions(-)

I seem to see a "regression" on Nord ADSP (probed as attached) with this change.

Before the change:

root@iq10-rrd:~# cat /sys/class/remoteproc/remoteproc0/state
attached
root@iq10-rrd:~# echo stop > /sys/class/remoteproc/remoteproc0/state
[   28.005204] qcom_q6v5_pas 4c00000.remoteproc: Handover signaled, but it already happened
[   28.036754] remoteproc remoteproc0: stopped remote processor adsp
root@iq10-rrd:~# echo start > /sys/class/remoteproc/remoteproc0/state
[   33.603101] remoteproc remoteproc0: powering up adsp
[   33.626128] remoteproc remoteproc0: Booting fw image qcom/nord/adsp.mbn, size 8241816
[   33.640317] PDM: no support for the platform, userspace daemon might be required.
[   33.724070] remoteproc remoteproc0: remote processor adsp is now up

After the change:

root@iq10-rrd:~# cat /sys/class/remoteproc/remoteproc0/state
attached
root@iq10-rrd:~# echo stop > /sys/class/remoteproc/remoteproc0/state
[   40.004874] genpd genpd:0:4c00000.remoteproc: Runtime PM usage count underflow!
[   40.012409] genpd genpd:1:4c00000.remoteproc: Runtime PM usage count underflow!
[   40.050074] remoteproc remoteproc0: stopped remote processor adsp
root@iq10-rrd:~# echo start > /sys/class/remoteproc/remoteproc0/state
[   44.350298] remoteproc remoteproc0: powering up adsp
[   44.375769] remoteproc remoteproc0: Booting fw image qcom/nord/adsp.mbn, size 8241816
[   44.389850] PDM: no support for the platform, userspace daemon might be required.
[   44.397864] ------------[ cut here ]------------
[   44.402633] Unbalanced enable for IRQ 363
[   44.406779] WARNING: kernel/irq/manage.c:775 at __enable_irq+0x4c/0x7c, CPU#9: sh/791
[   44.414837] Modules linked in: bluetooth ecdh_generic kpp ecc usb_f_fs libcomposite qcom_pd_mapper rpmsg_ctrl fastrpc rpmsg_char qrtr_smd qcom_pdr_msg qrtr qcom_q6v5_pas qcom_pil_info rtc_rv8803 phy_nxp_ptn3222 qcom_q6v5 phy_qcom_qmp_combo qcom_sysmon aux_bridge qcom_common i2c_qcom_geni spi_geni_qcom drm_kms_helper qcom_glink_smem typec mdt_loader qmi_helpers phy_snps_eusb2 qcom_cpucp_mbox qcom_wdt qcom_rng socinfo qcomtee cfg80211 rfkill fuse drm backlight
[   44.456498] CPU: 9 UID: 0 PID: 791 Comm: sh Not tainted 7.2.0-rc5-next-20260729+ #114 PREEMPT
[   44.465363] Hardware name: Qualcomm Technologies, Inc. IQ10 RRD (DT)
[   44.471910] pstate: 614000c5 (nZCv daIF +PAN -UAO -TCO +DIT -SSBS BTYPE=--)
[   44.479075] pc : __enable_irq+0x4c/0x7c
[   44.483043] lr : __enable_irq+0x4c/0x7c
[   44.487010] sp : ffff80008688bae0
[   44.490434] x29: ffff80008688bae0 x28: ffff00080bf1d000 x27: ffff000806285528
[   44.497784] x26: ffff000806285000 x25: ffff0008136ac600 x24: ffff0008136ac440
[   44.505134] x23: ffff000806285518 x22: 0000000000000001 x21: 0000000000000000
[   44.512485] x20: 000000000000016b x19: ffff00080c8e1000 x18: 0000000000000006
[   44.519835] x17: 0000000000000018 x16: ffffd80886bb74b4 x15: ffff80008688b4f0
[   44.527185] x14: 0000000000000000 x13: ffff008f3874c000 x12: 00000000000002fa
[   44.534536] x11: 00000000000008ee x10: ffff008f387fc000 x9 : ffff008f3874c000
[   44.541887] x8 : 3fffffffffffdfff x7 : ffff008f387fc000 x6 : bfffffffffffe000
[   44.549238] x5 : ffff008f3891a188 x4 : 0000000000000000 x3 : ffff2886b057d000
[   44.556589] x2 : 0000000000000000 x1 : 0000000000000000 x0 : ffff00080bf1d000
[   44.563939] Call trace:
[   44.566485]  __enable_irq+0x4c/0x7c (P)
[   44.570454]  enable_irq+0x6c/0xd8
[   44.573879]  qcom_q6v5_prepare+0xb8/0x118 [qcom_q6v5]
[   44.579087]  qcom_pas_start+0x30/0x418 [qcom_q6v5_pas]
[   44.584392]  rproc_start+0x88/0x1b8
[   44.588004]  rproc_boot+0x194/0x3b4
[   44.591613]  state_store+0x40/0x104
[   44.595220]  dev_attr_store+0x18/0x2c
[   44.599006]  sysfs_kf_write+0x7c/0x94
[   44.602792]  kernfs_fop_write_iter+0x130/0x1dc
[   44.607379]  vfs_write+0x240/0x370
[   44.610906]  ksys_write+0x70/0x108
[   44.614430]  __arm64_sys_write+0x1c/0x28
[   44.618486]  invoke_syscall+0x54/0x10c
[   44.622370]  el0_svc_common.constprop.0+0x40/0xe0
[   44.627228]  do_el0_svc+0x1c/0x28
[   44.630655]  el0_svc+0x38/0x1d0
[   44.633908]  el0t_64_sync_handler+0xa0/0xe4
[   44.638233]  el0t_64_sync+0x198/0x19c
[   44.642025] ---[ end trace 0000000000000000 ]---
[   44.708474] remoteproc remoteproc0: remote processor adsp is now up

Shawn

  parent reply	other threads:[~2026-07-31  1:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-12 11:09 Abel Vesa
2026-07-10 18:06 ` Bjorn Andersson
2026-07-31  1:35 ` Shawn Guo [this message]
2026-07-31  6:34   ` Shawn Guo

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=amv781piw4R6txhF@QCOM-aGQu4IUr3Y \
    --to=shengchao.guo@oss.qualcomm.com \
    --cc=abel.vesa@oss.qualcomm.com \
    --cc=andersson@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-remoteproc@vger.kernel.org \
    --cc=mathieu.poirier@linaro.org \
    --cc=stephan.gerhold@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®