From: Peter Zijlstra Date: Fri, 10 Sep 2010 20:32:53 +0000 (+0200) Subject: x86, tsc: Fix a preemption leak in restore_sched_clock_state() X-Git-Tag: firefly_0821_release~9833^2~534^2 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=55496c896b8a695140045099d4e0175cf09d4eae;p=firefly-linux-kernel-4.4.55.git x86, tsc: Fix a preemption leak in restore_sched_clock_state() Doh, a real life genuine preemption leak.. This caused a suspend failure. Reported-bisected-and-tested-by-the-invaluable: Jeff Chua Acked-by: Suresh Siddha Signed-off-by: Peter Zijlstra Cc: Rafael J. Wysocki Cc: Nico Schottelius Cc: Jesse Barnes Cc: Linus Torvalds Cc: Florian Pritz Cc: Suresh Siddha Cc: Len Brown Cc: # Greg, please apply after: cd7240c ("x86, tsc, sched: Recompute cyc2ns_offset's during resume from") sleep states LKML-Reference: <1284150773.402.122.camel@laptop> Signed-off-by: Ingo Molnar --- diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c index d632934cb638..26a863a9c2a8 100644 --- a/arch/x86/kernel/tsc.c +++ b/arch/x86/kernel/tsc.c @@ -655,7 +655,7 @@ void restore_sched_clock_state(void) local_irq_save(flags); - get_cpu_var(cyc2ns_offset) = 0; + __get_cpu_var(cyc2ns_offset) = 0; offset = cyc2ns_suspend - sched_clock(); for_each_possible_cpu(cpu)