diff options
| author | Gou Hao <gouhao@uniontech.com> | 2026-07-27 18:42:12 +0800 |
|---|---|---|
| committer | Madhavan Srinivasan <maddy@linux.ibm.com> | 2026-08-03 13:55:59 +0530 |
| commit | ab5ae5dceb86614f6c9e7488f91b652000edfdc5 (patch) | |
| tree | b0418446c1585cd298fd0f157c0017a88a50707e | |
| parent | f068fca7e8b7014014296b0e458ba9c5aa77f954 (diff) | |
| download | linux-ab5ae5dceb86614f6c9e7488f91b652000edfdc5.tar.gz linux-ab5ae5dceb86614f6c9e7488f91b652000edfdc5.zip | |
powerpc/xive: add error return value to xive_smp_probe()
xive_smp_probe() calls xive_init_ipis() which can fail, but its
return value is currently ignored. Change xive_smp_probe() to
return int so that errors can be propagated to callers.
This is a preparatory patch for the next one.
No functional change yet; the return value is always 0 at this point.
Signed-off-by: Gou Hao <gouhao@uniontech.com>
Reviewed-by: Wentao Guan <guanwentao@uniontech.com>
Reviewed-by: jiazhenyuan <jiazhenyuan@uniontech.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20260727104215.184786-3-gouhao@uniontech.com
| -rw-r--r-- | arch/powerpc/include/asm/xive.h | 4 | ||||
| -rw-r--r-- | arch/powerpc/sysdev/xive/common.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/arch/powerpc/include/asm/xive.h b/arch/powerpc/include/asm/xive.h index efb0f5effcc6..4e3e3358993c 100644 --- a/arch/powerpc/include/asm/xive.h +++ b/arch/powerpc/include/asm/xive.h @@ -91,7 +91,7 @@ static inline bool xive_enabled(void) { return __xive_enabled; } bool xive_spapr_init(void); bool xive_native_init(void); -void xive_smp_probe(void); +int xive_smp_probe(void); int xive_smp_prepare_cpu(unsigned int cpu); void xive_smp_setup_cpu(void); void xive_smp_disable_cpu(void); @@ -153,7 +153,7 @@ static inline bool xive_enabled(void) { return false; } static inline bool xive_spapr_init(void) { return false; } static inline bool xive_native_init(void) { return false; } -static inline void xive_smp_probe(void) { } +static inline int xive_smp_probe(void) { return -EINVAL; } static inline int xive_smp_prepare_cpu(unsigned int cpu) { return -EINVAL; } static inline void xive_smp_setup_cpu(void) { } static inline void xive_smp_disable_cpu(void) { } diff --git a/arch/powerpc/sysdev/xive/common.c b/arch/powerpc/sysdev/xive/common.c index 86c78af1f68e..9f80c16be23f 100644 --- a/arch/powerpc/sysdev/xive/common.c +++ b/arch/powerpc/sysdev/xive/common.c @@ -1265,7 +1265,7 @@ noinstr static void xive_cleanup_cpu_ipi(unsigned int cpu, struct xive_cpu *xc) xive_ops->put_ipi(cpu, xc); } -void __init xive_smp_probe(void) +int __init xive_smp_probe(void) { smp_ops->cause_ipi = xive_cause_ipi; @@ -1274,6 +1274,8 @@ void __init xive_smp_probe(void) /* Allocate and setup IPI for the boot CPU */ xive_setup_cpu_ipi(smp_processor_id()); + + return 0; } #endif /* CONFIG_SMP */ |
