提交 b922f53b 编写于 作者: J Jens Axboe

x86-64: update nommu to sg helpers

Acked-by: NMuli Ben-Yehuda <muli@il.ibm.com>
Signed-off-by: NJens Axboe <jens.axboe@oracle.com>
上级 8b87d9f4
......@@ -5,6 +5,7 @@
#include <linux/pci.h>
#include <linux/string.h>
#include <linux/dma-mapping.h>
#include <linux/scatterlist.h>
#include <asm/iommu.h>
#include <asm/processor.h>
......@@ -57,10 +58,10 @@ static void nommu_unmap_single(struct device *dev, dma_addr_t addr,size_t size,
static int nommu_map_sg(struct device *hwdev, struct scatterlist *sg,
int nents, int direction)
{
struct scatterlist *s;
int i;
for (i = 0; i < nents; i++ ) {
struct scatterlist *s = &sg[i];
for_each_sg(sg, s, nents, i) {
BUG_ON(!s->page);
s->dma_address = virt_to_bus(page_address(s->page) +s->offset);
if (!check_addr("map_sg", hwdev, s->dma_address, s->length))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册