[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1229663480-10757-2-git-send-email-beckyb@kernel.crashing.org>
Date: Thu, 18 Dec 2008 23:11:12 -0600
From: Becky Bruce <beckyb@...nel.crashing.org>
To: mingo@...e.hu, jeremy@...p.org
Cc: fujita.tomonori@....ntt.co.jp, linux-kernel@...r.kernel.org,
ian.campbell@...rix.com, jbeulich@...ell.com, joerg.roedel@....com,
benh@...nel.crashing.org, Becky Bruce <beckyb@...nel.crashing.org>
Subject: [PATCH 01/11] swiotlb: Drop SG_ENT_VIRT_ADDRESS macro
All SG_ENT_VIRT_ADDRESS does is call sg_virt(), get rid of
this needless layer of complexity.
Signed-off-by: Becky Bruce <beckyb@...nel.crashing.org>
---
lib/swiotlb.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 96e8b10..3d9ac10 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -36,8 +36,7 @@
#define OFFSET(val,align) ((unsigned long) \
( (val) & ( (align) - 1)))
-#define SG_ENT_VIRT_ADDRESS(sg) (sg_virt((sg)))
-#define SG_ENT_PHYS_ADDRESS(sg) virt_to_bus(SG_ENT_VIRT_ADDRESS(sg))
+#define SG_ENT_PHYS_ADDRESS(sg) virt_to_bus(sg_virt(sg))
/*
* Maximum allowable number of contiguous slabs to map,
@@ -721,7 +720,7 @@ swiotlb_map_sg_attrs(struct device *hwdev, struct scatterlist *sgl, int nelems,
BUG_ON(dir == DMA_NONE);
for_each_sg(sgl, sg, nelems, i) {
- addr = SG_ENT_VIRT_ADDRESS(sg);
+ addr = sg_virt(sg);
dev_addr = virt_to_bus(addr);
if (swiotlb_force ||
address_needs_mapping(hwdev, dev_addr, sg->length)) {
@@ -769,7 +768,7 @@ swiotlb_unmap_sg_attrs(struct device *hwdev, struct scatterlist *sgl,
unmap_single(hwdev, bus_to_virt(sg->dma_address),
sg->dma_length, dir);
else if (dir == DMA_FROM_DEVICE)
- dma_mark_clean(SG_ENT_VIRT_ADDRESS(sg), sg->dma_length);
+ dma_mark_clean(sg_virt(sg), sg->dma_length);
}
}
EXPORT_SYMBOL(swiotlb_unmap_sg_attrs);
@@ -802,7 +801,7 @@ swiotlb_sync_sg(struct device *hwdev, struct scatterlist *sgl,
sync_single(hwdev, bus_to_virt(sg->dma_address),
sg->dma_length, dir, target);
else if (dir == DMA_FROM_DEVICE)
- dma_mark_clean(SG_ENT_VIRT_ADDRESS(sg), sg->dma_length);
+ dma_mark_clean(sg_virt(sg), sg->dma_length);
}
}
--
1.5.6.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists