[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1220867630-1995-2-git-send-email-fujita.tomonori@lab.ntt.co.jp>
Date: Mon, 8 Sep 2008 18:53:48 +0900
From: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To: linux-kernel@...r.kernel.org
Cc: mingo@...hat.com, tony.luck@...el.com,
FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
Subject: [PATCH 1/3] swiotlb: use map_single instead of swiotlb_map_single in swiotlb_alloc_coherent
We always need swiotlb memory here so address_needs_mapping and
swiotlb_force testings are irrelevant. map_single should be used here
instead of swiotlb_map_single.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
---
lib/swiotlb.c | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index 3066ffe..2fb485d 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -483,12 +483,9 @@ swiotlb_alloc_coherent(struct device *hwdev, size_t size,
* swiotlb_map_single(), which will grab memory from
* the lowest available address range.
*/
- dma_addr_t handle;
- handle = swiotlb_map_single(NULL, NULL, size, DMA_FROM_DEVICE);
- if (swiotlb_dma_mapping_error(hwdev, handle))
+ ret = map_single(hwdev, NULL, size, DMA_FROM_DEVICE);
+ if (!ret)
return NULL;
-
- ret = bus_to_virt(handle);
}
memset(ret, 0, size);
--
1.5.5.GIT
--
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