* [PATCH 0/3] Qcom: Add GIC-ITS support to SM8450 PCIe controllers
@ 2022-12-19 19:14 Manivannan Sadhasivam
2022-12-19 19:14 ` [PATCH 1/3] dt-bindings: PCI: qcom: Update maintainers Manivannan Sadhasivam
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Manivannan Sadhasivam @ 2022-12-19 19:14 UTC (permalink / raw)
To: andersson, robh+dt, krzysztof.kozlowski+dt
Cc: bhelgaas, konrad.dybcio, linux-arm-msm, linux-pci, devicetree,
linux-kernel, Manivannan Sadhasivam
Hello,
This series adds GIC-ITS support to SM8450 PCIe controllers for receiving
the MSIs from endpoint devices.
The GIC-ITS MSI implementation provides an advantage over internal MSI
implementation using Locality-specific Peripheral Interrupts (LPI) that
would allow MSIs to be targeted for each CPU core.
This series has been tested on SM8450 based dev board that works using an
out-of-tree dts where the MSIs from endpoint devices are distributed across
the CPU cores.
Thanks,
Mani
Manivannan Sadhasivam (3):
dt-bindings: PCI: qcom: Update maintainers
dt-bindings: PCI: qcom: Document msi-map and msi-map-mask properties
arm64: dts: qcom: sm8450: Use GIC-ITS for PCIe0 and PCIe1
.../devicetree/bindings/pci/qcom,pcie.yaml | 18 ++++++++++++++----
arch/arm64/boot/dts/qcom/sm8450.dtsi | 12 ++++++------
2 files changed, 20 insertions(+), 10 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 1/3] dt-bindings: PCI: qcom: Update maintainers
2022-12-19 19:14 [PATCH 0/3] Qcom: Add GIC-ITS support to SM8450 PCIe controllers Manivannan Sadhasivam
@ 2022-12-19 19:14 ` Manivannan Sadhasivam
2022-12-20 10:24 ` Krzysztof Kozlowski
2022-12-19 19:14 ` [PATCH 2/3] dt-bindings: PCI: qcom: Document msi-map and msi-map-mask properties Manivannan Sadhasivam
2022-12-19 19:14 ` [PATCH 3/3] arm64: dts: qcom: sm8450: Use GIC-ITS for PCIe0 and PCIe1 Manivannan Sadhasivam
2 siblings, 1 reply; 10+ messages in thread
From: Manivannan Sadhasivam @ 2022-12-19 19:14 UTC (permalink / raw)
To: andersson, robh+dt, krzysztof.kozlowski+dt
Cc: bhelgaas, konrad.dybcio, linux-arm-msm, linux-pci, devicetree,
linux-kernel, Manivannan Sadhasivam
Stanimir has left mm-sol and already expressed his wish to not continue
maintaining the PCIe RC driver. So his entry can be removed.
Adding myself as the co-maintainer since I took over the PCIe RC driver
maintainership from Stanimir.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
Documentation/devicetree/bindings/pci/qcom,pcie.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
index 54f07852d279..02450fb26bb9 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
@@ -8,7 +8,7 @@ title: Qualcomm PCI express root complex
maintainers:
- Bjorn Andersson <bjorn.andersson@linaro.org>
- - Stanimir Varbanov <svarbanov@mm-sol.com>
+ - Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
description: |
Qualcomm PCIe root complex controller is based on the Synopsys DesignWare
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 2/3] dt-bindings: PCI: qcom: Document msi-map and msi-map-mask properties
2022-12-19 19:14 [PATCH 0/3] Qcom: Add GIC-ITS support to SM8450 PCIe controllers Manivannan Sadhasivam
2022-12-19 19:14 ` [PATCH 1/3] dt-bindings: PCI: qcom: Update maintainers Manivannan Sadhasivam
@ 2022-12-19 19:14 ` Manivannan Sadhasivam
2022-12-20 10:29 ` Krzysztof Kozlowski
2022-12-19 19:14 ` [PATCH 3/3] arm64: dts: qcom: sm8450: Use GIC-ITS for PCIe0 and PCIe1 Manivannan Sadhasivam
2 siblings, 1 reply; 10+ messages in thread
From: Manivannan Sadhasivam @ 2022-12-19 19:14 UTC (permalink / raw)
To: andersson, robh+dt, krzysztof.kozlowski+dt
Cc: bhelgaas, konrad.dybcio, linux-arm-msm, linux-pci, devicetree,
linux-kernel, Manivannan Sadhasivam
The Qcom PCIe controller is capable of using either internal MSI controller
or the external GIC-ITS for receiving the MSIs from endpoint devices.
Currently, the binding only documents the internal MSI implementation.
Let's document the GIC-ITS imeplementation by making use of msi-map and
msi-map-mask properties.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
.../devicetree/bindings/pci/qcom,pcie.yaml | 16 +++++++++++++---
1 file changed, 13 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
index 02450fb26bb9..24c3e7ef14eb 100644
--- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
@@ -100,18 +100,28 @@ properties:
description: GPIO controlled connection to WAKE# signal
maxItems: 1
+ msi-map: true
+
+ msi-map-mask: true
+
required:
- compatible
- reg
- reg-names
- - interrupts
- - interrupt-names
- - "#interrupt-cells"
- interrupt-map-mask
- interrupt-map
- clocks
- clock-names
+oneOf:
+ - required:
+ - interrupts
+ - interrupt-names
+ - "#interrupt-cells"
+ - required:
+ - msi-map
+ - msi-map-mask
+
allOf:
- $ref: /schemas/pci/pci-bus.yaml#
- if:
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH 3/3] arm64: dts: qcom: sm8450: Use GIC-ITS for PCIe0 and PCIe1
2022-12-19 19:14 [PATCH 0/3] Qcom: Add GIC-ITS support to SM8450 PCIe controllers Manivannan Sadhasivam
2022-12-19 19:14 ` [PATCH 1/3] dt-bindings: PCI: qcom: Update maintainers Manivannan Sadhasivam
2022-12-19 19:14 ` [PATCH 2/3] dt-bindings: PCI: qcom: Document msi-map and msi-map-mask properties Manivannan Sadhasivam
@ 2022-12-19 19:14 ` Manivannan Sadhasivam
2022-12-19 20:51 ` Konrad Dybcio
2022-12-19 21:46 ` Dmitry Baryshkov
2 siblings, 2 replies; 10+ messages in thread
From: Manivannan Sadhasivam @ 2022-12-19 19:14 UTC (permalink / raw)
To: andersson, robh+dt, krzysztof.kozlowski+dt
Cc: bhelgaas, konrad.dybcio, linux-arm-msm, linux-pci, devicetree,
linux-kernel, Manivannan Sadhasivam
Both PCIe0 and PCIe1 controllers are capable of receiving MSIs from
endpoint devices using GIC-ITS MSI controller. Add support for it.
Currently, BDF (0:0.0) and BDF (1:0.0) are enabled and with the
msi-map-mask of 0xff00, all the 32 devices under these two busses can
share the same Device ID.
The GIC-ITS MSI implementation provides an advantage over internal MSI
implementation using Locality-specific Peripheral Interrupts (LPI) that
would allow MSIs to be targeted for each CPU core.
Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---
arch/arm64/boot/dts/qcom/sm8450.dtsi | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
index 570475040d95..276ceba4c247 100644
--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
@@ -1733,9 +1733,9 @@ pcie0: pci@1c00000 {
ranges = <0x01000000 0x0 0x60200000 0 0x60200000 0x0 0x100000>,
<0x02000000 0x0 0x60300000 0 0x60300000 0x0 0x3d00000>;
- interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "msi";
- #interrupt-cells = <1>;
+ msi-map = <0x0 &gic_its 0x5980 0x1>,
+ <0x100 &gic_its 0x5981 0x1>;
+ msi-map-mask = <0xff00>;
interrupt-map-mask = <0 0 0 0x7>;
interrupt-map = <0 0 0 1 &intc 0 0 0 149 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
<0 0 0 2 &intc 0 0 0 150 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
@@ -1842,9 +1842,9 @@ pcie1: pci@1c08000 {
ranges = <0x01000000 0x0 0x40200000 0 0x40200000 0x0 0x100000>,
<0x02000000 0x0 0x40300000 0 0x40300000 0x0 0x1fd00000>;
- interrupts = <GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "msi";
- #interrupt-cells = <1>;
+ msi-map = <0x0 &gic_its 0x5a01 0x1>,
+ <0x100 &gic_its 0x5a00 0x1>;
+ msi-map-mask = <0xff00>;
interrupt-map-mask = <0 0 0 0x7>;
interrupt-map = <0 0 0 1 &intc 0 0 0 434 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
<0 0 0 2 &intc 0 0 0 435 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
--
2.25.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] arm64: dts: qcom: sm8450: Use GIC-ITS for PCIe0 and PCIe1
2022-12-19 19:14 ` [PATCH 3/3] arm64: dts: qcom: sm8450: Use GIC-ITS for PCIe0 and PCIe1 Manivannan Sadhasivam
@ 2022-12-19 20:51 ` Konrad Dybcio
2022-12-20 10:42 ` Manivannan Sadhasivam
2022-12-19 21:46 ` Dmitry Baryshkov
1 sibling, 1 reply; 10+ messages in thread
From: Konrad Dybcio @ 2022-12-19 20:51 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson, robh+dt, krzysztof.kozlowski+dt
Cc: bhelgaas, linux-arm-msm, linux-pci, devicetree, linux-kernel
On 19.12.2022 20:14, Manivannan Sadhasivam wrote:
> Both PCIe0 and PCIe1 controllers are capable of receiving MSIs from
> endpoint devices using GIC-ITS MSI controller. Add support for it.
>
> Currently, BDF (0:0.0) and BDF (1:0.0) are enabled and with the
> msi-map-mask of 0xff00, all the 32 devices under these two busses can
> share the same Device ID.
>
> The GIC-ITS MSI implementation provides an advantage over internal MSI
> implementation using Locality-specific Peripheral Interrupts (LPI) that
> would allow MSIs to be targeted for each CPU core.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
This breaks PCIe Wi-Fi on Xperia 1 IV:
[ 32.711199] ath11k_pci 0000:01:00.0: Adding to iommu group 5
[ 32.713738] ath11k_pci 0000:01:00.0: BAR 0: assigned [mem 0x60400000-0x605fffff 64bit]
[ 32.715447] ath11k_pci 0000:01:00.0: MSI vectors: 32
[ 32.715485] ath11k_pci 0000:01:00.0: wcn6855 hw2.1
[ 32.873873] mhi mhi0: Requested to power ON
[ 32.873896] mhi mhi0: Power on setup success
[ 65.161798] arm-smmu 15000000.iommu: Unhandled context fault: fsr=0x402, iova=0x91517088, fsynr=0x640001, cbfrsynra=0x1c00, cb=5
Konrad
> arch/arm64/boot/dts/qcom/sm8450.dtsi | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
> index 570475040d95..276ceba4c247 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
> @@ -1733,9 +1733,9 @@ pcie0: pci@1c00000 {
> ranges = <0x01000000 0x0 0x60200000 0 0x60200000 0x0 0x100000>,
> <0x02000000 0x0 0x60300000 0 0x60300000 0x0 0x3d00000>;
>
> - interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
> - interrupt-names = "msi";
> - #interrupt-cells = <1>;
> + msi-map = <0x0 &gic_its 0x5980 0x1>,
> + <0x100 &gic_its 0x5981 0x1>;
> + msi-map-mask = <0xff00>;
> interrupt-map-mask = <0 0 0 0x7>;
> interrupt-map = <0 0 0 1 &intc 0 0 0 149 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
> <0 0 0 2 &intc 0 0 0 150 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
> @@ -1842,9 +1842,9 @@ pcie1: pci@1c08000 {
> ranges = <0x01000000 0x0 0x40200000 0 0x40200000 0x0 0x100000>,
> <0x02000000 0x0 0x40300000 0 0x40300000 0x0 0x1fd00000>;
>
> - interrupts = <GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH>;
> - interrupt-names = "msi";
> - #interrupt-cells = <1>;
> + msi-map = <0x0 &gic_its 0x5a01 0x1>,
> + <0x100 &gic_its 0x5a00 0x1>;
> + msi-map-mask = <0xff00>;
> interrupt-map-mask = <0 0 0 0x7>;
> interrupt-map = <0 0 0 1 &intc 0 0 0 434 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
> <0 0 0 2 &intc 0 0 0 435 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] arm64: dts: qcom: sm8450: Use GIC-ITS for PCIe0 and PCIe1
2022-12-19 19:14 ` [PATCH 3/3] arm64: dts: qcom: sm8450: Use GIC-ITS for PCIe0 and PCIe1 Manivannan Sadhasivam
2022-12-19 20:51 ` Konrad Dybcio
@ 2022-12-19 21:46 ` Dmitry Baryshkov
2022-12-20 10:34 ` Manivannan Sadhasivam
1 sibling, 1 reply; 10+ messages in thread
From: Dmitry Baryshkov @ 2022-12-19 21:46 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson, robh+dt, krzysztof.kozlowski+dt
Cc: bhelgaas, konrad.dybcio, linux-arm-msm, linux-pci, devicetree,
linux-kernel
On 19/12/2022 21:14, Manivannan Sadhasivam wrote:
> Both PCIe0 and PCIe1 controllers are capable of receiving MSIs from
> endpoint devices using GIC-ITS MSI controller. Add support for it.
>
> Currently, BDF (0:0.0) and BDF (1:0.0) are enabled and with the
> msi-map-mask of 0xff00, all the 32 devices under these two busses can
> share the same Device ID.
>
> The GIC-ITS MSI implementation provides an advantage over internal MSI
> implementation using Locality-specific Peripheral Interrupts (LPI) that
> would allow MSIs to be targeted for each CPU core.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
> arch/arm64/boot/dts/qcom/sm8450.dtsi | 12 ++++++------
> 1 file changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
> index 570475040d95..276ceba4c247 100644
> --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
> @@ -1733,9 +1733,9 @@ pcie0: pci@1c00000 {
> ranges = <0x01000000 0x0 0x60200000 0 0x60200000 0x0 0x100000>,
> <0x02000000 0x0 0x60300000 0 0x60300000 0x0 0x3d00000>;
>
> - interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
> - interrupt-names = "msi";
> - #interrupt-cells = <1>;
> + msi-map = <0x0 &gic_its 0x5980 0x1>,
> + <0x100 &gic_its 0x5981 0x1>;
Does ITS support handling more than one MSI interrupt per device?
Otherwise it might be better to switch to multi-MSI scheme using SPI
interrupts.
> + msi-map-mask = <0xff00>;
> interrupt-map-mask = <0 0 0 0x7>;
> interrupt-map = <0 0 0 1 &intc 0 0 0 149 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
> <0 0 0 2 &intc 0 0 0 150 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
> @@ -1842,9 +1842,9 @@ pcie1: pci@1c08000 {
> ranges = <0x01000000 0x0 0x40200000 0 0x40200000 0x0 0x100000>,
> <0x02000000 0x0 0x40300000 0 0x40300000 0x0 0x1fd00000>;
>
> - interrupts = <GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH>;
> - interrupt-names = "msi";
> - #interrupt-cells = <1>;
> + msi-map = <0x0 &gic_its 0x5a01 0x1>,
> + <0x100 &gic_its 0x5a00 0x1>;
Are you sure that the order is correct here?
> + msi-map-mask = <0xff00>;
> interrupt-map-mask = <0 0 0 0x7>;
> interrupt-map = <0 0 0 1 &intc 0 0 0 434 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
> <0 0 0 2 &intc 0 0 0 435 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
--
With best wishes
Dmitry
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 1/3] dt-bindings: PCI: qcom: Update maintainers
2022-12-19 19:14 ` [PATCH 1/3] dt-bindings: PCI: qcom: Update maintainers Manivannan Sadhasivam
@ 2022-12-20 10:24 ` Krzysztof Kozlowski
0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-12-20 10:24 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson, robh+dt, krzysztof.kozlowski+dt
Cc: bhelgaas, konrad.dybcio, linux-arm-msm, linux-pci, devicetree,
linux-kernel
On 19/12/2022 20:14, Manivannan Sadhasivam wrote:
> Stanimir has left mm-sol and already expressed his wish to not continue
> maintaining the PCIe RC driver. So his entry can be removed.
>
> Adding myself as the co-maintainer since I took over the PCIe RC driver
> maintainership from Stanimir.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 2/3] dt-bindings: PCI: qcom: Document msi-map and msi-map-mask properties
2022-12-19 19:14 ` [PATCH 2/3] dt-bindings: PCI: qcom: Document msi-map and msi-map-mask properties Manivannan Sadhasivam
@ 2022-12-20 10:29 ` Krzysztof Kozlowski
0 siblings, 0 replies; 10+ messages in thread
From: Krzysztof Kozlowski @ 2022-12-20 10:29 UTC (permalink / raw)
To: Manivannan Sadhasivam, andersson, robh+dt, krzysztof.kozlowski+dt
Cc: bhelgaas, konrad.dybcio, linux-arm-msm, linux-pci, devicetree,
linux-kernel
On 19/12/2022 20:14, Manivannan Sadhasivam wrote:
> The Qcom PCIe controller is capable of using either internal MSI controller
> or the external GIC-ITS for receiving the MSIs from endpoint devices.
> Currently, the binding only documents the internal MSI implementation.
>
> Let's document the GIC-ITS imeplementation by making use of msi-map and
> msi-map-mask properties.
>
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
> .../devicetree/bindings/pci/qcom,pcie.yaml | 16 +++++++++++++---
> 1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> index 02450fb26bb9..24c3e7ef14eb 100644
> --- a/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> +++ b/Documentation/devicetree/bindings/pci/qcom,pcie.yaml
> @@ -100,18 +100,28 @@ properties:
> description: GPIO controlled connection to WAKE# signal
> maxItems: 1
>
> + msi-map: true
> +
> + msi-map-mask: true
You should not need these. Just like interrup-map-mask, it is coming
from pci-bus.yaml.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] arm64: dts: qcom: sm8450: Use GIC-ITS for PCIe0 and PCIe1
2022-12-19 21:46 ` Dmitry Baryshkov
@ 2022-12-20 10:34 ` Manivannan Sadhasivam
0 siblings, 0 replies; 10+ messages in thread
From: Manivannan Sadhasivam @ 2022-12-20 10:34 UTC (permalink / raw)
To: Dmitry Baryshkov
Cc: andersson, robh+dt, krzysztof.kozlowski+dt, bhelgaas,
konrad.dybcio, linux-arm-msm, linux-pci, devicetree, linux-kernel
On Mon, Dec 19, 2022 at 11:46:03PM +0200, Dmitry Baryshkov wrote:
> On 19/12/2022 21:14, Manivannan Sadhasivam wrote:
> > Both PCIe0 and PCIe1 controllers are capable of receiving MSIs from
> > endpoint devices using GIC-ITS MSI controller. Add support for it.
> >
> > Currently, BDF (0:0.0) and BDF (1:0.0) are enabled and with the
> > msi-map-mask of 0xff00, all the 32 devices under these two busses can
> > share the same Device ID.
> >
> > The GIC-ITS MSI implementation provides an advantage over internal MSI
> > implementation using Locality-specific Peripheral Interrupts (LPI) that
> > would allow MSIs to be targeted for each CPU core.
> >
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > ---
> > arch/arm64/boot/dts/qcom/sm8450.dtsi | 12 ++++++------
> > 1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
> > index 570475040d95..276ceba4c247 100644
> > --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
> > @@ -1733,9 +1733,9 @@ pcie0: pci@1c00000 {
> > ranges = <0x01000000 0x0 0x60200000 0 0x60200000 0x0 0x100000>,
> > <0x02000000 0x0 0x60300000 0 0x60300000 0x0 0x3d00000>;
> > - interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
> > - interrupt-names = "msi";
> > - #interrupt-cells = <1>;
> > + msi-map = <0x0 &gic_its 0x5980 0x1>,
> > + <0x100 &gic_its 0x5981 0x1>;
>
> Does ITS support handling more than one MSI interrupt per device? Otherwise
> it might be better to switch to multi-MSI scheme using SPI interrupts.
>
Yes, it does support multiple MSIs from endpoints. I've verified it using the
MHI Endpoint device.
> > + msi-map-mask = <0xff00>;
> > interrupt-map-mask = <0 0 0 0x7>;
> > interrupt-map = <0 0 0 1 &intc 0 0 0 149 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
> > <0 0 0 2 &intc 0 0 0 150 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
> > @@ -1842,9 +1842,9 @@ pcie1: pci@1c08000 {
> > ranges = <0x01000000 0x0 0x40200000 0 0x40200000 0x0 0x100000>,
> > <0x02000000 0x0 0x40300000 0 0x40300000 0x0 0x1fd00000>;
> > - interrupts = <GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH>;
> > - interrupt-names = "msi";
> > - #interrupt-cells = <1>;
> > + msi-map = <0x0 &gic_its 0x5a01 0x1>,
> > + <0x100 &gic_its 0x5a00 0x1>;
>
> Are you sure that the order is correct here?
>
Ideally, BDF (1:0.0) should be assinged the Device ID of 0x5a01. But based on my
experiments, it doesn't work. But if the Device ID gets swapped, it works.
Maybe I should add a comment here.
Thanks,
Mani
> > + msi-map-mask = <0xff00>;
> > interrupt-map-mask = <0 0 0 0x7>;
> > interrupt-map = <0 0 0 1 &intc 0 0 0 434 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
> > <0 0 0 2 &intc 0 0 0 435 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
>
> --
> With best wishes
> Dmitry
>
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH 3/3] arm64: dts: qcom: sm8450: Use GIC-ITS for PCIe0 and PCIe1
2022-12-19 20:51 ` Konrad Dybcio
@ 2022-12-20 10:42 ` Manivannan Sadhasivam
0 siblings, 0 replies; 10+ messages in thread
From: Manivannan Sadhasivam @ 2022-12-20 10:42 UTC (permalink / raw)
To: Konrad Dybcio
Cc: andersson, robh+dt, krzysztof.kozlowski+dt, bhelgaas,
linux-arm-msm, linux-pci, devicetree, linux-kernel
On Mon, Dec 19, 2022 at 09:51:40PM +0100, Konrad Dybcio wrote:
>
>
> On 19.12.2022 20:14, Manivannan Sadhasivam wrote:
> > Both PCIe0 and PCIe1 controllers are capable of receiving MSIs from
> > endpoint devices using GIC-ITS MSI controller. Add support for it.
> >
> > Currently, BDF (0:0.0) and BDF (1:0.0) are enabled and with the
> > msi-map-mask of 0xff00, all the 32 devices under these two busses can
> > share the same Device ID.
> >
> > The GIC-ITS MSI implementation provides an advantage over internal MSI
> > implementation using Locality-specific Peripheral Interrupts (LPI) that
> > would allow MSIs to be targeted for each CPU core.
> >
> > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > ---
> This breaks PCIe Wi-Fi on Xperia 1 IV:
>
> [ 32.711199] ath11k_pci 0000:01:00.0: Adding to iommu group 5
> [ 32.713738] ath11k_pci 0000:01:00.0: BAR 0: assigned [mem 0x60400000-0x605fffff 64bit]
> [ 32.715447] ath11k_pci 0000:01:00.0: MSI vectors: 32
> [ 32.715485] ath11k_pci 0000:01:00.0: wcn6855 hw2.1
> [ 32.873873] mhi mhi0: Requested to power ON
> [ 32.873896] mhi mhi0: Power on setup success
> [ 65.161798] arm-smmu 15000000.iommu: Unhandled context fault: fsr=0x402, iova=0x91517088, fsynr=0x640001, cbfrsynra=0x1c00, cb=5
>
Thanks a lot for testing! Can you please share the full dmesg log?
Thanks,
Mani
>
> Konrad
> > arch/arm64/boot/dts/qcom/sm8450.dtsi | 12 ++++++------
> > 1 file changed, 6 insertions(+), 6 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
> > index 570475040d95..276ceba4c247 100644
> > --- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
> > +++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
> > @@ -1733,9 +1733,9 @@ pcie0: pci@1c00000 {
> > ranges = <0x01000000 0x0 0x60200000 0 0x60200000 0x0 0x100000>,
> > <0x02000000 0x0 0x60300000 0 0x60300000 0x0 0x3d00000>;
> >
> > - interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>;
> > - interrupt-names = "msi";
> > - #interrupt-cells = <1>;
> > + msi-map = <0x0 &gic_its 0x5980 0x1>,
> > + <0x100 &gic_its 0x5981 0x1>;
> > + msi-map-mask = <0xff00>;
> > interrupt-map-mask = <0 0 0 0x7>;
> > interrupt-map = <0 0 0 1 &intc 0 0 0 149 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
> > <0 0 0 2 &intc 0 0 0 150 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
> > @@ -1842,9 +1842,9 @@ pcie1: pci@1c08000 {
> > ranges = <0x01000000 0x0 0x40200000 0 0x40200000 0x0 0x100000>,
> > <0x02000000 0x0 0x40300000 0 0x40300000 0x0 0x1fd00000>;
> >
> > - interrupts = <GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH>;
> > - interrupt-names = "msi";
> > - #interrupt-cells = <1>;
> > + msi-map = <0x0 &gic_its 0x5a01 0x1>,
> > + <0x100 &gic_its 0x5a00 0x1>;
> > + msi-map-mask = <0xff00>;
> > interrupt-map-mask = <0 0 0 0x7>;
> > interrupt-map = <0 0 0 1 &intc 0 0 0 434 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
> > <0 0 0 2 &intc 0 0 0 435 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
--
மணிவண்ணன் சதாசிவம்
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2022-12-20 10:43 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-19 19:14 [PATCH 0/3] Qcom: Add GIC-ITS support to SM8450 PCIe controllers Manivannan Sadhasivam
2022-12-19 19:14 ` [PATCH 1/3] dt-bindings: PCI: qcom: Update maintainers Manivannan Sadhasivam
2022-12-20 10:24 ` Krzysztof Kozlowski
2022-12-19 19:14 ` [PATCH 2/3] dt-bindings: PCI: qcom: Document msi-map and msi-map-mask properties Manivannan Sadhasivam
2022-12-20 10:29 ` Krzysztof Kozlowski
2022-12-19 19:14 ` [PATCH 3/3] arm64: dts: qcom: sm8450: Use GIC-ITS for PCIe0 and PCIe1 Manivannan Sadhasivam
2022-12-19 20:51 ` Konrad Dybcio
2022-12-20 10:42 ` Manivannan Sadhasivam
2022-12-19 21:46 ` Dmitry Baryshkov
2022-12-20 10:34 ` Manivannan Sadhasivam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).