diff options
Diffstat (limited to 'arch/s390/lib/delay.c')
-rw-r--r-- | arch/s390/lib/delay.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/arch/s390/lib/delay.c b/arch/s390/lib/delay.c index 70f2a862b670..eae21a8ac72d 100644 --- a/arch/s390/lib/delay.c +++ b/arch/s390/lib/delay.c | |||
@@ -34,7 +34,7 @@ void __delay(unsigned long loops) | |||
34 | */ | 34 | */ |
35 | void __udelay(unsigned long usecs) | 35 | void __udelay(unsigned long usecs) |
36 | { | 36 | { |
37 | u64 end, time, jiffy_timer = 0; | 37 | u64 end, time, old_cc = 0; |
38 | unsigned long flags, cr0, mask, dummy; | 38 | unsigned long flags, cr0, mask, dummy; |
39 | int irq_context; | 39 | int irq_context; |
40 | 40 | ||
@@ -43,8 +43,8 @@ void __udelay(unsigned long usecs) | |||
43 | local_bh_disable(); | 43 | local_bh_disable(); |
44 | local_irq_save(flags); | 44 | local_irq_save(flags); |
45 | if (raw_irqs_disabled_flags(flags)) { | 45 | if (raw_irqs_disabled_flags(flags)) { |
46 | jiffy_timer = S390_lowcore.jiffy_timer; | 46 | old_cc = S390_lowcore.clock_comparator; |
47 | S390_lowcore.jiffy_timer = -1ULL - (4096 << 12); | 47 | S390_lowcore.clock_comparator = -1ULL; |
48 | __ctl_store(cr0, 0, 0); | 48 | __ctl_store(cr0, 0, 0); |
49 | dummy = (cr0 & 0xffff00e0) | 0x00000800; | 49 | dummy = (cr0 & 0xffff00e0) | 0x00000800; |
50 | __ctl_load(dummy , 0, 0); | 50 | __ctl_load(dummy , 0, 0); |
@@ -55,8 +55,8 @@ void __udelay(unsigned long usecs) | |||
55 | 55 | ||
56 | end = get_clock() + ((u64) usecs << 12); | 56 | end = get_clock() + ((u64) usecs << 12); |
57 | do { | 57 | do { |
58 | time = end < S390_lowcore.jiffy_timer ? | 58 | time = end < S390_lowcore.clock_comparator ? |
59 | end : S390_lowcore.jiffy_timer; | 59 | end : S390_lowcore.clock_comparator; |
60 | set_clock_comparator(time); | 60 | set_clock_comparator(time); |
61 | trace_hardirqs_on(); | 61 | trace_hardirqs_on(); |
62 | __load_psw_mask(mask); | 62 | __load_psw_mask(mask); |
@@ -65,10 +65,10 @@ void __udelay(unsigned long usecs) | |||
65 | 65 | ||
66 | if (raw_irqs_disabled_flags(flags)) { | 66 | if (raw_irqs_disabled_flags(flags)) { |
67 | __ctl_load(cr0, 0, 0); | 67 | __ctl_load(cr0, 0, 0); |
68 | S390_lowcore.jiffy_timer = jiffy_timer; | 68 | S390_lowcore.clock_comparator = old_cc; |
69 | } | 69 | } |
70 | if (!irq_context) | 70 | if (!irq_context) |
71 | _local_bh_enable(); | 71 | _local_bh_enable(); |
72 | set_clock_comparator(S390_lowcore.jiffy_timer); | 72 | set_clock_comparator(S390_lowcore.clock_comparator); |
73 | local_irq_restore(flags); | 73 | local_irq_restore(flags); |
74 | } | 74 | } |