diff options
author | Ralph Campbell <ralph.campbell@qlogic.com> | 2008-01-07 08:02:33 +0300 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-01-26 01:15:38 +0300 |
commit | 6c719cae0b91f577738dfb4007baee28f03e48a5 (patch) | |
tree | fef7fb60092c5ed84fe14f7aaafdf55a0551016a /drivers/infiniband/hw/ipath/ipath_kernel.h | |
parent | 7aa54bd730df1468c90ae84b56ade7f322b44de7 (diff) | |
download | linux-6c719cae0b91f577738dfb4007baee28f03e48a5.tar.xz |
IB/ipath: MAD performance sampling registers support
Add support for QLogic HCAs which have hardware performance sampling
registers for PortSamplesControl and PortSamplesResult MADs.
Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_kernel.h')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_kernel.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h index 7bb0d08820d8..a59c06943de6 100644 --- a/drivers/infiniband/hw/ipath/ipath_kernel.h +++ b/drivers/infiniband/hw/ipath/ipath_kernel.h @@ -930,6 +930,15 @@ static inline u32 ipath_read_creg32(const struct ipath_devdata *dd, (char __iomem *)dd->ipath_kregbase)); } +static inline void ipath_write_creg(const struct ipath_devdata *dd, + ipath_creg regno, u64 value) +{ + if (dd->ipath_kregbase) + writeq(value, regno + (u64 __iomem *) + (dd->ipath_cregbase + + (char __iomem *)dd->ipath_kregbase)); +} + static inline void ipath_clear_rcvhdrtail(const struct ipath_portdata *pd) { *((u64 *) pd->port_rcvhdrtail_kvaddr) = 0ULL; |