diff options
author | Sowmini Varadhan <sowmini.varadhan@oracle.com> | 2015-04-18 12:33:55 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-04-18 12:34:50 -0700 |
commit | 2f0c0fdc085c0d415457a1c52344f72e12c4cec6 (patch) | |
tree | 2567af96358ff14960a686df6e253244dcf3e99d | |
parent | 0ae53ed15d9b87b883b593a9884957cfa4fc2480 (diff) | |
download | op-kernel-dev-2f0c0fdc085c0d415457a1c52344f72e12c4cec6.zip op-kernel-dev-2f0c0fdc085c0d415457a1c52344f72e12c4cec6.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 b99f1d7..a1a517c 100644 --- a/lib/iommu-common.c +++ b/lib/iommu-common.c @@ -11,6 +11,10 @@ #include <linux/dma-mapping.h> #include <linux/hash.h> +#ifndef DMA_ERROR_CODE +#define DMA_ERROR_CODE (~(dma_addr_t)0x0) +#endif + unsigned long iommu_large_alloc = 15; static DEFINE_PER_CPU(unsigned int, iommu_pool_hash); @@ -171,7 +175,7 @@ unsigned long iommu_tbl_range_alloc(struct device *dev, boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1, 1 << iommu->table_shift); else - boundary_size = ALIGN(1UL << 32, 1 << iommu->table_shift); + boundary_size = ALIGN(1ULL << 32, 1 << iommu->table_shift); boundary_size = boundary_size >> iommu->table_shift; /* |