Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 138887
b: refs/heads/master
c: 4cf37bb
h: refs/heads/master
i:
  138885: 6c5cc99
  138883: 5f53592
  138879: d703c10
v: v3
  • Loading branch information
FUJITA Tomonori authored and Ingo Molnar committed Jan 6, 2009
1 parent 21902d5 commit fe327d5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: abe6602bf197167efb3b37161b9c11748fa076e1
refs/heads/master: 4cf37bb7d9dc6dfb5d5fca7f735ba65ba173dabc
19 changes: 19 additions & 0 deletions trunk/arch/x86/kernel/pci-swiotlb_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,23 @@ swiotlb_map_single_phys(struct device *hwdev, phys_addr_t paddr, size_t size,
return swiotlb_map_single(hwdev, phys_to_virt(paddr), size, direction);
}

/* these will be moved to lib/swiotlb.c later on */

static dma_addr_t swiotlb_map_page(struct device *dev, struct page *page,
unsigned long offset, size_t size,
enum dma_data_direction dir,
struct dma_attrs *attrs)
{
return swiotlb_map_single(dev, page_address(page) + offset, size, dir);
}

static void swiotlb_unmap_page(struct device *dev, dma_addr_t dma_handle,
size_t size, enum dma_data_direction dir,
struct dma_attrs *attrs)
{
swiotlb_unmap_single(dev, dma_handle, size, dir);
}

static void *x86_swiotlb_alloc_coherent(struct device *hwdev, size_t size,
dma_addr_t *dma_handle, gfp_t flags)
{
Expand All @@ -71,6 +88,8 @@ struct dma_mapping_ops swiotlb_dma_ops = {
.sync_sg_for_device = swiotlb_sync_sg_for_device,
.map_sg = swiotlb_map_sg,
.unmap_sg = swiotlb_unmap_sg,
.map_page = swiotlb_map_page,
.unmap_page = swiotlb_unmap_page,
.dma_supported = NULL,
};

Expand Down

0 comments on commit fe327d5

Please sign in to comment.