| From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| From: Maulik Shah <mkshah@codeaurora.org> |
| Date: Tue, 8 Jun 2021 14:35:10 +0530 |
| Subject: NOUPSTREAM: ANDROID: gic-v3: Export gic_resume() for vendor GIC |
| enhancements |
| |
| syscore ops in gic-v3 takes care of invoking gic_resume() when |
| exiting from "deep" suspend. However for "s2idle" suspend syscore |
| ops will not get invoked. |
| |
| Vendor modules can register for s2idle notifications and |
| invoke gic_resume() when the first cpu is waking up from s2idle. |
| |
| [CPNOTE: 16/08/21] Lee: GKI vendor exports |
| |
| Bug: 190353898 |
| Bug: 195914333 |
| Change-Id: I3d565ed3fd0fcada2231b10415dcf487fefc7c5f |
| Signed-off-by: Maulik Shah <mkshah@codeaurora.org> |
| --- |
| drivers/irqchip/irq-gic-v3.c | 4 +++- |
| include/linux/irqchip/arm-gic-v3.h | 2 ++ |
| 2 files changed, 5 insertions(+), 1 deletion(-) |
| |
| diff --git a/drivers/irqchip/irq-gic-v3.c b/drivers/irqchip/irq-gic-v3.c |
| --- a/drivers/irqchip/irq-gic-v3.c |
| +++ b/drivers/irqchip/irq-gic-v3.c |
| @@ -1327,10 +1327,11 @@ static inline void gic_cpu_pm_init(void) { } |
| #endif /* CONFIG_CPU_PM */ |
| |
| #ifdef CONFIG_PM |
| -static void gic_resume(void) |
| +void gic_resume(void) |
| { |
| trace_android_vh_gic_resume(gic_data.domain, gic_data.dist_base); |
| } |
| +EXPORT_SYMBOL_GPL(gic_resume); |
| |
| static struct syscore_ops gic_syscore_ops = { |
| .resume = gic_resume, |
| @@ -1343,6 +1344,7 @@ static void gic_syscore_init(void) |
| |
| #else |
| static inline void gic_syscore_init(void) { } |
| +void gic_resume(void) { } |
| #endif |
| |
| |
| diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h |
| --- a/include/linux/irqchip/arm-gic-v3.h |
| +++ b/include/linux/irqchip/arm-gic-v3.h |
| @@ -652,6 +652,8 @@ static inline bool gic_enable_sre(void) |
| return !!(val & ICC_SRE_EL1_SRE); |
| } |
| |
| +void gic_resume(void); |
| + |
| #endif |
| |
| #endif |