1. 30 Aug, 2019 2 commits
    • Eric Auger's avatar
      iommu: Revisit iommu_insert_resv_region() implementation · 4dbd258f
      Eric Auger authored
      Current implementation is recursive and in case of allocation
      failure the existing @regions list is altered. A non recursive
      version looks better for maintainability and simplifies the
      error handling. We use a separate stack for overlapping segment
      merging. The elements are sorted by start address and then by
      type, if their start address match.
      
      Note this new implementation may change the region order of
      appearance in /sys/kernel/iommu_groups/<n>/reserved_regions
      files but this order has never been documented, see
      commit bc7d12b9 ("iommu: Implement reserved_regions
      iommu-group sysfs file").
      Signed-off-by: default avatarEric Auger <eric.auger@redhat.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      4dbd258f
    • Eric Dumazet's avatar
      iommu/iova: Avoid false sharing on fq_timer_on · 0d87308c
      Eric Dumazet authored
      In commit 14bd9a60 ("iommu/iova: Separate atomic variables
      to improve performance") Jinyu Qi identified that the atomic_cmpxchg()
      in queue_iova() was causing a performance loss and moved critical fields
      so that the false sharing would not impact them.
      
      However, avoiding the false sharing in the first place seems easy.
      We should attempt the atomic_cmpxchg() no more than 100 times
      per second. Adding an atomic_read() will keep the cache
      line mostly shared.
      
      This false sharing came with commit 9a005a80
      ("iommu/iova: Add flush timer").
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Fixes: 9a005a80 ('iommu/iova: Add flush timer')
      Cc: Jinyu Qi <jinyuqi@huawei.com>
      Cc: Joerg Roedel <jroedel@suse.de>
      Acked-by: default avatarRobin Murphy <robin.murphy@arm.com>
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      0d87308c
  2. 23 Aug, 2019 11 commits
  3. 20 Aug, 2019 1 commit
  4. 09 Aug, 2019 1 commit
    • Stephen Boyd's avatar
      iommu: Remove dev_err() usage after platform_get_irq() · 086f9efa
      Stephen Boyd authored
      We don't need dev_err() messages when platform_get_irq() fails now that
      platform_get_irq() prints an error message itself when something goes
      wrong. Let's remove these prints with a simple semantic patch.
      
      // <smpl>
      @@
      expression ret;
      struct platform_device *E;
      @@
      
      ret =
      (
      platform_get_irq(E, ...)
      |
      platform_get_irq_byname(E, ...)
      );
      
      if ( \( ret < 0 \| ret <= 0 \) )
      {
      (
      -if (ret != -EPROBE_DEFER)
      -{ ...
      -dev_err(...);
      -... }
      |
      ...
      -dev_err(...);
      )
      ...
      }
      // </smpl>
      
      While we're here, remove braces on if statements that only have one
      statement (manually).
      
      Cc: Joerg Roedel <joro@8bytes.org>
      Cc: iommu@lists.linux-foundation.org
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Signed-off-by: default avatarStephen Boyd <swboyd@chromium.org>
      Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
      086f9efa
  5. 05 Aug, 2019 1 commit
  6. 04 Aug, 2019 10 commits
  7. 03 Aug, 2019 14 commits