--- v1
+++ v2
@@ -1,3 +1,13 @@
+Changes in v2:
+ * Add 2 new patches that create smp_shutdown_nonboot_cpus() to be used
+ in machine_shutdown() in ia64, arm and arm64
+ * Use proper kernel-doc for the newly introduced functions
+ * Renamed a function
+ * Removed a stale comment in a function
+ * Rebased on top of 5.4-rc8
+
+ git clone git://linux-arm.org/linux-qy.git -b cpu-hp-cleanup-v2
+
Using cpu_up/down directly to bring cpus online/offline loses synchronization
with sysfs and could suffer from a race similar to what is described in
commit a6717c01ddc2 ("powerpc/rtas: use device model APIs and serialization
@@ -13,10 +23,6 @@
converts the remaining users and hides cpu_up/down from internal users at the
end.
-I still need to update the documentation to remove references to cpu_up/down
-and advocate for device_online/offline instead if this series will make its way
-through.
-
I noticed this problem while working on a hack to disable offlining
a particular CPU but noticed that setting the offline_disabled attribute in the
device struct isn't enough because users can easily bypass the device core.
@@ -24,11 +30,10 @@
the way cpus are being onlined/offlined and this attempt hopefully improves on
this.
-The first 6 patches fixes arch users.
+The first 8 patches fix arch users.
-The next 5 patches fixes generic code users. Particularly creating a new
+The remaining 6 patches fix generic code users. Particularly creating a new
special exported API for the device core to use instead of cpu_up/down.
-Maybe we can do something more restrictive than that.
The last patch removes cpu_up/down from cpu.h and unexport the functions.
@@ -36,8 +41,9 @@
the logic in a higher level - special purposed function; and converted the code
to use that instead.
-I did run the rcu torture, lock torture and psci checker tests and no problem
-was noticed. I did perform build tests on all arch affected except for parisc.
+I did re-run the rcu torture, lock torture and psci checker tests and no
+problem was noticed. I did perform build tests on all arch affected except for
+parisc.
Hopefully I got the CC list right for all the patches. Apologies in advance if
some people were omitted from some patches but they should have been CCed.
@@ -77,6 +83,7 @@
CC: "Rafael J. Wysocki" <rafael@kernel.org>
CC: Ram Pai <linuxram@us.ibm.com>
CC: Richard Fontana <rfontana@redhat.com>
+CC: Russell King <linux@armlinux.org.uk>
CC: Sakari Ailus <sakari.ailus@linux.intel.com>
CC: Stefano Stabellini <sstabellini@kernel.org>
CC: Steve Capper <steve.capper@arm.com>
@@ -95,11 +102,13 @@
CC: xen-devel@lists.xenproject.org
-Qais Yousef (12):
+Qais Yousef (14):
+ smp: create a new function to shutdown nonboot cpus
+ ia64: Replace cpu_down with smp_shutdown_nonboot_cpus()
+ arm: arm64: Don't use disable_nonboot_cpus()
arm64: hibernate.c: create a new function to handle cpu_up(sleep_cpu)
x86: Replace cpu_up/down with devcie_online/offline
powerpc: Replace cpu_up/down with device_online/offline
- ia64: Replace cpu_down with freeze_secondary_cpus
sparc: Replace cpu_up/down with device_online/offline
parisc: Replace cpu_up/down with device_online/offline
driver: base: cpu: export device_online/offline
@@ -109,23 +118,25 @@
smp: Create a new function to bringup nonboot cpus online
cpu: Hide cpu_up/down
- arch/arm64/kernel/hibernate.c | 13 +++----
- arch/ia64/kernel/process.c | 8 +---
+ arch/arm/kernel/reboot.c | 4 +-
+ arch/arm64/kernel/hibernate.c | 13 ++--
+ arch/arm64/kernel/process.c | 4 +-
+ arch/ia64/kernel/process.c | 8 +--
arch/parisc/kernel/processor.c | 4 +-
arch/powerpc/kernel/machine_kexec_64.c | 4 +-
- arch/sparc/kernel/ds.c | 8 +++-
+ arch/sparc/kernel/ds.c | 8 ++-
arch/x86/kernel/topology.c | 4 +-
- arch/x86/mm/mmio-mod.c | 8 +++-
+ arch/x86/mm/mmio-mod.c | 8 ++-
arch/x86/xen/smp.c | 4 +-
drivers/base/core.c | 4 ++
drivers/base/cpu.c | 4 +-
- drivers/firmware/psci/psci_checker.c | 6 ++-
+ drivers/firmware/psci/psci_checker.c | 6 +-
drivers/xen/cpu_hotplug.c | 2 +-
- include/linux/cpu.h | 6 ++-
- kernel/cpu.c | 53 ++++++++++++++++++++++++--
- kernel/smp.c | 9 +----
- kernel/torture.c | 15 ++++++--
- 16 files changed, 106 insertions(+), 46 deletions(-)
+ include/linux/cpu.h | 8 ++-
+ kernel/cpu.c | 85 ++++++++++++++++++++++++--
+ kernel/smp.c | 9 +--
+ kernel/torture.c | 15 +++--
+ 18 files changed, 143 insertions(+), 51 deletions(-)
--
2.17.1