1. 11 1月, 2013 1 次提交
    • A
      iommu: moving initialization earlier · 097e3635
      Alexey Kardashevskiy 提交于
      The iommu_init() initializes IOMMU internal structures and data
      required for the IOMMU API as iommu_group_alloc().
      It is registered as a subsys_initcall now.
      
      One of the IOMMU users is going to be a PCI subsystem on POWER.
      It discovers new IOMMU tables during the PCI scan so the logical
      place to call iommu_group_alloc() is the moment when a new group
      is discovered. However PCI scan is done from subsys_initcall hook
      as IOMMU does so PCI hook can be (and is) called before the IOMMU one.
      
      The patch moves IOMMU subsystem initialization one step earlier
      to make sure that IOMMU is initialized before PCI scan begins.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Signed-off-by: NJoerg Roedel <joro@8bytes.org>
      097e3635
  2. 04 1月, 2013 1 次提交
    • G
      Drivers: iommu: remove __dev* attributes. · d34d6517
      Greg Kroah-Hartman 提交于
      CONFIG_HOTPLUG is going away as an option.  As a result, the __dev*
      markings need to be removed.
      
      This change removes the use of __devinit, __devexit_p, __devinitdata,
      and __devexit from these drivers.
      
      Based on patches originally written by Bill Pemberton, but redone by me
      in order to handle some of the coding style issues better, by hand.
      
      Cc: Bill Pemberton <wfp5p@virginia.edu>
      Cc: David Woodhouse <dwmw2@infradead.org>
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: Ohad Ben-Cohen <ohad@wizery.com>
      Cc: Tony Lindgren <tony@atomide.com>
      Cc: Omar Ramirez Luna <omar.luna@linaro.org>
      Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
      Cc: Hiroshi Doyu <hdoyu@nvidia.com>
      Cc: Stephen Warren <swarren@wwwdotorg.org>
      Cc: Bharat Nihalani <bnihalani@nvidia.com>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
      d34d6517
  3. 21 12月, 2012 1 次提交
    • W
      intel-iommu: Free old page tables before creating superpage · 6491d4d0
      Woodhouse, David 提交于
      The dma_pte_free_pagetable() function will only free a page table page
      if it is asked to free the *entire* 2MiB range that it covers. So if a
      page table page was used for one or more small mappings, it's likely to
      end up still present in the page tables... but with no valid PTEs.
      
      This was fine when we'd only be repopulating it with 4KiB PTEs anyway
      but the same virtual address range can end up being reused for a
      *large-page* mapping. And in that case were were trying to insert the
      large page into the second-level page table, and getting a complaint
      from the sanity check in __domain_mapping() because there was already a
      corresponding entry. This was *relatively* harmless; it led to a memory
      leak of the old page table page, but no other ill-effects.
      
      Fix it by calling dma_pte_clear_range (hopefully redundant) and
      dma_pte_free_pagetable() before setting up the new large page.
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      Tested-by: NRavi Murty <Ravi.Murty@intel.com>
      Tested-by: NSudeep Dutt <sudeep.dutt@intel.com>
      Cc: stable@kernel.org [3.0+]
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6491d4d0
  4. 04 12月, 2012 4 次提交
    • O
      iommu/omap: Adapt to runtime pm · ebf7cda0
      Omar Ramirez Luna 提交于
      Use runtime PM functionality interfaced with hwmod enable/idle
      functions, to replace direct clock operations and sysconfig
      handling.
      
      Due to reset sequence, pm_runtime_[get|put]_sync must be used, to
      avoid possible operations with the module under reset. Because of
      this and given that the driver uses spin_locks to protect their
      critical sections, we must use pm_runtime_irq_safe in order for the
      runtime ops to be happy, otherwise might_sleep_if checks in runtime
      framework will complain.
      
      The remaining pm_runtime out of iommu_enable and iommu_disable
      corresponds to paths that can be accessed through debugfs, some of
      them doesn't work if the module is not enabled first, but in future
      if the mmu is idled withouth freeing, these are needed to debug.
      Signed-off-by: NOmar Ramirez Luna <omar.luna@linaro.org>
      Tested-by: NOhad Ben-Cohen <ohad@wizery.com>
      Acked-by: NTony Lindgren <tony@atomide.com>
      Signed-off-by: NJoerg Roedel <joro@8bytes.org>
      ebf7cda0
    • O
      iommu/omap: Migrate to hwmod framework · 72b15b6a
      Omar Ramirez Luna 提交于
      Use hwmod data and device attributes to build and register an
      omap device for iommu driver.
      
       - Update the naming convention in isp module.
       - Remove unneeded check for number of resources, as this is now
         handled by omap_device and prevents driver from loading.
       - Now unused, remove platform device and resource data, handling
         of sysconfig register for softreset purposes, use default
         latency structure.
       - Use hwmod API for reset handling.
      Signed-off-by: NOmar Ramirez Luna <omar.luna@linaro.org>
      Tested-by: NOhad Ben-Cohen <ohad@wizery.com>
      Signed-off-by: NJoerg Roedel <joro@8bytes.org>
      72b15b6a
    • O
      iommu/omap: Keep mmu enabled when requested · 87f8e573
      Omar Ramirez Luna 提交于
      The purpose of the mmu is to handle the memory accesses requested by
      its users. Typically, the mmu is bundled with the processing unit in
      a single IP block, which makes them to share the same clock to be
      functional.
      
      Currently, iommu code assumes that its user will be indirectly
      clocking it, but being a separate mmu driver, it should handle
      its own clocks, so as long as the mmu is requested it will be
      powered ON and once detached it will be powered OFF.
      
      The remaining clock handling out of iommu_enable and iommu_disable
      corresponds to paths that can be accessed through debugfs, some of
      them doesn't work if the module is not enabled first, but in future
      if the mmu is idled withouth freeing, these are needed to debug.
      Signed-off-by: NOmar Ramirez Luna <omar.luna@linaro.org>
      Tested-by: NOhad Ben-Cohen <ohad@wizery.com>
      Signed-off-by: NJoerg Roedel <joro@8bytes.org>
      87f8e573
    • O
      iommu/omap: Remove redundant clock handling on ISR · a3397720
      Omar Ramirez Luna 提交于
      For the interrupt to be generated, the mmu clock should be already
      enabled while translating a virtual address, so, this call to clock
      handling is just increasing/decreasing the counter.
      
      This works now, because its users need the same clock and they
      indirectly power the mmu, in this interrupt context the handling of
      clocks inside the ISR doesn't seem to be needed nor helping.
      
      Next patch should also correct the dependency on clients to handle
      iommu clocks.
      Signed-off-by: NOmar Ramirez Luna <omar.luna@linaro.org>
      Tested-by: NOhad Ben-Cohen <ohad@wizery.com>
      Signed-off-by: NJoerg Roedel <joro@8bytes.org>
      a3397720
  5. 02 12月, 2012 2 次提交
  6. 28 11月, 2012 3 次提交
  7. 21 11月, 2012 6 次提交
  8. 17 11月, 2012 2 次提交
  9. 06 11月, 2012 2 次提交
  10. 24 10月, 2012 6 次提交
  11. 16 10月, 2012 1 次提交
  12. 02 10月, 2012 2 次提交
  13. 28 9月, 2012 9 次提交