From: Zhenze Zhuang <luuiiruo@163.com>
To: tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org, Zhenze Zhuang <luuiiruo@163.com>
Subject: [PATCH] genirq: Fix gpio irq will fail to be resend under certain conditions
Date: Sun, 9 Jun 2024 00:36:20 +0800 [thread overview]
Message-ID: <20240608163620.89028-1-luuiiruo@163.com> (raw)
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.
Signed-off-by: Zhenze Zhuang <luuiiruo@163.com>
---
kernel/irq/chip.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index dc94e0bf2c94..8800db8d655c 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -690,6 +690,8 @@ void handle_fasteoi_irq(struct irq_desc *desc)
raw_spin_lock(&desc->lock);
+ desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
+
/*
* When an affinity change races with IRQ handling, the next interrupt
* can arrive on the new CPU before the original CPU has completed
@@ -701,8 +703,6 @@ void handle_fasteoi_irq(struct irq_desc *desc)
goto out;
}
- desc->istate &= ~(IRQS_REPLAY | IRQS_WAITING);
-
/*
* If its disabled or no action available
* then mask it and get out of here:
--
2.34.1
next reply other threads:[~2024-06-08 16:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-08 16:36 Zhenze Zhuang [this message]
2024-06-10 19:25 ` Thomas Gleixner
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=20240608163620.89028-1-luuiiruo@163.com \
--to=luuiiruo@163.com \
--cc=linux-kernel@vger.kernel.org \
--cc=tglx@linutronix.de \
/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®