瀏覽代碼

x86/apb/timer: Use proper mask to modify hotplug action

Magic hex constants are a guarantee for wreckage when the defines change.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Thomas Gleixner 9 年之前
父節點
當前提交
a38f98735e
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      arch/x86/kernel/apb_timer.c

+ 1 - 1
arch/x86/kernel/apb_timer.c

@@ -221,7 +221,7 @@ static int apbt_cpuhp_notify(struct notifier_block *n,
 	unsigned long cpu = (unsigned long)hcpu;
 	struct apbt_dev *adev = &per_cpu(cpu_apbt_dev, cpu);
 
-	switch (action & 0xf) {
+	switch (action & ~CPU_TASKS_FROZEN) {
 	case CPU_DEAD:
 		dw_apb_clockevent_pause(adev->timer);
 		if (system_state == SYSTEM_RUNNING) {