lkml.org 
[lkml]   [2009]   [Jun]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 05/11] x86: use dma_map_range when allocating PCI GART memory
    Date
    This function is intended to replaces is_buffer_dma_capable with a
    more generic interface.

    Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
    Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
    Cc: Jeremy Fitzhardinge <jeremy@goop.org>
    Cc: x86@kernel.org
    ---
    arch/x86/kernel/pci-gart_64.c | 6 ++++--
    1 files changed, 4 insertions(+), 2 deletions(-)

    diff --git a/arch/x86/kernel/pci-gart_64.c b/arch/x86/kernel/pci-gart_64.c
    index 1e8920d..eb043bd 100644
    --- a/arch/x86/kernel/pci-gart_64.c
    +++ b/arch/x86/kernel/pci-gart_64.c
    @@ -190,14 +190,16 @@ static void iommu_full(struct device *dev, size_t size, int dir)
    static inline int
    need_iommu(struct device *dev, unsigned long addr, size_t size)
    {
    + dma_addr_t dma_addr;
    return force_iommu ||
    - !is_buffer_dma_capable(*dev->dma_mask, addr, size);
    + !dma_map_range(dev, *dev->dma_mask, addr, size, &dma_addr);
    }

    static inline int
    nonforced_iommu(struct device *dev, unsigned long addr, size_t size)
    {
    - return !is_buffer_dma_capable(*dev->dma_mask, addr, size);
    + dma_addr_t dma_addr;
    + return !dma_map_range(dev, *dev->dma_mask, addr, size, &dma_addr);
    }

    /* Map a single continuous physical area into the IOMMU.
    --
    1.5.6.5


    \
     
     \ /
      Last update: 2009-06-01 17:39    [W:3.322 / U:0.048 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site