* [PATCH] irqchip/riscv-aplic: Pass context data to syscore callbacks
@ 2025-12-16 10:06 Geert Uytterhoeven
2025-12-16 18:09 ` Thomas Gleixner
0 siblings, 1 reply; 2+ messages in thread
From: Geert Uytterhoeven @ 2025-12-16 10:06 UTC (permalink / raw)
To: Anup Patel, Thomas Gleixner, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Alexandre Ghiti, Yong-Xuan Wang, Cyan Yang, Nutty Liu,
Nick Hu, Thierry Reding, Rafael J . Wysocki
Cc: linux-riscv, linux-kernel, Geert Uytterhoeven
On RISC-V:
drivers/irqchip/irq-riscv-aplic-main.c:111:20: error: initialization of ‘int (*)(void *)’ from incompatible pointer type ‘int (*)(void)’ [-Werror=incompatible-pointer-types]
111 | .suspend = aplic_syscore_suspend,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-riscv-aplic-main.c:111:20: note: (near initialization for ‘aplic_syscore_ops.suspend’)
drivers/irqchip/irq-riscv-aplic-main.c:112:19: error: initialization of ‘void (*)(void *)’ from incompatible pointer type ‘void (*)(void)’ [-Werror=incompatible-pointer-types]
112 | .resume = aplic_syscore_resume,
| ^~~~~~~~~~~~~~~~~~~~
drivers/irqchip/irq-riscv-aplic-main.c:112:19: note: (near initialization for ‘aplic_syscore_ops.resume’)
drivers/irqchip/irq-riscv-aplic-main.c: In function ‘aplic_probe’:
drivers/irqchip/irq-riscv-aplic-main.c:375:17: error: implicit declaration of function ‘register_syscore_ops’; did you mean ‘register_syscore’? [-Werror=implicit-function-declaration]
375 | register_syscore_ops(&aplic_syscore_ops);
| ^~~~~~~~~~~~~~~~~~~~
| register_syscore
Fix this by updating the driver for the syscore API changes in commit
a97fbc3ee3e2a536 ("syscore: Pass context data to callbacks").
Fixes: 1c546bb433618843 ("irqchip/riscv-aplic: Preserve APLIC states across suspend/resume")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
Commit a97fbc3ee3e2a536 is in v6.19-rc1, which is now the base for
irqchip/irq/drivers.
---
drivers/irqchip/irq-riscv-aplic-main.c | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/drivers/irqchip/irq-riscv-aplic-main.c b/drivers/irqchip/irq-riscv-aplic-main.c
index b760942e57f916d8..4495ca26abf5712d 100644
--- a/drivers/irqchip/irq-riscv-aplic-main.c
+++ b/drivers/irqchip/irq-riscv-aplic-main.c
@@ -89,7 +89,7 @@ static void aplic_save_states(struct aplic_priv *priv)
}
}
-static int aplic_syscore_suspend(void)
+static int aplic_syscore_suspend(void *data)
{
struct aplic_priv *priv;
@@ -99,7 +99,7 @@ static int aplic_syscore_suspend(void)
return 0;
}
-static void aplic_syscore_resume(void)
+static void aplic_syscore_resume(void *data)
{
struct aplic_priv *priv;
@@ -112,6 +112,10 @@ static struct syscore_ops aplic_syscore_ops = {
.resume = aplic_syscore_resume,
};
+static struct syscore aplic_syscore = {
+ .ops = &aplic_syscore_ops,
+};
+
static int aplic_pm_notifier(struct notifier_block *nb, unsigned long action, void *data)
{
struct aplic_priv *priv = container_of(nb, struct aplic_priv, genpd_nb);
@@ -372,7 +376,7 @@ static int aplic_probe(struct platform_device *pdev)
dev_err_probe(dev, rc, "failed to setup APLIC in %s mode\n",
msi_mode ? "MSI" : "direct");
else
- register_syscore_ops(&aplic_syscore_ops);
+ register_syscore(&aplic_syscore);
#ifdef CONFIG_ACPI
if (!acpi_disabled)
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] irqchip/riscv-aplic: Pass context data to syscore callbacks
2025-12-16 10:06 [PATCH] irqchip/riscv-aplic: Pass context data to syscore callbacks Geert Uytterhoeven
@ 2025-12-16 18:09 ` Thomas Gleixner
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Gleixner @ 2025-12-16 18:09 UTC (permalink / raw)
To: Geert Uytterhoeven, Anup Patel, Paul Walmsley, Palmer Dabbelt,
Albert Ou, Alexandre Ghiti, Yong-Xuan Wang, Cyan Yang, Nutty Liu,
Nick Hu, Thierry Reding, Rafael J . Wysocki
Cc: linux-riscv, linux-kernel, Geert Uytterhoeven
On Tue, Dec 16 2025 at 11:06, Geert Uytterhoeven wrote:
> Fix this by updating the driver for the syscore API changes in commit
> a97fbc3ee3e2a536 ("syscore: Pass context data to callbacks").
>
> Fixes: 1c546bb433618843 ("irqchip/riscv-aplic: Preserve APLIC states across suspend/resume")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Thanks for fixing this!
I folded it into the offending commit and force pushed the branch.
Thanks,
tglx
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-12-16 18:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-16 10:06 [PATCH] irqchip/riscv-aplic: Pass context data to syscore callbacks Geert Uytterhoeven
2025-12-16 18:09 ` Thomas Gleixner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox