Re: [PATCH 1/2] iommu: Add driver for Renesas VMSA-compatible IPMMU

2014-02-28 Thread Geert Uytterhoeven
on the comments ;-) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say programmer or something

Re: [PATCH 2/5] iommu/ipmmu-vmsa: Add device tree bindings documentation

2014-03-31 Thread Geert Uytterhoeven
interrupt. Does it make sense to have a property for the number of micro-TLBs, or is this handled transparently? E.g. ipmmu_mx has 24 micro-TLBs, but ipmmu_mp has 30. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org

Re: [PATCH 3/5] iommu/ipmmu-vmsa: Add device tree support

2014-03-31 Thread Geert Uytterhoeven
) + return -1; + + if (args.np != mmu-dev-of_node) + return -1; + + return args.args[0]; } Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations

Re: [PATCH 4/5] ARM: shmobile: r8a7791: Add IPMMU DT nodes

2014-03-31 Thread Geert Uytterhoeven
, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say programmer or something like

Re: [PATCH v2 2/5] iommu/ipmmu-vmsa: Add device tree bindings documentation

2014-04-17 Thread Geert Uytterhoeven
honor the two CC lines aboves? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say programmer

Re: [RFC PATCH 2/2] iommu: rockchip: Handle system-wide and runtime PM

2014-12-15 Thread Geert Uytterhoeven
() and pm_genpd_name_attach_cpuidle()? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say programmer or something like

Re: [PATCH] iommu/ipmmu-vmsa: change IOMMU_EXEC to IOMMU_NOEXEC

2014-12-15 Thread Geert Uytterhoeven
{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say programmer or something like

Re: [PATCH 10/10] ARM: shmobile: r8a7791: Add IPMMU DT nodes

2014-12-15 Thread Geert Uytterhoeven
look OK to me. However, my comment about the 0x800 offset is still valid. Shouldn't we have two register blocks, and let the driver use only the second one? If you ignore, feel free to add my Acked-by: Geert Uytterhoeven geert+rene...@glider.be Gr{oetje,eeting}s, Geert

Re: [PATCH v2 05/10] iommu/ipmmu-vmsa: Add device tree bindings documentation

2014-12-16 Thread Geert Uytterhoeven
Hi Laurent, On Tue, Dec 16, 2014 at 2:44 PM, Laurent Pinchart laurent.pinchart+rene...@ideasonboard.com wrote: Signed-off-by: Laurent Pinchart laurent.pinchart+rene...@ideasonboard.com Thanks! Apart from the minor nit below: Acked-by: Geert Uytterhoeven geert+rene...@glider.be

Re: [PATCH v2 10/10] ARM: shmobile: r8a7791: Add IPMMU DT nodes

2014-12-16 Thread Geert Uytterhoeven
On Tue, Dec 16, 2014 at 2:44 PM, Laurent Pinchart laurent.pinchart+rene...@ideasonboard.com wrote: Add the seven IPMMU instances found in the r8a7791 to DT with a disabled status. Signed-off-by: Laurent Pinchart laurent.pinchart+rene...@ideasonboard.com Acked-by: Geert Uytterhoeven geert+rene

Re: [PATCH v2 09/10] ARM: shmobile: r8a7790: Add IPMMU DT nodes

2014-12-16 Thread Geert Uytterhoeven
On Tue, Dec 16, 2014 at 2:44 PM, Laurent Pinchart laurent.pinchart+rene...@ideasonboard.com wrote: Add the six IPMMU instances found in the r8a7790 to DT with a disabled status. Signed-off-by: Laurent Pinchart laurent.pinchart+rene...@ideasonboard.com Acked-by: Geert Uytterhoeven geert+rene

Re: [PATCH linux-next] iommu: Enable LPAE pagetable on ARM only

2015-02-24 Thread Geert Uytterhoeven
), or by adding a check to arm_lpae_do_selftests(), to please all compile-testers. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking

Re: [PATCH] iommu-common: fix return type of iommu_tbl_range_alloc()

2015-10-21 Thread Geert Uytterhoeven
it) "unsigned long" to (32-bit) dma_addr_t will truncate the address. Does this function really need to return DMA_ERROR_CODE in case of failure? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.

Re: [PATCH/RFC 01/10] iommu/ipmmu-vmsa: Introduce features, break out alias

2015-12-16 Thread Geert Uytterhoeven
t; + bool use_ns_alias_offset; > +}; Given you're adding more than 4 features in this series, you may want to consider using an unsigned int bitfield instead. That way you could also store it directly in of_device_id.data, if you want. Gr{oetje,eeting}s, Ge

Re: [PATCH 03/06] iommu/ipmmu-vmsa: Break out utlb control function

2015-12-15 Thread Geert Uytterhoeven
- ipmmu_write(mmu, IMUCTR(utlb), 0); > + for (i = 0; i < dev_data->num_utlbs; ++i) > + fn(domain, dev_data->utlbs[i]); > } Unless you have further plans with the "fn" parameter, I would simply pass a bool enable/disable flag instead of a function

[PATCH] iommu/ipmmu-vmsa: Don't truncate ttbr if LPAE is not enabled

2015-12-22 Thread Geert Uytterhoeven
_cfg.ttbr[] is an array of u64s, assigning it to a phys_addr_t may truncates it. Make ttbr u64 to fix this. Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be> --- drivers/iommu/ipmmu-vmsa.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iommu/ipmmu-vmsa.c b/driv

Re: [PATCH 0/3] iommu/ipmmu-vmsa: Initial r8a7796 support

2016-06-07 Thread Geert Uytterhoeven
've queued it up in topic/r8a7796-ipmmu-v1 at https://git.kernel.org/cgit/linux/kernel/git/geert/renesas-drivers.git, and will include it in next renesas-drivers release. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m6

Re: [PATCH v2 00/11] iommu/ipmmu-vmsa: r8a7795 support V2

2016-06-06 Thread Geert Uytterhoeven
ching code Thanks for your series! For your convenience, I've queued it up in topic/r8a7795-ipmmu-v2 at https://git.kernel.org/cgit/linux/kernel/git/geert/renesas-drivers.git, and will include it in next renesas-drivers release. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- The

Re: [PATCH v3 00/06] iommu/ipmmu-vmsa: IPMMU multi-arch update V3

2016-06-07 Thread Geert Uytterhoeven
fig on renesas-drivers-2016-05-31-v4.7-rc1, which contained the previous version of your patch set. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call mys

Re: [PATCH v4 00/07] iommu/ipmmu-vmsa: IPMMU multi-arch update V4

2016-06-10 Thread Geert Uytterhoeven
ultiple contexts are added. Thanks for your series! For your convenience, I've queued it up in topic/ipmmu-multi-arch-v4 at https://git.kernel.org/cgit/linux/kernel/git/geert/renesas-drivers.git, and will include it in next renesas-drivers release. Gr{oetje,eeting}s, Geert --

Re: [RFC v3 02/45] dma-mapping: Use unsigned long for dma_attrs

2016-06-03 Thread Geert Uytterhoeven
DMA_ATTR_ALLOC_SINGLE_PAGES(1UL << 8) Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalist

Re: [RFC v3 29/45] m68k: dma-mapping: Use unsigned long for dma_attrs

2016-06-03 Thread Geert Uytterhoeven
On Thu, Jun 2, 2016 at 5:39 PM, Krzysztof Kozlowski <k.kozlow...@samsung.com> wrote: > Split out subsystem specific changes for easier reviews. This will be > squashed with main commit. > > Signed-off-by: Krzysztof Kozlowski <k.kozlow...@samsung.com> Looks good. Acked-by

Re: [PATCH v3 00/06] iommu/ipmmu-vmsa: IPMMU multi-arch update V3

2016-06-03 Thread Geert Uytterhoeven
gt; > Signed-off-by: Magnus Damm <damm+rene...@opensource.se> Thanks for your series! For your convenience, I've queued it up in topic/ipmmu-multi-arch-v3 at https://git.kernel.org/cgit/linux/kernel/git/geert/renesas-drivers.git, and will include it in next renesas-drivers release.

Re: [PATCH] iommu: ipmmu-vmsa: Use ARCH_RENESAS

2016-02-22 Thread Geert Uytterhoeven
seems to be a more > appropriate name than SHMOBILE for the majority of Renesas ARM based SoCs. > > Signed-off-by: Simon Horman <horms+rene...@verge.net.au> Acked-by: Geert Uytterhoeven <geert+rene...@glider.be> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven --

Re: [PATCH 03/10] iommu/ipmmu-vmsa: Teach xlate() to skip disabled iommus

2016-03-18 Thread Geert Uytterhoeven
to make sure the of_iommu code does not install ops > +* even though the iommu device is disabled > +*/ > + if (!of_device_is_available(spec->np)) > + return -ENODEV; > + > return 0; I think this should be handled in drivers/iommu/of_iommu.c:of_iommu_init() instead, cfr. co

Re: [PATCH] iommu/ipmmu-vmsa: Add r8a7795 DT binding

2016-03-02 Thread Geert Uytterhoeven
operties: > + > + - renesas,ipmmu-main: reference to the main IPMMU instance in two cells. > +The first cell is a phandle to the main IPMMU and the second cell is > +the interrupt bit number associated with the particular cache IPMMU > device. > +The interrupt bit number

Re: [PATCH v2] iommu/io-pgtable-armv7s: Fix kmem_cache_alloc() flags

2016-03-02 Thread Geert Uytterhoeven
rnel_init+0x8/0xec) > [] (kernel_init) from [] (ret_from_fork+0x14/0x2c) > Code: 1a03 e7f001f2 e3130001 0a00 (e7f001f2) > ---[ end trace 190f6f6b84352efd ]--- > > Keep the peace by adding GFP_DMA when allocating a table. Thanks, this makes the test succeed: arm-v7s

[PATCH 22/54] MAINTAINERS: Add file patterns for iommu device tree bindings

2016-05-22 Thread Geert Uytterhoeven
Submitters of device tree binding documentation may forget to CC the subsystem maintainer if this is missing. Signed-off-by: Geert Uytterhoeven <ge...@linux-m68k.org> Cc: Joerg Roedel <j...@8bytes.org> Cc: iommu@lists.linux-foundation.org --- Please apply this patch directly

Re: [PATCH v3] arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS to IOMMU

2017-02-02 Thread Geert Uytterhoeven
Hi Robin, On Thu, Feb 2, 2017 at 2:15 PM, Robin Murphy <robin.mur...@arm.com> wrote: > On 31/01/17 11:12, Geert Uytterhoeven wrote: >> Add support for allocating physically contiguous DMA buffers on arm64 >> systems with an IOMMU. This can be useful when two or more devi

[PATCH v3] arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS to IOMMU

2017-01-31 Thread Geert Uytterhoeven
__dma_alloc_coherent() already calls dma_alloc_from_contiguous() when CMA is available. Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be> Acked-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> --- v3: - Add Acked-by, - Update comment to "one of _4_

Re: [PATCH v2 1/2] iommu/dma: Add support for DMA_ATTR_FORCE_CONTIGUOUS

2017-01-31 Thread Geert Uytterhoeven
Hi Robin, On Fri, Jan 27, 2017 at 6:50 PM, Robin Murphy <robin.mur...@arm.com> wrote: > On 27/01/17 15:34, Geert Uytterhoeven wrote: >> Add helpers for allocating physically contiguous DMA buffers to the >> generic IOMMU DMA code. This can be useful when two or more devi

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

2017-01-31 Thread Geert Uytterhoeven
out a 40-bit IOVA, outside the 32-bit IOVA space, leading to out-of-bounds accesses of the PGD when mapping the IOVA. Force a 32-bit IOMMU Domain Geometry to fix this. Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be> Reviewed-by: Robin Murphy <robin.mur...@arm.com> ---

Re: [PATCH v2 05/11] iommu/ipmmu-vmsa: Make use of IOMMU_OF_DECLARE()

2017-02-07 Thread Geert Uytterhoeven
this should become: iommu_register_instance(>fwnode, (struct iommu_ops *)ops); Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical

[PATCH v4] arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS to IOMMU

2017-02-07 Thread Geert Uytterhoeven
__dma_alloc_coherent() already calls dma_alloc_from_contiguous() when CMA is available. Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be> Acked-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> --- v4: - Replace dma_to_phys()/phys_to_page() by vmalloc_to_page(), to pass

Re: [PATCH/RFC 2/2] iommu/ipmmu-vmsa: Opt-in slave devices based on ES version

2017-01-23 Thread Geert Uytterhoeven
Cs. Is that what you want? 2. Usually we match on the old broken versions instead (e.g. against "ES1.*"), as (1) it marks more clearly support for old SoCs, and (2) it makes it easier to remove the check later when these old SoCs are deemed extinct later. Gr{oe

Re: [PATCH v2 2/3] iommu/ipmmu-vmsa: Increase maximum micro-TLBS to 48

2017-01-23 Thread Geert Uytterhoeven
; seem necessary. > > Signed-off-by: Magnus Damm <damm+rene...@opensource.se> Thanks for your patch! Reviewed-by: Geert Uytterhoeven <geert+rene...@glider.be> > @@ -1141,7 +1145,7 @@ static int ipmmu_probe(struct platform_d > } > > mmu->dev = >

Re: [PATCH/RFC 2/2] iommu/ipmmu-vmsa: Opt-in slave devices based on ES version

2017-01-24 Thread Geert Uytterhoeven
Hi Magnus, On Tue, Jan 24, 2017 at 10:38 AM, Magnus Damm <magnus.d...@gmail.com> wrote: > On Mon, Jan 23, 2017 at 9:50 PM, Geert Uytterhoeven > <ge...@linux-m68k.org> wrote: >> On Mon, Jan 23, 2017 at 1:12 PM, Magnus Damm <magnus.d...@gmail.com> wrote: &g

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

2017-01-26 Thread Geert Uytterhoeven
Hi Robin, On Thu, Jan 26, 2017 at 12:23 PM, Robin Murphy <robin.mur...@arm.com> wrote: > On 26/01/17 09:53, 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 does

Re: [PATCH 0/2] Fix incorrect warning from dma-debug

2017-01-25 Thread Geert Uytterhoeven
it has not allocated [device address=0x00067bab2ff8] [size=8 bytes] __arm_lpae_map() added "ARM_LPAE_LVL_IDX(iova, lvl, data)" == 0xff8 to ptep (the PGD base address), but the PGD has only 32 bytes, leading to the warning. Does my analysis make sense? Do you have a clue? Thanks! Gr{oetje,

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

2017-01-26 Thread Geert Uytterhoeven
out a 40-bit IOVA, outside the 32-bit IOVA space, leading to out-of-bounds accesses of the PGD when mapping the IOVA. Force a 32-bit IOMMU Domain Geometry to fix this. Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be> --- Should the generic code restrict the geometry based on IAS i

[PATCH v2 0/2] iommu/dma: Add support for DMA_ATTR_FORCE_CONTIGUOUS

2017-01-27 Thread Geert Uytterhoeven
dance, as the buffer is contiguous, - Move CPU cache magement into the caller, which is much simpler with a single contiguous buffer. Thanks for your comments! Geert Uytterhoeven (2): iommu/dma: Add support for DMA_ATTR_FORCE_CONTIGUOUS arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS

[PATCH v2 2/2] arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS to IOMMU

2017-01-27 Thread Geert Uytterhoeven
() already calls dma_alloc_from_contiguous() when CMA is available. Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be> --- v2: - New, handle dispatching in the arch (arm64) code, as requested by Robin Murphy. --- arch/arm64/mm/dma-mapping.

[PATCH v2 1/2] iommu/dma: Add support for DMA_ATTR_FORCE_CONTIGUOUS

2017-01-27 Thread Geert Uytterhoeven
, iommu_dma_alloc_contiguous() has no callback to flush pages. Ensuring the returned region is made visible to a non-coherent device is the responsibility of the caller. Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be> --- v2: - Provide standalone iommu_dma_{alloc,free}_cont

Re: [PATCH 0/2] Fix incorrect warning from dma-debug

2017-01-25 Thread Geert Uytterhoeven
Hi Robin, On Wed, Jan 25, 2017 at 6:27 PM, Robin Murphy <robin.mur...@arm.com> wrote: > On 25/01/17 16:23, Geert Uytterhoeven wrote: >> On Mon, May 9, 2016 at 11:37 AM, Robin Murphy <robin.mur...@arm.com> wrote: >>> On 08/05/16 11:59, Niklas Söderlund wrote: >>

Re: [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option

2016-11-07 Thread Geert Uytterhoeven
I'm just not sure what situation it's actually the best solution for. If I set the DMA mask to a small value, DMA is never used, and SWIOTLB always falls back to bounce buffers (and DMAing from the small pool)? That's the inverse of what I want to achieve: I want to avoid using the boun

Re: [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option

2016-11-07 Thread Geert Uytterhoeven
Hi Konrad, On Mon, Oct 31, 2016 at 6:52 PM, Konrad Rzeszutek Wilk <konrad.w...@oracle.com> wrote: > On Mon, Oct 31, 2016 at 04:45:04PM +0100, Geert Uytterhoeven wrote: >> On architectures like arm64, swiotlb is tied intimately to the core >> architecture DMA support. In addi

Re: [v16, 0/7] Fix eSDHC host version register bug

2016-11-10 Thread Geert Uytterhoeven
>> - Fixed error code issue in guts driver >> Changes for v16: >> - Dropped patch 'powerpc/fsl: move mpc85xx.h to include/linux/fsl' >> - Added a bug-fix patch from Geert >> --- >> >> Arnd Bergmann (1): >> base: soc: introdu

[PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option

2016-10-31 Thread Geert Uytterhoeven
ot;, which disables the use of bounce buffers. If specified, trying to map memory that cannot be used with DMA will fail, and a warning will be printed (rate-limited). Note that io_tlb_nslabs is set to 1, which is the minimal supported value. Signed-off-by: Geert Uytterhoeven <geert+rene

[PATCH 1/2] swiotlb: Rate-limit printing when running out of SW-IOMMU space

2016-10-31 Thread Geert Uytterhoeven
of the open-coded dev_name() handling by using the appropriate dev_err_*() variant. Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be> --- lib/swiotlb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 22e13a0e19

[PATCH 0/2] swiotlb: Rate-limit printing and 64-bit memory debugging

2016-10-31 Thread Geert Uytterhoeven
outside the 32-bit address space. Thanks for your comments! Geert Uytterhoeven (2): swiotlb: Rate-limit printing when running out of SW-IOMMU space swiotlb: Add swiotlb=nobounce debug option Documentation/kernel-parameters.txt | 3 ++- lib/swiotlb.c | 23

Re: [PATCH 2/2] swiotlb: Add swiotlb=nobounce debug option

2016-10-31 Thread Geert Uytterhoeven
Hi Robin, On Mon, Oct 31, 2016 at 6:41 PM, Robin Murphy <robin.mur...@arm.com> wrote: > On 31/10/16 15:45, Geert Uytterhoeven wrote: >> On architectures like arm64, swiotlb is tied intimately to the core >> architecture DMA support. In addition, ZONE_DMA cannot be dis

Re: [PATCH v3] iommu/ipmmu-vmsa: Add r8a7796 DT binding

2016-11-29 Thread Geert Uytterhoeven
mm+rene...@opensource.se> > Acked-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> > Acked-by: Rob Herring <r...@kernel.org> > Acked-by: Simon Horman <horms+rene...@verge.net.au> Acked-by: Geert Uytterhoeven <geert+rene...@glider.be> Gr{oetje,eeting}s,

Re: [PATCH] iommu/dma: Add support for DMA_ATTR_FORCE_CONTIGUOUS

2017-01-13 Thread Geert Uytterhoeven
Hi Robin, On Fri, Jan 13, 2017 at 12:32 PM, Robin Murphy <robin.mur...@arm.com> wrote: > On 13/01/17 11:07, Geert Uytterhoeven wrote: >> Add support for DMA_ATTR_FORCE_CONTIGUOUS to the generic IOMMU DMA code. >> This allows to allocate physically contiguous DMA buffer

[PATCH] iommu/dma: Add support for DMA_ATTR_FORCE_CONTIGUOUS

2017-01-13 Thread Geert Uytterhoeven
is available. Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be> --- arch/arm64/mm/dma-mapping.c | 4 ++-- drivers/iommu/dma-iommu.c | 44 ++-- include/linux/dma-iommu.h | 2 +- 3 files changed, 37 insertions(+), 13 deletions(-) diff

Re: [PATCH] iommu/dma: Add support for DMA_ATTR_FORCE_CONTIGUOUS

2017-01-13 Thread Geert Uytterhoeven
Hi Robin, On Fri, Jan 13, 2017 at 1:17 PM, Robin Murphy <robin.mur...@arm.com> wrote: > On 13/01/17 11:59, Geert Uytterhoeven wrote: >> On Fri, Jan 13, 2017 at 12:32 PM, Robin Murphy <robin.mur...@arm.com> wrote: >>> On 13/01/17 11:07, Geert Uytter

Re: [PATCH v3 0/3] iommu/ipmmu-vmsa: r8a7796 support V3

2017-03-22 Thread Geert Uytterhoeven
vers.git/tag/?h=renesas-drivers-2017-03-21-v4.11-rc3 I expect them to apply cleanly to your next branch, too. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I ca

Re: [PATCH] arm64/dma-mapping: fix DMA_ATTR_FORCE_CONTIGUOUS mmaping code

2017-03-30 Thread Geert Uytterhoeven
phys_to_page(dma_to_phys(dev, handle)); // in >>> __swiotlb_get_sgtable >>> I guess it is similarly in __swiotlb_mmap. >>> >>> Are these translations equivalent? >> Ah, my mistake, sorry - I managed to forget that cpu_addr is always >> remapped for FORCE_CONTIGUOUS (*and

Re: [PATCH] arm64/dma-mapping: fix DMA_ATTR_FORCE_CONTIGUOUS mmaping code

2017-03-30 Thread Geert Uytterhoeven
t; If you do want to go down that route, then I would much rather we fix > dma_common_contiguous_remap() to leave a valid array in area->pages in > the first place, than be temporarily faking them up around individual calls. The only point of using the pages array here in the first place is

Re: [PATCH] arm64/dma-mapping: fix DMA_ATTR_FORCE_CONTIGUOUS mmaping code

2017-03-29 Thread Geert Uytterhoeven
+ if (!ret) > + sg_set_page(sgt->sgl, vmalloc_to_page(cpu_addr), > + PAGE_ALIGN(size), 0); > + > + return ret; > + } > + > + if (WARN_ON(!area->pages)) > return -ENXIO; &g

Re: [PATCH v2] arm64/dma-mapping: fix DMA_ATTR_FORCE_CONTIGUOUS mmaping code

2017-04-21 Thread Geert Uytterhoeven
64-specific handling. That was actually the approach I took in my v1. V2 changed that to provide standalone iommu_dma_{alloc,free}_contiguous() functions. V3 changed that to call everything directly from the arm64 code. ... Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven --

Re: [PATCH v3 3/3] iommu/ipmmu-vmsa: Hook up r8a7796 DT matching code

2017-03-12 Thread Geert Uytterhoeven
mpat string. > > Signed-off-by: Magnus Damm <damm+rene...@opensource.se> Reviewed-by: Geert Uytterhoeven <geert+rene...@glider.be> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conve

Re: [PATCH v3 02/09] iommu/ipmmu-vmsa: Add optional root device feature

2017-03-08 Thread Geert Uytterhoeven
} > + } > + > + spin_unlock(_devices_lock); > + return found ? mmu : NULL; return root; > +} Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m

Re: [PATCH v3 04/09] iommu/ipmmu-vmsa: Make use of IOMMU_OF_DECLARE()

2017-03-08 Thread Geert Uytterhoeven
, what's the rationale for not using IOMMU_OF_DECLARE() on arm32, and thus the need for setup_done? Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. B

Re: [PATCH v3 09/09] iommu/ipmmu-vmsa: Hook up r8a7795 DT matching code

2017-03-08 Thread Geert Uytterhoeven
} > + > + /* For R-Car Gen3 use a white list to opt-in slave devices */ > + if (soc_device_match(soc_r8a7795) && !ipmmu_slave_whitelist(dev)) > + return -ENODEV; Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's

[PATCH v5] arm64: Add support for DMA_ATTR_FORCE_CONTIGUOUS to IOMMU

2017-03-07 Thread Geert Uytterhoeven
__dma_alloc_coherent() already calls dma_alloc_from_contiguous() when CMA is available. Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be> Acked-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> Reviewed-by: Robin Murphy <robin.mur...@arm.com> --- v5: - Add Reviewed-by,

Re: [PATCH v7 01/07] iommu/ipmmu-vmsa: Remove platform data handling

2017-03-08 Thread Geert Uytterhoeven
off-by: Magnus Damm <damm+rene...@opensource.se> > Reviewed-by: Laurent Pinchart <laurent.pinch...@ideasonboard.com> > Reviewed-by: Joerg Roedel <jroe...@suse.de> Reviewed-by: Geert Uytterhoeven <geert+rene...@glider.be> Gr{oetje,eeting}s, Geert -- G

Re: [PATCH v7 04/07] iommu/ipmmu-vmsa: Break out domain allocation code

2017-03-08 Thread Geert Uytterhoeven
mm <damm+rene...@opensource.se> > Reviewed-by: Joerg Roedel <jroe...@suse.de> Reviewed-by: Geert Uytterhoeven <geert+rene...@glider.be> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In p

Re: [PATCH v7 06/07] iommu/ipmmu-vmsa: ARM and ARM64 archdata access

2017-03-08 Thread Geert Uytterhoeven
to support > Signed-off-by: Magnus Damm <damm+rene...@opensource.se> > Reviewed-by: Joerg Roedel <jroe...@suse.de> Reviewed-by: Geert Uytterhoeven <geert+rene...@glider.be> > --- 0010/drivers/iommu/ipmmu-vmsa.c > +++ work/drivers/iommu/ipmmu-vmsa.c 2017-03-0

Re: [PATCH V8 07/11] iommu: of: Handle IOMMU lookup failure with deferred probing or error

2017-05-02 Thread Geert Uytterhoeven
t; -void of_dma_configure(struct device *dev, struct device_node *np); > +int of_dma_configure(struct device *dev, struct device_node *np); > void of_dma_deconfigure(struct device *dev); > #else /* CONFIG_OF */ > > @@ -105,8 +105,11 @@ static inline struct device_node > *of_cpu_device_node

Re: [PATCH v8 08/08] iommu/ipmmu-vmsa: Fix pgsize_bitmap semicolon typo

2017-05-17 Thread Geert Uytterhoeven
+rene...@opensource.se> Reviewed-by: Geert Uytterhoeven <geert+rene...@glider.be> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker.

Re: [PATCH 33/44] openrisc: remove arch-specific dma_supported implementation

2017-06-09 Thread Geert Uytterhoeven
Hellwig <h...@lst.de> > --- > arch/openrisc/include/asm/dma-mapping.h | 7 --- Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. Bu

Re: [PATCH 04/04] iommu/ipmmu-vmsa: Replace local utlb code with fwspec ids

2017-06-16 Thread Geert Uytterhoeven
); > } Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or

Re: [PATCH 02/04] iommu/ipmmu-vmsa: Consistent ->of_xlate() handling

2017-06-16 Thread Geert Uytterhoeven
gt; > num_utlbs = of_count_phandle_with_args(dev->of_node, "iommus", > @@ -734,6 +738,12 @@ error: > return ret; > } > > +static int ipmmu_of_xlate(struct device *dev, > + struct of_phandle_args *spec) > +{ ... here &g

Re: [PATCH 0/2] Fix incorrect warning from dma-debug

2017-05-08 Thread Geert Uytterhoeven
s to change arch/arm64/mm/dma-mapping.c:dma_debug_do_init() from fs_initcall() to arch_initcall(). However, then you loose the debugfs features. A proper fix would involve splitting dma_debug_init() in two phases: an early one doing the real work, and a late one registering the debugfs interface. Gr

Re: [PATCH V8 07/11] iommu: of: Handle IOMMU lookup failure with deferred probing or error

2017-05-05 Thread Geert Uytterhoeven
Hi Sricharan, Robin, On Wed, May 3, 2017 at 12:24 PM, Sricharan R <sricha...@codeaurora.org> wrote: > On 5/3/2017 3:24 PM, Robin Murphy wrote: >> On 02/05/17 19:35, Geert Uytterhoeven wrote: >>> On Fri, Feb 3, 2017 at 4:48 PM, Sricharan R <sricha...@codeaurora.org>

Re: [PATCH 3/3] iommu/ipmmu-vmsa: Document R-Car D3 IPMMU DT bindings

2017-09-22 Thread Geert Uytterhoeven
gt; Signed-off-by: Magnus Damm <damm+rene...@opensource.se> Acked-by: Geert Uytterhoeven <geert+rene...@glider.be> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technica

Re: [PATCH 2/3] iommu/ipmmu-vmsa: Document R-Car V3M IPMMU DT bindings

2017-09-22 Thread Geert Uytterhoeven
gt; Signed-off-by: Magnus Damm <damm+rene...@opensource.se> Acked-by: Geert Uytterhoeven <geert+rene...@glider.be> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technica

Re: [PATCH] pci: Add dummy for pci_acs_enabled() if CONFIG_PCI=n to fix iommmu build

2017-09-22 Thread Geert Uytterhoeven
Hi Björn, On Fri, Sep 22, 2017 at 5:56 PM, Bjorn Helgaas <helg...@kernel.org> wrote: > On Mon, Sep 11, 2017 at 02:29:15PM +0200, Geert Uytterhoeven wrote: >> If CONFIG_PCI=n, and gcc (e.g. 4.1.2) decides not to inline >> get_pci_function_alias_group(), the build fails wi

Re: [PATCH 2/2] lib: Improve a size determination in seven functions

2017-10-08 Thread Geert Uytterhoeven
parameter for the operator "sizeof" to make the corresponding size > determination a bit safer according to the Linux coding style convention. > > This issue was detected by using the Coccinelle software. > > Signed-off-by: Markus Elfring <elfr...@users.sourceforge.net>

[PATCH] dt-bindings: iommu: ipmmu-vmsa: Use generic node name

2017-10-04 Thread Geert Uytterhoeven
Use the preferred generic node name in the example. Signed-off-by: Geert Uytterhoeven <geert+rene...@glider.be> --- Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/iommu/r

Re: [PATCH 1/2] mmc: renesas_sdhi: fix swiotlb buffer is full

2017-10-17 Thread Geert Uytterhoeven
= 512, Fixing this in the individual drivers feels like the wrong solution to me. iommu: Is there a better (generic) way to handle this? > + /* Gen3 SDHI DMAC cannot handle scatter-gather. So, max_segs = 1 */ > .max_segs = 1, > }; Gr{oetje,eeting}s,

[PATCH] iommu: QCOM_IOMMU should depend on HAS_DMA

2017-09-11 Thread Geert Uytterhoeven
QCOM_IOMMU depend on HAS_DMA to fix this. Fixes: 0ae349a0f33fb040 ("iommu/qcom: Add qcom_iommu") Signed-off-by: Geert Uytterhoeven <ge...@linux-m68k.org> --- drivers/iommu/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig ind

[PATCH] pci: Add dummy for pci_acs_enabled() if CONFIG_PCI=n to fix iommmu build

2017-09-11 Thread Geert Uytterhoeven
, as get_pci_function_alias_group() is a not-so-small function called from two places. Hence fix the issue by introducing a dummy for pci_acs_enabled() instead. Signed-off-by: Geert Uytterhoeven <ge...@linux-m68k.org> --- include/linux/pci.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/pci.h b/i

Re: iommu/io-pgtable: depend on !GENERIC_ATOMIC64 when using COMPILE_TEST with LPAE

2017-09-25 Thread Geert Uytterhoeven
Hi Will, On Mon, Sep 25, 2017 at 5:21 PM, Will Deacon <will.dea...@arm.com> wrote: > On Mon, Sep 25, 2017 at 09:16:22AM +0200, Geert Uytterhoeven wrote: >> On Wed, Jul 12, 2017 at 7:16 PM, Linux Kernel Mailing List >> <linux-ker...@vger.kernel.org> wrote: &

Re: iommu/io-pgtable: depend on !GENERIC_ATOMIC64 when using COMPILE_TEST with LPAE

2017-09-25 Thread Geert Uytterhoeven
before. Perhaps there's another (SMP vs UP?) dependency, as include/asm-generic/cmpxchg.h cannot be used on SMP? Should it be COMPILE_TEST && (!GENERIC_ATOMIC64 || !SMP)? Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-

Re: [PATCH 12/12] dma-mapping: turn dma_cache_sync into a dma_map_ops method

2017-08-28 Thread Geert Uytterhoeven
uct dma_map_ops and implement it for the > mips defualt DMA ops, and the parisc pa11 ops. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people, I call myself a hacker. Bu

Re: [PATCH 1/2] mmc: renesas_sdhi: fix swiotlb buffer is full

2017-10-19 Thread Geert Uytterhoeven
Hi Konrad, On Thu, Oct 19, 2017 at 2:24 AM, Konrad Rzeszutek Wilk <kon...@darnok.org> wrote: > On Tue, Oct 17, 2017 at 10:02:50AM +0200, Geert Uytterhoeven wrote: >> On Tue, Oct 17, 2017 at 9:30 AM, Yoshihiro Shimoda >> <yoshihiro.shimoda...@renesas.com> wrote: >>

Re: [PATCH 2/2] iommu/ipmmu-vmsa: Add r8a779(70|95) DT bindings

2017-11-14 Thread Geert Uytterhoeven
ned-off-by: Simon Horman <horms+rene...@verge.net.au> > Reviewed-by: Geert Uytterhoeven <geert+rene...@glider.be> > --- > Documentation/devicetree/bindings/iommu/renesas,ipmmu-vmsa.txt | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/Documentation/devicetree/bi

Re: [PATCH/RFT v5 3/3] iommu/ipmmu-vmsa: Hook up r8a779(70|95) DT matching code

2017-11-15 Thread Geert Uytterhoeven
compat strings. > > Based on work for the r8a7796 by Magnus Damm > > Signed-off-by: Simon Horman <horms+rene...@verge.net.au> > Reviewed-by: Geert Uytterhoeven <geert+rene...@glider.be> > --- > v2 > * Add reviewed-by tag from Geert Uytterhoeven > --- > drive

Re: [PATCH 1/2] mmc: renesas_sdhi: fix swiotlb buffer is full

2017-11-03 Thread Geert Uytterhoeven
kernel parameter on arm64. > - In this case, the maximum size per a map is still 256k bytes because > the swiotlb has hardcoded the size by the following code: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/lib/swio

Re: [PATCH 1/2] iommu/ipmmu-vmsa: Add r8a779(70|95) DT bindings

2017-11-07 Thread Geert Uytterhoeven
Simon Horman <horms+rene...@verge.net.au> Reviewed-by: Geert Uytterhoeven <geert+rene...@glider.be> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- ge...@linux-m68k.org In personal conversations with technical people,

Re: [PATCH 2/2] iommu/ipmmu-vmsa: Hook up r8a779(70|95) DT matching code

2017-11-07 Thread Geert Uytterhoeven
ings. > > Based on work for the r8a7796 by Magnus Damm > > Signed-off-by: Simon Horman <horms+rene...@verge.net.au> Reviewed-by: Geert Uytterhoeven <geert+rene...@glider.be> Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Li

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

2018-05-07 Thread Geert Uytterhoeven
Hi Mauro, On Sat, May 5, 2018 at 2:47 PM, Mauro Carvalho Chehab <mchehab+sams...@kernel.org> wrote: > Em Tue, 17 Apr 2018 19:49:12 +0200 > Geert Uytterhoeven <ge...@linux-m68k.org> escreveu: > >> Remove dependencies on HAS_DMA where a Kconfig symbol depends on ano

Re: [PATCH] iommu/ipmmu-vmsa: Document R-Car V3H and E3 IPMMU DT bindings

2018-06-06 Thread Geert Uytterhoeven
On Mon, May 21, 2018 at 4:41 PM, Magnus Damm wrote: > From: Magnus Damm > > Update the IPMMU DT binding documentation to include the compat strings > for the IPMMU devices included in the R-Car V3H and E3 SoCs. > > Signed-off-by: Magnus Damm Reviewed-by: Geert Uytterhoeven

Re: [PATCH 27/67] dma-direct: add dma address sanity checks

2017-12-29 Thread Geert Uytterhoeven
dma_addr_t ... > + caller, (long long)dma_addr, size, ... and use _addr. > + (long long)*dev->dma_mask); This cast is not needed, as u64 is unsigned long long in kernelspace on all architectures. Gr{oetje,eeting}s, Geer

[PATCH/RFC 2/6] dma-coherent: Add NO_DMA dummies for managed DMA API

2018-02-06 Thread Geert Uytterhoeven
/xgene/xgene-enet.ko] undefined! ERROR: "dmam_alloc_coherent" [drivers/net/ethernet/apm/xgene/xgene-enet.ko] undefined! ERROR: "dmam_alloc_coherent" [drivers/mtd/nand/hisi504_nand.ko] undefined! ERROR: "dmam_alloc_coherent" [drivers/mmc/host/dw_mmc.ko]

[PATCH/RFC 0/6] Allow compile-testing NO_DMA

2018-02-06 Thread Geert Uytterhoeven
patch per subsystem, if this RFC is welcomed positively. Compile-tested with allmodconfig and allyesconfig for m68k/sun3. Thanks for your comments! Geert Uytterhoeven (6): [RFC] dma-mapping: Convert NO_DMA get_dma_ops() into a real dummy [RFC] dma-coherent: Add NO_DMA dummies for managed DMA

[PATCH/RFC 4/6] mm: Add NO_DMA dummies for DMA pool API

2018-02-06 Thread Geert Uytterhoeven
x.ko] undefined! ERROR: "dma_pool_free" [drivers/mailbox/bcm-pdc-mailbox.ko] undefined! ERROR: "dma_pool_create" [drivers/mailbox/bcm-pdc-mailbox.ko] undefined! ERROR: "dma_pool_destroy" [drivers/mailbox/bcm-pdc-mailbox.ko] undefined! Signed-off-by: Geert Uytterho

[PATCH/RFC 5/6] scsi: Add NO_DMA dummies for SCSI DMA mapping API

2018-02-06 Thread Geert Uytterhoeven
Add dummies for scsi_dma_{,un}map(), to allow compile-testing if NO_DMA=y. This prevents the following from showing up later: ERROR: "scsi_dma_unmap" [drivers/firewire/firewire-sbp2.ko] undefined! ERROR: "scsi_dma_map" [drivers/firewire/firewire-sbp2.ko] undefined!

[PATCH/RFC 3/6] usb: gadget: Add NO_DMA dummies for DMA mapping API

2018-02-06 Thread Geert Uytterhoeven
/gadget/udc/renesas_usb3.ko] undefined! ERROR: "usb_gadget_unmap_request" [drivers/usb/gadget/udc/renesas_usb3.ko] undefined! Signed-off-by: Geert Uytterhoeven <ge...@linux-m68k.org> --- include/linux/usb/gadget.h | 12 1 file changed, 12 insertions(+) diff --g

  1   2   3   >