From: Sasha Levin <sashal@kernel.org>
To: patches@lists.linux.dev, stable@vger.kernel.org
Cc: Biju Das <biju.das.jz@bp.renesas.com>,
Thomas Gleixner <tglx@linutronix.de>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Sasha Levin <sashal@kernel.org>,
linux-kernel@vger.kernel.org
Subject: [PATCH AUTOSEL 6.16 49/85] irqchip/renesas-rzv2h: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND
Date: Sun, 3 Aug 2025 20:22:58 -0400 [thread overview]
Message-ID: <20250804002335.3613254-49-sashal@kernel.org> (raw)
In-Reply-To: <20250804002335.3613254-1-sashal@kernel.org>
From: Biju Das <biju.das.jz@bp.renesas.com>
[ Upstream commit de2942828e7670526289f098df7e50b112e8ff1e ]
The interrupt controller found on RZ/G3E doesn't provide any facility to
configure the wakeup sources. That's the reason why the driver lacks the
irq_set_wake() callback for the interrupt chip.
But this prevent to properly enter power management states like "suspend to
idle".
Enable the flags IRQCHIP_SKIP_SET_WAKE and IRQCHIP_MASK_ON_SUSPEND so the
interrupt suspend logic can handle the chip correctly.
Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Link: https://lore.kernel.org/all/20250701105923.52151-1-biju.das.jz@bp.renesas.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
LLM Generated explanations, may be completely bogus:
**Backport Status: YES**
This commit should be backported to stable kernel trees. Here's my
extensive analysis:
## Summary
This commit fixes a real bug where the Renesas RZ/G3E interrupt
controller prevents the system from properly entering power management
states like "suspend to idle" due to missing irqchip flags.
## Detailed Analysis
### 1. **Bug Fix Nature**
The commit clearly fixes a functional bug as stated in the commit
message:
- "But this prevent to properly enter power management states like
'suspend to idle'"
- The interrupt controller lacks an `irq_set_wake()` callback, which is
necessary for proper suspend/resume functionality
### 2. **Small and Contained Change**
The code change is minimal and well-contained:
```c
.flags = IRQCHIP_SET_TYPE_MASKED,
```
changed to:
```c
.flags = IRQCHIP_MASK_ON_SUSPEND |
IRQCHIP_SET_TYPE_MASKED |
IRQCHIP_SKIP_SET_WAKE,
```
This is a simple addition of two flags to the interrupt chip structure.
### 3. **Clear Understanding of Flags**
From the kernel documentation in include/linux/irq.h:
- **IRQCHIP_MASK_ON_SUSPEND**: "Mask non wake irqs in the suspend path"
- This ensures interrupts that shouldn't wake the system are properly
masked during suspend
- **IRQCHIP_SKIP_SET_WAKE**: "Skip chip.irq_set_wake(), for this irq
chip" - This tells the kernel to skip calling the non-existent
irq_set_wake() callback
### 4. **Pattern Consistency**
Looking at the similar Renesas driver (irq-renesas-rzg2l.c:446-448), we
can see the same flags are used:
```c
.flags = IRQCHIP_MASK_ON_SUSPEND |
IRQCHIP_SET_TYPE_MASKED |
IRQCHIP_SKIP_SET_WAKE,
```
This shows it's a well-established pattern for Renesas interrupt
controllers that lack wakeup source configuration.
### 5. **No Side Effects**
The change only adds flags that:
- Enable proper masking of interrupts during suspend (preventing
spurious interrupts)
- Tell the kernel to skip calling a non-existent function
- No functional changes beyond fixing the suspend issue
- No API changes or new features
### 6. **Affects Users**
This bug directly affects users trying to use power management features
on RZ/G3E hardware. Without this fix, the system cannot properly enter
suspend states, which impacts:
- Power consumption
- Battery life (on battery-powered devices)
- System reliability during suspend/resume cycles
### 7. **Low Risk**
The change has minimal risk of regression because:
- It only adds standard irqchip flags that are well-tested in the kernel
- The same flags are used in other similar drivers
- It doesn't modify any existing logic, just adds proper flag
configuration
- The flags only affect suspend/resume paths, not normal operation
### 8. **Driver Maturity**
While this is a relatively new driver (added in 2024), the fix addresses
a clear oversight in the initial implementation. The driver is already
in mainline, so systems using this hardware need this fix for proper
operation.
## Conclusion
This commit meets all the criteria for stable backporting:
- Fixes a real bug that affects users
- Minimal, well-understood change
- No architectural changes or new features
- Low risk of regression
- Follows established patterns in similar drivers
The fix enables proper power management functionality on affected
hardware, which is important for system operation and user experience.
drivers/irqchip/irq-renesas-rzv2h.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-renesas-rzv2h.c b/drivers/irqchip/irq-renesas-rzv2h.c
index 69b32c19e8ff..76fb1354e2aa 100644
--- a/drivers/irqchip/irq-renesas-rzv2h.c
+++ b/drivers/irqchip/irq-renesas-rzv2h.c
@@ -427,7 +427,9 @@ static const struct irq_chip rzv2h_icu_chip = {
.irq_retrigger = irq_chip_retrigger_hierarchy,
.irq_set_type = rzv2h_icu_set_type,
.irq_set_affinity = irq_chip_set_affinity_parent,
- .flags = IRQCHIP_SET_TYPE_MASKED,
+ .flags = IRQCHIP_MASK_ON_SUSPEND |
+ IRQCHIP_SET_TYPE_MASKED |
+ IRQCHIP_SKIP_SET_WAKE,
};
static int rzv2h_icu_alloc(struct irq_domain *domain, unsigned int virq, unsigned int nr_irqs,
--
2.39.5
next prev parent reply other threads:[~2025-08-04 0:25 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20250804002335.3613254-1-sashal@kernel.org>
2025-08-04 0:22 ` [PATCH AUTOSEL 6.16 09/85] regulator: core: repeat voltage setting request for stepped regulators Sasha Levin
2025-08-04 11:36 ` Mark Brown
2025-08-16 13:09 ` Sasha Levin
2025-08-04 0:22 ` [PATCH AUTOSEL 6.16 18/85] binder: Fix selftest page indexing Sasha Levin
2025-08-04 0:22 ` Sasha Levin [this message]
2025-08-04 0:22 ` [PATCH AUTOSEL 6.16 50/85] selftests: vDSO: vdso_test_getrandom: Always print TAP header Sasha Levin
2025-08-04 0:23 ` [PATCH AUTOSEL 6.16 56/85] mei: bus: Check for still connected devices in mei_cl_bus_dev_release() Sasha Levin
2025-08-04 0:23 ` [PATCH AUTOSEL 6.16 67/85] irqchip/mips-gic: Allow forced affinity Sasha Levin
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=20250804002335.3613254-49-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=biju.das.jz@bp.renesas.com \
--cc=geert+renesas@glider.be \
--cc=linux-kernel@vger.kernel.org \
--cc=patches@lists.linux.dev \
--cc=stable@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®