diff options
author | Jan Glauber <jang@linux.vnet.ibm.com> | 2010-05-17 04:00:17 -0400 |
---|---|---|
committer | Martin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com> | 2010-05-17 04:00:17 -0400 |
commit | 3a601bfef33c82537511c7d970d8010c38aaecd1 (patch) | |
tree | ec5420840b3290ef45b50f11c500f6455a2ce670 /drivers/s390 | |
parent | 5382fe11d90e3ed9602ce655e523852e3dbf3e35 (diff) |
[S390] qdio: dont convert timestamps to microseconds
Don't convert timestamps to microseconds, use timestamps returned by
get_clock() directly.
Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/cio/qdio.h | 9 | ||||
-rw-r--r-- | drivers/s390/cio/qdio_main.c | 8 |
2 files changed, 6 insertions, 11 deletions
diff --git a/drivers/s390/cio/qdio.h b/drivers/s390/cio/qdio.h index da80e9b95e45..f0037eefd44e 100644 --- a/drivers/s390/cio/qdio.h +++ b/drivers/s390/cio/qdio.h | |||
@@ -13,8 +13,8 @@ | |||
13 | #include <asm/debug.h> | 13 | #include <asm/debug.h> |
14 | #include "chsc.h" | 14 | #include "chsc.h" |
15 | 15 | ||
16 | #define QDIO_BUSY_BIT_PATIENCE 100 /* 100 microseconds */ | 16 | #define QDIO_BUSY_BIT_PATIENCE (100 << 12) /* 100 microseconds */ |
17 | #define QDIO_INPUT_THRESHOLD 500 /* 500 microseconds */ | 17 | #define QDIO_INPUT_THRESHOLD (500 << 12) /* 500 microseconds */ |
18 | 18 | ||
19 | /* | 19 | /* |
20 | * if an asynchronous HiperSockets queue runs full, the 10 seconds timer wait | 20 | * if an asynchronous HiperSockets queue runs full, the 10 seconds timer wait |
@@ -370,11 +370,6 @@ static inline int multicast_outbound(struct qdio_q *q) | |||
370 | (q->nr == q->irq_ptr->nr_output_qs - 1); | 370 | (q->nr == q->irq_ptr->nr_output_qs - 1); |
371 | } | 371 | } |
372 | 372 | ||
373 | static inline unsigned long long get_usecs(void) | ||
374 | { | ||
375 | return monotonic_clock() >> 12; | ||
376 | } | ||
377 | |||
378 | #define pci_out_supported(q) \ | 373 | #define pci_out_supported(q) \ |
379 | (q->irq_ptr->qib.ac & QIB_AC_OUTBOUND_PCI_SUPPORTED) | 374 | (q->irq_ptr->qib.ac & QIB_AC_OUTBOUND_PCI_SUPPORTED) |
380 | #define is_qebsm(q) (q->irq_ptr->sch_token != 0) | 375 | #define is_qebsm(q) (q->irq_ptr->sch_token != 0) |
diff --git a/drivers/s390/cio/qdio_main.c b/drivers/s390/cio/qdio_main.c index f4fd6cd4dc08..dafb3e5bdad7 100644 --- a/drivers/s390/cio/qdio_main.c +++ b/drivers/s390/cio/qdio_main.c | |||
@@ -336,10 +336,10 @@ again: | |||
336 | WARN_ON(queue_type(q) != QDIO_IQDIO_QFMT || cc != 2); | 336 | WARN_ON(queue_type(q) != QDIO_IQDIO_QFMT || cc != 2); |
337 | 337 | ||
338 | if (!start_time) { | 338 | if (!start_time) { |
339 | start_time = get_usecs(); | 339 | start_time = get_clock(); |
340 | goto again; | 340 | goto again; |
341 | } | 341 | } |
342 | if ((get_usecs() - start_time) < QDIO_BUSY_BIT_PATIENCE) | 342 | if ((get_clock() - start_time) < QDIO_BUSY_BIT_PATIENCE) |
343 | goto again; | 343 | goto again; |
344 | } | 344 | } |
345 | return cc; | 345 | return cc; |
@@ -536,7 +536,7 @@ static int qdio_inbound_q_moved(struct qdio_q *q) | |||
536 | if ((bufnr != q->last_move) || q->qdio_error) { | 536 | if ((bufnr != q->last_move) || q->qdio_error) { |
537 | q->last_move = bufnr; | 537 | q->last_move = bufnr; |
538 | if (!is_thinint_irq(q->irq_ptr) && MACHINE_IS_LPAR) | 538 | if (!is_thinint_irq(q->irq_ptr) && MACHINE_IS_LPAR) |
539 | q->u.in.timestamp = get_usecs(); | 539 | q->u.in.timestamp = get_clock(); |
540 | return 1; | 540 | return 1; |
541 | } else | 541 | } else |
542 | return 0; | 542 | return 0; |
@@ -567,7 +567,7 @@ static inline int qdio_inbound_q_done(struct qdio_q *q) | |||
567 | * At this point we know, that inbound first_to_check | 567 | * At this point we know, that inbound first_to_check |
568 | * has (probably) not moved (see qdio_inbound_processing). | 568 | * has (probably) not moved (see qdio_inbound_processing). |
569 | */ | 569 | */ |
570 | if (get_usecs() > q->u.in.timestamp + QDIO_INPUT_THRESHOLD) { | 570 | if (get_clock() > q->u.in.timestamp + QDIO_INPUT_THRESHOLD) { |
571 | DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "in done:%02x", | 571 | DBF_DEV_EVENT(DBF_INFO, q->irq_ptr, "in done:%02x", |
572 | q->first_to_check); | 572 | q->first_to_check); |
573 | return 1; | 573 | return 1; |