Commit 90f5e8c5 authored by James Morse's avatar James Morse Committed by liwei
Browse files

LoongArch: Use the __weak version of arch_unregister_cpu()

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


CVE: NA

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

LoongArch provides its own arch_unregister_cpu(). This clears the
hotpluggable flag, then unregisters the CPU.

It isn't necessary to clear the hotpluggable flag when unregistering
a cpu. unregister_cpu() writes NULL to the percpu cpu_sys_devices
pointer, meaning cpu_is_hotpluggable() will return false, as
get_cpu_device() has returned NULL.

Remove arch_unregister_cpu() and use the __weak version.

Signed-off-by: default avatarJames Morse <james.morse@arm.com>
Reviewed-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.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 avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/E1r5R46-00Ct0A-GJ@rmk-PC.armlinux.org.uk


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