lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20250804002335.3613254-49-sashal@kernel.org>
Date: Sun,  3 Aug 2025 20:22:58 -0400
From: Sasha Levin <sashal@...nel.org>
To: patches@...ts.linux.dev,
	stable@...r.kernel.org
Cc: Biju Das <biju.das.jz@...renesas.com>,
	Thomas Gleixner <tglx@...utronix.de>,
	Geert Uytterhoeven <geert+renesas@...der.be>,
	Sasha Levin <sashal@...nel.org>,
	linux-kernel@...r.kernel.org
Subject: [PATCH AUTOSEL 6.16 49/85] irqchip/renesas-rzv2h: Enable SKIP_SET_WAKE and MASK_ON_SUSPEND

From: Biju Das <biju.das.jz@...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@...renesas.com>
Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
Reviewed-by: Geert Uytterhoeven <geert+renesas@...der.be>
Link: https://lore.kernel.org/all/20250701105923.52151-1-biju.das.jz@bp.renesas.com
Signed-off-by: Sasha Levin <sashal@...nel.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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ