mbox series

[0/5] remove label = "cpu" from DSA dt-binding

Message ID 20221130141040.32447-1-arinc.unal@arinc9.com
Headers show
Series remove label = "cpu" from DSA dt-binding | expand

Message

Arınç ÜNAL Nov. 30, 2022, 2:10 p.m. UTC
Hello folks,

With this patch series, we're completely getting rid of 'label = "cpu";'
which is not used by the DSA dt-binding at all.

Information for taking the patches for maintainers:
Patch 1: netdev maintainers (based off netdev/net-next.git main)
Patch 2-3: SoC maintainers (based off soc/soc.git soc/dt)
Patch 4: MIPS maintainers (based off mips/linux.git mips-next)
Patch 5: PowerPC maintainers (based off powerpc/linux.git next-test)

I've been meaning to submit this for a few months. Find the relevant
conversation here:
https://lore.kernel.org/netdev/20220913155408.GA3802998-robh@kernel.org/

Here's how I did it, for the interested (or suggestions):

Find the platforms which have got 'label = "cpu";' defined.
grep -rnw . -e 'label = "cpu";'

Remove the line where 'label = "cpu";' is included.
sed -i /'label = "cpu";'/,+d arch/arm/boot/dts/*
sed -i /'label = "cpu";'/,+d arch/arm64/boot/dts/freescale/*
sed -i /'label = "cpu";'/,+d arch/arm64/boot/dts/marvell/*
sed -i /'label = "cpu";'/,+d arch/arm64/boot/dts/mediatek/*
sed -i /'label = "cpu";'/,+d arch/arm64/boot/dts/rockchip/*
sed -i /'label = "cpu";'/,+d arch/mips/boot/dts/qca/*
sed -i /'label = "cpu";'/,+d arch/mips/boot/dts/ralink/*
sed -i /'label = "cpu";'/,+d arch/powerpc/boot/dts/turris1x.dts
sed -i /'label = "cpu";'/,+d Documentation/devicetree/bindings/net/qca,ar71xx.yaml

Restore the symlink files which typechange after running sed.

Arınç ÜNAL (5):
  dt-bindings: net: qca,ar71xx: remove label = "cpu" from examples
  arm: dts: remove label = "cpu" from DSA dt-binding
  arm64: dts: remove label = "cpu" from DSA dt-binding
  mips: dts: remove label = "cpu" from DSA dt-binding
  powerpc: dts: remove label = "cpu" from DSA dt-binding

Comments

Geert Uytterhoeven Nov. 30, 2022, 2:51 p.m. UTC | #1
CC cleger

On Wed, Nov 30, 2022 at 3:33 PM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
> This is not used by the DSA dt-binding, so remove it from all devicetrees.
>
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

>  arch/arm/boot/dts/r9a06g032.dtsi                          | 1 -

Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>

> --- a/arch/arm/boot/dts/r9a06g032.dtsi
> +++ b/arch/arm/boot/dts/r9a06g032.dtsi
> @@ -401,7 +401,6 @@ switch_port3: port@3 {
>                                 switch_port4: port@4 {
>                                         reg = <4>;
>                                         ethernet = <&gmac2>;
> -                                       label = "cpu";
>                                         phy-mode = "internal";
>                                         status = "disabled";
>                                         fixed-link {

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
Andrew Lunn Nov. 30, 2022, 3:55 p.m. UTC | #2
On Wed, Nov 30, 2022 at 05:10:35PM +0300, Arınç ÜNAL wrote:
> Hello folks,
> 
> With this patch series, we're completely getting rid of 'label = "cpu";'
> which is not used by the DSA dt-binding at all.
> 
> Information for taking the patches for maintainers:
> Patch 1: netdev maintainers (based off netdev/net-next.git main)
> Patch 2-3: SoC maintainers (based off soc/soc.git soc/dt)
> Patch 4: MIPS maintainers (based off mips/linux.git mips-next)
> Patch 5: PowerPC maintainers (based off powerpc/linux.git next-test)

Hi Arınç

So your plan is that each architecture maintainer merges one patch?

That is fine, but it is good to be explicit, otherwise patches will
fall through the cracks because nobody picks them up. I generally use
To: to indicate who i expect to merge a patch, and everybody else in
the Cc:

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew
Arınç ÜNAL Nov. 30, 2022, 5:22 p.m. UTC | #3
On 30.11.2022 18:55, Andrew Lunn wrote:
> On Wed, Nov 30, 2022 at 05:10:35PM +0300, Arınç ÜNAL wrote:
>> Hello folks,
>>
>> With this patch series, we're completely getting rid of 'label = "cpu";'
>> which is not used by the DSA dt-binding at all.
>>
>> Information for taking the patches for maintainers:
>> Patch 1: netdev maintainers (based off netdev/net-next.git main)
>> Patch 2-3: SoC maintainers (based off soc/soc.git soc/dt)
>> Patch 4: MIPS maintainers (based off mips/linux.git mips-next)
>> Patch 5: PowerPC maintainers (based off powerpc/linux.git next-test)
> 
> Hi Arınç
> 
> So your plan is that each architecture maintainer merges one patch?

Initially, I sent this series to soc@kernel.org to take it all but Rob 
said it must be this way instead.

> 
> That is fine, but it is good to be explicit, otherwise patches will
> fall through the cracks because nobody picks them up. I generally use
> To: to indicate who i expect to merge a patch, and everybody else in
> the Cc:

Thanks for this, I'll follow suit if I don't see any activity for a few 
weeks.

> 
> Reviewed-by: Andrew Lunn <andrew@lunn.ch>
> 
>      Andrew

Arınç
Heiko Stuebner Nov. 30, 2022, 6:40 p.m. UTC | #4
Am Mittwoch, 30. November 2022, 15:10:38 CET schrieb Arınç ÜNAL:
> This is not used by the DSA dt-binding, so remove it from all devicetrees.
> 
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---

> diff --git a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
> index c282f6e79960..b71162d65d2e 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
> +++ b/arch/arm64/boot/dts/rockchip/rk3568-bpi-r2-pro.dts
> @@ -552,7 +552,6 @@ port@4 {
>  
>  			port@5 {
>  				reg = <5>;
> -				label = "cpu";
>  				ethernet = <&gmac0>;
>  				phy-mode = "rgmii";
>  
> 

Rockchip-part:
Acked-by: Heiko Stuebner <heiko@sntech.de>
Sergio Paracuellos Dec. 1, 2022, 6:04 a.m. UTC | #5
On Wed, Nov 30, 2022 at 3:14 PM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:
>
> This is not used by the DSA dt-binding, so remove it from all devicetrees.
>
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
>  arch/mips/boot/dts/ralink/mt7621.dtsi | 1 -

Acked-by: Sergio Paracuellos <sergio.paracuellos@gmail.com>

Thanks,
    Sergio Paracuellos
Oleksij Rempel Dec. 1, 2022, 6:13 a.m. UTC | #6
On Wed, Nov 30, 2022 at 05:10:39PM +0300, Arınç ÜNAL wrote:
> This is not used by the DSA dt-binding, so remove it from all devicetrees.
> 
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
>  arch/mips/boot/dts/qca/ar9331.dtsi    | 1 -
>  arch/mips/boot/dts/ralink/mt7621.dtsi | 1 -
>  2 files changed, 2 deletions(-)
> 
> diff --git a/arch/mips/boot/dts/qca/ar9331.dtsi b/arch/mips/boot/dts/qca/ar9331.dtsi
> index c4102b280b47..768ac0f869b1 100644
> --- a/arch/mips/boot/dts/qca/ar9331.dtsi
> +++ b/arch/mips/boot/dts/qca/ar9331.dtsi
> @@ -176,7 +176,6 @@ ports {
>  
>  						switch_port0: port@0 {
>  							reg = <0x0>;
> -							label = "cpu";
>  							ethernet = <&eth1>;
>  
>  							phy-mode = "gmii";

Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>

Thx!
Oleksij Rempel Dec. 1, 2022, 6:20 a.m. UTC | #7
On Wed, Nov 30, 2022 at 05:10:37PM +0300, Arınç ÜNAL wrote:
> This is not used by the DSA dt-binding, so remove it from all devicetrees.
> 
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
>  arch/arm/boot/dts/imx6qdl-skov-cpu.dtsi                   | 1 -
>  arch/arm/boot/dts/imx6qp-prtwd3.dts                       | 1 -

Reviewed-by: Oleksij Rempel <o.rempel@pengutronix.de>

Thx!
Arınç ÜNAL Dec. 1, 2022, 9:14 a.m. UTC | #8
I'm sending a more specific mail to make sure this series doesn't fall 
through the cracks like Andrew said. I'd like this merged this week 
before the merge window closes.

Jakub, please take patch 1.
Arnd, please take patch 2 and 3.
Thomas, please take patch 4.
Michael, please take patch 5.

Arınç

On 30.11.2022 17:10, Arınç ÜNAL wrote:
> Hello folks,
> 
> With this patch series, we're completely getting rid of 'label = "cpu";'
> which is not used by the DSA dt-binding at all.
> 
> Information for taking the patches for maintainers:
> Patch 1: netdev maintainers (based off netdev/net-next.git main)
> Patch 2-3: SoC maintainers (based off soc/soc.git soc/dt)
> Patch 4: MIPS maintainers (based off mips/linux.git mips-next)
> Patch 5: PowerPC maintainers (based off powerpc/linux.git next-test)
> 
> I've been meaning to submit this for a few months. Find the relevant
> conversation here:
> https://lore.kernel.org/netdev/20220913155408.GA3802998-robh@kernel.org/
> 
> Here's how I did it, for the interested (or suggestions):
> 
> Find the platforms which have got 'label = "cpu";' defined.
> grep -rnw . -e 'label = "cpu";'
> 
> Remove the line where 'label = "cpu";' is included.
> sed -i /'label = "cpu";'/,+d arch/arm/boot/dts/*
> sed -i /'label = "cpu";'/,+d arch/arm64/boot/dts/freescale/*
> sed -i /'label = "cpu";'/,+d arch/arm64/boot/dts/marvell/*
> sed -i /'label = "cpu";'/,+d arch/arm64/boot/dts/mediatek/*
> sed -i /'label = "cpu";'/,+d arch/arm64/boot/dts/rockchip/*
> sed -i /'label = "cpu";'/,+d arch/mips/boot/dts/qca/*
> sed -i /'label = "cpu";'/,+d arch/mips/boot/dts/ralink/*
> sed -i /'label = "cpu";'/,+d arch/powerpc/boot/dts/turris1x.dts
> sed -i /'label = "cpu";'/,+d Documentation/devicetree/bindings/net/qca,ar71xx.yaml
> 
> Restore the symlink files which typechange after running sed.
> 
> Arınç ÜNAL (5):
>    dt-bindings: net: qca,ar71xx: remove label = "cpu" from examples
>    arm: dts: remove label = "cpu" from DSA dt-binding
>    arm64: dts: remove label = "cpu" from DSA dt-binding
>    mips: dts: remove label = "cpu" from DSA dt-binding
>    powerpc: dts: remove label = "cpu" from DSA dt-binding
> 
>
Michael Ellerman Dec. 1, 2022, 10:40 a.m. UTC | #9
Arınç ÜNAL <arinc.unal@arinc9.com> writes:
> This is not used by the DSA dt-binding, so remove it from all devicetrees.
>
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
>  arch/powerpc/boot/dts/turris1x.dts | 2 --
>  1 file changed, 2 deletions(-)

Adding Pali to Cc.

These were only recently updated in commit:

  8bf056f57f1d ("powerpc: dts: turris1x.dts: Fix labels in DSA cpu port nodes")

Which said:

  DSA cpu port node has to be marked with "cpu" label.

But if the binding doesn't use them then I'm confused why they needed to
be updated.

cheers


> diff --git a/arch/powerpc/boot/dts/turris1x.dts b/arch/powerpc/boot/dts/turris1x.dts
> index 045af668e928..3841c8d96d00 100644
> --- a/arch/powerpc/boot/dts/turris1x.dts
> +++ b/arch/powerpc/boot/dts/turris1x.dts
> @@ -147,7 +147,6 @@ ports {
>  
>  					port@0 {
>  						reg = <0>;
> -						label = "cpu";
>  						ethernet = <&enet1>;
>  						phy-mode = "rgmii-id";
>  
> @@ -184,7 +183,6 @@ port@5 {
>  
>  					port@6 {
>  						reg = <6>;
> -						label = "cpu";
>  						ethernet = <&enet0>;
>  						phy-mode = "rgmii-id";
>  
> -- 
> 2.34.1
Michael Ellerman Dec. 1, 2022, 10:42 a.m. UTC | #10
Arınç ÜNAL <arinc.unal@arinc9.com> writes:
> On 30.11.2022 18:55, Andrew Lunn wrote:
>> On Wed, Nov 30, 2022 at 05:10:35PM +0300, Arınç ÜNAL wrote:
>>> Hello folks,
>>>
>>> With this patch series, we're completely getting rid of 'label = "cpu";'
>>> which is not used by the DSA dt-binding at all.
>>>
>>> Information for taking the patches for maintainers:
>>> Patch 1: netdev maintainers (based off netdev/net-next.git main)
>>> Patch 2-3: SoC maintainers (based off soc/soc.git soc/dt)
>>> Patch 4: MIPS maintainers (based off mips/linux.git mips-next)
>>> Patch 5: PowerPC maintainers (based off powerpc/linux.git next-test)
>> 
>> Hi Arınç
>> 
>> So your plan is that each architecture maintainer merges one patch?
>
> Initially, I sent this series to soc@kernel.org to take it all but Rob 
> said it must be this way instead.
>
>> 
>> That is fine, but it is good to be explicit, otherwise patches will
>> fall through the cracks because nobody picks them up. I generally use
>> To: to indicate who i expect to merge a patch, and everybody else in
>> the Cc:
>
> Thanks for this, I'll follow suit if I don't see any activity for a few 
> weeks.

IMHO the best solution if the patches are truly independent is to send
them independantly to each maintainer. That way there's no confusion
about whether someone else will take the series.

It's also simpler for maintainers to apply a single standalone patch vs
pick a single patch from a larger series.

cheers
Thomas Bogendoerfer Dec. 1, 2022, 10:53 a.m. UTC | #11
On Wed, Nov 30, 2022 at 05:10:39PM +0300, Arınç ÜNAL wrote:
> This is not used by the DSA dt-binding, so remove it from all devicetrees.
> 
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
>  arch/mips/boot/dts/qca/ar9331.dtsi    | 1 -
>  arch/mips/boot/dts/ralink/mt7621.dtsi | 1 -
>  2 files changed, 2 deletions(-)
> 
> diff --git a/arch/mips/boot/dts/qca/ar9331.dtsi b/arch/mips/boot/dts/qca/ar9331.dtsi
> index c4102b280b47..768ac0f869b1 100644
> --- a/arch/mips/boot/dts/qca/ar9331.dtsi
> +++ b/arch/mips/boot/dts/qca/ar9331.dtsi
> @@ -176,7 +176,6 @@ ports {
>  
>  						switch_port0: port@0 {
>  							reg = <0x0>;
> -							label = "cpu";
>  							ethernet = <&eth1>;
>  
>  							phy-mode = "gmii";
> diff --git a/arch/mips/boot/dts/ralink/mt7621.dtsi b/arch/mips/boot/dts/ralink/mt7621.dtsi
> index f3f4c1f26e01..445817cbf376 100644
> --- a/arch/mips/boot/dts/ralink/mt7621.dtsi
> +++ b/arch/mips/boot/dts/ralink/mt7621.dtsi
> @@ -386,7 +386,6 @@ port@4 {
>  
>  					port@6 {
>  						reg = <6>;
> -						label = "cpu";
>  						ethernet = <&gmac0>;
>  						phy-mode = "trgmii";
>  
> -- 
> 2.34.1

applied to mips-next.

Thomas.
Arınç ÜNAL Dec. 1, 2022, 11:37 a.m. UTC | #12
On 1.12.2022 13:42, Michael Ellerman wrote:
> Arınç ÜNAL <arinc.unal@arinc9.com> writes:
>> On 30.11.2022 18:55, Andrew Lunn wrote:
>>> On Wed, Nov 30, 2022 at 05:10:35PM +0300, Arınç ÜNAL wrote:
>>>> Hello folks,
>>>>
>>>> With this patch series, we're completely getting rid of 'label = "cpu";'
>>>> which is not used by the DSA dt-binding at all.
>>>>
>>>> Information for taking the patches for maintainers:
>>>> Patch 1: netdev maintainers (based off netdev/net-next.git main)
>>>> Patch 2-3: SoC maintainers (based off soc/soc.git soc/dt)
>>>> Patch 4: MIPS maintainers (based off mips/linux.git mips-next)
>>>> Patch 5: PowerPC maintainers (based off powerpc/linux.git next-test)
>>>
>>> Hi Arınç
>>>
>>> So your plan is that each architecture maintainer merges one patch?
>>
>> Initially, I sent this series to soc@kernel.org to take it all but Rob
>> said it must be this way instead.
>>
>>>
>>> That is fine, but it is good to be explicit, otherwise patches will
>>> fall through the cracks because nobody picks them up. I generally use
>>> To: to indicate who i expect to merge a patch, and everybody else in
>>> the Cc:
>>
>> Thanks for this, I'll follow suit if I don't see any activity for a few
>> weeks.
> 
> IMHO the best solution if the patches are truly independent is to send
> them independantly to each maintainer. That way there's no confusion
> about whether someone else will take the series.
> 
> It's also simpler for maintainers to apply a single standalone patch vs
> pick a single patch from a larger series.

I agree. I'll do that next time.

Cheers.
Arınç
Pali Rohár Dec. 1, 2022, 5:39 p.m. UTC | #13
On Thursday 01 December 2022 21:40:03 Michael Ellerman wrote:
> Arınç ÜNAL <arinc.unal@arinc9.com> writes:
> > This is not used by the DSA dt-binding, so remove it from all devicetrees.
> >
> > Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> > ---
> >  arch/powerpc/boot/dts/turris1x.dts | 2 --
> >  1 file changed, 2 deletions(-)
> 
> Adding Pali to Cc.
> 
> These were only recently updated in commit:
> 
>   8bf056f57f1d ("powerpc: dts: turris1x.dts: Fix labels in DSA cpu port nodes")
> 
> Which said:
> 
>   DSA cpu port node has to be marked with "cpu" label.
> 
> But if the binding doesn't use them then I'm confused why they needed to
> be updated.
> 
> cheers

I was told by Marek (CCed) that DSA port connected to CPU should have
label "cpu" and not "cpu<number>". Modern way for specifying CPU port is
by defining reference to network device, which there is already (&enet1
and &enet0). So that change just "fixed" incorrect naming cpu0 and cpu1.

So probably linux kernel does not need label = "cpu" in DTS anymore. But
this is not the reason to remove this property. Linux kernel does not
use lot of other nodes and properties too... Device tree should describe
hardware and not its usage in Linux. "label" property is valid in device
tree and it exactly describes what or where is this node connected. And
it may be used for other systems.

So I do not see a point in removing "label" properties from turris1x.dts
file, nor from any other dts file.

> 
> > diff --git a/arch/powerpc/boot/dts/turris1x.dts b/arch/powerpc/boot/dts/turris1x.dts
> > index 045af668e928..3841c8d96d00 100644
> > --- a/arch/powerpc/boot/dts/turris1x.dts
> > +++ b/arch/powerpc/boot/dts/turris1x.dts
> > @@ -147,7 +147,6 @@ ports {
> >  
> >  					port@0 {
> >  						reg = <0>;
> > -						label = "cpu";
> >  						ethernet = <&enet1>;
> >  						phy-mode = "rgmii-id";
> >  
> > @@ -184,7 +183,6 @@ port@5 {
> >  
> >  					port@6 {
> >  						reg = <6>;
> > -						label = "cpu";
> >  						ethernet = <&enet0>;
> >  						phy-mode = "rgmii-id";
> >  
> > -- 
> > 2.34.1
Rob Herring Dec. 1, 2022, 11:44 p.m. UTC | #14
On Thu, Dec 01, 2022 at 06:39:02PM +0100, Pali Rohár wrote:
> On Thursday 01 December 2022 21:40:03 Michael Ellerman wrote:
> > Arınç ÜNAL <arinc.unal@arinc9.com> writes:
> > > This is not used by the DSA dt-binding, so remove it from all devicetrees.
> > >
> > > Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> > > ---
> > >  arch/powerpc/boot/dts/turris1x.dts | 2 --
> > >  1 file changed, 2 deletions(-)
> > 
> > Adding Pali to Cc.
> > 
> > These were only recently updated in commit:
> > 
> >   8bf056f57f1d ("powerpc: dts: turris1x.dts: Fix labels in DSA cpu port nodes")
> > 
> > Which said:
> > 
> >   DSA cpu port node has to be marked with "cpu" label.
> > 
> > But if the binding doesn't use them then I'm confused why they needed to
> > be updated.
> > 
> > cheers
> 
> I was told by Marek (CCed) that DSA port connected to CPU should have
> label "cpu" and not "cpu<number>". Modern way for specifying CPU port is
> by defining reference to network device, which there is already (&enet1
> and &enet0). So that change just "fixed" incorrect naming cpu0 and cpu1.
> 
> So probably linux kernel does not need label = "cpu" in DTS anymore. But
> this is not the reason to remove this property. Linux kernel does not
> use lot of other nodes and properties too... Device tree should describe
> hardware and not its usage in Linux. "label" property is valid in device
> tree and it exactly describes what or where is this node connected. And
> it may be used for other systems.
> 
> So I do not see a point in removing "label" properties from turris1x.dts
> file, nor from any other dts file.

Well, it seems like a bit of an abuse of 'label' to me. 'label' should 
be aligned with a sticker or other identifier identifying something to a 
human. Software should never care what the value of 'label' is.

Rob
Pali Rohár Dec. 2, 2022, 7:35 p.m. UTC | #15
On Thursday 01 December 2022 17:44:00 Rob Herring wrote:
> On Thu, Dec 01, 2022 at 06:39:02PM +0100, Pali Rohár wrote:
> > On Thursday 01 December 2022 21:40:03 Michael Ellerman wrote:
> > > Arınç ÜNAL <arinc.unal@arinc9.com> writes:
> > > > This is not used by the DSA dt-binding, so remove it from all devicetrees.
> > > >
> > > > Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> > > > ---
> > > >  arch/powerpc/boot/dts/turris1x.dts | 2 --
> > > >  1 file changed, 2 deletions(-)
> > > 
> > > Adding Pali to Cc.
> > > 
> > > These were only recently updated in commit:
> > > 
> > >   8bf056f57f1d ("powerpc: dts: turris1x.dts: Fix labels in DSA cpu port nodes")
> > > 
> > > Which said:
> > > 
> > >   DSA cpu port node has to be marked with "cpu" label.
> > > 
> > > But if the binding doesn't use them then I'm confused why they needed to
> > > be updated.
> > > 
> > > cheers
> > 
> > I was told by Marek (CCed) that DSA port connected to CPU should have
> > label "cpu" and not "cpu<number>". Modern way for specifying CPU port is
> > by defining reference to network device, which there is already (&enet1
> > and &enet0). So that change just "fixed" incorrect naming cpu0 and cpu1.
> > 
> > So probably linux kernel does not need label = "cpu" in DTS anymore. But
> > this is not the reason to remove this property. Linux kernel does not
> > use lot of other nodes and properties too... Device tree should describe
> > hardware and not its usage in Linux. "label" property is valid in device
> > tree and it exactly describes what or where is this node connected. And
> > it may be used for other systems.
> > 
> > So I do not see a point in removing "label" properties from turris1x.dts
> > file, nor from any other dts file.
> 
> Well, it seems like a bit of an abuse of 'label' to me. 'label' should 
> be aligned with a sticker or other identifier identifying something to a 
> human. Software should never care what the value of 'label' is.
> 
> Rob

But it already does. "label" property is used for setting (initial)
network interface name for DSA drivers. And you can try to call e.g.
git grep '"cpu"' net/dsa drivers/net/dsa to see that cpu is still
present on some dsa places (probably relict or backward compatibility
before eth reference).

I agree with you that in this case it is abuse. But I would not say that
software should not care about "label". I think that software should
care about "label" but only in situation in which it presents
information to user. So if user wants to see device with labels *ABC*
(meaning show me anything which stickers contains substring ABC) then
software should filter devices and turns that with asked label.

The main problem here is _existing_ software. New software should really
do not use cpu label for deciding if network port is connected to cpu or
not and it should be designed correctly. But you cannot change nor fix
old / existing software...

The worst thing which can be done is breaking updated version of (old)
software. Prevention is always testing software and in this case testing
on the real hardware. I know, it is hard as developers do not have
such lot of hardware devices and configurations.
Vladimir Oltean Dec. 4, 2022, 6:59 p.m. UTC | #16
Hi Pali,

On Fri, Dec 02, 2022 at 08:35:52PM +0100, Pali Rohár wrote:
> On Thursday 01 December 2022 17:44:00 Rob Herring wrote:
> > On Thu, Dec 01, 2022 at 06:39:02PM +0100, Pali Rohár wrote:
> > > I was told by Marek (CCed) that DSA port connected to CPU should have
> > > label "cpu" and not "cpu<number>". Modern way for specifying CPU port is
> > > by defining reference to network device, which there is already (&enet1
> > > and &enet0). So that change just "fixed" incorrect naming cpu0 and cpu1.
> > > 
> > > So probably linux kernel does not need label = "cpu" in DTS anymore. But
> > > this is not the reason to remove this property. Linux kernel does not
> > > use lot of other nodes and properties too... Device tree should describe
> > > hardware and not its usage in Linux. "label" property is valid in device
> > > tree and it exactly describes what or where is this node connected. And
> > > it may be used for other systems.
> > > 
> > > So I do not see a point in removing "label" properties from turris1x.dts
> > > file, nor from any other dts file.
> > 
> > Well, it seems like a bit of an abuse of 'label' to me. 'label' should 
> > be aligned with a sticker or other identifier identifying something to a 
> > human. Software should never care what the value of 'label' is.
> 
> But it already does. "label" property is used for setting (initial)
> network interface name for DSA drivers. And you can try to call e.g.
> git grep '"cpu"' net/dsa drivers/net/dsa to see that cpu is still
> present on some dsa places (probably relict or backward compatibility
> before eth reference).

Can you try to eliminate the word "probably" from the information you
transmit and be specific about when did the DSA binding parse or require
the 'label = "cpu"' property for CPU ports in any way?
Linus Walleij Dec. 4, 2022, 9:31 p.m. UTC | #17
On Wed, Nov 30, 2022 at 3:13 PM Arınç ÜNAL <arinc.unal@arinc9.com> wrote:

> This is not used by the DSA dt-binding, so remove it from all devicetrees.
>
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

Acked-by: Linus Walleij <linus.walleij@linaro.org>

Yours,
Linus Walleij
Arınç ÜNAL Dec. 5, 2022, 7:15 p.m. UTC | #18
On 4.12.2022 21:59, Vladimir Oltean wrote:
> Hi Pali,
> 
> On Fri, Dec 02, 2022 at 08:35:52PM +0100, Pali Rohár wrote:
>> On Thursday 01 December 2022 17:44:00 Rob Herring wrote:
>>> On Thu, Dec 01, 2022 at 06:39:02PM +0100, Pali Rohár wrote:
>>>> I was told by Marek (CCed) that DSA port connected to CPU should have
>>>> label "cpu" and not "cpu<number>". Modern way for specifying CPU port is
>>>> by defining reference to network device, which there is already (&enet1
>>>> and &enet0). So that change just "fixed" incorrect naming cpu0 and cpu1.
>>>>
>>>> So probably linux kernel does not need label = "cpu" in DTS anymore. But
>>>> this is not the reason to remove this property. Linux kernel does not
>>>> use lot of other nodes and properties too... Device tree should describe
>>>> hardware and not its usage in Linux. "label" property is valid in device
>>>> tree and it exactly describes what or where is this node connected. And
>>>> it may be used for other systems.
>>>>
>>>> So I do not see a point in removing "label" properties from turris1x.dts
>>>> file, nor from any other dts file.
>>>
>>> Well, it seems like a bit of an abuse of 'label' to me. 'label' should
>>> be aligned with a sticker or other identifier identifying something to a
>>> human. Software should never care what the value of 'label' is.
>>
>> But it already does. "label" property is used for setting (initial)
>> network interface name for DSA drivers. And you can try to call e.g.
>> git grep '"cpu"' net/dsa drivers/net/dsa to see that cpu is still
>> present on some dsa places (probably relict or backward compatibility
>> before eth reference).
> 
> Can you try to eliminate the word "probably" from the information you
> transmit and be specific about when did the DSA binding parse or require
> the 'label = "cpu"' property for CPU ports in any way?

As Jonas (on CC) pointed out, I only see this being used in the swconfig 
b53 driver which uses the label to identify the cpu port.

https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/generic/files/drivers/net/phy/b53/b53_common.c;h=87d731ec3e2a868dc8389f554b1dc9ab42c30be2;hb=HEAD#l1508

Maybe this got into DSA dt-bindings unchecked before it was decided to 
move forward with DSA instead of swconfig on Linux.

Arınç
Jernej Škrabec Dec. 5, 2022, 8:10 p.m. UTC | #19
Dne sreda, 30. november 2022 ob 15:10:37 CET je Arınç ÜNAL napisal(a):
> This is not used by the DSA dt-binding, so remove it from all devicetrees.
> 
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> ---
>  arch/arm/boot/dts/armada-370-rd.dts                       | 1 -
>  arch/arm/boot/dts/armada-381-netgear-gs110emx.dts         | 1 -
>  arch/arm/boot/dts/armada-385-clearfog-gtr-l8.dts          | 1 -
>  arch/arm/boot/dts/armada-385-clearfog-gtr-s4.dts          | 1 -
>  arch/arm/boot/dts/armada-385-linksys.dtsi                 | 1 -
>  arch/arm/boot/dts/armada-385-turris-omnia.dts             | 1 -
>  arch/arm/boot/dts/armada-388-clearfog.dts                 | 1 -
>  arch/arm/boot/dts/armada-xp-linksys-mamba.dts             | 1 -
>  arch/arm/boot/dts/at91-sama5d2_icp.dts                    | 1 -
>  arch/arm/boot/dts/at91-sama5d3_ksz9477_evb.dts            | 1 -
>  arch/arm/boot/dts/bcm-cygnus.dtsi                         | 1 -
>  arch/arm/boot/dts/bcm4708-buffalo-wzr-1166dhp-common.dtsi | 1 -
>  arch/arm/boot/dts/bcm4708-luxul-xap-1510.dts              | 1 -
>  arch/arm/boot/dts/bcm4708-luxul-xwc-1000.dts              | 1 -
>  arch/arm/boot/dts/bcm4708-netgear-r6250.dts               | 1 -
>  arch/arm/boot/dts/bcm4708-smartrg-sr400ac.dts             | 1 -
>  arch/arm/boot/dts/bcm47081-buffalo-wzr-600dhp2.dts        | 1 -
>  arch/arm/boot/dts/bcm47081-luxul-xap-1410.dts             | 1 -
>  arch/arm/boot/dts/bcm47081-luxul-xwr-1200.dts             | 1 -
>  arch/arm/boot/dts/bcm4709-netgear-r8000.dts               | 1 -
>  arch/arm/boot/dts/bcm47094-asus-rt-ac88u.dts              | 3 ---
>  arch/arm/boot/dts/bcm47094-dlink-dir-885l.dts             | 1 -
>  arch/arm/boot/dts/bcm47094-linksys-panamera.dts           | 4 ----
>  arch/arm/boot/dts/bcm47094-luxul-abr-4500.dts             | 1 -
>  arch/arm/boot/dts/bcm47094-luxul-xap-1610.dts             | 1 -
>  arch/arm/boot/dts/bcm47094-luxul-xbr-4500.dts             | 1 -
>  arch/arm/boot/dts/bcm47094-luxul-xwc-2000.dts             | 1 -
>  arch/arm/boot/dts/bcm47094-luxul-xwr-3100.dts             | 1 -
>  arch/arm/boot/dts/bcm47094-luxul-xwr-3150-v1.dts          | 1 -
>  arch/arm/boot/dts/bcm47189-tenda-ac9.dts                  | 1 -
>  arch/arm/boot/dts/bcm53015-meraki-mr26.dts                | 1 -
>  arch/arm/boot/dts/bcm53016-meraki-mr32.dts                | 1 -
>  arch/arm/boot/dts/bcm953012er.dts                         | 1 -
>  arch/arm/boot/dts/bcm958622hr.dts                         | 1 -
>  arch/arm/boot/dts/bcm958623hr.dts                         | 1 -
>  arch/arm/boot/dts/bcm958625hr.dts                         | 1 -
>  arch/arm/boot/dts/bcm958625k.dts                          | 1 -
>  arch/arm/boot/dts/bcm988312hr.dts                         | 1 -
>  arch/arm/boot/dts/gemini-dlink-dir-685.dts                | 1 -
>  arch/arm/boot/dts/gemini-sl93512r.dts                     | 1 -
>  arch/arm/boot/dts/gemini-sq201.dts                        | 1 -
>  arch/arm/boot/dts/imx51-zii-rdu1.dts                      | 1 -
>  arch/arm/boot/dts/imx51-zii-scu2-mezz.dts                 | 1 -
>  arch/arm/boot/dts/imx51-zii-scu3-esb.dts                  | 1 -
>  arch/arm/boot/dts/imx53-kp-hsc.dts                        | 1 -
>  arch/arm/boot/dts/imx6dl-yapp4-common.dtsi                | 1 -
>  arch/arm/boot/dts/imx6q-b450v3.dts                        | 1 -
>  arch/arm/boot/dts/imx6q-b650v3.dts                        | 1 -
>  arch/arm/boot/dts/imx6q-b850v3.dts                        | 1 -
>  arch/arm/boot/dts/imx6qdl-gw5904.dtsi                     | 1 -
>  arch/arm/boot/dts/imx6qdl-skov-cpu.dtsi                   | 1 -
>  arch/arm/boot/dts/imx6qdl-zii-rdu2.dtsi                   | 1 -
>  arch/arm/boot/dts/imx6qp-prtwd3.dts                       | 1 -
>  arch/arm/boot/dts/imx7d-zii-rpu2.dts                      | 1 -
>  arch/arm/boot/dts/kirkwood-dir665.dts                     | 1 -
>  arch/arm/boot/dts/kirkwood-l-50.dts                       | 1 -
>  arch/arm/boot/dts/kirkwood-linksys-viper.dts              | 1 -
>  arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts            | 1 -
>  arch/arm/boot/dts/kirkwood-rd88f6281.dtsi                 | 1 -
>  arch/arm/boot/dts/mt7623a-rfb-emmc.dts                    | 1 -
>  arch/arm/boot/dts/mt7623a-rfb-nand.dts                    | 1 -
>  arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts             | 1 -
>  arch/arm/boot/dts/mt7623n-rfb-emmc.dts                    | 1 -
>  arch/arm/boot/dts/orion5x-netgear-wnr854t.dts             | 1 -
>  arch/arm/boot/dts/qcom-ipq8064-rb3011.dts                 | 2 --
>  arch/arm/boot/dts/r9a06g032.dtsi                          | 1 -
>  arch/arm/boot/dts/stm32mp151a-prtt1c.dts                  | 1 -
>  arch/arm/boot/dts/sun7i-a20-lamobo-r1.dts                 | 1 -

For sun7i:

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Best regards,
Jernej

>  arch/arm/boot/dts/vf610-zii-cfu1.dts                      | 1 -
>  arch/arm/boot/dts/vf610-zii-dev-rev-b.dts                 | 1 -
>  arch/arm/boot/dts/vf610-zii-dev-rev-c.dts                 | 1 -
>  arch/arm/boot/dts/vf610-zii-scu4-aib.dts                  | 1 -
>  arch/arm/boot/dts/vf610-zii-spb4.dts                      | 1 -
>  arch/arm/boot/dts/vf610-zii-ssmb-dtu.dts                  | 1 -
>  arch/arm/boot/dts/vf610-zii-ssmb-spu3.dts                 | 1 -
>  75 files changed, 81 deletions(-)
Vladimir Oltean Dec. 7, 2022, 1:13 p.m. UTC | #20
On Mon, Dec 05, 2022 at 10:15:16PM +0300, Arınç ÜNAL wrote:
> As Jonas (on CC) pointed out, I only see this being used in the swconfig b53
> driver which uses the label to identify the cpu port.
> 
> https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/generic/files/drivers/net/phy/b53/b53_common.c;h=87d731ec3e2a868dc8389f554b1dc9ab42c30be2;hb=HEAD#l1508
> 
> Maybe this got into DSA dt-bindings unchecked before it was decided to move
> forward with DSA instead of swconfig on Linux.

Yes, but swconfig is not DSA and their bindings are not compatible
anyway (swconfig lacks an ethernet = <&phandle> property that would
allow DSA to work). Still waiting for Pali to clarify what he had in mind.