summaryrefslogtreecommitdiffstats
path: root/drivers/ntb/ntb_hw.h
diff options
context:
space:
mode:
authorJon Mason <jon.mason@intel.com>2013-01-21 16:40:39 -0700
committerJon Mason <jon.mason@intel.com>2013-09-03 14:48:53 -0700
commitac477afb0431386575ef453f50fa0052c3f0461b (patch)
treef32e9f650e68e345baee7919800d8b8e6da60d82 /drivers/ntb/ntb_hw.h
parentbe4dac0fcacd7d62e0b4f7ff51a7032e197b62af (diff)
downloadop-kernel-dev-ac477afb0431386575ef453f50fa0052c3f0461b.zip
op-kernel-dev-ac477afb0431386575ef453f50fa0052c3f0461b.tar.gz
NTB: Enable 32bit Support
Correct the issues on NTB that prevented it from working on x86_32 and modify the Kconfig to allow it to be permitted to be used in that environment as well. Signed-off-by: Jon Mason <jon.mason@intel.com>
Diffstat (limited to 'drivers/ntb/ntb_hw.h')
-rw-r--r--drivers/ntb/ntb_hw.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/drivers/ntb/ntb_hw.h b/drivers/ntb/ntb_hw.h
index 591d4ff..d838bc1 100644
--- a/drivers/ntb/ntb_hw.h
+++ b/drivers/ntb/ntb_hw.h
@@ -62,6 +62,21 @@
#define msix_table_size(control) ((control & PCI_MSIX_FLAGS_QSIZE)+1)
+#ifndef readq
+static inline u64 readq(void __iomem *addr)
+{
+ return readl(addr) | (((u64) readl(addr + 4)) << 32LL);
+}
+#endif
+
+#ifndef writeq
+static inline void writeq(u64 val, void __iomem *addr)
+{
+ writel(val & 0xffffffff, addr);
+ writel(val >> 32, addr + 4);
+}
+#endif
+
#define NTB_BAR_MMIO 0
#define NTB_BAR_23 2
#define NTB_BAR_45 4
@@ -226,7 +241,7 @@ int ntb_read_local_spad(struct ntb_device *ndev, unsigned int idx, u32 *val);
int ntb_write_remote_spad(struct ntb_device *ndev, unsigned int idx, u32 val);
int ntb_read_remote_spad(struct ntb_device *ndev, unsigned int idx, u32 *val);
void __iomem *ntb_get_mw_vbase(struct ntb_device *ndev, unsigned int mw);
-resource_size_t ntb_get_mw_size(struct ntb_device *ndev, unsigned int mw);
+u64 ntb_get_mw_size(struct ntb_device *ndev, unsigned int mw);
void ntb_ring_sdb(struct ntb_device *ndev, unsigned int idx);
void *ntb_find_transport(struct pci_dev *pdev);
OpenPOWER on IntegriCloud