Skip to contentSkip to conversation

sched: Use local_irq_save_nmi() in cpu_clock()

PATCH In review David Miller 1 participant 1 message Apr 9, 2010 Generic include/asm header files

lore
Share & tools
lore
#0 lore raw

PATCH 3/4 sched: Use local_irq_save_nmi() in cpu_clock()

Since we can call cpu_clock() from NMI context fix up the IRQ disabling to conform to the new rules.

---
 kernel/sched_clock.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
kernel/sched_clock.c +2 -2
index 5b49613..ef159ee 100644
@@ -241,9 +241,9 @@ unsigned long long cpu_clock(int cpu)
 	unsigned long long clock;
 	unsigned long flags;
 
-	local_irq_save(flags);
+	local_irq_save_nmi(flags);
 	clock = sched_clock_cpu(cpu);
-	local_irq_restore(flags);
+	local_irq_restore_nmi(flags);
 
 	return clock;
 }
Signature · 1 line
1.7.0.4