Skip to content

Commit

Permalink
powerpc64/ftrace: Disable ftrace during hotplug
Browse files Browse the repository at this point in the history
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: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
  • Loading branch information
Naveen N. Rao authored and Michael Ellerman committed May 3, 2018
1 parent d103978 commit 424ef01
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions arch/powerpc/kernel/smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();

Expand Down

0 comments on commit 424ef01

Please sign in to comment.