20 Jun, 2013

1 commit


21 Nov, 2012

4 commits

  • Move iommu/iovmm headers from plat/ to platform_data/ as part of the
    single zImage work.

    Partially based on an earlier version by Ido Yariv .

    Cc: Ido Yariv
    Cc: Laurent Pinchart
    Cc: Omar Ramirez Luna
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Ohad Ben-Cohen
    Acked-by: Joerg Roedel
    Signed-off-by: Tony Lindgren

    Tony Lindgren
     
  • This file should not be in arch/arm. Move it to drivers/iommu
    to allow making most of the header local to drivers/iommu.

    This is needed as we are removing plat and mach includes
    from drivers for ARM common zImage support.

    Cc: Ido Yariv
    Cc: Laurent Pinchart
    Cc: Mauro Carvalho Chehab
    Cc: Omar Ramirez Luna
    Cc: linux-media@vger.kernel.org
    Acked-by: Ohad Ben-Cohen
    Acked-by: Joerg Roedel
    Signed-off-by: Tony Lindgren

    Tony Lindgren
     
  • Looks like the iommu framework does not have generic functions
    exported for all the needs yet. The hardware specific functions
    are defined in files like intel-iommu.h and amd-iommu.h. Follow
    the same standard for omap-iommu.h.

    This is needed because we are removing plat and mach includes
    for ARM common zImage support. Further work should continue
    in the iommu framework context as only pure platform data will
    be communicated from arch/arm/*omap*/* code to the iommu
    framework.

    Cc: Ido Yariv
    Cc: Laurent Pinchart
    Cc: Omar Ramirez Luna
    Cc: linux-media@vger.kernel.org
    Acked-by: Mauro Carvalho Chehab
    Acked-by: Ohad Ben-Cohen
    Acked-by: Joerg Roedel
    Signed-off-by: Tony Lindgren

    Tony Lindgren
     
  • The iopgtable header file is only used by the iommu & iovmm drivers, so
    move it to drivers/iommu/, as part of the single zImage effort.

    Cc: Laurent Pinchart
    Cc: Mauro Carvalho Chehab
    Cc: Omar Ramirez Luna
    Signed-off-by: Ido Yariv
    Acked-by: Ohad Ben-Cohen
    Acked-by: Joerg Roedel
    [tony@atomide.com: updated to be earlier in the series]
    Signed-off-by: Tony Lindgren

    Ido Yariv
     

09 Jan, 2012

1 commit


14 Dec, 2011

1 commit


05 Dec, 2011

1 commit

  • Eliminate the public omap_find_iommu_device() method, and don't
    expect clients to provide the omap_iommu handle anymore.

    Instead, OMAP's iommu driver now utilizes dev_archdata's private iommu
    extension to be able to access the required iommu information.

    This way OMAP IOMMU users are now able to use the generic IOMMU API without
    having to call any omap-specific binding method.

    Update omap3isp appropriately.

    Signed-off-by: Ohad Ben-Cohen
    Acked-by: Laurent Pinchart
    Acked-by: Tony Lindgren
    Cc: Hiroshi Doyu

    Ohad Ben-Cohen
     

10 Nov, 2011

1 commit

  • When mapping a memory region, split it to page sizes as supported
    by the iommu hardware. Always prefer bigger pages, when possible,
    in order to reduce the TLB pressure.

    The logic to do that is now added to the IOMMU core, so neither the iommu
    drivers themselves nor users of the IOMMU API have to duplicate it.

    This allows a more lenient granularity of mappings; traditionally the
    IOMMU API took 'order' (of a page) as a mapping size, and directly let
    the low level iommu drivers handle the mapping, but now that the IOMMU
    core can split arbitrary memory regions into pages, we can remove this
    limitation, so users don't have to split those regions by themselves.

    Currently the supported page sizes are advertised once and they then
    remain static. That works well for OMAP and MSM but it would probably
    not fly well with intel's hardware, where the page size capabilities
    seem to have the potential to be different between several DMA
    remapping devices.

    register_iommu() currently sets a default pgsize behavior, so we can convert
    the IOMMU drivers in subsequent patches. After all the drivers
    are converted, the temporary default settings will be removed.

    Mainline users of the IOMMU API (kvm and omap-iovmm) are adopted
    to deal with bytes instead of page order.

    Many thanks to Joerg Roedel for significant review!

    Signed-off-by: Ohad Ben-Cohen
    Cc: David Brown
    Cc: David Woodhouse
    Cc: Joerg Roedel
    Cc: Stepan Moskovchenko
    Cc: KyongHo Cho
    Cc: Hiroshi DOYU
    Cc: Laurent Pinchart
    Cc: kvm@vger.kernel.org
    Signed-off-by: Joerg Roedel

    Ohad Ben-Cohen
     

09 Nov, 2011

1 commit


05 Sep, 2011

2 commits

  • Users of the IOMMU API (kvm specifically) assume that iommu_unmap()
    returns the order of the unmapped page.

    Fix omap_iommu_unmap() to do so and adopt omap-iovmm accordingly.

    Signed-off-by: Ohad Ben-Cohen
    Signed-off-by: Joerg Roedel

    Ohad Ben-Cohen
     
  • omap_iovmm requires page-aligned buffers, and that sometimes causes
    omap3isp failures (i.e. whenever the buffer passed from userspace is not
    page-aligned).

    Remove this limitation by rounding the address of the first page entry
    down, and adding the offset back to the device address.

    Signed-off-by: Laurent Pinchart
    Acked-by: Hiroshi DOYU
    [ohad@wizery.com: rebased, but tested only with aligned buffers]
    [ohad@wizery.com: slightly edited the commit log]
    Signed-off-by: Ohad Ben-Cohen
    Signed-off-by: Joerg Roedel

    Laurent Pinchart
     

26 Aug, 2011

3 commits

  • Prepend 'omap_' to OMAP's 'struct iommu' and exposed API, to prevent
    namespace pollution and generally to improve readability of the code
    that still uses the driver directly.

    Update the users as needed as well.

    Signed-off-by: Ohad Ben-Cohen
    Acked-by: Laurent Pinchart
    Acked-by: Hiroshi DOYU
    Acked-by: Tony Lindgren
    Signed-off-by: Joerg Roedel

    Ohad Ben-Cohen
     
  • Remove unused functionality from OMAP's iovmm module.

    The intention is to eventually completely replace iovmm with the
    generic DMA-API, so new code that'd need this iovmm functionality
    will have to extend the DMA-API instead.

    Signed-off-by: Ohad Ben-Cohen
    Acked-by: Hiroshi DOYU
    Acked-by: Tony Lindgren
    Signed-off-by: Joerg Roedel

    Ohad Ben-Cohen
     
  • Move OMAP's iommu drivers to the dedicated iommu drivers folder.

    While OMAP's iovmm (virtual memory manager) driver does not strictly
    belong to the iommu drivers folder, move it there as well, because
    it's by no means OMAP-specific (in concept. technically it is still
    coupled with OMAP's iommu).

    Eventually, iovmm will be completely replaced with the generic,
    iommu-based, dma-mapping API.

    Signed-off-by: Ohad Ben-Cohen
    Acked-by: Laurent Pinchart
    Acked-by: Hiroshi DOYU
    Acked-by: Tony Lindgren
    Signed-off-by: Joerg Roedel

    Ohad Ben-Cohen