* [PATCH] arm64: dts: rockchip: fix PCIe domain number for rk3399
@ 2017-03-20 2:38 Shawn Lin
2017-03-20 22:14 ` Brian Norris
[not found] ` <1489977480-8785-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
0 siblings, 2 replies; 3+ messages in thread
From: Shawn Lin @ 2017-03-20 2:38 UTC (permalink / raw)
To: Heiko Stuebner
Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Shawn Lin,
Brian Norris
It's suggested to fix the domain number for all PCIe
host bridges or not set it at all. However, if we don't
fix it, the domain number will keep increasing ever when
doing unbind/bind test, which makes the bus tree of lspci
introduce pointless domain hierarchy. More investigation shows
the domain number allocater of PCI doesn't consider the conflict
of domain number if we have more than one PCIe port belonging to
different domains. So once unbinding/binding one of them and keep
others would going to overflow the domain number so that finally
it will share the same domain as others, but actually it shouldn't.
We should fix the domain number for PCIe or invent new indexing
ID mechanisms. However it isn't worth inventing new indexing ID
mechanisms personlly, Just look at how other Root Complex drivers
did, for instance, broadcom and qualcomm, it seems fixing the domain
number was more popular. So this patch gonna fix the domain number
of PCIe for rk3399.
Cc: Brian Norris <briannorris-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Signed-off-by: Shawn Lin <shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
---
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index f5681be..f66c320 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -234,6 +234,7 @@
<0 0 0 2 &pcie0_intc 1>,
<0 0 0 3 &pcie0_intc 2>,
<0 0 0 4 &pcie0_intc 3>;
+ linux,pci-domain = <0>;
max-link-speed = <1>;
msi-map = <0x0 &its 0x0 0x1000>;
phys = <&pcie_phy>;
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: dts: rockchip: fix PCIe domain number for rk3399
2017-03-20 2:38 [PATCH] arm64: dts: rockchip: fix PCIe domain number for rk3399 Shawn Lin
@ 2017-03-20 22:14 ` Brian Norris
[not found] ` <1489977480-8785-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
1 sibling, 0 replies; 3+ messages in thread
From: Brian Norris @ 2017-03-20 22:14 UTC (permalink / raw)
To: Shawn Lin; +Cc: Heiko Stuebner, linux-rockchip, linux-pci
On Mon, Mar 20, 2017 at 10:38:00AM +0800, Shawn Lin wrote:
> It's suggested to fix the domain number for all PCIe
> host bridges or not set it at all. However, if we don't
> fix it, the domain number will keep increasing ever when
> doing unbind/bind test, which makes the bus tree of lspci
> introduce pointless domain hierarchy. More investigation shows
> the domain number allocater of PCI doesn't consider the conflict
> of domain number if we have more than one PCIe port belonging to
> different domains. So once unbinding/binding one of them and keep
> others would going to overflow the domain number so that finally
> it will share the same domain as others, but actually it shouldn't.
> We should fix the domain number for PCIe or invent new indexing
> ID mechanisms. However it isn't worth inventing new indexing ID
> mechanisms personlly, Just look at how other Root Complex drivers
> did, for instance, broadcom and qualcomm, it seems fixing the domain
> number was more popular. So this patch gonna fix the domain number
> of PCIe for rk3399.
>
> Cc: Brian Norris <briannorris@chromium.org>
> Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Seems OK, though it still feels like we should fix the domain number
allocation code.
Reviewed-by: Brian Norris <briannorris@chromium.org>
Tested-by: Brian Norris <briannorris@chromium.org>
> ---
>
> arch/arm64/boot/dts/rockchip/rk3399.dtsi | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> index f5681be..f66c320 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
> @@ -234,6 +234,7 @@
> <0 0 0 2 &pcie0_intc 1>,
> <0 0 0 3 &pcie0_intc 2>,
> <0 0 0 4 &pcie0_intc 3>;
> + linux,pci-domain = <0>;
> max-link-speed = <1>;
> msi-map = <0x0 &its 0x0 0x1000>;
> phys = <&pcie_phy>;
> --
> 1.9.1
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] arm64: dts: rockchip: fix PCIe domain number for rk3399
[not found] ` <1489977480-8785-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2017-03-22 16:51 ` Heiko Stuebner
0 siblings, 0 replies; 3+ messages in thread
From: Heiko Stuebner @ 2017-03-22 16:51 UTC (permalink / raw)
To: Shawn Lin; +Cc: linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, Brian Norris
Am Montag, 20. März 2017, 10:38:00 CET schrieb Shawn Lin:
> It's suggested to fix the domain number for all PCIe
> host bridges or not set it at all. However, if we don't
> fix it, the domain number will keep increasing ever when
> doing unbind/bind test, which makes the bus tree of lspci
> introduce pointless domain hierarchy. More investigation shows
> the domain number allocater of PCI doesn't consider the conflict
> of domain number if we have more than one PCIe port belonging to
> different domains. So once unbinding/binding one of them and keep
> others would going to overflow the domain number so that finally
> it will share the same domain as others, but actually it shouldn't.
> We should fix the domain number for PCIe or invent new indexing
> ID mechanisms. However it isn't worth inventing new indexing ID
> mechanisms personlly, Just look at how other Root Complex drivers
> did, for instance, broadcom and qualcomm, it seems fixing the domain
> number was more popular. So this patch gonna fix the domain number
> of PCIe for rk3399.
>
> Cc: Brian Norris <briannorris-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> Signed-off-by: Shawn Lin <shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
applied for 4.12 with Brian's tags.
Thanks
Heiko
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-22 16:51 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-20 2:38 [PATCH] arm64: dts: rockchip: fix PCIe domain number for rk3399 Shawn Lin
2017-03-20 22:14 ` Brian Norris
[not found] ` <1489977480-8785-1-git-send-email-shawn.lin-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2017-03-22 16:51 ` Heiko Stuebner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox