Re: [RFC] arm64: Ensure proper addressing for ldnp/stnp

2016-09-19 Thread Robin Murphy
On 19/09/16 18:36, Brent DeGraaf wrote: > According to section 6.3.8 of the ARM Programmer's Guide, non-temporal > loads and stores do not verify that address dependency is met between a > load of an address to a register and a subsequent non-temporal load or > store using that address on the execu

Re: [RFC] arm64: Ensure proper addressing for ldnp/stnp

2016-09-20 Thread Robin Murphy
On 19/09/16 19:25, bdegr...@codeaurora.org wrote: > On 2016-09-19 14:01, Robin Murphy wrote: >> On 19/09/16 18:36, Brent DeGraaf wrote: >>> According to section 6.3.8 of the ARM Programmer's Guide, non-temporal >>> loads and stores do not verify that address depende

Re: [PATCH] dma-mapping.h: Preserve unmap info for CONFIG_DMA_API_DEBUG

2016-09-21 Thread Robin Murphy
so results in a false positive warnings about > previously mapped areas never being unmapped. Makes sense, although I guess it might be even clearer to simply have DMA_API_DEBUG select NEED_DMA_MAP_STATE. Either way, though, Reviewed-by: Robin Murphy > > Signed-off-by: Andrey Smir

Re: [PATCH 1/2] armv8: aarch32: Execute 32-bit Linux for LayerScape platforms

2016-09-23 Thread Robin Murphy
Hi Alison, On 23/09/16 03:19, Alison Wang wrote: > The ARMv8 architecture supports: > 1. 64-bit execution state, AArch64. > 2. 32-bit execution state, AArch32, that is compatible with previous > versions of the ARM architecture. > > LayerScape platforms are compliant with ARMv8 architecture. This

Re: [PATCH 1/2] armv8: aarch32: Execute 32-bit Linux for LayerScape platforms

2016-09-23 Thread Robin Murphy
On 23/09/16 14:13, Stuart Yoder wrote: > > >> -Original Message----- >> From: Robin Murphy [mailto:robin.mur...@arm.com] >> Sent: Friday, September 23, 2016 7:17 AM >> To: Alison Wang ; shawn...@kernel.org; >> ker...@pengutronix.de; Fabio Esteva

Re: [PATCH 1/2] armv8: aarch32: Execute 32-bit Linux for LayerScape platforms

2016-09-23 Thread Robin Murphy
On 23/09/16 15:01, Stuart Yoder wrote: > > >> -Original Message----- >> From: Robin Murphy [mailto:robin.mur...@arm.com] >> Sent: Friday, September 23, 2016 8:19 AM >> To: Stuart Yoder ; Alison Wang ; >> shawn...@kernel.org; >> ker...@peng

Re: [PATCH 1/2] armv8: aarch32: Execute 32-bit Linux for LayerScape platforms

2016-09-23 Thread Robin Murphy
On 23/09/16 15:44, Arnd Bergmann wrote: > On Friday, September 23, 2016 3:24:12 PM CEST Robin Murphy wrote: >> On 23/09/16 15:01, Stuart Yoder wrote: >> Otherwise you can >> always simply run your own shim at EL2 to drive an AArch32 EL1 (it'll >> need to trap and tr

Re: [PATCH] ARM: decompressor: reset ttbcr fields to use TTBR0 on ARMv7

2016-09-27 Thread Robin Murphy
On 27/09/16 13:16, Srinivas Ramana wrote: > Hi Robin, Sorry! This one had slipped my mind already... > On 09/13/2016 08:22 PM, Srinivas Ramana wrote: >> On 09/12/2016 11:21 PM, Robin Murphy wrote: >>> On 12/09/16 07:57, Srinivas Ramana wrote: >>>> If the bo

Re: [PATCH v2] arm64: mm: convert __dma_* routines to use start, size

2016-07-29 Thread Robin Murphy
On 28/07/16 01:08, kwangwoo@sk.com wrote: >> -Original Message- >> From: Robin Murphy [mailto:robin.mur...@arm.com] >> Sent: Wednesday, July 27, 2016 6:56 PM >> To: 이광우(LEE KWANGWOO) MS SW; Russell King - ARM Linux; Catalin Marinas; Will >> Deacon;

Re: [PATCH v2] arm64: mm: convert __dma_* routines to use start, size

2016-08-01 Thread Robin Murphy
On 01/08/16 00:45, kwangwoo@sk.com wrote: [...] -8<- diff --git a/arch/arm64/include/asm/assembler.h b/arch/arm64/include/asm/assembler.h index 10b017c4bdd8..1c005c90387e 100644 --- a/arch/arm64/include/asm/assembler.h +++ b/arch/arm64/include/asm/assembler

Re: [PATCH v2] arm64: mm: convert __dma_* routines to use start, size

2016-08-01 Thread Robin Murphy
On 01/08/16 14:36, Robin Murphy wrote: > On 01/08/16 00:45, kwangwoo@sk.com wrote: > [...] >>>>> -8<- >>>>> diff --git a/arch/arm64/include/asm/assembler.h >>>>> b/arch/arm64/include/asm/assembler.h >>>>> index

[PATCH v6.1] iommu/dma: Add support for mapping MSIs

2016-09-07 Thread Robin Murphy
Zyngier CC: linux-kernel@vger.kernel.org Signed-off-by: Robin Murphy --- - Rework map_page() helper function plus insane lookup logic into straightforward get_page() helper - Use phys_addr_t to further simplify address matching - Fix the bit where I neglected to actually round the doorbell

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-07 Thread Robin Murphy
On 07/09/16 10:55, Peter Chen wrote: [...] >> Regarding the DMA configuration that you mention in ci_hdrc_add_device(), >> I think we should replace >> >> pdev->dev.dma_mask = dev->dma_mask; >> pdev->dev.dma_parms = dev->dma_parms; >> dma_set_coherent_mask(&pdev->dev, dev->

Re: [PATCH] pcie: qcom: add support to msm8996 PCIE controller

2016-09-07 Thread Robin Murphy
On 07/09/16 12:06, Srinivas Kandagatla wrote: > This patch adds support to msm8996/apq8096 pcie, MSM8996 supports > Gen 1/2, One lane, 3 pcie root-complex with support to MSI and > legacy interrupts and it conforms to PCI Express Base 2.1 specification. > > This patch adds post_init callback to qc

Re: [PATCH v5 05/14] drivers: iommu: make iommu_fwspec OF agnostic

2016-09-13 Thread Robin Murphy
the new iommu_fwspec API by simply converting > the device_node to its fwnode_handle pointer. > > Signed-off-by: Lorenzo Pieralisi > Cc: Will Deacon > Cc: Hanjun Guo > Cc: Robin Murphy > Cc: Joerg Roedel > --- > drivers/iommu/Kconfig| 4 ++ > driver

Re: [PATCH v5 06/14] drivers: acpi: implement acpi_dma_configure

2016-09-13 Thread Robin Murphy
d-off-by: Lorenzo Pieralisi > Acked-by: Bjorn Helgaas [pci] > Cc: Bjorn Helgaas > Cc: Robin Murphy > Cc: Tomasz Nowicki > Cc: Joerg Roedel > Cc: "Rafael J. Wysocki" > --- > drivers/acpi/glue.c | 4 ++-- > drivers/acpi/scan.c | 24 +++

Re: [PATCH v5 07/14] drivers: acpi: iort: add support for ARM SMMU platform devices creation

2016-09-13 Thread Robin Murphy
On 09/09/16 15:23, Lorenzo Pieralisi wrote: > In ARM ACPI systems, IOMMU components are specified through static > IORT table entries. In order to create platform devices for the > corresponding ARM SMMU components, IORT kernel code should be made > able to parse IORT table entries and create platf

Re: [PATCH v5 09/14] drivers: iommu: arm-smmu-v3: add IORT configuration

2016-09-13 Thread Robin Murphy
ng a corresponding ACPI device > early probe section entry. > > Signed-off-by: Lorenzo Pieralisi > Cc: Will Deacon > Cc: Robin Murphy > Cc: Joerg Roedel > --- > drivers/acpi/arm64/iort.c | 103 >

[PATCH] of/platform: Initialise dev->fwnode appropriately

2016-09-14 Thread Robin Murphy
ad simply fill in the device's fwnode when binding the of_node, and let the drivers use dev->fwnode either way. Let's give it a go and see what falls out. Signed-off-by: Robin Murphy --- drivers/of/platform.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/of/platfo

Re: [PATCH] usb: dwc3: host: inherit dma configuration from parent dev

2016-09-02 Thread Robin Murphy
On 02/09/16 11:53, Felipe Balbi wrote: > > Hi, > > Arnd Bergmann writes: >> On Thursday, September 1, 2016 5:14:28 PM CEST Leo Li wrote: >>> >>> Hi Felipe and Arnd, >>> >>> It has been a while since the last response to this discussion, but we >>> haven't reached an agreement yet! Can we get to

Re: [PATCH 10/11] soc: ti: knav_qmss_queue: use of_property_read_bool

2016-08-05 Thread Robin Murphy
Hi Julia, On 05/08/16 09:56, Julia Lawall wrote: > Use of_property_read_bool to check for the existence of a property. This caught my eye since Rob told me off for doing the same recently[1]. > The semantic patch that makes this change is as follows: > (http://coccinelle.lip6.fr/) > > // > @@

[PATCH v5 19/19] iommu/dma: Add support for mapping MSIs

2016-08-23 Thread Robin Murphy
Zyngier CC: linux-kernel@vger.kernel.org Signed-off-by: Robin Murphy --- drivers/iommu/dma-iommu.c| 141 ++- drivers/irqchip/irq-gic-v2m.c| 3 + drivers/irqchip/irq-gic-v3-its.c | 3 + include/linux/dma-iommu.h| 9 +++ 4 files changed

Re: [PATCH v5 19/19] iommu/dma: Add support for mapping MSIs

2016-08-24 Thread Robin Murphy
On 24/08/16 09:16, Thomas Gleixner wrote: > On Tue, 23 Aug 2016, Robin Murphy wrote: >> +cookie = domain->iova_cookie; >> +iovad = &cookie->iovad; >> + >> +spin_lock(&cookie->msi_lock); >> +list_for_each_entry(msi_page, &coo

Re: [PATCH v5 19/19] iommu/dma: Add support for mapping MSIs

2016-08-25 Thread Robin Murphy
Hi Eric, On Fri, 26 Aug 2016 00:25:34 +0200 Auger Eric wrote: > Hi Robin, > > On 23/08/2016 21:05, Robin Murphy wrote: > > When an MSI doorbell is located downstream of an IOMMU, attaching > > devices to a DMA ops domain and switching on translation leads to a > > ru

Re: [PATCH] irqchip/gic-{v2m, v3-its}: check iommu capable before doing iommu map

2017-08-17 Thread Robin Murphy
On 17/08/17 10:22, Marc Zyngier wrote: > On 17/08/17 10:01, Shawn Lin wrote: >> Hi Marc >> >> On 2017/8/17 16:52, Marc Zyngier wrote: >>> On 17/08/17 09:28, Shawn Lin wrote: If a PCIe RC use gic-v2m or gic-v3-its as a msi domain but doesn't have iommu support, we don't need to do iommu_dm

[PATCH] iommu: Avoid NULL group dereference

2017-08-17 Thread Robin Murphy
ices regardless. Fixes: 05f80300dc8b ("iommu: Finish making iommu_group support mandatory") Reported-by: Shawn Lin Signed-off-by: Robin Murphy --- As well as dma-iommu, there are at least the Cavium ThunderX and Freescale DPAA2 ethernet drivers expecting this to work too. drivers/iom

Re: [PATCH] iommu: Avoid NULL group dereference

2017-08-17 Thread Robin Murphy
On 17/08/17 16:41, Joerg Roedel wrote: > On Thu, Aug 17, 2017 at 11:40:08AM +0100, Robin Murphy wrote: >> The recently-removed FIXME in iommu_get_domain_for_dev() turns out to >> have been a little misleading, since that check is still worthwhile even >> when groups *are* uni

Re: [PATCH] PCI/MSI: Improve MSI alias detection

2017-06-20 Thread Robin Murphy
On 19/06/17 22:52, Bjorn Helgaas wrote: > [+cc David, Alex] > > On Wed, May 31, 2017 at 06:52:28PM +0100, Robin Murphy wrote: >> Currently, we consider all DMA aliases when calculating MSI requester >> IDs. This turns out to be the wrong thing to do in the face of pure DMA &g

Re: [PATCH 1/1] iommu/arm-smmu-v3: replace writel with writel_relaxed in queue_inc_prod

2017-06-20 Thread Robin Murphy
On 20/06/17 12:04, Zhen Lei wrote: > This function is protected by spinlock, and the latter will do memory > barrier implicitly. So that we can safely use writel_relaxed. In fact, the > dmb operation will lengthen the time protected by lock, which indirectly > increase the locking confliction in th

Re: new dma-mapping tree, was Re: clean up and modularize arch dma_mapping interface V2

2017-06-20 Thread Robin Murphy
Hi Christoph, On 20/06/17 13:41, Christoph Hellwig wrote: > On Fri, Jun 16, 2017 at 08:10:15PM +0200, Christoph Hellwig wrote: >> I plan to create a new dma-mapping tree to collect all this work. >> Any volunteers for co-maintainers, especially from the iommu gang? > > Ok, I've created the new tr

Re: [PATCH v5 3/7] drivers: dma-coherent: Account dma_pfn_offset when used with device tree

2017-06-20 Thread Robin Murphy
On 20/06/17 14:42, Christoph Hellwig wrote: > Wouldn't the smal patch below solve the same issue in a simple way? That assumes that all devices accessing a shared pool will have the same dma_pfn_offset as the first one, which cannot strictly be relied upon (even if it is highly likely in practice

Re: [PATCH v5 4/7] drivers: dma-coherent: Introduce default DMA pool

2017-06-20 Thread Robin Murphy
On 20/06/17 14:49, Christoph Hellwig wrote: > On Wed, May 24, 2017 at 11:24:29AM +0100, Vladimir Murzin wrote: >> This patch introduces default coherent DMA pool similar to default CMA >> area concept. To keep other users safe code kept under CONFIG_ARM. > > I don't see a CONFIG_ARM in the code, a

Re: CONFIG_DMA_NOOP_OPS breaks ARM arch

2017-10-16 Thread Robin Murphy
On 16/10/17 09:12, Vladimir Murzin wrote: > + Robin and Christoph > > On 16/10/17 06:27, Marian Mihailescu wrote: >> I am using 4.14-rc4 with a patch on top that includes >> arch/arm/include/asm/dma-mapping.h in a module. >> >> I have MMU enabled, so >> select DMA_NOOP_OPS if !MMU >> does nothing

Re: ARM64: Regression with commit e3067861ba66 ("arm64: add basic VMAP_STACK support")

2017-10-16 Thread Robin Murphy
On 16/10/17 14:48, Mark Rutland wrote: > Hi Leo, > > On Mon, Oct 16, 2017 at 09:17:23AM +0800, Leo Yan wrote: >> On Tue, Oct 10, 2017 at 05:03:44PM +0100, Robin Murphy wrote: >>> On 10/10/17 16:45, Mark Rutland wrote: >>>> On Tue, Oct 10, 2017 at 10:27:25P

Re: ARM64: Regression with commit e3067861ba66 ("arm64: add basic VMAP_STACK support")

2017-10-16 Thread Robin Murphy
On 16/10/17 15:26, Mark Rutland wrote: > On Mon, Oct 16, 2017 at 03:12:45PM +0100, Robin Murphy wrote: >> On 16/10/17 14:48, Mark Rutland wrote: >>> Hi Leo, >>> >>> On Mon, Oct 16, 2017 at 09:17:23AM +0800, Leo Yan wrote: >>>> On Tue, Oct 10, 2017 a

Re: [PATCH V2] ARM: dts: rockchip:add sd card support for firefly reload board

2017-05-26 Thread Robin Murphy
On 26/05/17 08:07, Eddie Cai wrote: > firefly reload board not support sd card yet. so support it. I'm confused... According to pictures and the schematic the microSD socket and vcc_sd supply are on the baseboard, not the core module, and these nodes already exist in rk3288-firefly-reload.dts :/

Re: Device address specific mapping of arm,mmu-500

2017-05-30 Thread Robin Murphy
On 30/05/17 17:49, Ray Jui wrote: > Hi Will, > > On 5/30/17 8:14 AM, Will Deacon wrote: >> On Mon, May 29, 2017 at 06:18:45PM -0700, Ray Jui wrote: >>> I'm writing to check with you to see if the latest arm-smmu.c driver in >>> v4.12-rc Linux for smmu-500 can support mapping that is only specific

Re: [PATCH v1 0/3] manually add Error Synchronization Barrier at exception handler entry and exit

2017-11-01 Thread Robin Murphy
On 01/11/17 19:14, Dongjiu Geng wrote: > Some hardware platform can support RAS Extension, but not support IESB, > such as Huawei's platform, so software need to insert Synchronization Barrier > operations at exception handler entry. > > This series patches are based on James's series patches "SE

Re: [PATCH v1 1/3] arm64: add a macro for SError synchronization

2017-11-01 Thread Robin Murphy
On 01/11/17 19:14, Dongjiu Geng wrote: > ARMv8.2 adds a control bit to each SCTLR_ELx to insert implicit > Error Synchronization Barrier(IESB) operations at exception handler entry > and exit. But not all hardware platform which support RAS Extension > can support IESB. So for this case, software n

Re: [PATCH for-next 2/4] RDMA/hns: Add IOMMU enable support in hip08

2017-11-01 Thread Robin Murphy
On 01/11/17 07:46, Wei Hu (Xavier) wrote: > > > On 2017/10/12 20:59, Robin Murphy wrote: >> On 12/10/17 13:31, Wei Hu (Xavier) wrote: >>> >>> On 2017/10/1 0:10, Leon Romanovsky wrote: >>>> On Sat, Sep 30, 2017 at 05:28:59PM +0800, Wei Hu (Xavier) wro

Re: [PATCH v1 1/3] arm64: add a macro for SError synchronization

2017-11-01 Thread Robin Murphy
On 01/11/17 12:54, gengdongjiu wrote: > Hi Robin, > > On 2017/11/1 19:24, Robin Murphy wrote: >>> + esb >>> +alternative_else_nop_endif >>> +1: >>> + .endm >> Having a branch in here is pretty horrible, and furthermore using label >>

Re: [PATCH] arm64: write_sysreg asm illegal for aarch32

2017-11-01 Thread Robin Murphy
On 01/11/17 16:58, Mark Salyzyn wrote: > Cross compiling to aarch32 (for vdso32) using clang correctly > identifies that (the unused) write_sysreg inline asm directive is > illegal in that architectural context: > > arch/arm64/include/asm/arch_timer.h: error: invalid input constraint 'rZ' in > as

Re: [PATCH] arm64: mm: Set MAX_PHYSMEM_BITS based on ARM64_VA_BITS

2017-11-13 Thread Robin Murphy
On 13/11/17 10:32, Suzuki K Poulose wrote: On 12/11/17 17:55, Jerome Glisse wrote: On Fri, Nov 10, 2017 at 03:11:15PM +, Robin Murphy wrote: On 09/11/17 22:58, Krishna Reddy wrote: MAX_PHYSMEM_BITS greater than ARM64_VA_BITS is causing memory access fault, when HMM_DMIRROR test is enabled

Re: [PATCH 3/3] arm64: Add software workaround for Falkor erratum 1041

2017-11-03 Thread Robin Murphy
On 03/11/17 03:27, Shanker Donthineni wrote: > The ARM architecture defines the memory locations that are permitted > to be accessed as the result of a speculative instruction fetch from > an exception level for which all stages of translation are disabled. > Specifically, the core is permitted to

Re: [PATCH v2] iommu/iova: Use raw_cpu_ptr() instead of get_cpu_ptr() for ->fq

2017-11-06 Thread Robin Murphy
On 06/11/17 15:43, Alex Williamson wrote: > [cc +robin] > > On Thu, 2 Nov 2017 18:33:50 +0100 > Sebastian Andrzej Siewior wrote: > >> On 2017-09-21 17:21:40 [+0200], Sebastian Andrzej Siewior wrote: >>> get_cpu_ptr() disabled preemption and returns the ->fq object of the >>> current CPU. raw_cpu

Re: [PATCH 2/3] dmaengine: qcom_hidma: add support for the new revision

2017-11-06 Thread Robin Murphy
On 06/11/17 17:26, Sinan Kaya wrote: > Add support for probing the newer HW. > > Signed-off-by: Sinan Kaya > --- > drivers/dma/qcom/hidma.c | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/dma/qcom/hidma.c b/drivers/dma/qcom/hidma.c > index e366985..29d6aaa 100644 > --- a/

Re: [PATCH 3/4] iommu/arm-smmu-v3: Use NUMA memory allocations for stream tables and comamnd queues

2017-10-18 Thread Robin Murphy
On 04/10/17 14:53, Ganapatrao Kulkarni wrote: > Hi Robin, > > > On Thu, Sep 21, 2017 at 5:28 PM, Robin Murphy wrote: >> [+Christoph and Marek] >> >> On 21/09/17 09:59, Ganapatrao Kulkarni wrote: >>> Introduce smmu_alloc_coherent and smmu_free_coherent func

Re: [PATCH 4/4] dma-debug: Allow poisoning nonzero allocations

2015-10-07 Thread Robin Murphy
On 29/09/15 22:27, Andrew Morton wrote: [...] If I'm understanding things correctly, some allocators zero the memory by default and others do not. And we have an unknown number of drivers which are assuming that the memory is zeroed. Correct? That's precisely the motivation here, yes. If so

Re: [PATCH V2 2/3] Add iommu driver for hi6220 SoC platform

2015-10-20 Thread Robin Murphy
On 20/10/15 09:45, Chen Feng wrote: iommu/hisilicon: Add hi6220-SoC smmu driver A brief description of the smmu and what capabilities it provides wouldn't go amiss here. Signed-off-by: Chen Feng Signed-off-by: Yu Dongbin --- drivers/iommu/Kconfig| 8 + drivers/iommu/Makefile

Re: framebuffer corruption due to overlapping stp instructions on arm64

2018-08-06 Thread Robin Murphy
On 06/08/18 11:25, Mikulas Patocka wrote: [...] None of this explains why some transactions fail to make it across entirely. The overlapping writes in question write the same data to the memory locations that are covered by both, and so the ordering in which the transactions are received should n

Re: [PATCH] arm64: Trap WFI executed in userspace

2018-08-07 Thread Robin Murphy
On 07/08/18 11:30, Dave Martin wrote: On Tue, Aug 07, 2018 at 11:24:34AM +0100, Marc Zyngier wrote: On 07/08/18 11:05, Dave Martin wrote: On Tue, Aug 07, 2018 at 10:33:26AM +0100, Marc Zyngier wrote: It recently came to light that userspace can execute WFI, and that the arm64 kernel doesn trap

Re: [PATCH v14 4/4] iommu/arm-smmu: Add support for qcom,smmu-v2 variant

2018-08-22 Thread Robin Murphy
On 27/07/18 08:02, Vivek Gautam wrote: qcom,smmu-v2 is an arm,smmu-v2 implementation with specific clock and power requirements. This smmu core is used with multiple masters on msm8996, viz. mdss, video, etc. Add bindings for the same. Signed-off-by: Vivek Gautam Reviewed-by: Rob Herring Revie

Re: [PATCH mmc-next v2 3/3] mmc: sdhci-of-dwcmshc: solve 128MB DMA boundary limitation

2018-07-30 Thread Robin Murphy
Hi Jisheng, On 26/07/18 08:14, Jisheng Zhang wrote: When using DMA, if the DMA addr spans 128MB boundary, we have to split the DMA transfer into two so that each one doesn't exceed the boundary. Out of interest, is the driver already setting its segment boundary mask appropriately? This sound

Re: [BUG BISECT] Ethernet fail on VF50 (OF: Don't set default coherent DMA mask)

2018-07-30 Thread Robin Murphy
ommit ff33d1030a6ca87cea9a41e1a2ea7750a781ab3d as fault for my boot failures with NFSv4 root on Toradex Colibri VF50 (Iris carrier board). Author: Robin Murphy Date: Mon Jul 23 23:16:12 2018 +0100 OF: Don't set default coherent DMA mask Board: Toradex Colibri VF50 (NXP VF500, Cortex A5, serial confi

Re: [BUG BISECT] Ethernet fail on VF50 (OF: Don't set default coherent DMA mask)

2018-07-31 Thread Robin Murphy
On 31/07/18 09:19, Stefan Agner wrote: On 30.07.2018 16:38, Robin Murphy wrote: On 28/07/18 17:58, Guenter Roeck wrote: On Fri, Jul 27, 2018 at 04:04:48PM +0200, Christoph Hellwig wrote: On Fri, Jul 27, 2018 at 03:18:14PM +0200, Krzysztof Kozlowski wrote: On 27 July 2018 at 15:11, Krzysztof

Re: [BUG BISECT] Ethernet fail on VF50 (OF: Don't set default coherent DMA mask)

2018-07-31 Thread Robin Murphy
On 31/07/18 14:26, Guenter Roeck wrote: On 07/31/2018 05:32 AM, Robin Murphy wrote: On 31/07/18 09:19, Stefan Agner wrote: On 30.07.2018 16:38, Robin Murphy wrote: On 28/07/18 17:58, Guenter Roeck wrote: On Fri, Jul 27, 2018 at 04:04:48PM +0200, Christoph Hellwig wrote: On Fri, Jul 27, 2018

Re: [BUG BISECT] Ethernet fail on VF50 (OF: Don't set default coherent DMA mask)

2018-07-31 Thread Robin Murphy
On 31/07/18 16:43, Guenter Roeck wrote: On Tue, Jul 31, 2018 at 03:09:34PM +0100, Robin Murphy wrote: Please note that sparc images still generate the warning (next-20180731). Ugh, OK, any ideas what sparc does to create these platform devices that isn't of_platform_device_create_pdata(

Re: [BUG BISECT] Ethernet fail on VF50 (OF: Don't set default coherent DMA mask)

2018-07-31 Thread Robin Murphy
On 31/07/18 16:53, Stefan Agner wrote: On 31.07.2018 14:32, Robin Murphy wrote: On 31/07/18 09:19, Stefan Agner wrote: On 30.07.2018 16:38, Robin Murphy wrote: On 28/07/18 17:58, Guenter Roeck wrote: On Fri, Jul 27, 2018 at 04:04:48PM +0200, Christoph Hellwig wrote: On Fri, Jul 27, 2018 at

Re: [PATCH v2 0/4] arm64 SMMUv3 PMU driver with IORT support

2018-08-01 Thread Robin Murphy
Hi Shameer, On 01/08/18 09:52, Shameerali Kolothum Thodi wrote: Hi Lorenzo/Robin, Just a gentle ping on this series. This is a v2 for smmu pmcg support based on Neil Leeder's v1[1]. Thanks for picking this up - it's not gone unnoticed ;) It'll take me a while to page all this stuff back in,

Re: [BUG BISECT] Ethernet fail on VF50 (OF: Don't set default coherent DMA mask)

2018-08-01 Thread Robin Murphy
On 31/07/18 18:38, Guenter Roeck wrote: On Tue, Jul 31, 2018 at 04:58:41PM +0100, Robin Murphy wrote: On 31/07/18 16:43, Guenter Roeck wrote: On Tue, Jul 31, 2018 at 03:09:34PM +0100, Robin Murphy wrote: Please note that sparc images still generate the warning (next-20180731). Ugh, OK, any

Re: [PATCH] arm_pmu: fix compiler warning in arm_pmu_device_probe

2018-08-02 Thread Robin Murphy
Hi Chris, On 01/08/18 22:45, Chris Packham wrote: GCC warns arm_pmu_platform.c:234:5: error: 'err' may be used uninitialized in this function [-Werror=maybe-uninitialized] This is because we rely on the for_each_cpu loop in armpmu_request_irqs to initialise err. The warning is a little bog

Re: [PATCH 4/7 v6] iommu/arm-smmu: Add support for the fsl-mc bus

2018-07-25 Thread Robin Murphy
On 09/07/18 12:18, Nipun Gupta wrote: Implement bus specific support for the fsl-mc bus including registering arm_smmu_ops and bus specific device add operations. I guess this is about as neat as it can get; Reviewed-by: Robin Murphy Signed-off-by: Nipun Gupta --- drivers/iommu/arm

Re: [PATCH 5/7 v6] bus/fsl-mc: support dma configure for devices on fsl-mc bus

2018-07-25 Thread Robin Murphy
On 09/07/18 12:18, Nipun Gupta wrote: This patch adds support of dma configuration for devices on fsl-mc bus using 'dma_configure' callback for busses. Also, directly calling arch_setup_dma_ops is removed from the fsl-mc bus. Reviewed-by: Robin Murphy Signed-off-by: Nipun Gupta R

Re: [PATCH 1/7 v6] Documentation: fsl-mc: add iommu-map device-tree binding for fsl-mc bus

2018-07-25 Thread Robin Murphy
On 09/07/18 12:18, Nipun Gupta wrote: 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. No more nits from me :) Acked-by: Robin Murphy

Re: [PATCH] iommu/iova: Update cached node pointer when current node fails to get any free IOVA

2018-07-25 Thread Robin Murphy
, Ganapatrao Kulkarni wrote: On Mon, Apr 23, 2018 at 10:07 PM, Robin Murphy wrote: On 19/04/18 18:12, Ganapatrao Kulkarni wrote: The performance drop is observed with long hours iperf testing using 40G cards. This is mainly due to long iterations in finding the free iova range in 32bit address

Re: [RFC PATCH 0/4] Stop losing firmware-set DMA masks

2018-07-11 Thread Robin Murphy
On 11/07/18 15:40, Rob Herring wrote: On Tue, Jul 10, 2018 at 12:43 PM Robin Murphy wrote: Whilst the common firmware code invoked by dma_configure() initialises devices' DMA masks according to limitations described by the respective properties ("dma-ranges" for OF and _DM

Re: [PATCH v5 08/13] iommu/rockchip: Control clocks needed to access the IOMMU

2018-01-24 Thread Robin Murphy
iple times, right? I guess there could be other users who also want "just get whatever clocks I have" functionality, so it might be worth proposing that for the core API as a separate/follow-up patch, but it definitely doesn't need to be part of this series. I really

Re: [PATCH v2] iommu/mediatek: Move attach_device after iommu-group is ready for M4Uv1

2018-01-24 Thread Robin Murphy
h, sorry for breaking it! Seems I managed to forget just how horrible and fiddly all the arm_iommu_* stuff is :( CC: Robin Murphy CC: Honghui Zhang Fixes: 05f80300dc8b ("iommu: Finish making iommu_group support mandatory") Reported-by: Ryder Lee Tested-by: Bibby Hsieh Signed-off-by: Yo

Re: [PATCH v3] iommu/mediatek: Move attach_device after iommu-group is ready for M4Uv1

2018-01-25 Thread Robin Murphy
issue. CC: Robin Murphy CC: Honghui Zhang Fixes: 05f80300dc8b ('iommu: Finish making iommu_group support mandatory') Reported-by: Ryder Lee Signed-off-by: Yong Wu --- changes notes: v3: don't use the global variable and allocate a new iommu group before arm_iommu_attach_devi

Re: [PATCH RFC 0/3] API for 128-bit IO access

2018-01-25 Thread Robin Murphy
On 25/01/18 11:38, Yury Norov wrote: On Wed, Jan 24, 2018 at 11:28:55AM +0100, Arnd Bergmann wrote: On Wed, Jan 24, 2018 at 10:05 AM, Yury Norov wrote: This series adds API for 128-bit memory IO access and enables it for ARM64. The original motivation for 128-bit API came from new Cavium netwo

[PATCH 1/2] acpica: iort: Update SMMU models for IORT rev. C

2017-05-12 Thread Robin Murphy
IORT revision C has been published with a number of new SMMU implementation identifiers; define them. CC: Rafael J. Wysocki CC: Robert Moore CC: Lv Zheng Signed-off-by: Robin Murphy --- include/acpi/actbl2.h | 8 1 file changed, 8 insertions(+) diff --git a/include/acpi/actbl2.h b

[PATCH 2/2] iommu/arm-smmu: Plumb in new ACPI identifiers

2017-05-12 Thread Robin Murphy
Revision C of IORT now allows us to identify ARM MMU-401 and the Cavium ThunderX implementation; wire them up so that the appropriate quirks get enabled when booting with ACPI. Signed-off-by: Robin Murphy --- drivers/iommu/arm-smmu.c | 8 1 file changed, 8 insertions(+) diff --git a

Re: [patch 11/18] iommu/of: Adjust system_state check

2017-05-15 Thread Robin Murphy
extra states. FWIW, Acked-by: Robin Murphy > Signed-off-by: Thomas Gleixner > Cc: Joerg Roedel > Cc: io...@lists.linux-foundation.org > --- > drivers/iommu/of_iommu.c |2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > --- a/drivers/iommu/of_iommu.c > ++

Re: [PATCH 27/33] dma-direct: use node local allocations for coherent memory

2018-01-10 Thread Robin Murphy
On 10/01/18 15:30, Christoph Hellwig wrote: On Wed, Jan 10, 2018 at 12:06:22PM +, Robin Murphy wrote: On 10/01/18 08:00, Christoph Hellwig wrote: To preserve the x86 behavior. And combined with patch 10/22 of the SWIOTLB refactoring, this means SWIOTLB allocations will also end up NUMA

Re: [PATCH 31/33] dma-direct: reject too small dma masks

2018-01-10 Thread Robin Murphy
On 10/01/18 15:32, Christoph Hellwig wrote: On Wed, Jan 10, 2018 at 11:49:34AM +, Robin Murphy wrote: +#ifdef CONFIG_ZONE_DMA + if (mask < DMA_BIT_MASK(ARCH_ZONE_DMA_BITS)) + return 0; +#else + /* +* Because 32-bit DMA masks are so common we expect ev

Re: [PATCH 10/22] swiotlb: refactor coherent buffer allocation

2018-01-10 Thread Robin Murphy
On 10/01/18 15:46, Christoph Hellwig wrote: On Wed, Jan 10, 2018 at 12:22:18PM +, Robin Murphy wrote: + if (phys_addr == SWIOTLB_MAP_ERROR) + goto out_warn; -/* Confirm address can be DMA'd by device */ - if (dev_addr + size - 1 >

Re: [PATCH 21/22] arm64: replace ZONE_DMA with ZONE_DMA32

2018-01-10 Thread Robin Murphy
On 10/01/18 15:55, Christoph Hellwig wrote: On Wed, Jan 10, 2018 at 04:55:17PM +0100, Christoph Hellwig wrote: On Wed, Jan 10, 2018 at 12:58:14PM +, Robin Murphy wrote: On 10/01/18 08:09, Christoph Hellwig wrote: arm64 uses ZONE_DMA for allocations below 32-bits. These days we name the

Re: [PATCH 08/22] swiotlb: wire up ->dma_supported in swiotlb_dma_ops

2018-01-10 Thread Robin Murphy
On 10/01/18 15:35, Christoph Hellwig wrote: On Wed, Jan 10, 2018 at 12:16:15PM +, Robin Murphy wrote: On 10/01/18 08:09, Christoph Hellwig wrote: To properly reject too small DMA masks based on the addressability of the bounce buffer. I reckon this is self-evident enough that it should

Re: [PATCH 1/9] iommu/of: Drop early initialisation hooks

2018-01-11 Thread Robin Murphy
Hi Jeffy, On 11/01/18 11:14, JeffyChen wrote: Hi Marek, Thanks for your reply. On 01/11/2018 05:40 PM, Marek Szyprowski wrote: Hi Jeffy, On 2018-01-11 09:22, Jeffy Chen wrote: With the probe-deferral mechanism, early initialisation hooks are no longer needed. Suggested-by: Robin Murphy

Re: [PATCH] IIO: ADC: stm32-dfsdm: avoid unused-variable warning

2018-01-11 Thread Robin Murphy
On 11/01/18 10:34, Arnd Bergmann wrote: Building with CONFIG_OF disabled produces a compiler warning: drivers/iio/adc/stm32-dfsdm-core.c: In function 'stm32_dfsdm_probe': drivers/iio/adc/stm32-dfsdm-core.c:245:22: error: unused variable 'pnode' [-Werror=unused-variable] This removes the variab

Re: [PATCH 2/9] iommu/rockchip: Fix error handling in attach

2018-01-11 Thread Robin Murphy
On 11/01/18 08:22, Jeffy Chen wrote: From: Tomasz Figa Currently if the driver encounters an error while attaching device, it will leave the IOMMU in an inconsistent state. Even though it shouldn't really happen in reality, let's just add proper error path to keep things consistent. Signed-off

Re: [PATCH v2 10/16] arm64: KVM: Report SMCCC_ARCH_WORKAROUND_1 BP hardening support

2018-01-30 Thread Robin Murphy
On 29/01/18 17:45, Marc Zyngier wrote: A new feature of SMCCC 1.1 is that it offers firmware-based CPU workarounds. In particular, SMCCC_ARCH_WORKAROUND_1 provides BP hardening for CVE-2017-5715. If the host has some mitigation for this issue, report that we deal with it using SMCCC_ARCH_WORKARO

Re: [PATCH v2 13/16] firmware/psci: Expose SMCCC version through psci_ops

2018-01-30 Thread Robin Murphy
On 29/01/18 17:45, Marc Zyngier wrote: Since PSCI 1.0 allows the SMCCC version to be (indirectly) probed, let's do that at boot time, and expose the version of the calling convention as part of the psci_ops structure. Signed-off-by: Marc Zyngier --- drivers/firmware/psci.c | 21 ++

Re: [PATCH v2 04/16] arm/arm64: KVM: Add PSCI_VERSION helper

2018-01-30 Thread Robin Murphy
On 29/01/18 17:45, Marc Zyngier wrote: As we're about to trigger a PSCI version explosion, it doesn't hurt to introduce a PSCI_VERSION helper that is going to be used everywhere. Signed-off-by: Marc Zyngier --- include/kvm/arm_psci.h | 5 +++-- virt/kvm/arm/psci.c| 2 +- 2 files changed

Re: [PATCH v6 2/6] iommu/arm-smmu: Add pm_runtime/sleep ops

2018-01-31 Thread Robin Murphy
On 19/01/18 11:43, Vivek Gautam wrote: From: Sricharan R The smmu needs to be functional only when the respective master's using it are active. The device_link feature helps to track such functional dependencies, so that the iommu gets powered when the master device enables itself using pm_runt

Re: [PATCH v6 3/6] iommu/arm-smmu: Invoke pm_runtime during probe, add/remove device

2018-01-31 Thread Robin Murphy
On 19/01/18 11:43, Vivek Gautam wrote: From: Sricharan R The smmu device probe/remove and add/remove master device callbacks gets called when the smmu is not linked to its master, that is without the context of the master device. So calling runtime apis in those places separately. Signed-off-b

Re: [PATCH v6 4/6] iommu/arm-smmu: Add the device_link between masters and smmu

2018-01-31 Thread Robin Murphy
On 19/01/18 11:43, Vivek Gautam wrote: From: Sricharan R Finally add the device link between the master device and smmu, so that the smmu gets runtime enabled/disabled only when the master needs it. This is done from add_device callback which gets called once when the master is added to the smm

Re: [PATCH 1/2] iommu: Fix iommu_unmap and iommu_unmap_fast return type

2018-01-31 Thread Robin Murphy
Hi Suravee, On 31/01/18 01:48, Suravee Suthikulpanit wrote: Currently, iommu_unmap and iommu_unmap_fast return unmapped pages with size_t. However, the actual value returned could be error codes (< 0), which can be misinterpreted as large number of unmapped pages. Therefore, change the return t

Re: [PATCH 1/2] iommu: Fix iommu_unmap and iommu_unmap_fast return type

2018-02-01 Thread Robin Murphy
On 01/02/18 05:03, Suravee Suthikulpanit wrote: Hi Robin, On 2/1/18 1:02 AM, Robin Murphy wrote: Hi Suravee, On 31/01/18 01:48, Suravee Suthikulpanit wrote: Currently, iommu_unmap and iommu_unmap_fast return unmapped pages with size_t.  However, the actual value returned could be error codes

Re: [PATCH v3 13/18] firmware/psci: Expose PSCI conduit

2018-02-01 Thread Robin Murphy
On 01/02/18 11:46, Marc Zyngier wrote: In order to call into the firmware to apply workarounds, it is useful to find out whether we're using HVC or SMC. Let's expose this through the psci_ops. Reviewed-by: Robin Murphy Acked-by: Lorenzo Pieralisi Signed-off-by: Marc Zyngier ---

Re: [PATCH v3 14/18] firmware/psci: Expose SMCCC version through psci_ops

2018-02-01 Thread Robin Murphy
h the condition flipped and the redundant else case removed (or an explanation of why I'm wrong...) Reviewed-by: Robin Murphy + else + psci_ops.smccc_version = SMCCC_VERSION_1_1; + } + + pr_info("SMC Calling Convention v1.%d\n", psci_ops

Re: [PATCH v3 15/18] arm/arm64: smccc: Make function identifiers an unsigned quantity

2018-02-01 Thread Robin Murphy
possibly wrong. Reviewed-by: Robin Murphy Cc: sta...@vger.kernel.org Reported-by: Ard Biesheuvel Acked-by: Ard Biesheuvel Tested-by: Ard Biesheuvel Signed-off-by: Marc Zyngier --- include/linux/arm-smccc.h | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/linu

Re: [PATCH v3 16/18] arm/arm64: smccc: Implement SMCCC v1.1 inline primitive

2018-02-01 Thread Robin Murphy
e whole sequence away. "volatile" is what + * makes it stick. + */ +#define __arm_smccc_1_1(inst, ...) \ + do {\ + __declare_args(__count_args(__VA_ARGS__), __VA_ARGS__); \ +

Re: [PATCH v3 16/18] arm/arm64: smccc: Implement SMCCC v1.1 inline primitive

2018-02-01 Thread Robin Murphy
On 01/02/18 13:54, Marc Zyngier wrote: On 01/02/18 13:34, Robin Murphy wrote: On 01/02/18 11:46, Marc Zyngier wrote: One of the major improvement of SMCCC v1.1 is that it only clobbers the first 4 registers, both on 32 and 64bit. This means that it becomes very easy to provide an inline

Re: [PATCH] soc: mediatek: Handle return of of_match_device function

2018-02-01 Thread Robin Murphy
On 01/02/18 11:00, Himanshu Jha wrote: In scpsys_probe function, return value of of_match_device function which returns null is dereferenced without checking. Therefore, add a check for potential null dereference. Detected by CoverityScan, CID#1424087 "Dereference null return value" Fixes: comm

Re: [PATCH] soc: mediatek: Handle return of of_match_device function

2018-02-01 Thread Robin Murphy
On 01/02/18 15:09, Geert Uytterhoeven wrote: On Thu, Feb 1, 2018 at 4:02 PM, Robin Murphy wrote: On 01/02/18 11:00, Himanshu Jha wrote: In scpsys_probe function, return value of of_match_device function which returns null is dereferenced without checking. Therefore, add a check for potential

Re: [PATCH v6 2/2] media: V3s: Add support for Allwinner CSI.

2018-02-01 Thread Robin Murphy
On 31/01/18 09:37, Arnd Bergmann wrote: On Wed, Jan 31, 2018 at 8:29 AM, Maxime Ripard wrote: Hi Thierry, On Tue, Jan 30, 2018 at 11:01:50AM +0100, Thierry Reding wrote: On Tue, Jan 30, 2018 at 10:59:16AM +0100, Thierry Reding wrote: On Tue, Jan 30, 2018 at 10:24:48AM +0100, Arnd Bergmann wr

Re: [PATCH] ARM-SMMU: Delete error messages for a failed memory allocation in three functions

2018-01-22 Thread Robin Murphy
On 20/01/18 14:36, SF Markus Elfring wrote: From: Markus Elfring Date: Sat, 20 Jan 2018 15:30:17 +0100 Omit extra messages for a memory allocation failure in these functions. Why? It's your job as patch author to convince reviewers and maintainers why your change is a good thing and they sh

Re: [PATCH] iommu/of: Only do IOMMU lookup for available ones

2018-01-08 Thread Robin Murphy
Hi Jeffy, On 03/01/18 06:09, Jeffy Chen wrote: The for_each_matching_node_and_match() would return every matching nodes including unavailable ones. It's pointless to init unavailable IOMMUs, so add a sanity check to avoid that. Even better would be to clean up the last remaining init_fn user

Re: [PATCH] ARM: realview: remove eb-mp clcd IRQ

2018-01-08 Thread Robin Murphy
Hi Linus, On 21/12/17 22:08, Linus Walleij wrote: On Thu, Dec 21, 2017 at 10:31 PM, Arnd Bergmann wrote: We get a dtc warning about the CLCD interrupt being invalid: arch/arm/boot/dts/arm-realview-eb-11mp-ctrevb.dtb: Warning (interrupts_property): interrupts size is (8), expected multiple o

  1   2   3   4   5   6   7   8   9   10   >