diff options
author | Sowmini Varadhan <sowmini.varadhan@oracle.com> | 2015-04-16 22:28:04 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-17 15:24:36 -0400 |
commit | cb97201cb060d13da0b87fd1bf68208c7389c5b1 (patch) | |
tree | cc7f5280541a49d2dca99ff8776b8f6747d3be2b | |
parent | a83f5d6a11ced6f43ec467a95fe8cc76e1c96cfd (diff) | |
download | op-kernel-dev-cb97201cb060d13da0b87fd1bf68208c7389c5b1.zip op-kernel-dev-cb97201cb060d13da0b87fd1bf68208c7389c5b1.tar.gz |
iommu-common: Fix PARISC compile-time warnings
Fixes warnings due to
- no DMA_ERROR_CODE on PARISC,
- sizeof (unsigned long) == 4 bytes on PARISC.
Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | lib/iommu-common.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/iommu-common.c b/lib/iommu-common.c index 7583f9b..fac4f35 100644 --- a/lib/iommu-common.c +++ b/lib/iommu-common.c @@ -10,6 +10,10 @@ #include <linux/iommu-common.h> #include <linux/dma-mapping.h> +#ifndef DMA_ERROR_CODE +#define DMA_ERROR_CODE (~(dma_addr_t)0x0) +#endif + #define IOMMU_LARGE_ALLOC 15 /* @@ -121,7 +125,7 @@ unsigned long iommu_tbl_range_alloc(struct device *dev, boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1, 1 << iommu->page_table_shift); else - boundary_size = ALIGN(1UL << 32, 1 << iommu->page_table_shift); + boundary_size = ALIGN(1ULL << 32, 1 << iommu->page_table_shift); shift = iommu->page_table_map_base >> iommu->page_table_shift; boundary_size = boundary_size >> iommu->page_table_shift; |