diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2008-03-05 09:09:30 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-06 02:55:13 +0100 |
commit | 4a0d3f3afddf01dfcfdcc826f0b706dbc01f4ef4 (patch) | |
tree | d97a16be3c5c6e3df17cc2ae535cada149486a51 /drivers/parisc/ccio-dma.c | |
parent | cpusets: fix obsolete comment (diff) | |
download | linux-4a0d3f3afddf01dfcfdcc826f0b706dbc01f4ef4.tar.xz linux-4a0d3f3afddf01dfcfdcc826f0b706dbc01f4ef4.zip |
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/ccio-dma.c')
-rw-r--r-- | drivers/parisc/ccio-dma.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/parisc/ccio-dma.c b/drivers/parisc/ccio-dma.c index 60d338cd8009..62db3c3fe4dc 100644 --- a/drivers/parisc/ccio-dma.c +++ b/drivers/parisc/ccio-dma.c @@ -366,8 +366,8 @@ ccio_alloc_range(struct ioc *ioc, struct device *dev, size_t size) ** ggg sacrifices another 710 to the computer gods. */ - boundary_size = ALIGN(dma_get_seg_boundary(dev) + 1, 1 << IOVP_SHIFT); - boundary_size >>= IOVP_SHIFT; + boundary_size = ALIGN((unsigned long long)dma_get_seg_boundary(dev) + 1, + 1ULL << IOVP_SHIFT) >> IOVP_SHIFT; if (pages_needed <= 8) { /* |