[PATCH v2] irqchip: gic-v3: Handle failure case of CPU enters low power state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Adding a new condition in gic_cpu_pm_notifier to address instances
where the CPU fails to enter low power mode (CPU_PM_ENTER_FAILED).
The CPU_PM framework signals CPU_PM_ENTER_FAILED upon such failures.

When the CPU attempts to enter low power mode, it disables the
redistributor and Group 1 interrupts and reinitializes the system
registers upon wakeup.

In case of failure while entering low power mode, it is necessary
to re-enable the redistributor and Group 1 interrupts to restore
normal operation.

Signed-off-by: Yogesh Lal <quic_ylal@xxxxxxxxxxx>
---
 drivers/irqchip/irq-gic-v3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

---
Changes in V2:

* Updating the commit message
* Link to V1: https://lore.kernel.org/all/1671734140-15935-1-git-send-email-quic_ylal@xxxxxxxxxxx/
---

diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index c19083bfb943..2a99ca5c3f1d 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -1495,7 +1495,7 @@ static int gic_retrigger(struct irq_data *data)
 static int gic_cpu_pm_notifier(struct notifier_block *self,
 			       unsigned long cmd, void *v)
 {
-	if (cmd == CPU_PM_EXIT) {
+	if (cmd == CPU_PM_EXIT || cmd == CPU_PM_ENTER_FAILED) {
 		if (gic_dist_security_disabled())
 			gic_enable_redist(true);
 		gic_cpu_sys_reg_init();
-- 
2.34.1





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux