aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/lib/delay.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/lib/delay.c')
-rw-r--r--arch/s390/lib/delay.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/s390/lib/delay.c b/arch/s390/lib/delay.c
index 42d0cf89121d..c61b9fad43cc 100644
--- a/arch/s390/lib/delay.c
+++ b/arch/s390/lib/delay.c
@@ -32,7 +32,7 @@ static void __udelay_disabled(unsigned long long usecs)
32 unsigned long cr0, cr6, new; 32 unsigned long cr0, cr6, new;
33 u64 clock_saved, end; 33 u64 clock_saved, end;
34 34
35 end = get_clock() + (usecs << 12); 35 end = get_tod_clock() + (usecs << 12);
36 clock_saved = local_tick_disable(); 36 clock_saved = local_tick_disable();
37 __ctl_store(cr0, 0, 0); 37 __ctl_store(cr0, 0, 0);
38 __ctl_store(cr6, 6, 6); 38 __ctl_store(cr6, 6, 6);
@@ -45,7 +45,7 @@ static void __udelay_disabled(unsigned long long usecs)
45 set_clock_comparator(end); 45 set_clock_comparator(end);
46 vtime_stop_cpu(); 46 vtime_stop_cpu();
47 local_irq_disable(); 47 local_irq_disable();
48 } while (get_clock() < end); 48 } while (get_tod_clock() < end);
49 lockdep_on(); 49 lockdep_on();
50 __ctl_load(cr0, 0, 0); 50 __ctl_load(cr0, 0, 0);
51 __ctl_load(cr6, 6, 6); 51 __ctl_load(cr6, 6, 6);
@@ -56,7 +56,7 @@ static void __udelay_enabled(unsigned long long usecs)
56{ 56{
57 u64 clock_saved, end; 57 u64 clock_saved, end;
58 58
59 end = get_clock() + (usecs << 12); 59 end = get_tod_clock() + (usecs << 12);
60 do { 60 do {
61 clock_saved = 0; 61 clock_saved = 0;
62 if (end < S390_lowcore.clock_comparator) { 62 if (end < S390_lowcore.clock_comparator) {
@@ -67,7 +67,7 @@ static void __udelay_enabled(unsigned long long usecs)
67 local_irq_disable(); 67 local_irq_disable();
68 if (clock_saved) 68 if (clock_saved)
69 local_tick_enable(clock_saved); 69 local_tick_enable(clock_saved);
70 } while (get_clock() < end); 70 } while (get_tod_clock() < end);
71} 71}
72 72
73/* 73/*
@@ -111,8 +111,8 @@ void udelay_simple(unsigned long long usecs)
111{ 111{
112 u64 end; 112 u64 end;
113 113
114 end = get_clock() + (usecs << 12); 114 end = get_tod_clock() + (usecs << 12);
115 while (get_clock() < end) 115 while (get_tod_clock() < end)
116 cpu_relax(); 116 cpu_relax();
117} 117}
118 118
@@ -122,10 +122,10 @@ void __ndelay(unsigned long long nsecs)
122 122
123 nsecs <<= 9; 123 nsecs <<= 9;
124 do_div(nsecs, 125); 124 do_div(nsecs, 125);
125 end = get_clock() + nsecs; 125 end = get_tod_clock() + nsecs;
126 if (nsecs & ~0xfffUL) 126 if (nsecs & ~0xfffUL)
127 __udelay(nsecs >> 12); 127 __udelay(nsecs >> 12);
128 while (get_clock() < end) 128 while (get_tod_clock() < end)
129 barrier(); 129 barrier();
130} 130}
131EXPORT_SYMBOL(__ndelay); 131EXPORT_SYMBOL(__ndelay);