diff options
author | Mike Marciniszyn <mike.marciniszyn@intel.com> | 2014-03-07 14:40:49 +0100 |
---|---|---|
committer | Roland Dreier <roland@purestorage.com> | 2014-03-18 00:16:51 +0100 |
commit | 1ed88dd7d0b361e677b2690f573e5c274bb25c87 (patch) | |
tree | d78f5aa8f9983b92b7db9f876817199b136c3a2b /drivers/infiniband/hw/qib/qib.h | |
parent | IB/qib: Fix debugfs ordering issue with multiple HCAs (diff) | |
download | linux-1ed88dd7d0b361e677b2690f573e5c274bb25c87.tar.xz linux-1ed88dd7d0b361e677b2690f573e5c274bb25c87.zip |
IB/qib: Add percpu counter replacing qib_devdata int_counter
This patch replaces the dd->int_counter with a percpu counter.
The maintanance of qib_stats.sps_ints and int_counter are
combined into the new counter.
There are two new functions added to read the counter:
- qib_int_counter (for a particular qib_devdata)
- qib_sps_ints (for all HCAs)
A z_int_counter is added to allow the interrupt detection logic
to determine if interrupts have occured since z_int_counter
was "reset".
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
Diffstat (limited to 'drivers/infiniband/hw/qib/qib.h')
-rw-r--r-- | drivers/infiniband/hw/qib/qib.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/qib/qib.h b/drivers/infiniband/hw/qib/qib.h index 1946101419a3..f044430ed98e 100644 --- a/drivers/infiniband/hw/qib/qib.h +++ b/drivers/infiniband/hw/qib/qib.h @@ -868,8 +868,10 @@ struct qib_devdata { /* last buffer for user use */ u32 lastctxt_piobuf; - /* saturating counter of (non-port-specific) device interrupts */ - u32 int_counter; + /* reset value */ + u64 z_int_counter; + /* percpu intcounter */ + u64 __percpu *int_counter; /* pio bufs allocated per ctxt */ u32 pbufsctxt; @@ -1449,6 +1451,10 @@ void qib_nomsi(struct qib_devdata *); void qib_nomsix(struct qib_devdata *); void qib_pcie_getcmd(struct qib_devdata *, u16 *, u8 *, u8 *); void qib_pcie_reenable(struct qib_devdata *, u16, u8, u8); +/* interrupts for device */ +u64 qib_int_counter(struct qib_devdata *); +/* interrupt for all devices */ +u64 qib_sps_ints(void); /* * dma_addr wrappers - all 0's invalid for hw |