Commit 424ef016 authored by Naveen N. Rao's avatar Naveen N. Rao Committed by Michael Ellerman

powerpc64/ftrace: Disable ftrace during hotplug

Disable ftrace when a cpu is about to go offline. When the cpu is woken
up, ftrace will get enabled in start_secondary().
Signed-off-by: default avatarNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent d1039786
......@@ -1166,6 +1166,8 @@ int __cpu_disable(void)
if (!smp_ops->cpu_disable)
return -ENOSYS;
this_cpu_disable_ftrace();
err = smp_ops->cpu_disable();
if (err)
return err;
......@@ -1184,6 +1186,12 @@ void __cpu_die(unsigned int cpu)
void cpu_die(void)
{
/*
* Disable on the down path. This will be re-enabled by
* start_secondary() via start_secondary_resume() below
*/
this_cpu_disable_ftrace();
if (ppc_md.cpu_die)
ppc_md.cpu_die();
......
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