Commit e56d82a1 authored by Will Deacon's avatar Will Deacon

arm64: cpu hotplug: ensure we mask out CPU_TASKS_FROZEN in notifiers

We have a couple of CPU hotplug notifiers for resetting the CPU debug
state to a sane value when a CPU comes online.

This patch ensures that we mask out CPU_TASKS_FROZEN so that we don't
miss any online events occuring due to suspend/resume.
Acked-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
parent d10bcd47
...@@ -134,7 +134,7 @@ static int os_lock_notify(struct notifier_block *self, ...@@ -134,7 +134,7 @@ static int os_lock_notify(struct notifier_block *self,
unsigned long action, void *data) unsigned long action, void *data)
{ {
int cpu = (unsigned long)data; int cpu = (unsigned long)data;
if (action == CPU_ONLINE) if ((action & ~CPU_TASKS_FROZEN) == CPU_ONLINE)
smp_call_function_single(cpu, clear_os_lock, NULL, 1); smp_call_function_single(cpu, clear_os_lock, NULL, 1);
return NOTIFY_OK; return NOTIFY_OK;
} }
......
...@@ -872,7 +872,7 @@ static int hw_breakpoint_reset_notify(struct notifier_block *self, ...@@ -872,7 +872,7 @@ static int hw_breakpoint_reset_notify(struct notifier_block *self,
void *hcpu) void *hcpu)
{ {
int cpu = (long)hcpu; int cpu = (long)hcpu;
if (action == CPU_ONLINE) if ((action & ~CPU_TASKS_FROZEN) == CPU_ONLINE)
smp_call_function_single(cpu, hw_breakpoint_reset, NULL, 1); smp_call_function_single(cpu, hw_breakpoint_reset, NULL, 1);
return NOTIFY_OK; return NOTIFY_OK;
} }
......
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