[RFC PATCH v2 01/35] ACPI: Move ACPI_HOTPLUG_CPU to be disabled on arm64 and riscv

Russell King (Oracle) linux at armlinux.org.uk
Thu Sep 14 01:54:56 PDT 2023


On Wed, Sep 13, 2023 at 04:37:49PM +0000, James Morse wrote:
> diff --git a/arch/loongarch/include/asm/cpu.h b/arch/loongarch/include/asm/cpu.h
> index 48b9f7168bcc..7afe8cbb844e 100644
> --- a/arch/loongarch/include/asm/cpu.h
> +++ b/arch/loongarch/include/asm/cpu.h
> @@ -128,4 +128,11 @@ enum cpu_type_enum {
>  #define LOONGARCH_CPU_HYPERVISOR	BIT_ULL(CPU_FEATURE_HYPERVISOR)
>  #define LOONGARCH_CPU_PTW		BIT_ULL(CPU_FEATURE_PTW)
>  
> +#if !defined(__ASSEMBLY__)
> +#ifdef CONFIG_HOTPLUG_CPU
> +int arch_register_cpu(int num);
> +void arch_unregister_cpu(int cpu);
> +#endif
> +#endif /* ! __ASSEMBLY__ */

So, for loongarch:

grep arch_.*register_cpu arch/loongarch/ -r
arch/loongarch/kernel/topology.c:int arch_register_cpu(int cpu)
arch/loongarch/kernel/topology.c:EXPORT_SYMBOL(arch_register_cpu);
arch/loongarch/kernel/topology.c:void arch_unregister_cpu(int cpu)
arch/loongarch/kernel/topology.c:EXPORT_SYMBOL(arch_unregister_cpu);

So really this is a fix (since these functions should have prototypes)
and thus should probably be a separate patch.

However, I also wonder whether these prototypes should be added to
linux/cpu.h and be done with it (rather than have every arch prototype
these - it's not like the prototype can be different from this because
of the generic code.

I know in subsequent patches you do that, but it's rather piecemeal,
and I think this is a change that could be submitted now as both a
fix and clean up.

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!



More information about the linux-riscv mailing list