[S390] time: let local_tick_enable/disable() reprogram the clock comparator
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 5 Jan 2011 11:47:27 +0000 (12:47 +0100)
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>
Wed, 5 Jan 2011 11:47:25 +0000 (12:47 +0100)
Let local_tick_enable/disable() reprogram the clock comparator so the
function names make semantically more sense.
Also that way the functions are more symmetric since normally each
local_tick_enable() call usually would have a subsequent call to
set_clock_comparator() anyway.

Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/include/asm/timex.h
arch/s390/lib/delay.c

index 335afc057d3e4f63746e7601e4019780296598d4..88829a40af6f56e4dd67d70ceb289e0fe9faf13b 100644 (file)
@@ -59,12 +59,14 @@ static inline unsigned long long local_tick_disable(void)
 
        old = S390_lowcore.clock_comparator;
        S390_lowcore.clock_comparator = -1ULL;
+       set_clock_comparator(S390_lowcore.clock_comparator);
        return old;
 }
 
 static inline void local_tick_enable(unsigned long long comp)
 {
        S390_lowcore.clock_comparator = comp;
+       set_clock_comparator(S390_lowcore.clock_comparator);
 }
 
 #define CLOCK_TICK_RATE        1193180 /* Underlying HZ */
index 7c37ec359ec29ad40fc2cf47642316ac3cbba8bc..0f53110e1d09a36eb5ab794285d30854abe82a27 100644 (file)
@@ -47,7 +47,6 @@ static void __udelay_disabled(unsigned long long usecs)
        lockdep_on();
        __ctl_load(cr0_saved, 0, 0);
        local_tick_enable(clock_saved);
-       set_clock_comparator(S390_lowcore.clock_comparator);
 }
 
 static void __udelay_enabled(unsigned long long usecs)
@@ -70,7 +69,6 @@ static void __udelay_enabled(unsigned long long usecs)
                if (clock_saved)
                        local_tick_enable(clock_saved);
        } while (get_clock() < end);
-       set_clock_comparator(S390_lowcore.clock_comparator);
 }
 
 /*