aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc/sba_iommu.c
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-03-05 03:09:30 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-03-05 20:55:13 -0500
commit4a0d3f3afddf01dfcfdcc826f0b706dbc01f4ef4 (patch)
treed97a16be3c5c6e3df17cc2ae535cada149486a51 /drivers/parisc/sba_iommu.c
parent41f7f60d31e5e1dfc9a92957b3e14e08a2f04964 (diff)
parisc: fix IOMMU's device boundary overflow bug on 32bits arch
On 32bits boxes, boundary_size becomes zero due to a overflow and we hit BUG_ON in iommu_is_span_boundary. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Kyle McMartin <kyle@parisc-linux.org> Cc: Matthew Wilcox <matthew@wil.cx> Acked-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/parisc/sba_iommu.c')
-rw-r--r--drivers/parisc/sba_iommu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c
index e834127a8505..bdbe780e21c5 100644
--- a/drivers/parisc/sba_iommu.c
+++ b/drivers/parisc/sba_iommu.c
@@ -341,8 +341,8 @@ sba_search_bitmap(struct ioc *ioc, struct device *dev,
341 unsigned long shift; 341 unsigned long shift;
342 int ret; 342 int ret;
343 343
344 boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1, 1 << IOVP_SHIFT); 344 boundary_size = ALIGN((unsigned long long)dma_get_seg_boundary(dev) + 1,
345 boundary_size >>= IOVP_SHIFT; 345 1ULL << IOVP_SHIFT) >> IOVP_SHIFT;
346 346
347#if defined(ZX1_SUPPORT) 347#if defined(ZX1_SUPPORT)
348 BUG_ON(ioc->ibase & ~IOVP_MASK); 348 BUG_ON(ioc->ibase & ~IOVP_MASK);