From: "tip-bot2 for Thomas Gleixner" <tip-bot2@linutronix.de>
To: linux-tip-commits@vger.kernel.org
Cc: Thomas Gleixner <tglx@linutronix.de>,
Liangyan <liangyan.peng@bytedance.com>,
x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org
Subject: [tip: irq/core] genirq: Split up irq_pm_check_wakeup()
Date: Tue, 22 Jul 2025 12:45:53 -0000 [thread overview]
Message-ID: <175318835312.1420.11499005207479026635.tip-bot2@tip-bot2> (raw)
In-Reply-To: <20250718185312.012392426@linutronix.de>
The following commit has been merged into the irq/core branch of tip:
Commit-ID: c609045abc778689ce42e8f5827a84179ace52c5
Gitweb: https://git.kernel.org/tip/c609045abc778689ce42e8f5827a84179ace52c5
Author: Thomas Gleixner <tglx@linutronix.de>
AuthorDate: Fri, 18 Jul 2025 20:54:10 +02:00
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Tue, 22 Jul 2025 14:30:42 +02:00
genirq: Split up irq_pm_check_wakeup()
Let the calling code check for the IRQD_WAKEUP_ARMED flag to prepare for a
live lock mitigation in the edge type handler.
No functional change.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Liangyan <liangyan.peng@bytedance.com>
Link: https://lore.kernel.org/all/20250718185312.012392426@linutronix.de
---
kernel/irq/chip.c | 4 +++-
kernel/irq/internals.h | 4 ++--
kernel/irq/pm.c | 16 ++++++----------
3 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c
index 290244c..11ecf6c 100644
--- a/kernel/irq/chip.c
+++ b/kernel/irq/chip.c
@@ -488,8 +488,10 @@ static bool irq_can_handle_pm(struct irq_desc *desc)
* and suspended, disable it and notify the pm core about the
* event.
*/
- if (irq_pm_check_wakeup(desc))
+ if (unlikely(irqd_has_set(irqd, IRQD_WAKEUP_ARMED))) {
+ irq_pm_handle_wakeup(desc);
return false;
+ }
/* Check whether the interrupt is polled on another CPU */
if (unlikely(desc->istate & IRQS_POLL_INPROGRESS)) {
diff --git a/kernel/irq/internals.h b/kernel/irq/internals.h
index 82b0d67..0164ca4 100644
--- a/kernel/irq/internals.h
+++ b/kernel/irq/internals.h
@@ -277,11 +277,11 @@ static inline bool irq_is_nmi(struct irq_desc *desc)
}
#ifdef CONFIG_PM_SLEEP
-bool irq_pm_check_wakeup(struct irq_desc *desc);
+void irq_pm_handle_wakeup(struct irq_desc *desc);
void irq_pm_install_action(struct irq_desc *desc, struct irqaction *action);
void irq_pm_remove_action(struct irq_desc *desc, struct irqaction *action);
#else
-static inline bool irq_pm_check_wakeup(struct irq_desc *desc) { return false; }
+static inline void irq_pm_handle_wakeup(struct irq_desc *desc) { }
static inline void
irq_pm_install_action(struct irq_desc *desc, struct irqaction *action) { }
static inline void
diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
index 445912d..f739472 100644
--- a/kernel/irq/pm.c
+++ b/kernel/irq/pm.c
@@ -13,17 +13,13 @@
#include "internals.h"
-bool irq_pm_check_wakeup(struct irq_desc *desc)
+void irq_pm_handle_wakeup(struct irq_desc *desc)
{
- if (irqd_is_wakeup_armed(&desc->irq_data)) {
- irqd_clear(&desc->irq_data, IRQD_WAKEUP_ARMED);
- desc->istate |= IRQS_SUSPENDED | IRQS_PENDING;
- desc->depth++;
- irq_disable(desc);
- pm_system_irq_wakeup(irq_desc_get_irq(desc));
- return true;
- }
- return false;
+ irqd_clear(&desc->irq_data, IRQD_WAKEUP_ARMED);
+ desc->istate |= IRQS_SUSPENDED | IRQS_PENDING;
+ desc->depth++;
+ irq_disable(desc);
+ pm_system_irq_wakeup(irq_desc_get_irq(desc));
}
/*
next prev parent reply other threads:[~2025-07-22 12:45 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-18 18:54 [patch 0/4] genirq: Prevent migration live lock in handle_edge_irq() Thomas Gleixner
2025-07-18 18:54 ` [patch 1/4] genirq: Remove pointless local variable Thomas Gleixner
2025-07-22 12:45 ` [tip: irq/core] " tip-bot2 for Thomas Gleixner
2025-07-18 18:54 ` [patch 2/4] genirq: Move irq_wait_for_poll() to call site Thomas Gleixner
2025-07-22 7:07 ` Jiri Slaby
2025-07-22 12:36 ` Thomas Gleixner
2025-07-22 12:45 ` [tip: irq/core] " tip-bot2 for Thomas Gleixner
2025-07-23 6:22 ` Ingo Molnar
2025-07-18 18:54 ` [patch 3/4] genirq: Split up irq_pm_check_wakeup() Thomas Gleixner
2025-07-22 12:45 ` tip-bot2 for Thomas Gleixner [this message]
2025-07-18 18:54 ` [patch 4/4] genirq: Prevent migration live lock in handle_edge_irq() Thomas Gleixner
2025-07-22 7:37 ` Jiri Slaby
2025-07-22 12:45 ` [tip: irq/core] " tip-bot2 for Thomas Gleixner
2025-07-21 15:05 ` [External] [patch 0/4] " Liangyan
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=175318835312.1420.11499005207479026635.tip-bot2@tip-bot2 \
--to=tip-bot2@linutronix.de \
--cc=liangyan.peng@bytedance.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=maz@kernel.org \
--cc=tglx@linutronix.de \
--cc=x86@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).