Re: [PATCH 11/12] swiotlb: move the SWIOTLB config symbol to lib/Kconfig

2018-04-17 Thread Anshuman Khandual
On 04/15/2018 08:29 PM, Christoph Hellwig wrote: > This way we have one central definition of it, and user can select it as > needed. Note that we also add a second ARCH_HAS_SWIOTLB symbol to > indicate the architecture supports swiotlb at all, so that we can still > make the usage optional for a

Re: [PATCH 1/2] dt-bindings: iommu/rockchip: Make clock properties optional

2018-04-17 Thread Heiko Stuebner
Am Freitag, 13. April 2018, 23:02:26 CEST schrieb Rob Herring: > On Tue, Apr 10, 2018 at 01:26:41PM +0200, Heiko Stuebner wrote: > > Hi Robin, > > > > Am Dienstag, 10. April 2018, 13:18:48 CEST schrieb Robin Murphy: > > > On 10/04/18 10:26, Heiko Stuebner wrote: > > > > Rockchip IOMMUs are used

Re: [PATCH 01/12] iommu-common: move to arch/sparc

2018-04-17 Thread Michael Ellerman
Anshuman Khandual writes: > On 04/16/2018 07:28 PM, David Miller wrote: >> From: Anshuman Khandual >> Date: Mon, 16 Apr 2018 14:26:07 +0530 >> >>> On 04/15/2018 08:29 PM, Christoph Hellwig wrote: This code is only used by sparc, and

[PATCH 1/6 v2] Docs: dt: add fsl-mc iommu-map device-tree binding

2018-04-17 Thread Nipun Gupta
The existing IOMMU bindings cannot be used to specify the relationship between fsl-mc devices and IOMMUs. This patch adds a generic binding for mapping fsl-mc devices to IOMMUs, using iommu-map property. Signed-off-by: Nipun Gupta ---

[PATCH 2/6 v2] iommu: of: make of_pci_map_rid() available for other devices too

2018-04-17 Thread Nipun Gupta
iommu-map property is also used by devices with fsl-mc. This patch moves the of_pci_map_rid to generic location, so that it can be used by other busses too. Signed-off-by: Nipun Gupta --- drivers/iommu/of_iommu.c | 106 +--

[PATCH 3/6 v2] iommu: support iommu configuration for fsl-mc devices

2018-04-17 Thread Nipun Gupta
Signed-off-by: Nipun Gupta --- drivers/iommu/of_iommu.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c index 4e7712f..af4fc3b 100644 --- a/drivers/iommu/of_iommu.c +++ b/drivers/iommu/of_iommu.c

[PATCH 0/6 v2] Support for fsl-mc bus and its devices in SMMU

2018-04-17 Thread Nipun Gupta
This patchset defines IOMMU DT binding for fsl-mc bus and adds support in SMMU for fsl-mc bus. This patch series is dependent on patset: https://patchwork.kernel.org/patch/10317337/ These patches - Define property 'iommu-map' for fsl-mc bus (patch 1) - Integrates the fsl-mc bus with the SMMU

[PATCH 4/6 v2] iommu: arm-smmu: Add support for the fsl-mc bus

2018-04-17 Thread Nipun Gupta
Implement bus specific support for the fsl-mc bus including registering arm_smmu_ops and bus specific device add operations. Signed-off-by: Nipun Gupta --- drivers/iommu/arm-smmu.c | 7 +++ drivers/iommu/iommu.c| 21 + include/linux/fsl/mc.h |

[PATCH 5/6 v2] bus: fsl-mc: supoprt dma configure for devices on fsl-mc bus

2018-04-17 Thread Nipun Gupta
Signed-off-by: Nipun Gupta --- drivers/bus/fsl-mc/fsl-mc-bus.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/bus/fsl-mc/fsl-mc-bus.c b/drivers/bus/fsl-mc/fsl-mc-bus.c index 5d8266c..624828b 100644 ---

[PATCH 6/6 v2] arm64: dts: ls208xa: comply with the iommu map binding for fsl_mc

2018-04-17 Thread Nipun Gupta
Fsl-mc bus now support the iommu-map property. Comply to this binding for fsl_mc bus. This patch also updates the dts w.r.t. the DMA configuration. Signed-off-by: Nipun Gupta --- arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi | 6 +- 1 file changed, 5 insertions(+), 1

[PATCH v2] iommu/rockchip: make clock handling optional

2018-04-17 Thread Heiko Stuebner
iommu clocks are optional, so the driver should not fail if they are not present. Instead just set the number of clocks to 0, which the clk-blk APIs can handle just fine. Fixes: f2e3a5f557ad ("iommu/rockchip: Control clocks needed to access the IOMMU") Signed-off-by: Heiko Stuebner

Re: [PATCH v2] iommu/rockchip: make clock handling optional

2018-04-17 Thread Enric Balletbo Serra
2018-04-17 14:09 GMT+02:00 Heiko Stuebner : > iommu clocks are optional, so the driver should not fail if they are not > present. Instead just set the number of clocks to 0, which the clk-blk APIs > can handle just fine. > > Fixes: f2e3a5f557ad ("iommu/rockchip: Control clocks

Re: [PATCH 2/6 v2] iommu: of: make of_pci_map_rid() available for other devices too

2018-04-17 Thread Robin Murphy
On 17/04/18 11:21, Nipun Gupta wrote: iommu-map property is also used by devices with fsl-mc. This patch moves the of_pci_map_rid to generic location, so that it can be used by other busses too. Signed-off-by: Nipun Gupta --- drivers/iommu/of_iommu.c | 106

RE: [PATCH 2/6 v2] iommu: of: make of_pci_map_rid() available for other devices too

2018-04-17 Thread Bharat Bhushan
> -Original Message- > From: Robin Murphy [mailto:robin.mur...@arm.com] > Sent: Tuesday, April 17, 2018 10:23 PM > To: Nipun Gupta ; robh...@kernel.org; > frowand.l...@gmail.com > Cc: will.dea...@arm.com; mark.rutl...@arm.com; catalin.mari...@arm.com; > h...@lst.de;

[PATCH v3 19/20] staging: vc04_services: Remove depends on HAS_DMA in case of platform dependency

2018-04-17 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v3 13/20] mmc: Remove depends on HAS_DMA in case of platform dependency

2018-04-17 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v3 18/20] spi: Remove depends on HAS_DMA in case of platform dependency

2018-04-17 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v3 07/20] i2c: Remove depends on HAS_DMA in case of platform dependency

2018-04-17 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v3 17/20] serial: Remove depends on HAS_DMA in case of platform dependency

2018-04-17 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v3 05/20] firewire: Remove depends on HAS_DMA in case of platform dependency

2018-04-17 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

Re: [PATCH v4 09/22] iommu/vt-d: add svm/sva invalidate function

2018-04-17 Thread Alex Williamson
On Mon, 16 Apr 2018 14:48:58 -0700 Jacob Pan wrote: > When Shared Virtual Address (SVA) is enabled for a guest OS via > vIOMMU, we need to provide invalidation support at IOMMU API and driver > level. This patch adds Intel VT-d specific function to implement >

Re: [PATCH v4 04/22] iommu/vt-d: add bind_pasid_table function

2018-04-17 Thread Alex Williamson
On Mon, 16 Apr 2018 14:48:53 -0700 Jacob Pan wrote: > Add Intel VT-d ops to the generic iommu_bind_pasid_table API > functions. > > The primary use case is for direct assignment of SVM capable > device. Originated from emulated IOMMU in the guest, the request

Re: [PATCH 01/12] iommu-common: move to arch/sparc

2018-04-17 Thread Christoph Hellwig
On Mon, Apr 16, 2018 at 09:58:33AM -0400, David Miller wrote: > From: Anshuman Khandual > Date: Mon, 16 Apr 2018 14:26:07 +0530 > > > On 04/15/2018 08:29 PM, Christoph Hellwig wrote: > >> This code is only used by sparc, and all new iommu drivers should use the > >>

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-17 Thread Hook, Gary
On 4/16/2018 8:52 PM, Mehta, Sohil wrote: On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile index 5eb1121d54b9..0ca250f626d9 100644 --- a/drivers/iommu/Makefile +++ b/drivers/iommu/Makefile @@ -11,6 +11,7 @@

[PATCH v3 16/20] remoteproc: Remove depends on HAS_DMA in case of platform dependency

2018-04-17 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v3 14/20] mtd: Remove depends on HAS_DMA in case of platform dependency

2018-04-17 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v3 06/20] fpga: Remove depends on HAS_DMA in case of platform dependency

2018-04-17 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

Re: [PATCH v3 1/2] iommu - Enable debugfs exposure of the IOMMU

2018-04-17 Thread Robin Murphy
On 17/04/18 18:36, Hook, Gary wrote: On 4/13/2018 7:55 PM, Mehta, Sohil wrote: On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: +struct dentry *iommu_debugfs_setup(void) +{ +    if (!debugfs_initialized()) This check is probably not needed. Ah, so it isn't. Thank you. +   

Re: [PATCH v3 1/2] iommu - Enable debugfs exposure of the IOMMU

2018-04-17 Thread Hook, Gary
On 4/13/2018 7:55 PM, Mehta, Sohil wrote: On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: +struct dentry *iommu_debugfs_setup(void) +{ + if (!debugfs_initialized()) This check is probably not needed. Ah, so it isn't. Thank you. + return NULL; + + if

Re: [PATCH v2 00/21] Allow compile-testing NO_DMA (drivers)

2018-04-17 Thread Geert Uytterhoeven
Hi Rob, On Thu, Apr 5, 2018 at 2:32 AM, Rob Herring wrote: > On Fri, Mar 16, 2018 at 8:51 AM, Geert Uytterhoeven > wrote: >> If NO_DMA=y, get_dma_ops() returns a reference to the non-existing >> symbol bad_dma_ops, thus causing a link failure if it

[PATCH v3 09/20] iommu: Remove depends on HAS_DMA in case of platform dependency

2018-04-17 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v3 20/20] usb: Remove depends on HAS_DMA in case of platform dependency

2018-04-17 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v3 10/20] lightnvm: Remove depends on HAS_DMA in case of platform dependency

2018-04-17 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v3 01/20] ASoC: Remove depends on HAS_DMA in case of platform dependency

2018-04-17 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v3 08/20] iio: adc: Remove depends on HAS_DMA in case of platform dependency

2018-04-17 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v3 04/20] fbdev: Remove depends on HAS_DMA in case of platform dependency

2018-04-17 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v3 03/20] crypto: Remove depends on HAS_DMA in case of platform dependency

2018-04-17 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v3 15/20] net: Remove depends on HAS_DMA in case of platform dependency

2018-04-17 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

Re: [PATCH v3 1/2] iommu - Enable debugfs exposure of the IOMMU

2018-04-17 Thread Hook, Gary
On 4/17/2018 1:55 PM, Robin Murphy wrote: On 17/04/18 18:36, Hook, Gary wrote: On 4/13/2018 7:55 PM, Mehta, Sohil wrote: On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: +struct dentry *iommu_debugfs_setup(void) +{ +    if (!debugfs_initialized()) This check is probably not needed.

[PATCH v3 00/20] Allow compile-testing NO_DMA (drivers)

2018-04-17 Thread Geert Uytterhoeven
Hi all, As of v4.17-rc1, patch series "[PATCH v2 0/5] Allow compile-testing NO_DMA (core)" (https://lkml.org/lkml/2018/3/16/435) has been included upstream, and drivers using the DMA API can be compile-tested on platforms selecting NO_DMA. This follow-up patch series removes dependencies

[PATCH v3 11/20] mailbox: Remove depends on HAS_DMA in case of platform dependency

2018-04-17 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

[PATCH v3 02/20] ata: Remove depends on HAS_DMA in case of platform dependency

2018-04-17 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-17 Thread Hook, Gary
On 4/13/2018 8:08 PM, Mehta, Sohil wrote: On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: + +void amd_iommu_debugfs_setup(struct amd_iommu *iommu) +{ + char name[MAX_NAME_LEN + 1]; + struct dentry *d_top; + + if (!debugfs_initialized()) Probably not needed. Right.

Re: [PATCH v3 1/2] iommu - Enable debugfs exposure of the IOMMU

2018-04-17 Thread Hook, Gary
On 4/6/2018 9:17 AM, Gary R Hook wrote: Provide base enablement for using debugfs to expose internal data of an IOMMU driver. When called, create the /sys/kernel/debug/iommu directory. Emit a strong warning at boot time to indicate that this feature is enabled. This patch adds a top-level

Re: [PATCH v3 2/2] iommu/amd: Add basic debugfs infrastructure for AMD IOMMU

2018-04-17 Thread Robin Murphy
On 17/04/18 18:42, Hook, Gary wrote: On 4/16/2018 8:52 PM, Mehta, Sohil wrote: On Fri, 2018-04-06 at 08:17 -0500, Gary R Hook wrote: diff --git a/drivers/iommu/Makefile b/drivers/iommu/Makefile index 5eb1121d54b9..0ca250f626d9 100644 --- a/drivers/iommu/Makefile +++ b/drivers/iommu/Makefile

Re: [PATCH v3 1/2] iommu - Enable debugfs exposure of the IOMMU

2018-04-17 Thread Robin Murphy
On 17/04/18 18:46, Hook, Gary wrote: On 4/6/2018 9:17 AM, Gary R Hook wrote: Provide base enablement for using debugfs to expose internal data of an IOMMU driver. When called, create the /sys/kernel/debug/iommu directory.  Emit a strong warning at boot time to indicate that this feature is

[PATCH v3 12/20] media: Remove depends on HAS_DMA in case of platform dependency

2018-04-17 Thread Geert Uytterhoeven
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST". In most cases this other symbol is an architecture or platform specific symbol, or PCI. Generic symbols and drivers without platform dependencies keep their