From: Emanuele Ghidoli <ghidoliemanuele@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@intel.com>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Linus Walleij <linus.walleij@linaro.org>,
Francesco Dolcini <francesco@dolcini.it>,
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>,
Emanuele Ghidoli <emanuele.ghidoli@toradex.com>,
linux-gpio@vger.kernel.org, linux-kernel@vger.kernel.org,
Marek Vasut <marek.vasut@gmail.com>,
stable@vger.kernel.org,
Francesco Dolcini <francesco.dolcini@toradex.com>
Subject: Re: [PATCH v1] gpio: pca953x: fix IRQ storm on system wake up
Date: Sun, 13 Apr 2025 15:33:02 +0200 [thread overview]
Message-ID: <ceed9ca5-d7e4-4a86-8af9-af3e87f1c70a@gmail.com> (raw)
In-Reply-To: <Z_Px_ajf96J_LlcD@smile.fi.intel.com>
On 07/04/2025 17:40, Andy Shevchenko wrote:
>> I’ve found another possible solution: disable the PCA953x IRQ in
>> pca953x_suspend() and re-enable it in pca953x_resume().
>> This would prevent the ISR from being triggered while the regmap is in
>> cache-only mode.
>> The wake-up capability is preserved, since an IRQ can still wake the system
>> even when disabled with disable_irq(), as long as it has wake enabled.
>
> Can you enable IRQ debugfs and dump the state of the wake* nodes for the
> respective interrupts? In this case we will be 100% sure it works as expected.
>
# cat /sys/kernel/debug/irq/irqs/124
handler: handle_level_irq
device: (null)
status: 0x00000508
_IRQ_NOPROBE
istate: 0x00004020
IRQS_ONESHOT
ddepth: 0
wdepth: 0
dstate: 0x02402208
IRQ_TYPE_LEVEL_LOW
IRQD_LEVEL
IRQD_ACTIVATED
IRQD_IRQ_STARTED
IRQD_DEFAULT_TRIGGER_SET
node: 0
affinity: 0-5
effectiv:
domain: :soc:gpio@47400000
hwirq: 0xb
chip: gpio-vf610
flags: 0xa04
IRQCHIP_MASK_ON_SUSPEND
IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND
IRQCHIP_IMMUTABLE
# cat /sys/kernel/debug/irq/irqs/209
handler: handle_simple_irq
device: (null)
status: 0x00008403
_IRQ_NOPROBE
_IRQ_NESTED_THREAD
istate: 0x00004000
ddepth: 0
wdepth: 0
dstate: 0x00400203
IRQ_TYPE_EDGE_RISING
IRQ_TYPE_EDGE_FALLING
IRQD_ACTIVATED
IRQD_IRQ_STARTED
node: 0
affinity: 0-5
effectiv:
domain: :soc:bus@42000000:i2c@42540000:gpio-expander@29
hwirq: 0x4
chip: 3-0029
flags: 0x800
IRQCHIP_IMMUTABLE
And these just for confirmation (4 interrupt triggered by pushing the
SMARC_SLEEP# button):
# cat /proc/interrupts |grep 0029
124: 4 0 0 0 0 0
gpio-vf610 11 Level 3-0029
209: 0 4 0 0 0 0 3-0029
4 Edge SMARC_SLEEP#
# cat /sys/kernel/debug/wakeup_sources
name active_count event_count wakeup_count expire_count
active_since total_time max_time last_change
prevent_suspend_time
gpio-keys 4 4 0 0
0 43 14 293116 0
>> This should avoid introducing regressions and still handle Geert’s use case
>> properly.
>>
>> Andy, Bart, Geert - what do you think?
>
> Sounds okay, but please double check the above.
>
It took me a while to realize that the relevant information is only available
when CONFIG_GENERIC_IRQ_DEBUGFS is enabled.
All /sys/kernel/irq/*/wakeup always reports "disabled", even if wakeup is
actually configured. I guess if this is the information you were asking for.
Regards,
Emanuele
prev parent reply other threads:[~2025-04-13 13:33 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-26 17:38 [PATCH v1] gpio: pca953x: fix IRQ storm on system wake up Francesco Dolcini
2025-04-03 12:07 ` Bartosz Golaszewski
2025-04-03 13:54 ` Andy Shevchenko
2025-04-03 13:56 ` Bartosz Golaszewski
2025-04-07 15:11 ` Emanuele Ghidoli
2025-04-07 15:40 ` Andy Shevchenko
2025-04-13 13:33 ` Emanuele Ghidoli [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=ceed9ca5-d7e4-4a86-8af9-af3e87f1c70a@gmail.com \
--to=ghidoliemanuele@gmail.com \
--cc=andriy.shevchenko@intel.com \
--cc=bartosz.golaszewski@linaro.org \
--cc=brgl@bgdev.pl \
--cc=emanuele.ghidoli@toradex.com \
--cc=francesco.dolcini@toradex.com \
--cc=francesco@dolcini.it \
--cc=geert@linux-m68k.org \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marek.vasut@gmail.com \
--cc=stable@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.