diff options
author | john stultz <johnstul@us.ibm.com> | 2007-07-24 20:47:43 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-25 13:09:20 -0400 |
commit | 2c6b47de17c75d553de3e2fb426d8298d2074585 (patch) | |
tree | c8edc3d727d85cb3e1c043583c350a04a133e1a3 /drivers/s390/net/ctcmain.c | |
parent | 0de085bb474f64e4fdb2f1ff3268590792648c7b (diff) |
Cleanup non-arch xtime uses, use get_seconds() or current_kernel_time().
This avoids use of the kernel-internal "xtime" variable directly outside
of the actual time-related functions. Instead, use the helper functions
that we already have available to us.
This doesn't actually change any behaviour, but this will allow us to
fix the fact that "xtime" isn't updated very often with CONFIG_NO_HZ
(because much of the realtime information is maintained as separate
offsets to 'xtime'), which has caused interfaces that use xtime directly
to get a time that is out of sync with the real-time clock by up to a
third of a second or so.
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/s390/net/ctcmain.c')
-rw-r--r-- | drivers/s390/net/ctcmain.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/s390/net/ctcmain.c b/drivers/s390/net/ctcmain.c index b20fd0681733..92e8a37b5022 100644 --- a/drivers/s390/net/ctcmain.c +++ b/drivers/s390/net/ctcmain.c | |||
@@ -674,7 +674,7 @@ ch_action_txdone(fsm_instance * fi, int event, void *arg) | |||
674 | int first = 1; | 674 | int first = 1; |
675 | int i; | 675 | int i; |
676 | unsigned long duration; | 676 | unsigned long duration; |
677 | struct timespec done_stamp = xtime; | 677 | struct timespec done_stamp = current_kernel_time(); |
678 | 678 | ||
679 | DBF_TEXT(trace, 4, __FUNCTION__); | 679 | DBF_TEXT(trace, 4, __FUNCTION__); |
680 | 680 | ||
@@ -730,7 +730,7 @@ ch_action_txdone(fsm_instance * fi, int event, void *arg) | |||
730 | spin_unlock(&ch->collect_lock); | 730 | spin_unlock(&ch->collect_lock); |
731 | ch->ccw[1].count = ch->trans_skb->len; | 731 | ch->ccw[1].count = ch->trans_skb->len; |
732 | fsm_addtimer(&ch->timer, CTC_TIMEOUT_5SEC, CH_EVENT_TIMER, ch); | 732 | fsm_addtimer(&ch->timer, CTC_TIMEOUT_5SEC, CH_EVENT_TIMER, ch); |
733 | ch->prof.send_stamp = xtime; | 733 | ch->prof.send_stamp = current_kernel_time(); |
734 | rc = ccw_device_start(ch->cdev, &ch->ccw[0], | 734 | rc = ccw_device_start(ch->cdev, &ch->ccw[0], |
735 | (unsigned long) ch, 0xff, 0); | 735 | (unsigned long) ch, 0xff, 0); |
736 | ch->prof.doios_multi++; | 736 | ch->prof.doios_multi++; |
@@ -2281,7 +2281,7 @@ transmit_skb(struct channel *ch, struct sk_buff *skb) | |||
2281 | fsm_newstate(ch->fsm, CH_STATE_TX); | 2281 | fsm_newstate(ch->fsm, CH_STATE_TX); |
2282 | fsm_addtimer(&ch->timer, CTC_TIMEOUT_5SEC, CH_EVENT_TIMER, ch); | 2282 | fsm_addtimer(&ch->timer, CTC_TIMEOUT_5SEC, CH_EVENT_TIMER, ch); |
2283 | spin_lock_irqsave(get_ccwdev_lock(ch->cdev), saveflags); | 2283 | spin_lock_irqsave(get_ccwdev_lock(ch->cdev), saveflags); |
2284 | ch->prof.send_stamp = xtime; | 2284 | ch->prof.send_stamp = current_kernel_time(); |
2285 | rc = ccw_device_start(ch->cdev, &ch->ccw[ccw_idx], | 2285 | rc = ccw_device_start(ch->cdev, &ch->ccw[ccw_idx], |
2286 | (unsigned long) ch, 0xff, 0); | 2286 | (unsigned long) ch, 0xff, 0); |
2287 | spin_unlock_irqrestore(get_ccwdev_lock(ch->cdev), saveflags); | 2287 | spin_unlock_irqrestore(get_ccwdev_lock(ch->cdev), saveflags); |