Re: [PATCH v5 0/3] iommu/arm-smmu-qcom: Support maintaining bootloader mappings

2020-10-29 Thread Will Deacon
On Mon, 19 Oct 2020 11:23:20 -0700, Bjorn Andersson wrote: > This is the revised fourth attempt of inheriting the stream mapping for > the framebuffer on many Qualcomm platforms, in order to not hit > catastrophic faults during arm-smmu initialization. > > The new approach does, based on Robin's

Re: [PATCH v18 0/4] iommu/arm-smmu: Add adreno-smmu implementation and bindings

2020-10-29 Thread Will Deacon
On Tue, Oct 27, 2020 at 04:34:04PM -0600, Jordan Crouse wrote: > This short series adds support for the adreno-smmu implementation of the > arm-smmu driver and the device-tree bindings to turn on the implementation > for the sm845 and sc7180 GPUs. These changes are the last ones needed to >

Re: [PATCH v2 5/5] firmware: QCOM_SCM: Allow qcom_scm driver to be loadable as a permenent module

2020-10-28 Thread Will Deacon
On Tue, Oct 27, 2020 at 10:53:47PM -0700, John Stultz wrote: > On Mon, Jul 13, 2020 at 1:41 PM Will Deacon wrote: > > On Fri, Jul 10, 2020 at 03:21:53PM -0700, John Stultz wrote: > > > On Fri, Jul 10, 2020 at 12:54 AM Will Deacon wrote: > > > > On Thu, Jul 09,

Re: [PATCH v3 10/24] iommu/io-pgtable-arm-v7s: Add cfg as a param in some macros

2020-10-23 Thread Will Deacon
mu/io-pgtable-arm-v7s.c | 34 +++--- > 1 file changed, 17 insertions(+), 17 deletions(-) Acked-by: Will Deacon (but see my later comments above doing this for some of the 'constants' too) Will ___ iommu mailing list iommu@lists.linux-foundation.org ht

Re: [PATCH v3 09/24] iommu/io-pgtable-arm-v7s: Extend PA34 for MediaTek

2020-10-23 Thread Will Deacon
pgtable.h | 4 ++-- > 3 files changed, 10 insertions(+), 5 deletions(-) Acked-by: Will Deacon Will ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v3 11/24] iommu/io-pgtable-arm-v7s: Quad lvl1 pgtable for MediaTek

2020-10-23 Thread Will Deacon
On Wed, Sep 30, 2020 at 03:06:34PM +0800, Yong Wu wrote: > The standard input iova bits is 32. MediaTek quad the lvl1 pagetable > (4 * lvl1). No change for lvl2 pagetable. Then the iova bits can reach > 34bit. > > Signed-off-by: Yong Wu > --- > drivers/iommu/io-pgtable-arm-v7s.c | 13

Re: [PATCH v3 08/24] iommu/io-pgtable-arm-v7s: Use ias to check the valid iova in unmap

2020-10-23 Thread Will Deacon
On Wed, Sep 30, 2020 at 03:06:31PM +0800, Yong Wu wrote: > Use the ias for the valid iova checking in arm_v7s_unmap. This is a > preparing patch for supporting iova 34bit for MediaTek. > BTW, change the ias/oas checking format in arm_v7s_map. > > Signed-off-by: Yong Wu > --- >

Re: [PATCH v3 1/8] arm64: mm: Move reserve_crashkernel() into mem_init()

2020-10-15 Thread Will Deacon
On Wed, Oct 14, 2020 at 09:12:03PM +0200, Nicolas Saenz Julienne wrote: > crashkernel might reserve memory located in ZONE_DMA. We plan to delay > ZONE_DMA's initialization after unflattening the devicetree and ACPI's > boot table initialization, so move it later in the boot process. >

Re: [GIT PULL] iommu/arm-smmu: Updates for 5.10

2020-10-01 Thread Will Deacon
On Wed, Sep 30, 2020 at 09:05:23AM +0100, Will Deacon wrote: > Please pull these arm-smmu updates for 5.10. Summary in the tag, but the > big thing here is the long-awaited SVM enablement from Jean-Philippe. > We're not quite done yet, but this pull extends the SMMUv3 driver so that >

[GIT PULL] iommu/arm-smmu: Updates for 5.10

2020-09-30 Thread Will Deacon
lit pagetables iommu/arm-smmu: Prepare for the adreno-smmu implementation Rob Clark (1): iommu/arm-smmu: Constify some helpers Will Deacon (1): Merge branch 'for-next/svm' of git://git.kernel.org/.../arm64/linux into for-joerg/arm-smmu/updates Yu Kuai (1): iommu/qcom: add miss

Re: [PATCH V2] iommu/qcom: add missing put_device() call in qcom_iommu_of_xlate()

2020-09-29 Thread Will Deacon
On Tue, 29 Sep 2020 09:40:37 +0800, Yu Kuai wrote: > if of_find_device_by_node() succeed, qcom_iommu_of_xlate() doesn't have > a corresponding put_device(). Thus add put_device() to fix the exception > handling for this function implementation. Applied to will (for-joerg/arm-smmu/updates),

Re: [PATCH] iommu/qcom: add missing put_device() call in qcom_iommu_of_xlate()

2020-09-28 Thread Will Deacon
On Mon, Sep 21, 2020 at 09:45:57PM +0100, Will Deacon wrote: > On Tue, Sep 22, 2020 at 03:13:53AM +0800, kernel test robot wrote: > > Thank you for the patch! Perhaps something to improve: > > > > [auto build test WARNING on iommu/next] > > [also build test WARNING on

Re: [PATCH v10 00/13] iommu: Shared Virtual Addressing for SMMUv3 (PT sharing part)

2020-09-28 Thread Will Deacon
On Mon, Sep 28, 2020 at 06:23:15PM +0100, Will Deacon wrote: > On Mon, Sep 28, 2020 at 06:47:31PM +0200, Jean-Philippe Brucker wrote: > > On Fri, Sep 18, 2020 at 12:18:40PM +0200, Jean-Philippe Brucker wrote: > > > This is version 10 of the page table sharing support for Arm SMM

Re: [PATCH v10 01/13] mm: Define pasid in mm

2020-09-28 Thread Will Deacon
gt; > Suggested-by: Christoph Hellwig > Signed-off-by: Fenghua Yu > Reviewed-by: Tony Luck > --- > https://lore.kernel.org/linux-iommu/1600187413-163670-8-git-send-email-fenghua...@intel.com/ > --- > include/linux/mm_types.h | 4 +++

Re: [PATCH] iommu/arm-smmu-v3: Add rmb after reading event queue prod_reg

2020-09-28 Thread Will Deacon
On Mon, 28 Sep 2020 16:32:02 +0800, Zhou Wang wrote: > In arm_smmu_evtq_thread, reading event queue is from consumer pointer, > which has no address dependency on producer pointer, prog_reg(MMIO) and > event queue memory(Normal memory) can disorder. So the load for event queue > can be done before

Re: [PATCH v2] iommu/arm: Add module parameter to set msi iova address

2020-09-28 Thread Will Deacon
On Wed, Sep 23, 2020 at 08:32:43AM +0200, Auger Eric wrote: > On 9/21/20 10:45 PM, Will Deacon wrote: > > On Mon, Sep 14, 2020 at 11:13:07AM -0700, Vennila Megavannan wrote: > >> From: Srinath Mannam > >> > >> Add provision to change default value of MSI IOVA b

Re: [PATCH v10 00/13] iommu: Shared Virtual Addressing for SMMUv3 (PT sharing part)

2020-09-28 Thread Will Deacon
Hi Jean-Philippe, On Mon, Sep 28, 2020 at 06:47:31PM +0200, Jean-Philippe Brucker wrote: > On Fri, Sep 18, 2020 at 12:18:40PM +0200, Jean-Philippe Brucker wrote: > > This is version 10 of the page table sharing support for Arm SMMUv3. > > Patch 1 still needs an Ack from mm maintainers. However

Re: [PATCH v2 1/3] iommu/io-pgtable-arm: Support coherency for Mali LPAE

2020-09-28 Thread Will Deacon
,9 @@ arm_mali_lpae_alloc_pgtable(struct io_pgtable_cfg *cfg, > void *cookie) > cfg->arm_mali_lpae_cfg.transtab = virt_to_phys(data->pgd) | > ARM_MALI_LPAE_TTBR_READ_INNER | > ARM_MALI_LPAE_TTBR_ADRMODE_TABLE; > + if (cfg->

Re: [PATCH 1/3] iommu/io-pgtable-arm: Support coherency for Mali LPAE

2020-09-21 Thread Will Deacon
On Mon, Sep 21, 2020 at 10:53:23PM +0100, Robin Murphy wrote: > On 2020-09-21 18:57, Will Deacon wrote: > > On Wed, Sep 16, 2020 at 12:51:05AM +0100, Robin Murphy wrote: > > > Midgard GPUs have ACE-Lite master interfaces which allows systems to > > > integrate the

Re: [PATCHv4 1/6] iommu/io-pgtable-arm: Add support to use system cache

2020-09-21 Thread Will Deacon
On Mon, Sep 21, 2020 at 11:03:49PM +0100, Robin Murphy wrote: > On 2020-09-21 19:03, Will Deacon wrote: > > On Fri, Sep 11, 2020 at 07:57:18PM +0530, Sai Prakash Ranjan wrote: > > > Add a quirk IO_PGTABLE_QUIRK_SYS_CACHE to override the > > > attributes set in TCR for

Re: [PATCH v17 00/20] iommu/arm-smmu + drm/msm: per-process GPU pgtables

2020-09-21 Thread Will Deacon
On Sat, Sep 05, 2020 at 01:04:06PM -0700, Rob Clark wrote: > From: Rob Clark > > NOTE: I have re-ordered the series, and propose that we could merge this > series in the following order: > >1) 01-11 - merge via drm / msm-next >2) 12-15 - merge via iommu, no dependency on

Re: [PATCH v3 6/8] iommu/arm-smmu: Add impl hook for inherit boot mappings

2020-09-21 Thread Will Deacon
On Sat, Sep 12, 2020 at 10:25:59PM -0500, Bjorn Andersson wrote: > On Fri 11 Sep 12:13 CDT 2020, Robin Murphy wrote: > > On 2020-09-04 16:55, Bjorn Andersson wrote: > > > Add a new operation to allow platform implementations to inherit any > > > stream mappings from the boot loader. > > > > Is

Re: [PATCH] iommu/qcom: add missing put_device() call in qcom_iommu_of_xlate()

2020-09-21 Thread Will Deacon
On Tue, Sep 22, 2020 at 03:13:53AM +0800, kernel test robot wrote: > Thank you for the patch! Perhaps something to improve: > > [auto build test WARNING on iommu/next] > [also build test WARNING on linus/master v5.9-rc6 next-20200921] > [cannot apply to robclark/msm-next] > [If your patch is

Re: [PATCH v2] iommu/arm: Add module parameter to set msi iova address

2020-09-21 Thread Will Deacon
On Mon, Sep 14, 2020 at 11:13:07AM -0700, Vennila Megavannan wrote: > From: Srinath Mannam > > Add provision to change default value of MSI IOVA base to platform's > suitable IOVA using module parameter. The present hardcoded MSI IOVA base > may not be the accessible IOVA ranges of platform. >

Re: [PATCH] iommu/arm-smmu-v3: Fix endianness annotations

2020-09-21 Thread Will Deacon
On Fri, 18 Sep 2020 16:18:57 +0200, Jean-Philippe Brucker wrote: > When building with C=1, sparse reports some issues regarding endianness > annotations: > > arm-smmu-v3.c:221:26: warning: cast to restricted __le64 > arm-smmu-v3.c:221:24: warning: incorrect type in assignment (different base >

Re: [PATCHv4 1/6] iommu/io-pgtable-arm: Add support to use system cache

2020-09-21 Thread Will Deacon
On Fri, Sep 11, 2020 at 07:57:18PM +0530, Sai Prakash Ranjan wrote: > Add a quirk IO_PGTABLE_QUIRK_SYS_CACHE to override the > attributes set in TCR for the page table walker when > using system cache. I wonder if the panfrost folks can reuse this for the issue discussed over at:

Re: [PATCH 1/3] iommu/io-pgtable-arm: Support coherency for Mali LPAE

2020-09-21 Thread Will Deacon
On Wed, Sep 16, 2020 at 12:51:05AM +0100, Robin Murphy wrote: > Midgard GPUs have ACE-Lite master interfaces which allows systems to > integrate them in an I/O-coherent manner. It seems that from the GPU's > viewpoint, the rest of the system is its outer shareable domain, and so > even when snoop

Re: [PATCH] iommu/qcom: add missing put_device() call in qcom_iommu_of_xlate()

2020-09-21 Thread Will Deacon
On Fri, Sep 18, 2020 at 09:13:57AM +0800, Yu Kuai wrote: > if of_find_device_by_node() succeed, qcom_iommu_of_xlate() doesn't have > a corresponding put_device(). Thus add put_device() to fix the exception > handling for this function implementation. > > Fixes: e86d1aa8b60f ("iommu/arm-smmu: Move

Re: [PATCH v2 0/2] iommu/arm-smmu-v3: Improve cmdq lock efficiency

2020-09-21 Thread Will Deacon
On Fri, Aug 21, 2020 at 09:54:20PM +0800, John Garry wrote: > As mentioned in [0], the CPU may consume many cycles processing > arm_smmu_cmdq_issue_cmdlist(). One issue we find is the cmpxchg() loop to > get space on the queue takes a lot of time once we start getting many > CPUs contending - from

Re: [PATCHv4 6/6] iommu: arm-smmu-impl: Remove unwanted extra blank lines

2020-09-11 Thread Will Deacon
On Fri, Sep 11, 2020 at 05:03:06PM +0100, Robin Murphy wrote: > BTW am I supposed to have received 3 copies of everything? Because I did... Yeah, this seems to be happening for all of Sai's emails :/ Will ___ iommu mailing list

Re: [PATCH v5 0/3] iommu/arm-smmu-v3: permit users to disable msi polling

2020-09-07 Thread Will Deacon
On Thu, 27 Aug 2020 21:29:54 +1200, Barry Song wrote: > patch 1/3 and patch 2/3 are the preparation of patch 3/3 which permits users > to disable MSI-based polling by cmd line. > > -v5: > add Robin's reviewed-by > > -v4: > with respect to Robin's comments > * cleanup the code of the

Re: [PATCH] iommu/arm-smmu-v3: Fix l1 stream table size in the error message

2020-09-07 Thread Will Deacon
On Wed, 26 Aug 2020 22:17:58 +0800, Zenghui Yu wrote: > The actual size of level-1 stream table is l1size. This looks like an > oversight on commit d2e88e7c081ef ("iommu/arm-smmu: Fix LOG2SIZE setting > for 2-level stream tables") which forgot to update the @size in error > message as well. > >

Re: [PATCH] iommu/arm-smmu-v3: add tracepoints for cmdq_issue_cmdlist

2020-08-28 Thread Will Deacon
On Thu, Aug 27, 2020 at 09:33:51PM +1200, Barry Song wrote: > cmdq_issue_cmdlist() is the hotspot that uses a lot of time. This patch > adds tracepoints for it to help debug. > > Signed-off-by: Barry Song > --- > * can furthermore develop an eBPF program to benchmark using this trace Hmm,

Re: [PATCH] MAINTAINERS: update QUALCOMM IOMMU after Arm SSMU drivers move

2020-08-21 Thread Will Deacon
ation. > > Signed-off-by: Lukas Bulwahn > --- > Will, please ack. Typo in subject: s/SSMU/SMMU/ With that: Acked-by: Will Deacon > Joerg, please pick this minor non-urgent patch for your -next branch. Joerg -- can you queue this as a fix for 5.9-rc, please? Thanks, Will _

Re: [PATCH v6 1/2] dma-contiguous: provide the ability to reserve per-numa CMA

2020-08-21 Thread Will Deacon
On Fri, Aug 21, 2020 at 09:13:39AM +, Song Bao Hua (Barry Song) wrote: > > > > -Original Message- > > From: Will Deacon [mailto:w...@kernel.org] > > Sent: Friday, August 21, 2020 8:47 PM > > To: Song Bao Hua (Barry Song) > > Cc: h...@lst.de;

Re: [PATCH v6 2/2] arm64: mm: reserve per-numa CMA to localize coherent dma buffers

2020-08-21 Thread Will Deacon
> numa nodes. > > Cc: Christoph Hellwig > Cc: Marek Szyprowski > Cc: Will Deacon > Cc: Robin Murphy > Cc: Ganapatrao Kulkarni > Cc: Catalin Marinas > Cc: Nicolas Saenz Julienne > Cc: Steve Capper > Cc: Andrew Morton > Cc: Mike Rapoport > Signed-off-by: B

Re: [PATCH v6 1/2] dma-contiguous: provide the ability to reserve per-numa CMA

2020-08-21 Thread Will Deacon
On Fri, Aug 21, 2020 at 02:26:14PM +1200, Barry Song wrote: > diff --git a/Documentation/admin-guide/kernel-parameters.txt > b/Documentation/admin-guide/kernel-parameters.txt > index bdc1f33fd3d1..3f33b89aeab5 100644 > --- a/Documentation/admin-guide/kernel-parameters.txt > +++

Re: [PATCH v6 0/2] make dma_alloc_coherent NUMA-aware by per-NUMA CMA

2020-08-21 Thread Will Deacon
On Fri, Aug 21, 2020 at 08:19:18AM +0200, Christoph Hellwig wrote: > FYI, as of the last one I'm fine now, bit I really need an ACK from > the arm64 maintainers. Going through the dreaded backlog this morning... Will ___ iommu mailing list

Re: [PATCH 07/18] iommu/arm-smmu: Remove arch/arm workaround

2020-08-21 Thread Will Deacon
cfg = dev_iommu_priv_get(dev); > - if (!cfg) > - return -ENODEV; > - > smmu = cfg->smmu; > > ret = arm_smmu_rpm_get(smmu); Acked-by: Will Deacon Will ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH 1/2] dma-mapping: introduce relaxed version of dma sync

2020-08-18 Thread Will Deacon
On Tue, Aug 18, 2020 at 06:37:39PM +0900, Cho KyongHo wrote: > On Tue, Aug 18, 2020 at 09:28:53AM +0100, Will Deacon wrote: > > On Tue, Aug 18, 2020 at 04:43:10PM +0900, Cho KyongHo wrote: > > > Cache maintenance operations in the most of CPU architectures needs > >

Re: [PATCH 1/2] dma-mapping: introduce relaxed version of dma sync

2020-08-18 Thread Will Deacon
On Tue, Aug 18, 2020 at 04:43:10PM +0900, Cho KyongHo wrote: > Cache maintenance operations in the most of CPU architectures needs > memory barrier after the cache maintenance for the DMAs to view the > region of the memory correctly. The problem is that memory barrier is > very expensive and

Re: [Freedreno] [PATCH v12 04/13] iommu: Add a domain attribute to get/set a pagetable configuration

2020-08-13 Thread Will Deacon
On Thu, Aug 13, 2020 at 08:11:02AM -0700, Rob Clark wrote: > On Thu, Aug 13, 2020 at 6:14 AM Will Deacon wrote: > > > > On Mon, Aug 10, 2020 at 04:26:48PM -0600, Jordan Crouse wrote: > > > Add domain attribute DOMAIN_ATTR_PGTABLE_CFG. This will be used by > > &

Re: [PATCH v12 05/13] iommu/arm-smmu-qcom: Add implementation for the adreno GPU SMMU

2020-08-13 Thread Will Deacon
On Mon, Aug 10, 2020 at 04:26:49PM -0600, Jordan Crouse wrote: > Add a special implementation for the SMMU attached to most Adreno GPU > target triggered from the qcom,adreno-smmu compatible string. > > The new Adreno SMMU implementation will enable split pagetables > (TTBR1) for the domain

Re: [PATCH v12 00/13] iommu/arm-smmu: Add Adreno SMMU specific implementation

2020-08-13 Thread Will Deacon
On Mon, Aug 10, 2020 at 04:26:44PM -0600, Jordan Crouse wrote: > This series adds an Adreno SMMU implementation to arm-smmu to allow GPU > hardware > pagetable switching. > > The Adreno GPU has built in capabilities to switch the TTBR0 pagetable during > runtime to allow each individual instance

Re: [PATCH v12 04/13] iommu: Add a domain attribute to get/set a pagetable configuration

2020-08-13 Thread Will Deacon
On Mon, Aug 10, 2020 at 04:26:48PM -0600, Jordan Crouse wrote: > Add domain attribute DOMAIN_ATTR_PGTABLE_CFG. This will be used by > arm-smmu to share the current pagetable configuration with the > leaf driver and to allow the leaf driver to set up a new pagetable > configuration under certain

Re: [RFC v12 13/13] iommu/arm-smmu: Add a init_context_bank implementation hook

2020-08-13 Thread Will Deacon
On Mon, Aug 10, 2020 at 04:26:57PM -0600, Jordan Crouse wrote: > Add a new implementation hook to allow the implementation specific code > to tweek the context bank configuration just before it gets written. > The first user will be the Adreno GPU implementation to turn on > SCTLR.HUPCF to ensure

Re: [PATCH v2] iommu/arm-smmu-v3: disable MSI polling if SEV polling is faster

2020-07-31 Thread Will Deacon
On Fri, Jul 31, 2020 at 12:30:27PM +, Song Bao Hua (Barry Song) wrote: > Thanks for your comment. I had a patch with command line option as below. > If it is what you prefer, I'd refine this one and send. > > [PATCH] iommu/arm-smmu-v3: permit users to disable msi polling > --- >

Re: [PATCH v2] iommu/arm-smmu-v3: disable MSI polling if SEV polling is faster

2020-07-31 Thread Will Deacon
On Fri, Jul 31, 2020 at 10:48:33AM +, Song Bao Hua (Barry Song) wrote: > > -Original Message- > > From: John Garry > > Sent: Friday, July 31, 2020 10:21 PM > > To: Song Bao Hua (Barry Song) ; w...@kernel.org; > > robin.mur...@arm.com; j...@8bytes.org; iommu@lists.linux-foundation.org >

[GIT PULL] iommu/arm-smmu: Move driver files into their own subdir

2020-07-27 Thread Will Deacon
ory Will Deacon (1): iommu/arm-smmu: Move Arm SMMU drivers into their own subdirectory MAINTAINERS| 4 ++-- drivers/iommu/Makefile | 5 + drivers/iommu/arm/Makef

Re: [GIT PULL] iommu/arm-smmu: Updates for 5.9

2020-07-24 Thread Will Deacon
Hi Joerg, On Wed, Jul 22, 2020 at 03:33:23PM +0200, Joerg Roedel wrote: > On Tue, Jul 21, 2020 at 09:03:53AM +0100, Will Deacon wrote: > > Please pull these Arm SMMU driver updates for 5.9. Summary is in the tag, > > but the main thing is support for two new SoC integration

[GIT PULL] iommu/arm-smmu: Updates for 5.9

2020-07-21 Thread Will Deacon
phy (1): iommu/arm-smmu: Update impl quirks comment Tomasz Nowicki (2): iommu/arm-smmu: Call configuration impl hook before consuming features dt-bindings: arm-smmu: add compatible string for Marvell Armada-AP806 SMMU-500 Will Deacon (1): iommu: Remove unu

Re: [PATCH v11 0/5] NVIDIA ARM SMMU Implementation

2020-07-20 Thread Will Deacon
On Sat, 18 Jul 2020 12:34:52 -0700, Krishna Reddy wrote: > Changes in v11: > Addressed Rob comment on DT binding patch to set min/maxItems of reg property > in else part. > Rebased on top of > https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git/log/?h=for-joerg/arm-smmu/updates. > >

Re: [PATCH v8 00/12] iommu: Shared Virtual Addressing for SMMUv3 (PT sharing part)

2020-07-20 Thread Will Deacon
On Thu, Jun 18, 2020 at 05:51:13PM +0200, Jean-Philippe Brucker wrote: > Since v7 [1], I split the series into three parts to ease review. This > first one adds page table sharing to the SMMUv3 driver. The second one > adds support for I/O page faults through PRI and Stall, and the last one > adds

Re: [PATCH v2 5/5] iommu/arm-smmu: Setup identity domain for boot mappings

2020-07-20 Thread Will Deacon
On Thu, Jul 16, 2020 at 05:16:19PM -0700, Bjorn Andersson wrote: > With many Qualcomm platforms not having functional S2CR BYPASS a > temporary IOMMU domain, without translation, needs to be allocated in > order to allow these memory transactions. > > Unfortunately the boot loader uses the first

Re: [PATCH v2 2/5] iommu/arm-smmu: Emulate bypass by using context banks

2020-07-20 Thread Will Deacon
On Thu, Jul 16, 2020 at 05:16:16PM -0700, Bjorn Andersson wrote: > Some firmware found on various Qualcomm platforms traps writes to S2CR > of type BYPASS and writes FAULT into the register. This prevents us from > marking the streams for the display controller as BYPASS to allow > continued

Re: [PATCH v10 0/5] NVIDIA ARM SMMU Implementation

2020-07-17 Thread Will Deacon
On Mon, Jul 13, 2020 at 02:50:20PM +0100, Will Deacon wrote: > On Tue, Jul 07, 2020 at 10:00:12PM -0700, Krishna Reddy wrote: > > Changes in v10: > > Perform SMMU base ioremap before calling implementation init. > > Check for Global faults across both ARM MMU-500s du

Re: [PATCH v4 0/4] Add system mmu support for Armada-806

2020-07-16 Thread Will Deacon
On Thu, Jul 16, 2020 at 01:00:43PM +0100, Will Deacon wrote: > On Wed, 15 Jul 2020 09:06:45 +0200, Tomasz Nowicki wrote: > > The series is meant to support SMMU for AP806 and a workaround > > for accessing ARM SMMU 64bit registers is the gist of it. > > > > For the

Re: [PATCH v4 0/4] Add system mmu support for Armada-806

2020-07-16 Thread Will Deacon
On Wed, 15 Jul 2020 09:06:45 +0200, Tomasz Nowicki wrote: > The series is meant to support SMMU for AP806 and a workaround > for accessing ARM SMMU 64bit registers is the gist of it. > > For the record, AP-806 can't access SMMU registers with 64bit width. > This patches split the readq/writeq

Re: [PATCH 0/4] iommu/arm-smmu-v3: Improve cmdq lock efficiency

2020-07-16 Thread Will Deacon
On Thu, Jul 16, 2020 at 12:22:05PM +0100, Robin Murphy wrote: > On 2020-07-16 11:56, John Garry wrote: > > On 16/07/2020 11:28, Will Deacon wrote: > > > On Thu, Jul 16, 2020 at 11:22:33AM +0100, Will Deacon wrote: > > > > On Thu, Jul 16, 2020 at 11:19

Re: [PATCH 0/4] iommu/arm-smmu-v3: Improve cmdq lock efficiency

2020-07-16 Thread Will Deacon
On Thu, Jul 16, 2020 at 11:22:33AM +0100, Will Deacon wrote: > On Thu, Jul 16, 2020 at 11:19:41AM +0100, Will Deacon wrote: > > On Tue, Jun 23, 2020 at 01:28:36AM +0800, John Garry wrote: > > > As mentioned in [0], the CPU may consume many cycles processing > > > arm_smm

Re: [PATCH 0/4] iommu/arm-smmu-v3: Improve cmdq lock efficiency

2020-07-16 Thread Will Deacon
On Thu, Jul 16, 2020 at 11:19:41AM +0100, Will Deacon wrote: > On Tue, Jun 23, 2020 at 01:28:36AM +0800, John Garry wrote: > > As mentioned in [0], the CPU may consume many cycles processing > > arm_smmu_cmdq_issue_cmdlist(). One issue we find is the cmpxchg() loop to > > g

Re: [PATCH 4/4] iommu/arm-smmu-v3: Remove cmpxchg() in arm_smmu_cmdq_issue_cmdlist()

2020-07-16 Thread Will Deacon
On Tue, Jun 23, 2020 at 01:28:40AM +0800, John Garry wrote: > It has been shown that the cmpxchg() for finding space in the cmdq can > be a bottleneck: > - for more CPUs contending the cmdq, the cmpxchg() will fail more often > - since the software-maintained cons pointer is updated on the same

Re: [PATCH 0/4] iommu/arm-smmu-v3: Improve cmdq lock efficiency

2020-07-16 Thread Will Deacon
On Tue, Jun 23, 2020 at 01:28:36AM +0800, John Garry wrote: > As mentioned in [0], the CPU may consume many cycles processing > arm_smmu_cmdq_issue_cmdlist(). One issue we find is the cmpxchg() loop to > get space on the queue takes approx 25% of the cycles for this function. > > This series

Re: [Freedreno] [PATCH v9 4/7] iommu/arm-smmu: Add a pointer to the attached device to smmu_domain

2020-07-16 Thread Will Deacon
On Mon, Jul 13, 2020 at 11:19:17AM -0600, Jordan Crouse wrote: > On Mon, Jul 13, 2020 at 04:09:02PM +0100, Will Deacon wrote: > > On Fri, Jun 26, 2020 at 02:00:38PM -0600, Jordan Crouse wrote: > > > diff --git a/drivers/iommu/arm-smmu.h b/drivers/iommu/arm-smmu.h > &

Re: [PATCH v2 2/2] iommu: Add gfp parameter to io_pgtable_ops->map()

2020-07-14 Thread Will Deacon
as a bit nervous about us passing GFP_KERNEL with a spinlock held, but it looks like you've checked all the callsites and it looks fine to me, so: Acked-by: Will Deacon Joerg -- not sure what you want to do with this one, as it's likely to conflict (trivially) with unrelated driver changes.

Re: [PATCH v2 1/2] iommu: Mark __iommu_map/__iommu_map_sg as static

2020-07-14 Thread Will Deacon
tions(+), 5 deletions(-) Acked-by: Will Deacon (I'm assuming Joerg will pick this up for 5.9) Thanks, Will ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v3 0/4] Add system mmu support for Armada-806

2020-07-14 Thread Will Deacon
Hi Tomasz, On Thu, Jul 02, 2020 at 10:16:29PM +0200, Tomasz Nowicki wrote: > There were already two versions of series to support SMMU for AP806, > including workaround for accessing ARM SMMU 64bit registers. > First [1] by Hanna Hawa and second [2] by Gregory CLEMENT. > Since it got stuck this

Re: [PATCH v2 5/5] firmware: QCOM_SCM: Allow qcom_scm driver to be loadable as a permenent module

2020-07-14 Thread Will Deacon
On Mon, Jul 13, 2020 at 01:48:29PM -0700, John Stultz wrote: > On Mon, Jul 13, 2020 at 1:41 PM Will Deacon wrote: > > On Fri, Jul 10, 2020 at 03:21:53PM -0700, John Stultz wrote: > > > On Fri, Jul 10, 2020 at 12:54 AM Will Deacon wrote: > > > > On Thu, Jul 09,

Re: [PATCH v2 5/5] firmware: QCOM_SCM: Allow qcom_scm driver to be loadable as a permenent module

2020-07-13 Thread Will Deacon
On Fri, Jul 10, 2020 at 03:21:53PM -0700, John Stultz wrote: > On Fri, Jul 10, 2020 at 12:54 AM Will Deacon wrote: > > On Thu, Jul 09, 2020 at 08:28:45PM -0700, John Stultz wrote: > > > On Thu, Jul 2, 2020 at 7:18 AM Will Deacon wrote: > > > > On Thu, Jun 25,

Re: [PATCH v8 07/12] iommu/arm-smmu-v3: Share process page tables

2020-07-13 Thread Will Deacon
On Thu, Jun 18, 2020 at 05:51:20PM +0200, Jean-Philippe Brucker wrote: > With Shared Virtual Addressing (SVA), we need to mirror CPU TTBR, TCR, > MAIR and ASIDs in SMMU contexts. Each SMMU has a single ASID space split > into two sets, shared and private. Shared ASIDs correspond to those >

Re: [PATCH] iommu/arm-smmu: Add a init_context_bank implementation hook

2020-07-13 Thread Will Deacon
On Mon, Jul 13, 2020 at 11:00:32AM -0600, Jordan Crouse wrote: > On Mon, Jul 13, 2020 at 04:11:23PM +0100, Will Deacon wrote: > > On Thu, Jun 11, 2020 at 04:36:56PM -0600, Jordan Crouse wrote: > > > Add a new implementation hook to allow the implementation specific code > >

Re: [PATCH v8 04/12] arm64: mm: Pin down ASIDs for sharing mm with devices

2020-07-13 Thread Will Deacon
On Thu, Jun 18, 2020 at 05:51:17PM +0200, Jean-Philippe Brucker wrote: > To enable address space sharing with the IOMMU, introduce mm_context_get() > and mm_context_put(), that pin down a context and ensure that it will keep > its ASID after a rollover. Export the symbols to let the modular SMMUv3

Re: [PATCH] iommu/arm-smmu: Add a init_context_bank implementation hook

2020-07-13 Thread Will Deacon
On Thu, Jun 11, 2020 at 04:36:56PM -0600, Jordan Crouse wrote: > Add a new implementation hook to allow the implementation specific code > to tweek the context bank configuration just before it gets written. > The first user will be the Adreno GPU implementation to turn on > SCTLR.HUPCF to ensure

Re: [PATCH v9 4/7] iommu/arm-smmu: Add a pointer to the attached device to smmu_domain

2020-07-13 Thread Will Deacon
On Fri, Jun 26, 2020 at 02:00:38PM -0600, Jordan Crouse wrote: > Add a link to the pointer to the struct device that is attached to a > domain. This makes it easy to get the pointer if it is needed in the > implementation specific code. > > Signed-off-by: Jordan Crouse > --- > >

Re: [PATCH v10 0/5] NVIDIA ARM SMMU Implementation

2020-07-13 Thread Will Deacon
On Tue, Jul 07, 2020 at 10:00:12PM -0700, Krishna Reddy wrote: > Changes in v10: > Perform SMMU base ioremap before calling implementation init. > Check for Global faults across both ARM MMU-500s during global interrupt. > Check for context faults across all contexts of both ARM MMU-500s during >

Re: [PATCH v10 5/5] iommu/arm-smmu: Add global/context fault implementation hooks

2020-07-13 Thread Will Deacon
On Tue, Jul 07, 2020 at 10:00:17PM -0700, Krishna Reddy wrote: > Add global/context fault hooks to allow vendor specific implementations > override default fault interrupt handlers. > > Update NVIDIA implementation to override the default global/context fault > interrupt handlers and handle

Re: [PATCH v2] iommu/arm-smmu: Mark qcom_smmu_client_of_match as possibly unused

2020-07-13 Thread Will Deacon
On Mon, Jun 08, 2020 at 04:13:08PM +0100, Will Deacon wrote: > On Thu, Jun 04, 2020 at 02:39:04PM -0600, Jordan Crouse wrote: > > When CONFIG_OF=n of_match_device() gets pre-processed out of existence > > leaving qcom-smmu_client_of_match unused. Mark it as possibly unused to > &

Re: [PATCH v5 03/15] iommu/smmu: Report empty domain nesting info

2020-07-13 Thread Will Deacon
On Sun, Jul 12, 2020 at 04:20:58AM -0700, Liu Yi L wrote: > This patch is added as instead of returning a boolean for DOMAIN_ATTR_NESTING, > iommu_domain_get_attr() should return an iommu_nesting_info handle. > > Cc: Will Deacon > Cc: Robin Murphy > Cc: Eric Auger > Cc:

Re: [PATCH] iommu: Remove unused IOMMU_SYS_CACHE_ONLY flag

2020-07-10 Thread Will Deacon
On Fri, Jul 10, 2020 at 04:15:32PM +0200, Joerg Roedel wrote: > On Fri, Jul 10, 2020 at 02:05:27PM +0100, Will Deacon wrote: > > Ah, I'd already got this queued for 5.9: > > > > https://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git/log/?h=for-joerg/arm-smmu/upda

Re: [PATCH] iommu: Remove unused IOMMU_SYS_CACHE_ONLY flag

2020-07-10 Thread Will Deacon
Hi Joerg, On Fri, Jul 10, 2020 at 02:58:32PM +0200, Joerg Roedel wrote: > On Fri, Jul 03, 2020 at 05:25:48PM +0100, Will Deacon wrote: > > The IOMMU_SYS_CACHE_ONLY flag was never exposed via the DMA API and > > has no in-tree users. Remove it. > > > > Cc: Rob

Re: [PATCH v2 5/5] firmware: QCOM_SCM: Allow qcom_scm driver to be loadable as a permenent module

2020-07-10 Thread Will Deacon
On Thu, Jul 09, 2020 at 08:28:45PM -0700, John Stultz wrote: > On Thu, Jul 2, 2020 at 7:18 AM Will Deacon wrote: > > On Thu, Jun 25, 2020 at 12:10:39AM +, John Stultz wrote: > > > diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig > > > index b510f6

Re: [PATCH v2 0/8] arm64: dts: qcom: smmu/USB nodes and HDK855/HDK865 dts

2020-07-09 Thread Will Deacon
On Tue, 9 Jun 2020 15:40:18 -0400, Jonathan Marek wrote: > Add dts nodes for apps_smmu and USB for both sm8150 and sm8250. > > Also add initial dts files for HDK855 and HDK865, based on mtp dts, with a > few changes. Notably, the HDK865 dts has regulator config changed a bit based > on downstream

Re: [PATCH] iommu/arm-smmu: Update impl quirks comment

2020-07-08 Thread Will Deacon
On Wed, 24 Jun 2020 11:24:51 +0100, Robin Murphy wrote: > The comment about implementation and integration quirks being > mutually-exclusive is out of date, and in fact the code is already > structured for the case it anticipates, so document that properly. Applied to will

Re: [PATCH 1/1] iommu/arm-smmu: Implement qcom,skip-init

2020-07-04 Thread Will Deacon
[Adding Bjorn, Jordan and John because I really don't want a bunch of different ways to tell the driver that the firmware is screwing things up] On Sat, Jul 04, 2020 at 02:28:09PM +0200, Konrad Dybcio wrote: > This adds the downstream property required to support > SMMUs on SDM630 and other

[PATCH] iommu: Remove unused IOMMU_SYS_CACHE_ONLY flag

2020-07-03 Thread Will Deacon
The IOMMU_SYS_CACHE_ONLY flag was never exposed via the DMA API and has no in-tree users. Remove it. Cc: Robin Murphy Cc: "Isaac J. Manjarres" Cc: Joerg Roedel Cc: Christoph Hellwig Cc: Sai Prakash Ranjan Cc: Rob Clark Signed-off-by: Will Deacon --- As discussed in [1], s

Re: [PATCH] iommu/arm-smmu-v3: expose numa_node attribute to users in sysfs

2020-07-03 Thread Will Deacon
On Sat, May 30, 2020 at 09:15:05PM +1200, Barry Song wrote: > As tests show the latency of dma_unmap can increase dramatically while > calling them cross NUMA nodes, especially cross CPU packages, eg. > 300ns vs 800ns while waiting for the completion of CMD_SYNC in an > empty command queue. The

Re: [PATCH] iommu/arm-smmu-v3: allocate the memory of queues in local numa node

2020-07-03 Thread Will Deacon
On Mon, Jun 01, 2020 at 11:31:41PM +1200, Barry Song wrote: > dmam_alloc_coherent() will usually allocate memory from the default CMA. For > a common arm64 defconfig without reserved memory in device tree, there is only > one CMA close to address 0. > dma_alloc_contiguous() will allocate memory

Re: [PATCHv3 7/7] drm/msm/a6xx: Add support for using system cache(LLC)

2020-07-03 Thread Will Deacon
On Fri, Jul 03, 2020 at 08:23:07PM +0530, Sai Prakash Ranjan wrote: > On 2020-07-03 19:07, Will Deacon wrote: > > On Mon, Jun 29, 2020 at 09:22:50PM +0530, Sai Prakash Ranjan wrote: > > > diff --git a/drivers/gpu/drm/msm/msm_iommu.c > > > b/drivers/gpu/drm/msm/msm_iommu

Re: [PATCHv3 7/7] drm/msm/a6xx: Add support for using system cache(LLC)

2020-07-03 Thread Will Deacon
On Mon, Jun 29, 2020 at 09:22:50PM +0530, Sai Prakash Ranjan wrote: > diff --git a/drivers/gpu/drm/msm/msm_iommu.c b/drivers/gpu/drm/msm/msm_iommu.c > index f455c597f76d..bd1d58229cc2 100644 > --- a/drivers/gpu/drm/msm/msm_iommu.c > +++ b/drivers/gpu/drm/msm/msm_iommu.c > @@ -218,6 +218,9 @@

Re: [PATCH v2 0/8] arm64: dts: qcom: smmu/USB nodes and HDK855/HDK865 dts

2020-07-03 Thread Will Deacon
On Tue, Jun 09, 2020 at 03:40:18PM -0400, Jonathan Marek wrote: > Add dts nodes for apps_smmu and USB for both sm8150 and sm8250. > > Also add initial dts files for HDK855 and HDK865, based on mtp dts, with a > few changes. Notably, the HDK865 dts has regulator config changed a bit based > on

Re: [RFC][PATCH 5/5] firmware: QCOM_SCM: Allow qcom_scm driver to be loadable as a permenent module

2020-07-03 Thread Will Deacon
On Tue, Jun 16, 2020 at 01:52:32PM -0700, John Stultz wrote: > On Tue, Jun 16, 2020 at 12:55 AM Marc Zyngier wrote: > > On 2020-06-16 07:13, John Stultz wrote: > > > diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig > > > index b510f67dfa49..714893535dd2 100644 > > > ---

Re: [PATCH v2 5/5] firmware: QCOM_SCM: Allow qcom_scm driver to be loadable as a permenent module

2020-07-02 Thread Will Deacon
On Thu, Jun 25, 2020 at 12:10:39AM +, John Stultz wrote: > diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig > index b510f67dfa49..714893535dd2 100644 > --- a/drivers/iommu/Kconfig > +++ b/drivers/iommu/Kconfig > @@ -381,6 +381,7 @@ config SPAPR_TCE_IOMMU > config ARM_SMMU >

Re: [RFC 0/2] iommu: arm-smmu: Add support for early direct mappings

2020-07-01 Thread Will Deacon
On Wed, Jul 01, 2020 at 12:40:50AM -0700, Bjorn Andersson wrote: > On Wed 03 Jun 04:00 PDT 2020, Robin Murphy wrote: > > at that point I'm inclined to suggest we give up and stop trying to > > drive these things with arm-smmu. The XZR thing was bad enough, but if > > they're not even going to

Re: [PATCH 12/13] arm64: Remove dev->archdata.iommu pointer

2020-06-25 Thread Will Deacon
,6 @@ > #define __ASM_DEVICE_H > > struct dev_archdata { > -#ifdef CONFIG_IOMMU_API > - void *iommu; /* private IOMMU data */ > -#endif > }; Acked-by: Will Deacon Thanks, Joerg. Will ___ iommu mailing list

Re: [PATCH v2] iommu/arm-smmu: Mark qcom_smmu_client_of_match as possibly unused

2020-06-08 Thread Will Deacon
"iommu/arm-smmu: Allow client devices to select direct > mapping") > Reported-by: kbuild test robot > Acked-by: Will Deacon > Signed-off-by: Jordan Crouse > --- > > drivers/iommu/arm-smmu-qcom.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > &g

Re: [RFC PATCH] iommu/arm-smmu: Remove shutdown callback

2020-06-08 Thread Will Deacon
On Mon, Jun 08, 2020 at 02:43:03PM +0530, Sai Prakash Ranjan wrote: > On 2020-06-08 13:48, Will Deacon wrote: > > On Sun, Jun 07, 2020 at 04:39:18PM +0530, Sai Prakash Ranjan wrote: > > > Remove SMMU shutdown callback since it seems to cause more > > > problems than b

Re: [RFC PATCH] iommu/arm-smmu: Remove shutdown callback

2020-06-08 Thread Will Deacon
On Sun, Jun 07, 2020 at 04:39:18PM +0530, Sai Prakash Ranjan wrote: > Remove SMMU shutdown callback since it seems to cause more > problems than benefits. With this callback, we need to make > sure that all clients/consumers of SMMU do not perform any > DMA activity once the SMMU is shutdown and

Re: [PATCH] iommu/arm-smmu: Mark qcom_smmu_client_of_match as possibly unused

2020-06-04 Thread Will Deacon
t struct of_device_id qcom_smmu_client_of_match[] = { > +static const struct __maybe_unused of_device_id qcom_smmu_client_of_match[] > = { Yikes, I've never seen that between the 'struct' and the struct name before! I'd be inclined to stick it at the end, right before the '='. With that: Acked-by

Re: [RFC 0/2] iommu: arm-smmu: Add support for early direct mappings

2020-06-03 Thread Will Deacon
On Mon, Jun 01, 2020 at 11:32:10PM -0700, Bjorn Andersson wrote: > On Wed 27 May 04:03 PDT 2020, Will Deacon wrote: > > > Hi John, Bjorn, > > > > On Tue, May 26, 2020 at 01:34:45PM -0700, John Stultz wrote: > > > On Thu, May 14, 2020 at 12:34 PM wrote: > &

Re: [RFC 0/2] iommu: arm-smmu: Add support for early direct mappings

2020-05-27 Thread Will Deacon
Hi John, Bjorn, On Tue, May 26, 2020 at 01:34:45PM -0700, John Stultz wrote: > On Thu, May 14, 2020 at 12:34 PM wrote: > > > > On Thu 27 Feb 18:57 PST 2020, Bjorn Andersson wrote: > > > > Rob, Will, we're reaching the point where upstream has enough > > functionality that this is becoming a

  1   2   3   4   5   6   7   8   9   10   >