Re: [PATCH 09/10] iommu/exynos: Make use of iommu_device_register interface

2017-02-06 Thread kbuild test robot
Hi Joerg, [auto build test ERROR on linus/master] [also build test ERROR on v4.10-rc7] [cannot apply to iommu/next next-20170206] [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/Joerg-Roedel/Let

Re: [PATCH 08/10] iommu/mediatek: Make use of iommu_device_register interface

2017-02-06 Thread kbuild test robot
Hi Joerg, [auto build test ERROR on linus/master] [also build test ERROR on v4.10-rc7] [cannot apply to iommu/next next-20170206] [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/Joerg-Roedel/Let

Re: [PATCH v8 3/9] perf/amd/iommu: Misc fix up perf_iommu_read

2017-02-06 Thread Suravee Suthikulpanit
Peter, On 1/23/17 19:33, Peter Zijlstra wrote: On Mon, Jan 16, 2017 at 01:23:30AM -0600, Suravee Suthikulpanit wrote: static void perf_iommu_read(struct perf_event *event) { - u64 count = 0ULL; - u64 prev_raw_count = 0ULL; - u64 delta = 0ULL; + u64 count, prev; +

Re: [PATCH 07/10] iommu/msm: Make use of iommu_device_register interface

2017-02-06 Thread kbuild test robot
Hi Joerg, [auto build test ERROR on linus/master] [also build test ERROR on v4.10-rc7] [cannot apply to iommu/next next-20170206] [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/Joerg-Roedel/Let

Re: [PATCH v8 9/9] perf/amd/iommu: Enable support for multiple IOMMUs

2017-02-06 Thread Suravee Suthikulpanit
Boris, On 1/25/17 16:55, Borislav Petkov wrote: On Wed, Jan 25, 2017 at 10:46:53AM +0100, Peter Zijlstra wrote: Which is absolutely insane. Right, IMO, the simplest thing to do for your purposes is to embed a struct amd_iommu pointer into struct perf_amd_iommu at init time so that you don't

Re: [PATCH v8 9/9] perf/amd/iommu: Enable support for multiple IOMMUs

2017-02-06 Thread Suravee Suthikulpanit
Peter, On 1/25/17 16:46, Peter Zijlstra wrote: On Mon, Jan 16, 2017 at 01:23:36AM -0600, Suravee Suthikulpanit wrote: + pi = container_of(event->pmu, struct perf_amd_iommu, pmu); + hwc->idx = pi->idx; + hwc->config = event->attr.config; + hwc->ext

Re: [PATCH v8 9/9] perf/amd/iommu: Enable support for multiple IOMMUs

2017-02-06 Thread Suravee Suthikulpanit
Boris, On 1/23/17 02:55, Borislav Petkov wrote: @@ -421,46 +427,46 @@ static __init void amd_iommu_pc_exit(void) }; static __init int -_init_perf_amd_iommu(struct perf_amd_iommu *perf_iommu, char *name) +init_one_perf_amd_iommu(struct perf_amd_iommu *perf_iommu, unsigned int idx) { i

[PATCH 09/10] iommu/exynos: Make use of iommu_device_register interface

2017-02-06 Thread Joerg Roedel
From: Joerg Roedel Register Exynos IOMMUs to the IOMMU core and make them visible in sysfs. This patch does not add the links between IOMMUs and translated devices yet. Cc: Marek Szyprowski Cc: linux-arm-ker...@lists.infradead.org Cc: linux-samsung-...@vger.kernel.org Signed-off-by: Joerg Roede

[PATCH 01/10] iommu: Rename iommu_get_instance()

2017-02-06 Thread Joerg Roedel
From: Joerg Roedel Rename the function to iommu_ops_from_fwnode(), because that is what the function actually does. The new name is much more descriptive about what the function does. Signed-off-by: Joerg Roedel --- drivers/acpi/arm64/iort.c | 2 +- drivers/iommu/iommu.c | 2 +- include/li

[PATCH 03/10] iommu: Introduce new 'struct iommu_device'

2017-02-06 Thread Joerg Roedel
From: Joerg Roedel This struct represents one hardware iommu in the iommu core code. For now it only has the iommu-ops associated with it, but that will be extended soon. The register/unregister interface is also added, as well as making use of it in the Intel and AMD IOMMU drivers. Signed-off-

[PATCH 00/10 v2] Let IOMMU core know about individual IOMMUs

2017-02-06 Thread Joerg Roedel
Changes since v1: * Rebased to v4.10-rc7 * Fixed build failures found by the kbuild test robot Hi, the IOMMU core code already has two ways of representing individual hardware IOMMUs. One is the sysfs code and the other is the newer iommu_register_instance interface. Th

[PATCH 08/10] iommu/mediatek: Make use of iommu_device_register interface

2017-02-06 Thread Joerg Roedel
From: Joerg Roedel Register individual Mediatek IOMMUs to the iommu core and add sysfs entries. Cc: Matthias Brugger Cc: linux-arm-ker...@lists.infradead.org Cc: linux-media...@lists.infradead.org Signed-off-by: Joerg Roedel --- drivers/iommu/mtk_iommu.c | 26 ++ drive

[PATCH 07/10] iommu/msm: Make use of iommu_device_register interface

2017-02-06 Thread Joerg Roedel
From: Joerg Roedel Register the MSM IOMMUs to the iommu core and add sysfs entries for that driver. Signed-off-by: Joerg Roedel --- drivers/iommu/msm_iommu.c | 73 +++ drivers/iommu/msm_iommu.h | 3 ++ 2 files changed, 76 insertions(+) diff --git a

[PATCH 05/10] iommu: Make iommu_device_link/unlink take a struct iommu_device

2017-02-06 Thread Joerg Roedel
From: Joerg Roedel This makes the interface more consistent with iommu_device_sysfs_add/remove. Signed-off-by: Joerg Roedel --- drivers/iommu/amd_iommu.c | 4 ++-- drivers/iommu/intel-iommu.c | 4 ++-- drivers/iommu/iommu-sysfs.c | 16 include/linux/iommu.h | 4 ++--

[PATCH 10/10] iommu: Remove iommu_register_instance interface

2017-02-06 Thread Joerg Roedel
From: Joerg Roedel And also move its remaining functionality to iommu_device_register() and 'struct iommu_device'. Cc: Rob Herring Cc: Frank Rowand Cc: Matthias Brugger Cc: Marek Szyprowski Cc: devicet...@vger.kernel.org Cc: linux-arm-ker...@lists.infradead.org Signed-off-by: Joerg Roedel -

[PATCH 04/10] iommu: Add sysfs bindings for struct iommu_device

2017-02-06 Thread Joerg Roedel
From: Joerg Roedel There is currently support for iommu sysfs bindings, but those need to be implemented in the IOMMU drivers. Add a more generic version of this by adding a struct device to struct iommu_device and use that for the sysfs bindings. Also convert the AMD and Intel IOMMU driver to m

[PATCH 02/10] iommu: Rename struct iommu_device

2017-02-06 Thread Joerg Roedel
From: Joerg Roedel The struct is used to link devices to iommu-groups, so 'struct group_device' is a better name. Further this makes the name iommu_device available for a struct representing hardware iommus. Signed-off-by: Joerg Roedel --- drivers/iommu/iommu.c | 10 +- 1 file changed,

[PATCH 06/10] iommu/arm-smmu: Make use of the iommu_register interface

2017-02-06 Thread Joerg Roedel
From: Joerg Roedel Also add the smmu devices to sysfs. Signed-off-by: Joerg Roedel --- drivers/iommu/arm-smmu-v3.c | 20 +++- drivers/iommu/arm-smmu.c| 29 + 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/drivers/iommu/arm-smmu-v3

Re: [PATCH] iommu: fix static checker warning in iommu_insert_device_resv_regions

2017-02-06 Thread Joerg Roedel
On Mon, Feb 06, 2017 at 10:11:38AM +0100, Eric Auger wrote: > In case the device reserved region list is void, the returned value > of iommu_insert_device_resv_regions is uninitialized. Let's return 0 > in that case. > > This fixes commit 6c65fb318e8b ("iommu: iommu_get_group_resv_regions"). > >

Re: [PATCH 1/1] iommu: to avoid an unnecessary assignment

2017-02-06 Thread Joerg Roedel
On Fri, Feb 03, 2017 at 05:35:02PM +0800, Zhen Lei wrote: > Move the assignment statement into if branch above, where it only > needs to be. > > Signed-off-by: Zhen Lei > --- > drivers/iommu/iommu.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) Applied, thanks.

Re: [PATCH] iommu: mtk: remove bogus 'select' statements

2017-02-06 Thread Joerg Roedel
On Thu, Feb 02, 2017 at 03:29:03PM +0100, Arnd Bergmann wrote: > The mediatek IOMMU driver enables some drivers that it does not directly > rely on, and that causes a warning for build testing: > > warning: (MTK_IOMMU_V1) selects COMMON_CLK_MT2701_VDECSYS which has unmet > direct dependencies (CO

Re: [PATCH] iommu/dma: Remove bogus dma_supported() implementation

2017-02-06 Thread Joerg Roedel
On Wed, Feb 01, 2017 at 05:53:04PM +, Robin Murphy wrote: > Back when this was first written, dma_supported() was somewhat of a > murky mess, with subtly different interpretations being relied upon in > various places. The "does device X support DMA to address range Y?" > uses assuming Y to be

Re: [PATCH v2] iommu/ipmmu-vmsa: Restrict IOMMU Domain Geometry to 32-bit address space

2017-02-06 Thread Joerg Roedel
On Tue, Jan 31, 2017 at 12:17:07PM +0100, Geert Uytterhoeven wrote: > Currently, the IPMMU/VMSA driver supports 32-bit I/O Virtual Addresses > only, and thus sets io_pgtable_cfg.ias = 32. However, it doesn't force > a 32-bit IOVA space through the IOMMU Domain Geometry. > > Hence if a device (e.g

Re: [patch] iommu: silence an uninintialized variable warning

2017-02-06 Thread Dan Carpenter
Never mind. Eric just sent his own patch. regards, dan carpenter ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

[patch] iommu: silence an uninintialized variable warning

2017-02-06 Thread Dan Carpenter
My static checker complains that we return an uninitialized scalar if the list is empty. If that's the case then we should return zero. Fixes: 6c65fb318e8b ("iommu: iommu_get_group_resv_regions") Signed-off-by: Dan Carpenter diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index b752c

[PATCH] iommu: fix static checker warning in iommu_insert_device_resv_regions

2017-02-06 Thread Eric Auger
In case the device reserved region list is void, the returned value of iommu_insert_device_resv_regions is uninitialized. Let's return 0 in that case. This fixes commit 6c65fb318e8b ("iommu: iommu_get_group_resv_regions"). Reported-by: Dan Carpenter Signed-off-by: Eric Auger --- Applies on to