mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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>
This commit is contained in:
parent
d103978636
commit
424ef0160f
1 changed files with 8 additions and 0 deletions
|
@ -1166,6 +1166,8 @@ int __cpu_disable(void)
|
||||||
if (!smp_ops->cpu_disable)
|
if (!smp_ops->cpu_disable)
|
||||||
return -ENOSYS;
|
return -ENOSYS;
|
||||||
|
|
||||||
|
this_cpu_disable_ftrace();
|
||||||
|
|
||||||
err = smp_ops->cpu_disable();
|
err = smp_ops->cpu_disable();
|
||||||
if (err)
|
if (err)
|
||||||
return err;
|
return err;
|
||||||
|
@ -1184,6 +1186,12 @@ void __cpu_die(unsigned int cpu)
|
||||||
|
|
||||||
void cpu_die(void)
|
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)
|
if (ppc_md.cpu_die)
|
||||||
ppc_md.cpu_die();
|
ppc_md.cpu_die();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue