Commit 3afe4eef authored by James Morse's avatar James Morse Committed by liwei
Browse files

drivers: base: Allow parts of GENERIC_CPU_DEVICES to be overridden

mainline inclusion
from mainline-v6.8-rc1
commit 0949dd96dffec39683c6066cf8d0877cebc321ec
category: feature
bugzilla: https://gitee.com/openeuler/kernel/issues/I8XMTL


CVE: NA

----------------------------------

Architectures often have extra per-cpu work that needs doing
before a CPU is registered, often to determine if a CPU is
hotpluggable.

To allow the ACPI architectures to use GENERIC_CPU_DEVICES, move
the cpu_register() call into arch_register_cpu(), which is made __weak
so architectures with extra work can override it.
This aligns with the way x86, ia64 and loongarch register hotplug CPUs
when they become present.

Signed-off-by: default avatarJames Morse <james.morse@arm.com>
Reviewed-by: default avatarShaoqin Huang <shahuang@redhat.com>
Reviewed-by: default avatarGavin Shan <gshan@redhat.com>
Signed-off-by: default avatar"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/E1r5R3B-00Csz6-Uh@rmk-PC.armlinux.org.uk


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarliwei <liwei728@huawei.com>
parent 0e3c4782
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment