aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/parisc/sba_iommu.c
diff options
context:
space:
mode:
authorMilind Arun Choudhary <milindchoudhary@gmail.com>2007-03-06 05:44:13 -0500
committerKyle McMartin <kyle@athena.road.mcmartin.ca>2007-05-22 23:56:18 -0400
commit3cb1d95847db993911ba0bba65e05087c7586eed (patch)
tree3c14e568beaf58e86084c38c71e8841d22ec80e9 /drivers/parisc/sba_iommu.c
parentea74342900dbe79f2a31ed3609b9e2bdb5c7198c (diff)
[PARISC] ROUNDUP macro cleanup in drivers/parisc
Clean up ROUNDUP, Use ALIGN where ever appropriate. Signed-off-by: Milind Arun Choudhary <milindchoudhary@gmail.com> Acked-by: Grant Grundler <grundler@parisc-linux.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Kyle McMartin <kyle@parisc-linux.org>
Diffstat (limited to 'drivers/parisc/sba_iommu.c')
-rw-r--r--drivers/parisc/sba_iommu.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/parisc/sba_iommu.c b/drivers/parisc/sba_iommu.c
index 322957ac2ad1..d044c48323e6 100644
--- a/drivers/parisc/sba_iommu.c
+++ b/drivers/parisc/sba_iommu.c
@@ -113,8 +113,6 @@ module_param(sba_reserve_agpgart, int, 0444);
113MODULE_PARM_DESC(sba_reserve_agpgart, "Reserve half of IO pdir as AGPGART"); 113MODULE_PARM_DESC(sba_reserve_agpgart, "Reserve half of IO pdir as AGPGART");
114#endif 114#endif
115 115
116#define ROUNDUP(x,y) ((x + ((y)-1)) & ~((y)-1))
117
118 116
119/************************************ 117/************************************
120** SBA register read and write support 118** SBA register read and write support
@@ -352,7 +350,7 @@ sba_search_bitmap(struct ioc *ioc, unsigned long bits_wanted)
352 ** SBA HW features in the unmap path. 350 ** SBA HW features in the unmap path.
353 */ 351 */
354 unsigned long o = 1 << get_order(bits_wanted << PAGE_SHIFT); 352 unsigned long o = 1 << get_order(bits_wanted << PAGE_SHIFT);
355 uint bitshiftcnt = ROUNDUP(ioc->res_bitshift, o); 353 uint bitshiftcnt = ALIGN(ioc->res_bitshift, o);
356 unsigned long mask; 354 unsigned long mask;
357 355
358 if (bitshiftcnt >= BITS_PER_LONG) { 356 if (bitshiftcnt >= BITS_PER_LONG) {
@@ -779,7 +777,7 @@ sba_unmap_single(struct device *dev, dma_addr_t iova, size_t size,
779 offset = iova & ~IOVP_MASK; 777 offset = iova & ~IOVP_MASK;
780 iova ^= offset; /* clear offset bits */ 778 iova ^= offset; /* clear offset bits */
781 size += offset; 779 size += offset;
782 size = ROUNDUP(size, IOVP_SIZE); 780 size = ALIGN(size, IOVP_SIZE);
783 781
784 spin_lock_irqsave(&ioc->res_lock, flags); 782 spin_lock_irqsave(&ioc->res_lock, flags);
785 783