Skip to contentSkip to conversation

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

PATCH New Will Deacon 2 participants 2 messages Sep 14, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---
 arch/arm64/kernel/debug-monitors.c | 2 +-
 arch/arm64/kernel/hw_breakpoint.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
arch/arm64/kernel/debug-monitors.c +1 -1
index 9b3b62ac9c24..cebf78661a55 100644
@@ -134,7 +134,7 @@ static int os_lock_notify(struct notifier_block *self,
 				    unsigned long action, void *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);
 	return NOTIFY_OK;
 }
arch/arm64/kernel/hw_breakpoint.c +1 -1
index 565244fd57ff..2926c3dd6479 100644
@@ -878,7 +878,7 @@ static int hw_breakpoint_reset_notify(struct notifier_block *self,
 						void *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);
 	return NOTIFY_OK;
 }
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 arm64: cpu hotplug: ensure we mask out CPU_TASKS_FROZEN in notifiers

Quoted 11 lines · Will Deacon

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.

---
 arch/arm64/kernel/debug-monitors.c | 2 +-
 arch/arm64/kernel/hw_breakpoint.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Quoted 30 lines
arch/arm64/kernel/debug-monitors.c +1 -1
index 9b3b62ac9c24..cebf78661a55 100644
@@ -134,7 +134,7 @@ static int os_lock_notify(struct notifier_block *self,
 				    unsigned long action, void *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);
 	return NOTIFY_OK;
 }
arch/arm64/kernel/hw_breakpoint.c +1 -1
index 565244fd57ff..2926c3dd6479 100644
@@ -878,7 +878,7 @@ static int hw_breakpoint_reset_notify(struct notifier_block *self,
 						void *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);
 	return NOTIFY_OK;
 }
Signature · 1 line
2.1.4