Re: (subset) [PATCH 2/2] arm64: dts: qcom: sm8250: Enable per-process page tables.

2022-07-02 Thread Bjorn Andersson
er-process page tables. commit: 213d7368723709cf4567488e63dd667802378202 Best regards, -- Bjorn Andersson ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: (subset) [PATCH 4/4] ARM: dts: qcom: sdx65: Add Shared memory manager support

2022-06-28 Thread Bjorn Andersson
On Mon, 2 May 2022 14:07:45 +0530, Rohit Agarwal wrote: > Add smem node to support shared memory manager on SDX65 platform. > > Applied, thanks! [4/4] ARM: dts: qcom: sdx65: Add Shared memory manager support commit: e378b965330d99e8622eb369021d0dac01591046 Best regards,

[PATCH 2/2] iommu/arm-smmu-qcom: Add SC8280XP support

2022-05-03 Thread Bjorn Andersson
Add the Qualcomm SC8280XP platform to the list of compatible for which the Qualcomm-impl of the ARM SMMU should apply. Signed-off-by: Bjorn Andersson --- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c b

[PATCH 0/2] iommu/arm-smmu-qcom: Add SC8280XP support

2022-05-03 Thread Bjorn Andersson
This adds the compatible for the Qualcomm SC8280XP platform and associate the Qualcomm impl in the ARM SMMU driver to it. Bjorn Andersson (2): dt-bindings: arm-smmu: Add compatible for Qualcomm SC8280XP iommu/arm-smmu-qcom: Add SC8280XP support Documentation/devicetree/bindings/iommu/arm

[PATCH 1/2] dt-bindings: arm-smmu: Add compatible for Qualcomm SC8280XP

2022-05-03 Thread Bjorn Andersson
Add compatible for the Qualcomm SC8280XP platform to the ARM SMMU DeviceTree binding. Signed-off-by: Bjorn Andersson --- Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b

Re: [PATCH v2 7/7] ARM: dts: qcom: sdx65: Add Shared memory manager support

2022-04-12 Thread Bjorn Andersson
On Mon 11 Apr 04:50 CDT 2022, Rohit Agarwal wrote: > Add smem node to support shared memory manager on SDX65 platform. > > Signed-off-by: Rohit Agarwal > --- > arch/arm/boot/dts/qcom-sdx65.dtsi | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/arch/arm/boot/dts/qcom-sdx65.dtsi >

Re: [PATCH] iommu/arm-smmu-qcom: Fix TTBR0 read

2021-11-08 Thread Bjorn Andersson
On Mon 08 Nov 09:17 PST 2021, Rob Clark wrote: > From: Rob Clark > > It is a 64b register, lets not lose the upper bits. > > Fixes: ab5df7b953d8 ("iommu/arm-smmu-qcom: Add an adreno-smmu-priv callback > to get pagefault info") > Signed-off-by: Rob Clark

Re: [PATCH] iommu: fix ARM_SMMU vs QCOM_SCM compilation

2021-10-09 Thread Bjorn Andersson
SCM to be built on non-Qualcomm devices. But as Daniel experienced, attempting to boot most Qualcomm boards without this results in a instant reboot. I think it's okay if we tinker with CONFIG_ARM_SMMU_QCOM for v5.16, but we're getting late in v5.15 so I would prefer if we make sure

Re: [PATCH 1/2] iommu: arm-smmu-qcom: Add compatible for qcm2290

2021-10-01 Thread Bjorn Andersson
On Fri 01 Oct 07:00 PDT 2021, Loic Poulain wrote: > Signed-off-by: Loic Poulain > --- > drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c > b/drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c > index 55690af.

Re: [PATCH 2/2] [v2] qcom_scm: hide Kconfig symbol

2021-09-29 Thread Bjorn Andersson
On Tue 28 Sep 02:50 CDT 2021, Arnd Bergmann wrote: > From: Arnd Bergmann > > Now that SCM can be a loadable module, we have to add another > dependency to avoid link failures when ipa or adreno-gpu are > built-in: > > aarch64-linux-ld: drivers/net/ipa/ipa_main.o: in function `ipa_probe': > ipa_

Re: [PATCH] [RFC] qcom_scm: hide Kconfig symbol

2021-09-29 Thread Bjorn Andersson
On Wed 29 Sep 05:04 CDT 2021, Arnd Bergmann wrote: > On Wed, Sep 29, 2021 at 11:51 AM Will Deacon wrote: > > On Mon, Sep 27, 2021 at 05:22:13PM +0200, Arnd Bergmann wrote: > > > > > > diff --git a/drivers/iommu/Kconfig b/drivers/iommu/Kconfig > > > index 124c41adeca1..989c83acbfee 100644 > > > --

Re: [PATCH] [RFC] qcom_scm: hide Kconfig symbol

2021-09-27 Thread Bjorn Andersson
On Mon 27 Sep 13:15 PDT 2021, Arnd Bergmann wrote: > On Mon, Sep 27, 2021 at 9:52 PM Bjorn Andersson > wrote: > > On Mon 27 Sep 08:22 PDT 2021, Arnd Bergmann wrote: > > > From: Arnd Bergmann > > > > > > - To avoid a circular dependency chain

Re: [PATCH] [RFC] qcom_scm: hide Kconfig symbol

2021-09-27 Thread Bjorn Andersson
On Mon 27 Sep 08:22 PDT 2021, Arnd Bergmann wrote: > From: Arnd Bergmann > > Now that SCM can be a loadable module, we have to add another > dependency to avoid link failures when ipa or adreno-gpu are > built-in: > > aarch64-linux-ld: drivers/net/ipa/ipa_main.o: in function `ipa_probe': > ipa_

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

2021-07-23 Thread Bjorn Andersson
On Wed 21 Jul 16:07 CDT 2021, Saravana Kannan wrote: > On Wed, Jul 21, 2021 at 1:23 PM Bjorn Andersson > wrote: > > > > On Wed 21 Jul 13:00 CDT 2021, Saravana Kannan wrote: > > > > > On Wed, Jul 21, 2021 at 10:24 AM John Stultz > > > wrote: > >

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

2021-07-21 Thread Bjorn Andersson
On Wed 21 Jul 13:00 CDT 2021, Saravana Kannan wrote: > On Wed, Jul 21, 2021 at 10:24 AM John Stultz wrote: > > > > On Wed, Jul 21, 2021 at 4:54 AM Greg Kroah-Hartman > > wrote: > > > > > > On Wed, Jul 07, 2021 at 04:53:20AM +, John Stultz wrote: > > > > Allow the qcom_scm driver to be loadab

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

2021-07-21 Thread Bjorn Andersson
On Mon 19 Jul 16:53 CDT 2021, Saravana Kannan wrote: > On Mon, Jul 19, 2021 at 12:36 PM Bjorn Andersson > wrote: > > > > On Mon 19 Jul 14:00 CDT 2021, John Stultz wrote: > > > > > On Fri, Jul 16, 2021 at 10:01 PM Bjorn Andersson > > > wrote: > &g

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

2021-07-19 Thread Bjorn Andersson
On Mon 19 Jul 14:00 CDT 2021, John Stultz wrote: > On Fri, Jul 16, 2021 at 10:01 PM Bjorn Andersson > wrote: > > On Tue 06 Jul 23:53 CDT 2021, John Stultz wrote: > > > Allow the qcom_scm driver to be loadable as a permenent module. > > > > > > T

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

2021-07-16 Thread Bjorn Andersson
y the idea that some people are turning the boot process into a lottery) Regards, Bjorn > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Andy Gross > Cc: Bjorn Andersson > Cc: Joerg Roedel > Cc: Thomas Gleixner > Cc: Marc Zyngier > Cc: Linus Walleij > Cc: Vinod

Re: [PATCH v5 0/5] iommu/arm-smmu: adreno-smmu page fault handling

2021-07-06 Thread Bjorn Andersson
On Sun 04 Jul 13:20 CDT 2021, Rob Clark wrote: > I suspect you are getting a dpu fault, and need: > > https://lore.kernel.org/linux-arm-msm/CAF6AEGvTjTUQXqom-xhdh456tdLscbVFPQ+iud1H1gHc8A2=h...@mail.gmail.com/ > > I suppose Bjorn was expecting me to send that patch > No, I left that discussion

Re: [PATCH v5 3/5] drm/msm: Improve the a6xx page fault handler

2021-06-24 Thread Bjorn Andersson
On Thu 10 Jun 16:44 CDT 2021, Rob Clark wrote: [..] > diff --git a/drivers/gpu/drm/msm/msm_iommu.c b/drivers/gpu/drm/msm/msm_iommu.c > index 50d881794758..6975b95c3c29 100644 > --- a/drivers/gpu/drm/msm/msm_iommu.c > +++ b/drivers/gpu/drm/msm/msm_iommu.c > @@ -211,8 +211,17 @@ static int msm_fault_

Re: [PATCH v5 4/5] iommu/arm-smmu-qcom: Add stall support

2021-06-14 Thread Bjorn Andersson
> > This will be used on the GPU side to "freeze" the GPU while we snapshot > useful state for devcoredump. > > Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson Regards, Bjorn > --- > drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 33

Re: [PATCH v5 3/5] drm/msm: Improve the a6xx page fault handler

2021-06-14 Thread Bjorn Andersson
On Thu 10 Jun 16:44 CDT 2021, Rob Clark wrote: > From: Jordan Crouse > > Use the new adreno-smmu-priv fault info function to get more SMMU > debug registers and print the current TTBR0 to debug per-instance > pagetables and figure out which GPU block generated the request. >

Re: [PATCH v5 2/5] iommu/arm-smmu-qcom: Add an adreno-smmu-priv callback to get pagefault info

2021-06-14 Thread Bjorn Andersson
y: Rob Clark I presume this implies that more generic options has been discussed. Regardless, if further conclusions are made in that regard I expect that this could serve as a base for such efforts. Reviewed-by: Bjorn Andersson Regards, Bjorn > --- > drivers/iommu/arm

Re: [PATCH v5 1/5] iommu/arm-smmu: Add support for driver IOMMU fault handlers

2021-06-14 Thread Bjorn Andersson
On Thu 10 Jun 16:44 CDT 2021, Rob Clark wrote: > From: Jordan Crouse > > Call report_iommu_fault() to allow upper-level drivers to register their > own fault handlers. > > Signed-off-by: Jordan Crouse > Signed-off-by: Rob Clark > Acked-by: Will Deacon Reviewed-by: B

Re: [PATCH V2] iommu: arm-smmu-qcom: Add sm6125 compatible

2021-05-24 Thread Bjorn Andersson
On Sun 23 May 16:25 CDT 2021, Martin Botka wrote: > Add compatible for SM6125 SoC > Reviewed-by: Bjorn Andersson But please, don't forget to update the dt-binding. Regards, Bjorn > Signed-off-by: Martin Botka > --- > Changes in V2: > Add commit description > driv

Re: [PATCHv3 1/2] iommu/arm-smmu-qcom: Add SC7280 SMMU compatible

2021-05-24 Thread Bjorn Andersson
On Tue 20 Apr 01:04 CDT 2021, Sai Prakash Ranjan wrote: > Add compatible for SC7280 SMMU to use the Qualcomm Technologies, Inc. > specific implementation. > Reviewed-by: Bjorn Andersson Regards, Bjorn > Signed-off-by: Sai Prakash Ranjan > --- > drivers/iommu/arm/arm-sm

Re: [PATCH 0/3] iommu/arm-smmu: Qualcomm bootsplash/efifb

2021-05-24 Thread Bjorn Andersson
On Mon 24 May 07:03 CDT 2021, Lee Jones wrote: > On Wed, 8 Jan 2020 at 09:16, Will Deacon wrote: > > > On Thu, Dec 26, 2019 at 02:17:06PM -0800, Bjorn Andersson wrote: > > > These patches implements the stream mapping inheritance that's necessary > > in &

Re: [PATCHv2 2/2] iommu/arm-smmu-qcom: Move the adreno smmu specific impl earlier

2021-04-19 Thread Bjorn Andersson
> Suggested-by: Akhil P Oommen > Signed-off-by: Sai Prakash Ranjan Sorry for taking my time thinking about this. Reviewed-by: Bjorn Andersson Regards, Bjorn > --- > drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 12 +--- > 1 file changed, 9 insertions(+), 3 deletions

Re: [PATCHv2 2/2] iommu/arm-smmu-qcom: Move the adreno smmu specific impl earlier

2021-03-11 Thread Bjorn Andersson
On Sat 27 Feb 07:53 CST 2021, Sai Prakash Ranjan wrote: > Hi Bjorn, > > On 2021-02-27 00:44, Bjorn Andersson wrote: > > On Fri 26 Feb 12:23 CST 2021, Rob Clark wrote: > > > > > > The current logic picks one of: > > 1) is the compatible mentioned in

Re: [PATCHv2 2/2] iommu/arm-smmu-qcom: Move the adreno smmu specific impl earlier

2021-02-26 Thread Bjorn Andersson
On Fri 26 Feb 12:23 CST 2021, Rob Clark wrote: > On Fri, Feb 26, 2021 at 9:24 AM Bjorn Andersson > wrote: > > > > On Fri 26 Feb 03:55 CST 2021, Sai Prakash Ranjan wrote: > > > > > Adreno(GPU) SMMU and APSS(Application Processor SubSystem) SMMU > > > bot

Re: [PATCHv2 2/2] iommu/arm-smmu-qcom: Move the adreno smmu specific impl earlier

2021-02-26 Thread Bjorn Andersson
On Fri 26 Feb 03:55 CST 2021, Sai Prakash Ranjan wrote: > Adreno(GPU) SMMU and APSS(Application Processor SubSystem) SMMU > both implement "arm,mmu-500" in some QTI SoCs and to run through > adreno smmu specific implementation such as enabling split pagetables > support, we need to match the "qcom

[PATCH 2/2] iommu/arm-smmu-qcom: Add Qualcomm SC8180X impl

2021-01-20 Thread Bjorn Andersson
The primary SMMU found in Qualcomm SC8180X platform needs to use the Qualcomm implementation, so add a specific compatible for this. Signed-off-by: Bjorn Andersson --- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/iommu/arm/arm-smmu/arm

[PATCH 1/2] dt-bindings: arm-smmu-qcom: Add Qualcomm SC8180X compatible

2021-01-20 Thread Bjorn Andersson
Add compatible for the ARM SMMU found in the Qualcomm SC8180x platform. Signed-off-by: Bjorn Andersson --- Documentation/devicetree/bindings/iommu/arm,smmu.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/iommu/arm,smmu.yaml b/Documentation/devicetree

[PATCH] iommu/arm-smmu-qcom: Initialize SCTLR of the bypass context

2021-01-05 Thread Bjorn Andersson
- the context bank picked to emulate translation bypass. Resolve this by explicitly disabling the bypass context already in cfg_probe. Fixes: f9081b8ff593 ("iommu/arm-smmu-qcom: Implement S2CR quirk") Signed-off-by: Bjorn Andersson --- drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 2 ++ 1

Re: [PATCH -next] iommu: msm_iommu: Delete useless kfree code

2020-12-14 Thread Bjorn Andersson
On Mon 14 Dec 07:47 CST 2020, Zheng Yongjun wrote: > The parameter of kfree function is NULL, so kfree code is useless, delete it. > > Signed-off-by: Zheng Yongjun Reviewed-by: Bjorn Andersson Regards, Bjorn > --- > drivers/iommu/msm_iommu.c | 6 +- > 1 file changed,

Re: [PATCH] Revert "firmware: QCOM_SCM: Allow qcom_scm driver to be loadable as a permenent module"

2020-11-19 Thread Bjorn Andersson
On Thu, Nov 19, 2020 at 11:42 AM Thierry Reding wrote: > > From: Thierry Reding > > Commit d0511b5496c0 ("firmware: QCOM_SCM: Allow qcom_scm driver to be > loadable as a permenent module") causes the ARM SMMU driver to be built > as a loadable module when using the Aarch64 default configuration.

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

2020-11-05 Thread Bjorn Andersson
e not ideal in some cases its the > only safe way I can find to avoid build errors without having > those drivers select QCOM_SCM and have to force it on (as > QCOM_SCM=n can be valid for those drivers). > > Cc: Catalin Marinas > Cc: Will Deacon > Cc: Andy Gross > Cc:

Re: [PATCH v5 1/2] pinctrl: qcom: Allow pinctrl-msm code to be loadable as a module

2020-11-05 Thread Bjorn Andersson
ecomes a maintenance > headache. > > We also add PINCTRL_MSM to the arm64 defconfig to avoid > surprises as otherwise PINCTRL_MSM/IPQ* options previously > enabled, will be off. > Reviewed-by: Bjorn Andersson Regards, Bjorn > Cc: Catalin Marinas > Cc: Will Deacon >

Re: [PATCH v18 2/4] iommu/arm-smmu: Add a way for implementations to influence SCTLR

2020-11-03 Thread Bjorn Andersson
; > a terminated CP read could hang the GPU by returning invalid > > command-stream data. > > > > Signed-off-by: Rob Clark > > Reviewed-by: Bjorn Andersson > > Signed-off-by: Jordan Crouse > > --- > > > > drivers/iommu/arm/arm-smmu/arm-smmu-qc

[PATCH v5 3/3] iommu/arm-smmu-qcom: Implement S2CR quirk

2020-10-19 Thread Bjorn Andersson
means of configuring the stream for translation using a reserved and disabled context bank. Also circumvent the problem of configuring faulting streams by configuring the stream as bypass. Signed-off-by: Bjorn Andersson --- Changes since v4: - Made the bypass_cbndx an integer... - Separated out

[PATCH v5 2/3] iommu/arm-smmu-qcom: Read back stream mappings

2020-10-19 Thread Bjorn Andersson
-smmu driver maintain the streams in bypass mode. Signed-off-by: Bjorn Andersson --- Changes since v4: - Don't increment s2cr[i]->count, as this is not actually needed to survive probe deferral drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 23 ++ 1 file changed, 23 in

[PATCH v5 1/3] iommu/arm-smmu: Allow implementation specific write_s2cr

2020-10-19 Thread Bjorn Andersson
function, to allow the Qualcomm driver to work around this behavior. Reviewed-by: Robin Murphy Signed-off-by: Bjorn Andersson --- Changes since v4: - Return early instead of indenting the rest of the function drivers/iommu/arm/arm-smmu/arm-smmu.c | 13 ++--- drivers/iommu/arm/arm-smmu

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

2020-10-19 Thread Bjorn Andersson
of a context bank for bypass emulation and use of this context bank pretty much isolated to the Qualcomm specific implementation. The patchset has been tested to boot DB845c and RB5 (with splash screen) and Lenovo Yoga C630 (with EFI framebuffer). Bjorn Andersson (3): iommu/arm-smmu:

Re: [PATCH v4 3/3] iommu/arm-smmu-qcom: Implement S2CR quirk

2020-10-19 Thread Bjorn Andersson
On Mon 19 Oct 09:04 CDT 2020, Robin Murphy wrote: > On 2020-10-17 05:39, Bjorn Andersson wrote: > > The firmware found in some Qualcomm platforms intercepts writes to S2CR > > in order to replace bypass type streams with fault; and ignore S2CR > > updates of type fault.

Re: [PATCH v4 2/3] iommu/arm-smmu-qcom: Read back stream mappings

2020-10-19 Thread Bjorn Andersson
On Mon 19 Oct 09:03 CDT 2020, Robin Murphy wrote: > On 2020-10-17 05:39, Bjorn Andersson wrote: > > The Qualcomm boot loader configures stream mapping for the peripherals > > that it accesses and in particular it sets up the stream mapping for the > > display controller to b

[PATCH v4 1/3] iommu/arm-smmu: Allow implementation specific write_s2cr

2020-10-16 Thread Bjorn Andersson
function, to allow the Qualcomm driver to work around this behavior. Signed-off-by: Bjorn Andersson --- Changes since v3: - New patch drivers/iommu/arm/arm-smmu/arm-smmu.c | 22 ++ drivers/iommu/arm/arm-smmu/arm-smmu.h | 1 + 2 files changed, 15 insertions(+), 8 deletions

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

2020-10-16 Thread Bjorn Andersson
ntext bank for bypass emulation and use of this context bank pretty much isolated to the Qualcomm specific implementation. As before the patchset has been tested to boot DB845c (with splash screen) and Lenovo Yoga C630 (with EFI framebuffer). Bjorn Andersson (3): iommu/arm-smmu: Allow implement

[PATCH v4 2/3] iommu/arm-smmu-qcom: Read back stream mappings

2020-10-16 Thread Bjorn Andersson
-smmu driver maintain the streams in bypass mode. Signed-off-by: Bjorn Andersson --- Changes since v3: - Extracted from different patch in v3. - Now configures the stream as BYPASS, rather than translate, which should work for platforms with working S2CR handling as well. drivers/iommu/arm/arm

[PATCH v4 3/3] iommu/arm-smmu-qcom: Implement S2CR quirk

2020-10-16 Thread Bjorn Andersson
means of configuring the stream for translation using a reserved and disabled context bank. Also circumvent the problem of configuring faulting streams by configuring the stream as bypass. Signed-off-by: Bjorn Andersson --- Changes since v3: - Move the reservation of the "identity context

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

2020-10-12 Thread Bjorn Andersson
On Mon 21 Sep 23:08 CEST 2020, Will Deacon wrote: > 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

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

2020-09-24 Thread Bjorn Andersson
On Mon 21 Sep 16:08 CDT 2020, Will Deacon wrote: > 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

Re: [PATCH] irqchip/qcom-pdc: Allow QCOM_PDC to be loadable as a permanent module

2020-09-15 Thread Bjorn Andersson
ovided a better solution in his > Hybrid probing patch set, I wanted to re-submit this change. > Reviewed-by: Bjorn Andersson > Cc: Andy Gross > Cc: Bjorn Andersson > Cc: Joerg Roedel > Cc: Thomas Gleixner > Cc: Jason Cooper > Cc: Marc Zyngier > Cc: Linus Walleij

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

2020-09-12 Thread Bjorn Andersson
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 there a reason we need an explicit step for this? The a

Re: [PATCH v16 20/20] arm: dts: qcom: sc7180: Set the compatible string for the GPU SMMU

2020-09-04 Thread Bjorn Andersson
On Tue 01 Sep 11:46 CDT 2020, Rob Clark wrote: > From: Rob Clark > > Set the qcom,adreno-smmu compatible string for the GPU SMMU to enable > split pagetables and per-instance pagetables for drm/msm. > Reviewed-by: Bjorn Andersson > Signed-off-by: Rob Clark > --- >

Re: [PATCH v16 19/20] arm: dts: qcom: sm845: Set the compatible string for the GPU SMMU

2020-09-04 Thread Bjorn Andersson
On Tue 01 Sep 11:46 CDT 2020, Rob Clark wrote: > From: Jordan Crouse > > Set the qcom,adreno-smmu compatible string for the GPU SMMU to enable > split pagetables and per-instance pagetables for drm/msm. > > Signed-off-by: Jordan Crouse > Signed-off-by: Rob Clark Reviewe

[PATCH v3 5/8] iommu/arm-smmu-qcom: Consistently initialize stream mappings

2020-09-04 Thread Bjorn Andersson
ings might linger and reference context banks that Linux is reconfiguring. Use the fact that BYPASS writes result in FAULT type to force all stream mappings to FAULT. Signed-off-by: Bjorn Andersson --- Changes since v2: - None drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 18

[PATCH v3 7/8] iommu/arm-smmu: Provide helper for allocating identity domain

2020-09-04 Thread Bjorn Andersson
Some platform implementations needs to be able to allocate a domain for emulating identity mappings using a context bank without translation. Provide a helper function to allocate such a domain. Signed-off-by: Bjorn Andersson --- Changes since v2: - Extracted from previous

[PATCH v3 4/8] iommu/arm-smmu-qcom: Emulate bypass by using context banks

2020-09-04 Thread Bjorn Andersson
SMMU. This adds a Qualcomm specific cfg_probe function, which probes for the broken behavior of the S2CR registers and implements a custom alloc_context_bank() that when necessary allocates a context bank (without translation) for these domains as well. Signed-off-by: Bjorn Andersson --- Changes

[PATCH v3 1/8] iommu/arm-smmu: Refactor context bank allocation

2020-09-04 Thread Bjorn Andersson
passed object. This allows us to not assign smmu_domain->smmu before attempting to allocate the context bank and as such we don't need to roll back this assignment on failure. Signed-off-by: Bjorn Andersson --- Note that this series applies ontop of: https://lore.kernel.org/linux

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

2020-09-04 Thread Bjorn Andersson
Add a new operation to allow platform implementations to inherit any stream mappings from the boot loader. Signed-off-by: Bjorn Andersson --- Changes since v2: - New patch/interface drivers/iommu/arm/arm-smmu/arm-smmu.c | 11 ++- drivers/iommu/arm/arm-smmu/arm-smmu.h | 6 ++ 2

Re: [PATCH v16 14/20] iommu/arm-smmu: Prepare for the adreno-smmu implementation

2020-09-04 Thread Bjorn Andersson
le bit cleaner. So perhaps you would be interested in squashing https://lore.kernel.org/linux-arm-msm/20200904155513.282067-2-bjorn.anders...@linaro.org/ into this patch? Otherwise, feel free to add my: Reviewed-by: Bjorn Andersson Regards, Bjorn > --- > drivers/iommu/arm/arm-smmu/arm-

[PATCH v3 3/8] iommu/arm-smmu: Consult context bank allocator for identify domains

2020-09-04 Thread Bjorn Andersson
consulted and if it decides to use a context bank for the identity map, don't enable translation (i.e. omit ARM_SMMU_SCTLR_M). Signed-off-by: Bjorn Andersson --- Changes since v2: - Tie this to alloc_context_bank rather than carrying a Qualcomm specific quirk in the generic code. drivers/

[PATCH v3 2/8] iommu/arm-smmu: Delay modifying domain during init

2020-09-04 Thread Bjorn Andersson
Delay modifications to the domain during arm_smmu_init_domain_context() until we've allocated a context bank. This will allow us to postpone the special handling of identity domains until the platform specific context bank allocator has been executed, in a later patch. Signed-off-by:

[PATCH v3 8/8] iommu/arm-smmu-qcom: Setup identity domain for boot mappings

2020-09-04 Thread Bjorn Andersson
context bank is used and streams are diverted here during initialization. This also performs the readback of SMR registers for the Qualcomm platform, to trigger the mechanism. This is based on prior work by Thierry Reding and Laurentiu Tudor. Signed-off-by: Bjorn Andersson --- Changes since v2

[PATCH v3 0/8] iommu/arm-smmu: Support maintaining bootloader mappings

2020-09-04 Thread Bjorn Andersson
eries, which can be found at https://lore.kernel.org/linux-arm-msm/20200901164707.2645413-1-robdcl...@gmail.com/ Bjorn Andersson (8): iommu/arm-smmu: Refactor context bank allocation iommu/arm-smmu: Delay modifying domain during init iommu/arm-smmu: Consult context bank allocator for identify do

Re: [PATCH 1/3] iommu: amd: Fix kerneldoc

2020-09-04 Thread Bjorn Andersson
vers/iommu/amd/init.c:1938: warning: Function parameter or member > 'iommu' not described in 'iommu_update_intcapxt' > Reviewed-by: Bjorn Andersson > Signed-off-by: Krzysztof Kozlowski > --- > drivers/iommu/amd/init.c | 4 ++-- > 1 file changed, 2 insertions(+),

Re: [PATCH 2/3] iommu: intel: Drop kerneldoc marker from regular comment

2020-09-04 Thread Bjorn Andersson
On Tue 28 Jul 12:08 CDT 2020, Krzysztof Kozlowski wrote: > Fix W=1 compile warnings (invalid kerneldoc): > > drivers/iommu/intel/dmar.c:389: warning: Function parameter or member > 'header' not described in 'dmar_parse_one_drhd' > Reviewed-by: Bjorn And

Re: [PATCH 3/3] iommu: qcom: Drop of_match_ptr to fix -Wunused-const-variable

2020-09-04 Thread Bjorn Andersson
910:34: warning: 'qcom_iommu_of_match' defined > but not used [-Wunused-const-variable=] > 910 | static const struct of_device_id qcom_iommu_of_match[] = { > Reviewed-by: Bjorn Andersson > Signed-off-by: Krzysztof Kozlowski > --- > drivers/iommu/qcom_iommu.c | 4 ++-- >

Re: [PATCH 01/19] drm/msm: remove dangling submitqueue references

2020-08-31 Thread Bjorn Andersson
On Tue 01 Sep 03:42 UTC 2020, Rob Clark wrote: > On Mon, Aug 31, 2020 at 7:35 PM Bjorn Andersson > wrote: > > > > On Fri 14 Aug 02:40 UTC 2020, Rob Clark wrote: > > > > > From: Rob Clark > > > > > > Currently it doesn't matter, sin

Re: [PATCH 01/19] drm/msm: remove dangling submitqueue references

2020-08-31 Thread Bjorn Andersson
On Fri 14 Aug 02:40 UTC 2020, Rob Clark wrote: > From: Rob Clark > > Currently it doesn't matter, since we free the ctx immediately. But > when we start refcnt'ing the ctx, we don't want old dangling list > entries to hang around. > > Signed-off-by: Rob

Re: [PATCH 19/19] drm/msm: show process names in gem_describe

2020-08-31 Thread Bjorn Andersson
On Thu 13 Aug 21:41 CDT 2020, Rob Clark wrote: > From: Rob Clark > > In $debugfs/gem we already show any vma(s) associated with an object. > Also show process names if the vma's address space is a per-process > address space. > Reviewed-by: Bjorn Andersson >

Re: [PATCH 18/19] iommu/arm-smmu: add a way for implementations to influence SCTLR

2020-08-31 Thread Bjorn Andersson
gt; command-stream data. > Reviewed-by: Bjorn Andersson > Signed-off-by: Rob Clark > --- > drivers/iommu/arm/arm-smmu/arm-smmu-qcom.c | 6 ++ > drivers/iommu/arm/arm-smmu/arm-smmu.c | 3 +++ > drivers/iommu/arm/arm-smmu/arm-smmu.h | 3 +++ > 3 files changed, 12 inser

Re: [PATCH 15/19] drm/msm: Add support for private address space instances

2020-08-31 Thread Bjorn Andersson
l return a pointer to the global address space. > Reviewed-by: Bjorn Andersson > Signed-off-by: Jordan Crouse > Signed-off-by: Rob Clark > --- > drivers/gpu/drm/msm/msm_drv.c | 13 +++-- > drivers/gpu/drm/msm/msm_drv.h | 5 + > drivers/gpu/drm/msm/m

Re: [PATCH 14/19] drm/msm: Add support to create a local pagetable

2020-08-31 Thread Bjorn Andersson
ible string and > split pagetables enabled. > Reviewed-by: Bjorn Andersson > Signed-off-by: Jordan Crouse > Signed-off-by: Rob Clark > --- > drivers/gpu/drm/msm/msm_gpummu.c | 2 +- > drivers/gpu/drm/msm/msm_iommu.c | 199 ++- > drivers/gpu/dr

Re: [PATCH 13/19] drm/msm: Set the global virtual address range from the IOMMU domain

2020-08-31 Thread Bjorn Andersson
On Thu 13 Aug 21:41 CDT 2020, Rob Clark wrote: > From: Jordan Crouse > > Use the aperture settings from the IOMMU domain to set up the virtual > address range for the GPU. This allows us to transparently deal with > IOMMU side features (like split pagetables). > Reviewed-b

Re: [PATCH 12/19] drm/msm: Drop context arg to gpu->submit()

2020-08-31 Thread Bjorn Andersson
On Thu 13 Aug 21:41 CDT 2020, Rob Clark wrote: > From: Jordan Crouse > > Now that we can get the ctx from the submitqueue, the extra arg is > redundant. > Reviewed-by: Bjorn Andersson > Signed-off-by: Jordan Crouse > [split out of previous patch to reduce churny noise]

Re: [PATCH 11/19] drm/msm: Add a context pointer to the submitqueue

2020-08-31 Thread Bjorn Andersson
On Thu 13 Aug 21:41 CDT 2020, Rob Clark wrote: > From: Jordan Crouse > > Each submitqueue is attached to a context. Add a pointer to the > context to the submitqueue at create time and refcount it so > that it stays around through the life of the queue. > Reviewed-by: Bjorn

Re: [PATCH 09/19] iommu/arm-smmu-qcom: Add implementation for the adreno GPU SMMU

2020-08-31 Thread Bjorn Andersson
> (TTBR1) for the domain attached to the GPU device (SID 0) and > hard code it context bank 0 so the GPU hardware can implement > per-instance pagetables. > Reviewed-by: Bjorn Andersson > Co-developed-by: Rob Clark > Signed-off-by: Jordan Crouse > Signed-off-by: Rob Clark

Re: [PATCH 10/19] dt-bindings: arm-smmu: Add compatible string for Adreno GPU SMMU

2020-08-31 Thread Bjorn Andersson
with a compatible string so that they can be identified in the > arm-smmu implementation specific code. > Reviewed-by: Bjorn Andersson > Signed-off-by: Jordan Crouse > Reviewed-by: Rob Herring > Signed-off-by: Rob Clark > --- > Documentation/devicetree/bindings/iommu/arm,

Re: [PATCH 07/19] drm/msm: set adreno_smmu as gpu's drvdata

2020-08-31 Thread Bjorn Andersson
On Thu 13 Aug 21:41 CDT 2020, Rob Clark wrote: > From: Rob Clark > > This will be populated by adreno-smmu, to provide a way for coordinating > enabling/disabling TTBR0 translation. > Reviewed-by: Bjorn Andersson > Signed-off-by: Rob Clark > --- > dr

Re: [PATCH 08/19] iommu/arm-smmu: constify some helpers

2020-08-31 Thread Bjorn Andersson
On Thu 13 Aug 21:41 CDT 2020, Rob Clark wrote: > From: Rob Clark > > Sprinkle a few `const`s where helpers don't need write access. > Reviewed-by: Bjorn Andersson > Signed-off-by: Rob Clark > --- > drivers/iommu/arm/arm-smmu/arm-smmu.h | 6 +++--- > 1 fil

Re: [PATCH 06/19] drm/msm/gpu: add dev_to_gpu() helper

2020-08-31 Thread Bjorn Andersson
pu->funcs->gpu_get_freq) > *freq = gpu->funcs->gpu_get_freq(gpu); > diff --git a/drivers/gpu/drm/msm/msm_gpu.h b/drivers/gpu/drm/msm/msm_gpu.h > index 0db117a7339b..8bda7beaed4b 100644 > --- a/drivers/gpu/drm/msm/msm_gpu.h > +++ b/drivers/gpu/drm/msm/msm_gpu.h

Re: [PATCH 05/19] iommu: add private interface for adreno-smmu

2020-08-31 Thread Bjorn Andersson
erface is used to > avoid adding highly driver specific things to the public iommu > interface. > > Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson > --- > include/linux/adreno-smmu-priv.h | 36 > 1 file changed, 36 insertions(+) >

Re: [PATCH 03/19] iommu/arm-smmu: Add support for split pagetables

2020-08-31 Thread Bjorn Andersson
+ cfg->asid); The old indentation seems more appropriate. Apart from that this looks sensible. Reviewed-by: Bjorn Andersson Regards, Bjorn > + > + if (pgtbl_cfg->quirks & IO_PGTABLE_QUIRK_ARM_TTBR1) > +

Re: [PATCH 02/19] iommu/arm-smmu: Pass io-pgtable config to implementation specific function

2020-08-31 Thread Bjorn Andersson
able is created. > > Signed-off-by: Jordan Crouse > Signed-off-by: Rob Clark Reviewed-by: Bjorn Andersson Regards, Bjorn > --- > drivers/iommu/arm/arm-smmu/arm-smmu-impl.c | 3 ++- > drivers/iommu/arm/arm-smmu/arm-smmu.c | 11 ++- > drivers/iommu/arm/arm-smmu

Re: [PATCH 01/19] drm/msm: remove dangling submitqueue references

2020-08-31 Thread Bjorn Andersson
On Fri 14 Aug 02:40 UTC 2020, Rob Clark wrote: > From: Rob Clark > > Currently it doesn't matter, since we free the ctx immediately. But > when we start refcnt'ing the ctx, we don't want old dangling list > entries to hang around. > > Signed-off-by: Rob Clark > --- > drivers/gpu/drm/msm/msm_

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

2020-07-30 Thread Bjorn Andersson
On Wed 22 Jul 13:11 PDT 2020, Konrad Dybcio wrote: > >Is the problem on SDM630 that when you write to SMR/S2CR the device > >reboots? Or that when you start writing out the context bank > >configuration that trips the display and the device reboots? > > I added some debug prints and the phone han

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

2020-07-26 Thread Bjorn Andersson
On Mon 20 Jul 08:40 PDT 2020, Jordan Crouse wrote: > diff --git a/drivers/iommu/arm-smmu-qcom.c b/drivers/iommu/arm-smmu-qcom.c [..] > +static int qcom_adreno_smmu_alloc_context_bank(struct arm_smmu_domain > *smmu_domain, > + struct device *dev, int start, int count) > +{ > + struc

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

2020-07-21 Thread Bjorn Andersson
On Tue 21 Jul 09:20 PDT 2020, Konrad Dybcio wrote: > >The current > >focus has been on moving more of the SMMU specific bits into the > >arm-smmu-qcom > >implementation [1] and I think that is the right way to go. > > Pardon if I overlooked something obvious, but I can't seem to find a > clean w

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

2020-07-16 Thread Bjorn Andersson
translation. Tested-by: John Stultz Tested-by: Vinod Koul Signed-off-by: Bjorn Andersson --- Changes since v1: - Picked up tested-by drivers/iommu/arm-smmu-qcom.c | 21 + drivers/iommu/arm-smmu.c | 14 -- drivers/iommu/arm-smmu.h | 3 +++ 3 files changed

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

2020-07-16 Thread Bjorn Andersson
: Bjorn Andersson --- Changes since v1: - Rebased to avoid conflict - Picked up tested-by drivers/iommu/arm-smmu-qcom.c | 11 + drivers/iommu/arm-smmu.c | 79 +-- drivers/iommu/arm-smmu.h | 3 ++ 3 files changed, 89 insertions(+), 4 deletions

[PATCH v2 1/5] iommu/arm-smmu: Make all valid stream mappings BYPASS

2020-07-16 Thread Bjorn Andersson
Koul Suggested-by: Robin Murphy Signed-off-by: Bjorn Andersson --- Changes since v1: - Mark arm_smmu_setup_identity() static - Picked up tested-by tags drivers/iommu/arm-smmu.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/iommu/arm-smmu.c b/drivers/iommu/arm-s

[PATCH v2 4/5] iommu/arm-smmu-qcom: Consistently initialize stream mappings

2020-07-16 Thread Bjorn Andersson
ings might linger and reference context banks that Linux is reconfiguring. Use the fact that BYPASS writes result in FAULT type to force all stream mappings to FAULT. Tested-by: John Stultz Tested-by: Vinod Koul Signed-off-by: Bjorn Andersson --- Changes since v1: - Fixed subject spelling mistak

[PATCH v2 3/5] iommu/arm-smmu: Move SMR and S2CR definitions to header file

2020-07-16 Thread Bjorn Andersson
Expose the SMR and S2CR structs in the header file, to allow platform specific implementations to populate/initialize the smrs and s2cr arrays. Tested-by: John Stultz Tested-by: Vinod Koul Signed-off-by: Bjorn Andersson --- Changes since v1: - Picked up tested-by drivers/iommu/arm-smmu.c

[PATCH v2 0/5] iommu/arm-smmu: Support maintaining bootloader mappings

2020-07-16 Thread Bjorn Andersson
shown to allow booting SDM845, SDM850, SM8150, SM8250 with boot splash screen setup by the bootloader. Specifically it also allows the Lenovo Yoga C630 to boot with SMMU and efifb enabled. Bjorn Andersson (5): iommu/arm-smmu: Make all valid stream mappings BYPASS iommu/arm-smmu: Emulate bypa

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

2020-07-09 Thread Bjorn Andersson
On Thu 09 Jul 08:50 PDT 2020, Laurentiu Tudor wrote: > > > On 7/9/2020 8:01 AM, 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 allo

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

2020-07-09 Thread Bjorn Andersson
On Thu 09 Jul 11:55 PDT 2020, Rob Clark wrote: > On Thu, Jul 9, 2020 at 9:56 AM Rob Clark wrote: > > > > On Thu, Jul 9, 2020 at 9:48 AM Bjorn Andersson > > wrote: > > > > > > On Thu 09 Jul 09:17 PDT 2020, Rob Clark wrote: > > > > &g

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

2020-07-09 Thread Bjorn Andersson
On Thu 09 Jul 09:17 PDT 2020, Rob Clark wrote: > On Wed, Jul 8, 2020 at 10:01 PM Bjorn Andersson > wrote: [..] > > @@ -678,7 +680,11 @@ static int arm_smmu_init_domain_context(struct > > iommu_domain *domain, > > if (smmu_domain->smmu) > >

[PATCH 4/5] iommu/arm-smmu-qcom: Consstently initialize stream mappings

2020-07-08 Thread Bjorn Andersson
ings might linger and reference context banks that Linux is reconfiguring. Use the fact that BYPASS writes result in FAULT type to force all stream mappings to FAULT. Signed-off-by: Bjorn Andersson --- drivers/iommu/arm-smmu-qcom.c | 18 +- 1 file changed, 17 insertions(+),

[PATCH 3/5] iommu/arm-smmu: Move SMR and S2CR definitions to header file

2020-07-08 Thread Bjorn Andersson
Expose the SMR and S2CR structs in the header file, to allow platform specific implementations to populate/initialize the smrs and s2cr arrays. Signed-off-by: Bjorn Andersson --- drivers/iommu/arm-smmu.c | 14 -- drivers/iommu/arm-smmu.h | 15 +++ 2 files changed, 15

  1   2   >