From 86d2c1797a44975e628bcf77e30e687fd6738e81 Mon Sep 17 00:00:00 2001 From: Samuel Holland Date: Fri, 25 Oct 2024 11:59:48 -0700 Subject: platform: Drop IPI warm init and exit hooks Now that the SBI IPI core clears IPIs at warm boot in a generic way, none of the drivers or platforms use these hooks, and we can remove them. Platforms need only to initialize the driver once during cold init. If other hooks are needed in the future, they can be added to struct sbi_ipi_device. Signed-off-by: Samuel Holland Reviewed-by: Anup Patel --- include/sbi/sbi_platform.h | 25 +++++-------------------- include/sbi_utils/ipi/fdt_ipi.h | 9 ++------- 2 files changed, 7 insertions(+), 27 deletions(-) (limited to 'include') diff --git a/include/sbi/sbi_platform.h b/include/sbi/sbi_platform.h index 3e21a628..e94ab37c 100644 --- a/include/sbi/sbi_platform.h +++ b/include/sbi/sbi_platform.h @@ -116,10 +116,8 @@ struct sbi_platform_operations { /** Exit the platform interrupt controller for current HART */ void (*irqchip_exit)(void); - /** Initialize IPI for current HART */ - int (*ipi_init)(bool cold_boot); - /** Exit IPI for current HART */ - void (*ipi_exit)(void); + /** Initialize IPI during cold boot */ + int (*ipi_init)(void); /** Get tlb flush limit value **/ u64 (*get_tlbr_flush_limit)(void); @@ -572,32 +570,19 @@ static inline void sbi_platform_irqchip_exit(const struct sbi_platform *plat) } /** - * Initialize the platform IPI support for current HART + * Initialize the platform IPI support during cold boot * * @param plat pointer to struct sbi_platform - * @param cold_boot whether cold boot (true) or warm_boot (false) * * @return 0 on success and negative error code on failure */ -static inline int sbi_platform_ipi_init(const struct sbi_platform *plat, - bool cold_boot) +static inline int sbi_platform_ipi_init(const struct sbi_platform *plat) { if (plat && sbi_platform_ops(plat)->ipi_init) - return sbi_platform_ops(plat)->ipi_init(cold_boot); + return sbi_platform_ops(plat)->ipi_init(); return 0; } -/** - * Exit the platform IPI support for current HART - * - * @param plat pointer to struct sbi_platform - */ -static inline void sbi_platform_ipi_exit(const struct sbi_platform *plat) -{ - if (plat && sbi_platform_ops(plat)->ipi_exit) - sbi_platform_ops(plat)->ipi_exit(); -} - /** * Initialize the platform timer during cold boot * diff --git a/include/sbi_utils/ipi/fdt_ipi.h b/include/sbi_utils/ipi/fdt_ipi.h index c6245201..161f7a2e 100644 --- a/include/sbi_utils/ipi/fdt_ipi.h +++ b/include/sbi_utils/ipi/fdt_ipi.h @@ -17,18 +17,13 @@ struct fdt_ipi { const struct fdt_match *match_table; int (*cold_init)(const void *fdt, int nodeoff, const struct fdt_match *match); - int (*warm_init)(void); - void (*exit)(void); }; -void fdt_ipi_exit(void); - -int fdt_ipi_init(bool cold_boot); +int fdt_ipi_init(void); #else -static inline void fdt_ipi_exit(void) { } -static inline int fdt_ipi_init(bool cold_boot) { return 0; } +static inline int fdt_ipi_init(void) { return 0; } #endif -- cgit v1.3.1