diff options
Diffstat (limited to 'arch/x86/kernel/pci-gart_64.c')
-rw-r--r-- | arch/x86/kernel/pci-gart_64.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c index 076e64b2d4f3..ef753e233580 100644 --- a/arch/x86/kernel/pci-gart_64.c +++ b/arch/x86/kernel/pci-gart_64.c | |||
@@ -519,6 +519,15 @@ gart_alloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_addr, | |||
519 | return NULL; | 519 | return NULL; |
520 | } | 520 | } |
521 | 521 | ||
522 | /* free a coherent mapping */ | ||
523 | static void | ||
524 | gart_free_coherent(struct device *dev, size_t size, void *vaddr, | ||
525 | dma_addr_t dma_addr) | ||
526 | { | ||
527 | gart_unmap_single(dev, dma_addr, size, DMA_BIDIRECTIONAL); | ||
528 | free_pages((unsigned long)vaddr, get_order(size)); | ||
529 | } | ||
530 | |||
522 | static int no_agp; | 531 | static int no_agp; |
523 | 532 | ||
524 | static __init unsigned long check_iommu_size(unsigned long aper, u64 aper_size) | 533 | static __init unsigned long check_iommu_size(unsigned long aper, u64 aper_size) |
@@ -722,6 +731,7 @@ static struct dma_mapping_ops gart_dma_ops = { | |||
722 | .map_sg = gart_map_sg, | 731 | .map_sg = gart_map_sg, |
723 | .unmap_sg = gart_unmap_sg, | 732 | .unmap_sg = gart_unmap_sg, |
724 | .alloc_coherent = gart_alloc_coherent, | 733 | .alloc_coherent = gart_alloc_coherent, |
734 | .free_coherent = gart_free_coherent, | ||
725 | }; | 735 | }; |
726 | 736 | ||
727 | void gart_iommu_shutdown(void) | 737 | void gart_iommu_shutdown(void) |