From: Linus Torvalds <torvalds@linux-foundation.org>
Date: Tue, 31 Mar 2020 01:06:39 +0000 (-0700)
Subject: Merge tag 'smp-core-2020-03-30' of git://git.kernel.org/pub/scm/linux/kernel/git... 
X-Git-Tag: v5.7-rc1~176
X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=992a1a3b45b5c0b6e69ecc2a3f32b0d02da28d58;p=users%2Fwilly%2Flinux.git

Merge tag 'smp-core-2020-03-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull core SMP updates from Thomas Gleixner:
 "CPU (hotplug) updates:

   - Support for locked CSD objects in smp_call_function_single_async()
     which allows to simplify callsites in the scheduler core and MIPS

   - Treewide consolidation of CPU hotplug functions which ensures the
     consistency between the sysfs interface and kernel state. The low
     level functions cpu_up/down() are now confined to the core code and
     not longer accessible from random code"

* tag 'smp-core-2020-03-30' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (22 commits)
  cpu/hotplug: Ignore pm_wakeup_pending() for disable_nonboot_cpus()
  cpu/hotplug: Hide cpu_up/down()
  cpu/hotplug: Move bringup of secondary CPUs out of smp_init()
  torture: Replace cpu_up/down() with add/remove_cpu()
  firmware: psci: Replace cpu_up/down() with add/remove_cpu()
  xen/cpuhotplug: Replace cpu_up/down() with device_online/offline()
  parisc: Replace cpu_up/down() with add/remove_cpu()
  sparc: Replace cpu_up/down() with add/remove_cpu()
  powerpc: Replace cpu_up/down() with add/remove_cpu()
  x86/smp: Replace cpu_up/down() with add/remove_cpu()
  arm64: hibernate: Use bringup_hibernate_cpu()
  cpu/hotplug: Provide bringup_hibernate_cpu()
  arm64: Use reboot_cpu instead of hardconding it to 0
  arm64: Don't use disable_nonboot_cpus()
  ARM: Use reboot_cpu instead of hardcoding it to 0
  ARM: Don't use disable_nonboot_cpus()
  ia64: Replace cpu_down() with smp_shutdown_nonboot_cpus()
  cpu/hotplug: Create a new function to shutdown nonboot cpus
  cpu/hotplug: Add new {add,remove}_cpu() functions
  sched/core: Remove rq.hrtick_csd_pending
  ...
---

992a1a3b45b5c0b6e69ecc2a3f32b0d02da28d58
diff --cc kernel/torture.c
index 8683375dc0c7,a479689eac73..a1a41484ff6d
--- a/kernel/torture.c
+++ b/kernel/torture.c
@@@ -101,18 -97,12 +101,18 @@@ bool torture_offline(int cpu, long *n_o
  			 torture_type, cpu);
  	starttime = jiffies;
  	(*n_offl_attempts)++;
- 	ret = cpu_down(cpu);
+ 	ret = remove_cpu(cpu);
  	if (ret) {
 +		s = "";
 +		if (!rcu_inkernel_boot_has_ended() && ret == -EBUSY) {
 +			// PCI probe frequently disables hotplug during boot.
 +			(*n_offl_attempts)--;
 +			s = " (-EBUSY forgiven during boot)";
 +		}
  		if (verbose)
  			pr_alert("%s" TORTURE_FLAG
 -				 "torture_onoff task: offline %d failed: errno %d\n",
 -				 torture_type, cpu, ret);
 +				 "torture_onoff task: offline %d failed%s: errno %d\n",
 +				 torture_type, cpu, s, ret);
  	} else {
  		if (verbose > 1)
  			pr_alert("%s" TORTURE_FLAG
@@@ -159,18 -148,12 +159,18 @@@ bool torture_online(int cpu, long *n_on
  			 torture_type, cpu);
  	starttime = jiffies;
  	(*n_onl_attempts)++;
- 	ret = cpu_up(cpu);
+ 	ret = add_cpu(cpu);
  	if (ret) {
 +		s = "";
 +		if (!rcu_inkernel_boot_has_ended() && ret == -EBUSY) {
 +			// PCI probe frequently disables hotplug during boot.
 +			(*n_onl_attempts)--;
 +			s = " (-EBUSY forgiven during boot)";
 +		}
  		if (verbose)
  			pr_alert("%s" TORTURE_FLAG
 -				 "torture_onoff task: online %d failed: errno %d\n",
 -				 torture_type, cpu, ret);
 +				 "torture_onoff task: online %d failed%s: errno %d\n",
 +				 torture_type, cpu, s, ret);
  	} else {
  		if (verbose > 1)
  			pr_alert("%s" TORTURE_FLAG