Re: centralize SWIOTLB config symbol and misc other cleanups V3

2018-05-08 Thread Christoph Hellwig
On Wed, May 02, 2018 at 05:46:17AM -0700, Christoph Hellwig wrote: > Any more comments? Especially from the x86, mips and powerpc arch > maintainers? I'd like to merge this in a few days as various other > patches depend on it. I've pulled it in to make forward progress. Any additional

Re: [PATCH v5 1/2] iommu - Enable debugfs exposure of IOMMU driver internals

2018-05-08 Thread Joe Perches
On Tue, 2018-05-08 at 15:07 -0500, Gary R Hook wrote: > On 05/08/2018 01:48 PM, Joe Perches wrote: > > On Tue, 2018-05-08 at 12:08 -0500, Hook, Gary wrote: > > > On 5/7/2018 6:47 PM, kbuild test robot wrote: > > > > > > > > All error/warnings (new ones prefixed by >>): > > > > > > > > In

Re: [PATCH v5 1/2] iommu - Enable debugfs exposure of IOMMU driver internals

2018-05-08 Thread Gary R Hook
On 05/08/2018 03:42 PM, Joe Perches wrote: On Tue, 2018-05-08 at 15:07 -0500, Gary R Hook wrote: On 05/08/2018 01:48 PM, Joe Perches wrote: On Tue, 2018-05-08 at 12:08 -0500, Hook, Gary wrote: On 5/7/2018 6:47 PM, kbuild test robot wrote: All error/warnings (new ones prefixed by >>):

Re: [PATCH v5 1/2] iommu - Enable debugfs exposure of IOMMU driver internals

2018-05-08 Thread Gary R Hook
On 05/08/2018 01:48 PM, Joe Perches wrote: On Tue, 2018-05-08 at 12:08 -0500, Hook, Gary wrote: On 5/7/2018 6:47 PM, kbuild test robot wrote: All error/warnings (new ones prefixed by >>): In file included from include/linux/intel-iommu.h:32:0, from

Re: [PATCH v5 1/2] iommu - Enable debugfs exposure of IOMMU driver internals

2018-05-08 Thread Joe Perches
/github.com/0day-ci/linux/commits/Gary-R-Hook/iommu-Enable-debugfs-exposure-of-IOMMU-driver-internals/20180508-062918 > > base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git next > > config: x86_64-randconfig-x016-201818 (attached as .config) > > compiler: gcc

[PATCH v1 9/9] iommu/tegra: gart: Optimize mapping / unmapping performance

2018-05-08 Thread Dmitry Osipenko
Currently GART writes one page entry at a time. More optimal would be to aggregate the writes and flush BUS buffer in the end, this gives map/unmap 10-40% (depending on size of mapping) performance boost compared to a flushing after each entry update. Signed-off-by: Dmitry Osipenko

[PATCH v1 8/9] iommu: Introduce iotlb_sync_map callback

2018-05-08 Thread Dmitry Osipenko
Introduce iotlb_sync_map() callback that is invoked in the end of iommu_map(). This new callback allows IOMMU drivers to avoid syncing on mapping of each contiguous chunk and sync only when whole mapping is completed, optimizing performance of the mapping operation. Signed-off-by: Dmitry Osipenko

[PATCH v1 7/9] iommu/tegra: gart: Provide single domain and group for all devices

2018-05-08 Thread Dmitry Osipenko
GART aperture is shared by all devices, hence there is a single IOMMU domain and group shared by these devices. Allocation of a group per device only wastes resources and allowance of having more than one domain is simply wrong because IOMMU mappings made by the users of "different" domains will

[PATCH v1 6/9] iommu/tegra: gart: Ignore devices without IOMMU phandle in DT

2018-05-08 Thread Dmitry Osipenko
GART can't handle all devices, ignore devices that aren't related to GART. Device tree must explicitly assign GART IOMMU to the devices. Signed-off-by: Dmitry Osipenko --- drivers/iommu/tegra-gart.c | 33 - 1 file changed, 32 insertions(+), 1

[PATCH v1 5/9] iommu/tegra: gart: Clean up driver probe failure unwinding

2018-05-08 Thread Dmitry Osipenko
Properly clean up allocated resources on driver probe failure. Signed-off-by: Dmitry Osipenko --- drivers/iommu/tegra-gart.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-gart.c index

[PATCH v1 3/9] iommu/tegra: gart: Remove code related to module unloading

2018-05-08 Thread Dmitry Osipenko
GART driver is built-in, hence it can't be unloaded. This patch merely removes the dead code. Signed-off-by: Dmitry Osipenko --- drivers/iommu/tegra-gart.c | 25 +++-- 1 file changed, 3 insertions(+), 22 deletions(-) diff --git a/drivers/iommu/tegra-gart.c

[PATCH v1 1/9] memory: tegra: Provide facility for integration with the GART driver

2018-05-08 Thread Dmitry Osipenko
In order to report clients name and access direction on GART page fault, MC driver needs to access GART registers. Add facility that provides access to the GART. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/mc.c | 26 +++---

[PATCH v1 0/9] Tegra GART driver clean up and optimization

2018-05-08 Thread Dmitry Osipenko
Hello, This series addresses multiple shortcomings of the GART driver: 1. Thierry noticed that Memory Controller driver uses registers that belong to GART in [0] and for now MC driver only reports the fact of GART's page fault. The first two patches of the series are addressing this

[PATCH v1 4/9] iommu/tegra: gart: Remove pr_fmt and clean up includes

2018-05-08 Thread Dmitry Osipenko
Remove unneeded 'includes' and sort them in alphabet order. Also remove pr_fmt since there is no pr_xxx() and it doesn't affect dev_xxx(). Signed-off-by: Dmitry Osipenko --- drivers/iommu/tegra-gart.c | 17 + 1 file changed, 5 insertions(+), 12 deletions(-)

[PATCH v1 2/9] iommu/tegra: gart: Provide access to Memory Controller driver

2018-05-08 Thread Dmitry Osipenko
GART contains registers needed by the Memory Controller driver. Provide access to the MC driver by utilizing its GART-integration facility. Signed-off-by: Dmitry Osipenko --- drivers/iommu/tegra-gart.c | 23 +++ 1 file changed, 23 insertions(+) diff --git

Re: [PATCH v5 1/2] iommu - Enable debugfs exposure of IOMMU driver internals

2018-05-08 Thread Hook, Gary
] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Gary-R-Hook/iommu-Enable-debugfs-exposure-of-IOMMU-driver-internals/20180508-062918 base: https://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git

Re: [PATCH 3/3] dma-debug: unexport dma_debug_resize_entries and debug_dma_dump_mappings

2018-05-08 Thread Christoph Hellwig
On Tue, May 08, 2018 at 11:05:20AM +0100, Robin Murphy wrote: > On 24/04/18 15:02, Christoph Hellwig wrote: >> Only used by the AMD GART driver, which must be built in. > > FWIW debug_dma_dump_mappings() is also called by the Intel VT-d driver, but > the same reasoning still applies. I'll update

Re: [PATCH v4 05/22] iommu: introduce iommu invalidate API function

2018-05-08 Thread Jean-Philippe Brucker
Hi Jacob, Looks mostly good to me, I just have a couple more comments On 04/05/18 19:07, Jacob Pan wrote: > Now the passdown invalidation granularities look like: > (sorted by coarseness), will send out in v5 patchset soon if no issues. > > /** > * enum iommu_inv_granularity - Generic

Re: [PATCH 1/3] dma-debug: move initialization to common code

2018-05-08 Thread Marek Szyprowski
Hi Christoph, On 2018-04-24 16:02, Christoph Hellwig wrote: > Most mainstream architectures are using 65536 entries, so lets stick to > that. If someone is really desperate to override it that can still be > done through , but I'd rather see a really good > rationale for that. > > dma_debug_init

Re: [PATCH] dma-debug: Check scatterlist segments

2018-05-08 Thread Robin Murphy
On 25/04/18 06:58, Christoph Hellwig wrote: This looks interesting. I suspect it is going to blow up in quite a few places, so maybe at least for now it might make sense to have a separate config option? True, it's nice to verify this for 'traditional' dma_map_sg() usage, but places where

Re: [PATCH 3/3] dma-debug: unexport dma_debug_resize_entries and debug_dma_dump_mappings

2018-05-08 Thread Robin Murphy
On 24/04/18 15:02, Christoph Hellwig wrote: Only used by the AMD GART driver, which must be built in. FWIW debug_dma_dump_mappings() is also called by the Intel VT-d driver, but the same reasoning still applies. This does rather beg the question of whether it's right to have bits of

Re: [PATCH 4/3] dma-debug: remove CONFIG_HAVE_DMA_API_DEBUG

2018-05-08 Thread Robin Murphy
On 27/04/18 16:53, Christoph Hellwig wrote: There is no arch specific code required for dma-debug, so there is no need to opt into the support either. Makes sense, and a purely negative diffstat is always pleasing :) Reviewed-by: Robin Murphy Signed-off-by: Christoph

Re: [PATCH 2/3] dma-debug: simplify counting of preallocated requests

2018-05-08 Thread Robin Murphy
On 24/04/18 15:02, Christoph Hellwig wrote: Just keep a single variable with a descriptive name instead of two with confusing names. Reviewed-by: Robin Murphy Signed-off-by: Christoph Hellwig --- lib/dma-debug.c | 20 1 file

Re: [PATCH 1/3] dma-debug: move initialization to common code

2018-05-08 Thread Robin Murphy
On 24/04/18 15:02, Christoph Hellwig wrote: Most mainstream architectures are using 65536 entries, so lets stick to that. If someone is really desperate to override it that can still be done through , but I'd rather see a really good rationale for that. dma_debug_init is now called as a