mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
cpu-hotplug: Provide prototypes for arch CPU registration
Provide common prototypes for arch_register_cpu() and arch_unregister_cpu(). These are called by acpi_processor.c, with weak versions, so the prototype for this is already set. It is generally not necessary for function prototypes to be conditional on preprocessor macros. Some architectures (e.g. Loongarch) are missing the prototype for this, and rather than add it to Loongarch's asm/cpu.h, do the job once for everyone. Since this covers everyone, remove the now unnecessary prototypes in asm/cpu.h, and therefore remove the 'static' from one of ia64's arch_register_cpu() definitions. [ tglx: Bring back the ia64 part and remove the ACPI prototypes ] Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/r/E1qkoRr-0088Q8-Da@rmk-PC.armlinux.org.uk
This commit is contained in:
parent
94f6f0550c
commit
c4dd854f74
7 changed files with 5 additions and 14 deletions
|
@ -15,9 +15,4 @@ DECLARE_PER_CPU(struct ia64_cpu, cpu_devices);
|
|||
|
||||
DECLARE_PER_CPU(int, cpu_state);
|
||||
|
||||
#ifdef CONFIG_HOTPLUG_CPU
|
||||
extern int arch_register_cpu(int num);
|
||||
extern void arch_unregister_cpu(int);
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_IA64_CPU_H_ */
|
||||
|
|
|
@ -59,7 +59,7 @@ void __ref arch_unregister_cpu(int num)
|
|||
}
|
||||
EXPORT_SYMBOL(arch_unregister_cpu);
|
||||
#else
|
||||
static int __init arch_register_cpu(int num)
|
||||
int __init arch_register_cpu(int num)
|
||||
{
|
||||
return register_cpu(&sysfs_cpus[num].cpu, num);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue