aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/ipath/ipath_kernel.h
diff options
context:
space:
mode:
authorRalph Campbell <ralph.campbell@qlogic.com>2008-01-06 21:02:34 -0800
committerRoland Dreier <rolandd@cisco.com>2008-01-25 14:15:39 -0800
commita18e26ae442001de62f6b84a923e8613347dc35f (patch)
tree36109aca4360deb0ca0ea12e429d917e54819d5a /drivers/infiniband/hw/ipath/ipath_kernel.h
parentIB/ipath: Clean up some comments (diff)
downloadlinux-dev-a18e26ae442001de62f6b84a923e8613347dc35f.tar.xz
linux-dev-a18e26ae442001de62f6b84a923e8613347dc35f.zip
IB/ipath: Allow more flexible user register alignments
User registers have different alignments on different chips (4KB on older, 64KB on 7220). Allow mapping the user registers on kernels with page sizes up to 64K. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to '')
-rw-r--r--drivers/infiniband/hw/ipath/ipath_kernel.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_kernel.h b/drivers/infiniband/hw/ipath/ipath_kernel.h
index 4f7bc08796bc..08272bef2475 100644
--- a/drivers/infiniband/hw/ipath/ipath_kernel.h
+++ b/drivers/infiniband/hw/ipath/ipath_kernel.h
@@ -395,6 +395,8 @@ struct ipath_devdata {
void *ipath_dummy_hdrq; /* used after port close */
dma_addr_t ipath_dummy_hdrq_phys;
+ unsigned long ipath_ureg_align; /* user register alignment */
+
/*
* Shadow copies of registers; size indicates read access size.
* Most of them are readonly, but some are write-only register,
@@ -865,7 +867,7 @@ static inline u32 ipath_read_ureg32(const struct ipath_devdata *dd,
return readl(regno + (u64 __iomem *)
(dd->ipath_uregbase +
(char __iomem *)dd->ipath_kregbase +
- dd->ipath_palign * port));
+ dd->ipath_ureg_align * port));
}
/**
@@ -882,7 +884,7 @@ static inline void ipath_write_ureg(const struct ipath_devdata *dd,
{
u64 __iomem *ubase = (u64 __iomem *)
(dd->ipath_uregbase + (char __iomem *) dd->ipath_kregbase +
- dd->ipath_palign * port);
+ dd->ipath_ureg_align * port);
if (dd->ipath_kregbase)
writeq(value, &ubase[regno]);
}