Commit 015aa05f authored by Anna-Maria Gleixner's avatar Anna-Maria Gleixner Committed by Ralf Baechle

MIPS: Remove no longer needed work_on_cpu() call

Since commit 3b9d6da6 ("cpu/hotplug: Fix rollback during error-out
in __cpu_disable()") it is ensured that callbacks of CPU_ONLINE and
CPU_DOWN_PREPARE are processed on the hotplugged CPU. Due to this
work_on_cpu() calls are no longer required.

Replace work_on_cpu() with a direct call of mips_cdmm_bus_up() or
mips_cdmm_bus_down(). Description of those functions are adapted.
Signed-off-by: default avatarAnna-Maria Gleixner <anna-maria@linutronix.de>
Cc: linux-mips@linux-mips.org
Cc: linux-kernel@vger.kernel.org
Cc: rt@linutronix.de
Patchwork: https://patchwork.linux-mips.org/patch/13197/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent e8b5325c
...@@ -599,8 +599,8 @@ BUILD_PERDEV_HELPER(cpu_up) /* int mips_cdmm_cpu_up_helper(...) */ ...@@ -599,8 +599,8 @@ BUILD_PERDEV_HELPER(cpu_up) /* int mips_cdmm_cpu_up_helper(...) */
* mips_cdmm_bus_down() - Tear down the CDMM bus. * mips_cdmm_bus_down() - Tear down the CDMM bus.
* @data: Pointer to unsigned int CPU number. * @data: Pointer to unsigned int CPU number.
* *
* This work_on_cpu callback function is executed on a given CPU to call the * This function is executed on the hotplugged CPU and calls the CDMM
* CDMM driver cpu_down callback for all devices on that CPU. * driver cpu_down callback for all devices on that CPU.
*/ */
static long mips_cdmm_bus_down(void *data) static long mips_cdmm_bus_down(void *data)
{ {
...@@ -630,7 +630,9 @@ static long mips_cdmm_bus_down(void *data) ...@@ -630,7 +630,9 @@ static long mips_cdmm_bus_down(void *data)
* CDMM devices on that CPU, or to call the CDMM driver cpu_up callback for all * CDMM devices on that CPU, or to call the CDMM driver cpu_up callback for all
* devices already discovered on that CPU. * devices already discovered on that CPU.
* *
* It is used during initialisation and when CPUs are brought online. * It is used as work_on_cpu callback function during
* initialisation. When CPUs are brought online the function is
* invoked directly on the hotplugged CPU.
*/ */
static long mips_cdmm_bus_up(void *data) static long mips_cdmm_bus_up(void *data)
{ {
...@@ -677,10 +679,10 @@ static int mips_cdmm_cpu_notify(struct notifier_block *nb, ...@@ -677,10 +679,10 @@ static int mips_cdmm_cpu_notify(struct notifier_block *nb,
switch (action & ~CPU_TASKS_FROZEN) { switch (action & ~CPU_TASKS_FROZEN) {
case CPU_ONLINE: case CPU_ONLINE:
case CPU_DOWN_FAILED: case CPU_DOWN_FAILED:
work_on_cpu(cpu, mips_cdmm_bus_up, &cpu); mips_cdmm_bus_up(&cpu);
break; break;
case CPU_DOWN_PREPARE: case CPU_DOWN_PREPARE:
work_on_cpu(cpu, mips_cdmm_bus_down, &cpu); mips_cdmm_bus_down(&cpu);
break; break;
default: default:
return NOTIFY_DONE; return NOTIFY_DONE;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment