aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include/linux/cpu.h
diff options
context:
space:
mode:
authorRussell King (Oracle) <rmk+kernel@armlinux.org.uk>2023-09-25 17:28:39 +0100
committerThomas Gleixner <tglx@linutronix.de>2023-10-11 14:27:37 +0200
commitc4dd854f740c21ae8dd9903fc67969c5497cb14b (patch)
treef2aac9f62d503cf284d5c22ba931880ac603f684 /include/linux/cpu.h
parentLinux 6.6-rc5 (diff)
downloadwireguard-linux-c4dd854f740c21ae8dd9903fc67969c5497cb14b.tar.xz
wireguard-linux-c4dd854f740c21ae8dd9903fc67969c5497cb14b.zip
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
Diffstat (limited to 'include/linux/cpu.h')
-rw-r--r--include/linux/cpu.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index 0abd60a7987b..eb768a866fe3 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -80,6 +80,8 @@ extern __printf(4, 5)
struct device *cpu_device_create(struct device *parent, void *drvdata,
const struct attribute_group **groups,
const char *fmt, ...);
+extern int arch_register_cpu(int cpu);
+extern void arch_unregister_cpu(int cpu);
#ifdef CONFIG_HOTPLUG_CPU
extern void unregister_cpu(struct cpu *cpu);
extern ssize_t arch_cpu_probe(const char *, size_t);