* [PATCH v2] irqchip: gic-v3: Handle failure case of CPU enters low power state
@ 2024-12-20 9:39 Yogesh Lal
2025-01-08 11:22 ` Marc Zyngier
2025-01-15 9:16 ` [tip: irq/urgent] irqchip/gic-v3: Handle CPU_PM_ENTER_FAILED correctly tip-bot2 for Yogesh Lal
0 siblings, 2 replies; 3+ messages in thread
From: Yogesh Lal @ 2024-12-20 9:39 UTC (permalink / raw)
To: Marc Zyngier, Thomas Gleixner
Cc: linux-arm-kernel, linux-kernel, linux-arm-msm, Yogesh Lal
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@quicinc.com>
---
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@quicinc.com/
---
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
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2] irqchip: gic-v3: Handle failure case of CPU enters low power state
2024-12-20 9:39 [PATCH v2] irqchip: gic-v3: Handle failure case of CPU enters low power state Yogesh Lal
@ 2025-01-08 11:22 ` Marc Zyngier
2025-01-15 9:16 ` [tip: irq/urgent] irqchip/gic-v3: Handle CPU_PM_ENTER_FAILED correctly tip-bot2 for Yogesh Lal
1 sibling, 0 replies; 3+ messages in thread
From: Marc Zyngier @ 2025-01-08 11:22 UTC (permalink / raw)
To: Yogesh Lal; +Cc: Thomas Gleixner, linux-arm-kernel, linux-kernel, linux-arm-msm
On Fri, 20 Dec 2024 09:39:07 +0000,
Yogesh Lal <quic_ylal@quicinc.com> wrote:
>
> 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@quicinc.com>
Acked-by: Marc Zyngier <maz@kernel.org>
M.
--
Without deviation from the norm, progress is not possible.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [tip: irq/urgent] irqchip/gic-v3: Handle CPU_PM_ENTER_FAILED correctly
2024-12-20 9:39 [PATCH v2] irqchip: gic-v3: Handle failure case of CPU enters low power state Yogesh Lal
2025-01-08 11:22 ` Marc Zyngier
@ 2025-01-15 9:16 ` tip-bot2 for Yogesh Lal
1 sibling, 0 replies; 3+ messages in thread
From: tip-bot2 for Yogesh Lal @ 2025-01-15 9:16 UTC (permalink / raw)
To: linux-tip-commits
Cc: Yogesh Lal, Thomas Gleixner, Marc Zyngier, stable, x86,
linux-kernel
The following commit has been merged into the irq/urgent branch of tip:
Commit-ID: 0d62a49ab55c99e8deb4593b8d9f923de1ab5c18
Gitweb: https://git.kernel.org/tip/0d62a49ab55c99e8deb4593b8d9f923de1ab5c18
Author: Yogesh Lal <quic_ylal@quicinc.com>
AuthorDate: Fri, 20 Dec 2024 15:09:07 +05:30
Committer: Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Wed, 15 Jan 2025 09:42:44 +01:00
irqchip/gic-v3: Handle CPU_PM_ENTER_FAILED correctly
When a CPU attempts to enter low power mode, it disables the redistributor
and Group 1 interrupts and reinitializes the system registers upon wakeup.
If the transition into low power mode fails, then the CPU_PM framework
invokes the PM notifier callback with CPU_PM_ENTER_FAILED to allow the
drivers to undo the state changes.
The GIC V3 driver ignores CPU_PM_ENTER_FAILED, which leaves the GIC in
disabled state.
Handle CPU_PM_ENTER_FAILED in the same way as CPU_PM_EXIT to restore normal
operation.
[ tglx: Massage change log, add Fixes tag ]
Fixes: 3708d52fc6bb ("irqchip: gic-v3: Implement CPU PM notifier")
Signed-off-by: Yogesh Lal <quic_ylal@quicinc.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/all/20241220093907.2747601-1-quic_ylal@quicinc.com
---
drivers/irqchip/irq-gic-v3.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c
index 79d8cc8..76dce0a 100644
--- a/drivers/irqchip/irq-gic-v3.c
+++ b/drivers/irqchip/irq-gic-v3.c
@@ -1522,7 +1522,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_enable();
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-01-15 9:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-20 9:39 [PATCH v2] irqchip: gic-v3: Handle failure case of CPU enters low power state Yogesh Lal
2025-01-08 11:22 ` Marc Zyngier
2025-01-15 9:16 ` [tip: irq/urgent] irqchip/gic-v3: Handle CPU_PM_ENTER_FAILED correctly tip-bot2 for Yogesh Lal
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox