mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pankaj Patil <pankaj.patil@oss.qualcomm.com>
To: Lee Jones <lee@kernel.org>,
	Jishnu Prakash <jishnu.prakash@oss.qualcomm.com>,
	Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com>
Cc: mfd@lists.linux.dev, linux-arm-msm@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Sibi Sankar <sibi.sankar@oss.qualcomm.com>,
	Rajendra Nayak <rajendra.nayak@oss.qualcomm.com>
Subject: [BUG] qcom-spmi-adc-tm5: lockdep reports invalid wait context in IRQ handler
Date: Fri, 6 Nov 2026 11:37:55 +0530	[thread overview]
Message-ID: <1cb6d902-73f3-4d65-96f4-4b3c5217253c@oss.qualcomm.com> (raw)

Hello,

I am seeing the following lockdep warning on Linux v7.4-rc1 when
CONFIG_PROVE_LOCKING is enabled. I can reproduce it on a Qualcomm Glymur
CRD and so far I have only observed from v7.4-rc1 and only when
CONFIG_PROVE_LOCKING is enabled.

The warning is triggered from the Qualcomm SPMI ADC TM5 Gen3 interrupt
path while adc5_gen3_read() performs a regmap read:

swapper/0/0 is trying to lock:
ffff000b67201018
(qcom_spmi_pmic:259:(&spmi_regmap_config)->lock){....}-{3:3}, at:
regmap_lock_spinlock+0x20/0x40
other info that might help us debug this:
context-{2:2}
locks held by swapper/0/0: 0, last CPU#0
stack backtrace:

CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted 7.4.0-rc1 #1 PREEMPT(full)

Call trace:
check_wait_context.isra.0+0x2d8/0x380
__lock_acquire+0x2ec/0x840
lock_acquire.part.0+0xe0/0x250
lock_acquire+0x8c/0x1e0
_raw_spin_lock_irqsave+0x6c/0xd8
regmap_lock_spinlock+0x20/0x40
regmap_raw_read+0x88/0x328
regmap_bulk_read+0x10c/0x340
adc5_gen3_read+0x38/0x50 [qcom_spmi_adc5_gen3]
adctm5_gen3_isr+0x90/0x130 [qcom_spmi_adc_tm5_gen3]

There is also an ADC timeout around the same time:

qcom-spmi-adc5-gen3 c42d000.spmi:pmic@0:adc@9000:
Reading ADC channel pm8550_gpio_02 timed out

Kernel/platform details:

Kernel: 7.4.0-rc1 #1, PREEMPT(full), not tainted
Platform: Qualcomm Glymur CRD
Firmware: 6.0.260410.BOOT.MXF.2.4-00601-HAMOA-1 (04/10/2026)
Config: CONFIG_PROVE_LOCKING=y

The full backtrace is:

[   12.924146] 7.4.0-rc1 #1 Not tainted
[   12.927848] -----------------------------
[   12.931982] swapper/0/0 is trying to lock:
[   12.936217] ffff000b67201018
(qcom_spmi_pmic:259:(&spmi_regmap_config)->lock){....}-{3:3}, at:
regmap_lock_spinlock+0x20/0x40
[   12.947855] other info that might help us debug this:
[   12.953060] context-{2:2}
[   12.955773] locks held by swapper/0/0: 0, last CPU#0
[   12.960896] stack backtrace:
[   12.963889] CPU: 0 UID: 0 PID: 0 Comm: swapper/0 Not tainted
7.4.0-rc1 #1 PREEMPT(full)
[   12.972208] Hardware name: Qualcomm CRD, BIOS
6.0.260410.BOOT.MXF.2.4-00601-HAMOA-1 04/10/2026
[   12.981070] Call trace:
[   12.983606] show_stack+0x20/0x38 (C)
[   12.987398] dump_stack_lvl+0x7c/0xb0
[   12.991180] dump_stack+0x18/0x24
[   12.994610] check_wait_context.isra.0+0x2d8/0x380
[   12.999552] __lock_acquire+0x2ec/0x840
[   13.003514] lock_acquire.part.0+0xe0/0x250
[   13.007837] lock_acquire+0x8c/0x1e0
[   13.011530] _raw_spin_lock_irqsave+0x6c/0xd8
[   13.013256] qcom-spmi-adc5-gen3 c42d000.spmi:pmic@0:adc@9000: Reading
ADC channel pm8550_gpio_02 timed out
[   13.025949] regmap_lock_spinlock+0x20/0x40
[   13.030264] regmap_raw_read+0x88/0x328
[   13.034227] regmap_bulk_read+0x10c/0x340
[   13.038368] adc5_gen3_read+0x38/0x50 [qcom_spmi_adc5_gen3]
[   13.044118] adctm5_gen3_isr+0x90/0x130 [qcom_spmi_adc_tm5_gen3]
[   13.050313] __handle_irq_event_percpu+0xac/0x4c8
[   13.055170] handle_irq_event+0x54/0x120
[   13.059218] handle_edge_irq+0x104/0x1d0
[   13.063272] handle_irq_desc+0x3c/0x68
[   13.067152] generic_handle_irq+0x28/0x40
[   13.071289] periph_interrupt+0xe8/0x1c0
[   13.075353] pmic_arb_chained_irq+0x148/0x380
[   13.079860] handle_irq_desc+0x3c/0x68
[   13.083730] generic_handle_domain_irq+0x20/0x40
[   13.088503] __gic_handle_irq.isra.0+0x58/0x108
[   13.093179] gic_handle_irq+0x1c/0x40
[   13.096976] call_on_irq_stack+0x30/0x48
[   13.101024] do_interrupt_handler+0x88/0x98
[   13.105342] el1_interrupt+0x3c/0x60
[   13.109035] el1h_64_irq_handler+0x18/0x30
[   13.113268] el1h_64_irq+0x78/0x80
[   13.116791] cpuidle_enter_state+0x13c/0xa10 (P)
[   13.121552] cpuidle_enter+0x40/0x60
[   13.125251] cpuidle_idle_call+0x184/0x270
[   13.129483] do_idle+0xac/0x150
[   13.132729] cpu_startup_entry+0x40/0x58
[   13.136786] rest_init+0x214/0x220
[   13.140309] start_kernel+0x4c4/0x4d0
[   13.144097] __primary_switched+0x88/0x98

Please let me know if additional logs, the kernel config, or testing of
a proposed fix would be useful.

Thanks,
Pankaj

                 reply	other threads:[~2026-11-06  6:08 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1cb6d902-73f3-4d65-96f4-4b3c5217253c@oss.qualcomm.com \
    --to=pankaj.patil@oss.qualcomm.com \
    --cc=jishnu.prakash@oss.qualcomm.com \
    --cc=kamal.wadhwa@oss.qualcomm.com \
    --cc=lee@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfd@lists.linux.dev \
    --cc=rajendra.nayak@oss.qualcomm.com \
    --cc=sibi.sankar@oss.qualcomm.com \
    /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®