From: Thomas Gleixner <tglx@linutronix.de>
To: Zhenze Zhuang <luuiiruo@163.com>
Cc: linux-kernel@vger.kernel.org, Zhenze Zhuang <luuiiruo@163.com>
Subject: Re: [PATCH] genirq: Fix gpio irq will fail to be resend under certain conditions
Date: Mon, 10 Jun 2024 21:25:44 +0200 [thread overview]
Message-ID: <874ja0wqfb.ffs@tglx> (raw)
In-Reply-To: <20240608163620.89028-1-luuiiruo@163.com>
Zhenze!
On Sun, Jun 09 2024 at 00:36, Zhenze Zhuang wrote:
This has nothing to do with GPIO interrupts. It's a general problem
vs. resend, no?
> When a gpio irq is disable and the wakeup function is enable, and
> the device enters suspend, the irq wakeup is triggered but then enters
> suspend, the IRQS_REPLAY flag will be set, but the IRQS_REPLAY will
> not be cleared because the irq_may_run() condition is not met. After
> the gpio irq is enabled and the suspend is entered again, after the
> gpio irq is triggered, the check_irq_resend() execution will fail
> because the IRQS_REPLAY is asserted, resulting in the interrupt not
> being resned.
The concept of separate sentences and paragrahs exists for a reason.
https://www.kernel.org/doc/html/latest/process/maintainer-tip.html#changelog
No let me break that world salad apart and digest it.
> When a gpio irq is disable and the wakeup function is enable, and
> the device enters suspend, the irq wakeup is triggered but then enters
> suspend, the IRQS_REPLAY flag will be set, but the IRQS_REPLAY will
> not be cleared because the irq_may_run() condition is not met.
So what you are saying is:
An interrupt is disabled, but the wakeup function of the interrupt is
enabled, right?
Now the system enters suspend and the interrupt is raised, which
triggers the wakeup function, right?
Now the system enters suspend nevertheless. How can that happen?
Due to that the IRQS_REPLAY flag will be set. How so? IRQS_REPLAY is
only set from the resend function.
Due to that IRQS_REPLAY will not be cleared because the irq_may_run()
condition is not cleared. Sure, but how does any of this happen in the
first place?
> After the gpio irq is enabled and the suspend is entered again, after
> the gpio irq is triggered, the check_irq_resend() execution will fail
> because the IRQS_REPLAY is asserted, resulting in the interrupt not
> being resned.
This sentence really makes my brain go in circles. None of this change
log makes any sense.
Before you send me a decipherable description of the problem, let me ask
you a few obvious questions:
1) Why is the interrupt disabled _and_ marked as wakeup interrupt?
2) If it should still wakeup the system even if disabled, then the
interrupt chip should have the IRQCHIP_ENABLE_WAKEUP_ON_SUSPEND
flag set. That's not the case, right?
Thanks,
tglx
next prev parent reply other threads:[~2024-06-10 19:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-08 16:36 [PATCH] genirq: Fix gpio irq will fail to be resend under certain conditions Zhenze Zhuang
2024-06-10 19:25 ` Thomas Gleixner [this message]
2024-06-11 15:41 ` zzz
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=874ja0wqfb.ffs@tglx \
--to=tglx@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=luuiiruo@163.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