From 9ca63729003b0681b1c1a08cd33f28c8b3f68f2b Mon Sep 17 00:00:00 2001 From: Youngmin Nam Date: Sun, 30 Mar 2025 14:11:47 +0900 Subject: [PATCH] ANDROID: irqchip/gic-v3-its: Export suspend and resume functions for S2IDLE Although the suspend and resume functions exist and are registered as syscore_ops in the upstream GICv3 ITS driver, there is currently no proper way to invoke these functions in the S2IDLE scenario, as the S2IDLE framework does not call syscore_ops. To address this, export the suspend and resume symbols from the GICv3 ITS driver. This allows vendor modules to hook these functions into the s2idle_ops callbacks, enabling the save and restore of the GICv3 ITS state during S2IDLE. Bug: 405256435 Signed-off-by: Youngmin Nam Change-Id: Ib91e722856d5034da771c73612b5ca9f002a3342 --- drivers/irqchip/irq-gic-v3-its.c | 6 ++++-- include/linux/irqchip/arm-gic-v3.h | 3 +++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c index 0d3a889b1905..fce7d4ce78f9 100644 --- a/drivers/irqchip/irq-gic-v3-its.c +++ b/drivers/irqchip/irq-gic-v3-its.c @@ -4883,7 +4883,7 @@ static void its_enable_quirks(struct its_node *its) its_quirks, its); } -static int its_save_disable(void) +int its_save_disable(void) { struct its_node *its; int err = 0; @@ -4918,8 +4918,9 @@ err: return err; } +EXPORT_SYMBOL_GPL(its_save_disable); -static void its_restore_enable(void) +void its_restore_enable(void) { struct its_node *its; int ret; @@ -4978,6 +4979,7 @@ static void its_restore_enable(void) } raw_spin_unlock(&its_lock); } +EXPORT_SYMBOL_GPL(its_restore_enable); static struct syscore_ops its_syscore_ops = { .suspend = its_save_disable, diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h index af11bff9f35c..f6f8e52dee00 100644 --- a/include/linux/irqchip/arm-gic-v3.h +++ b/include/linux/irqchip/arm-gic-v3.h @@ -660,6 +660,9 @@ void gic_v3_dist_init(void); void gic_v3_cpu_init(void); void gic_v3_dist_wait_for_rwp(void); +int its_save_disable(void); +void its_restore_enable(void); + #endif #endif