Skip to content

Commit 424ef01

Browse files
rnavmpe
authored andcommitted
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: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent d103978 commit 424ef01

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

arch/powerpc/kernel/smp.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1166,6 +1166,8 @@ int __cpu_disable(void)
11661166
if (!smp_ops->cpu_disable)
11671167
return -ENOSYS;
11681168

1169+
this_cpu_disable_ftrace();
1170+
11691171
err = smp_ops->cpu_disable();
11701172
if (err)
11711173
return err;
@@ -1184,6 +1186,12 @@ void __cpu_die(unsigned int cpu)
11841186

11851187
void cpu_die(void)
11861188
{
1189+
/*
1190+
* Disable on the down path. This will be re-enabled by
1191+
* start_secondary() via start_secondary_resume() below
1192+
*/
1193+
this_cpu_disable_ftrace();
1194+
11871195
if (ppc_md.cpu_die)
11881196
ppc_md.cpu_die();
11891197

0 commit comments

Comments
 (0)