All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: "André Przywara" <andre.przywara@arm.com>
Cc: Rob Herring <robh@kernel.org>, Liviu Dudau <liviu.dudau@arm.com>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	Mark Rutland <mark.rutland@arm.com>
Subject: Re: [PATCH 07/16] arm64: dts: arm: Fix GIC compatible names
Date: Wed, 06 May 2020 11:11:57 +0100	[thread overview]
Message-ID: <cfb1e6ee9d8f41cd5332eae75eec2647@kernel.org> (raw)
In-Reply-To: <72e7ca7e-003f-7edf-267c-763014f33fdc@arm.com>

On 2020-05-06 11:00, André Przywara wrote:
> On 06/05/2020 10:16, Marc Zyngier wrote:
>> On 2020-05-06 09:45, André Przywara wrote:
>>> On 05/05/2020 19:25, Marc Zyngier wrote:
>>>> On Tue, 05 May 2020 17:52:03 +0100,
>>>> Andre Przywara <andre.przywara@arm.com> wrote:
>>>>> 
>>>>> The GIC DT binding only allows a certain combination of DT 
>>>>> compatible
>>>>> strings, mostly just consisting of one name.
>>>>> 
>>>>> Drop the combination of multiple names and go with the
>>>>> "arm,cortex-a15-gic" name for GICv2, as this seems to be the most
>>>>> widely
>>>>> accepted string. "arm,gic-400" would be more correct, but was
>>>>> introduced
>>>>> much later into the kernel's GIC driver.
>>>>> 
>>>>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>>>>> ---
>>>>>  arch/arm64/boot/dts/arm/foundation-v8-gicv2.dtsi | 2 +-
>>>>>  arch/arm64/boot/dts/arm/juno-base.dtsi           | 2 +-
>>>>>  arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts       | 2 +-
>>>>>  3 files changed, 3 insertions(+), 3 deletions(-)
>>>>> 
>>>>> diff --git a/arch/arm64/boot/dts/arm/foundation-v8-gicv2.dtsi
>>>>> b/arch/arm64/boot/dts/arm/foundation-v8-gicv2.dtsi
>>>>> index 15fe81738e94..61a1750fcdd6 100644
>>>>> --- a/arch/arm64/boot/dts/arm/foundation-v8-gicv2.dtsi
>>>>> +++ b/arch/arm64/boot/dts/arm/foundation-v8-gicv2.dtsi
>>>>> @@ -6,7 +6,7 @@
>>>>> 
>>>>>  / {
>>>>>      gic: interrupt-controller@2c001000 {
>>>>> -        compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic";
>>>>> +        compatible = "arm,cortex-a15-gic";
>>>>>          #interrupt-cells = <3>;
>>>>>          #address-cells = <2>;
>>>>>          interrupt-controller;
>>>>> diff --git a/arch/arm64/boot/dts/arm/juno-base.dtsi
>>>>> b/arch/arm64/boot/dts/arm/juno-base.dtsi
>>>>> index 3feefd61eb76..62392ab1f880 100644
>>>>> --- a/arch/arm64/boot/dts/arm/juno-base.dtsi
>>>>> +++ b/arch/arm64/boot/dts/arm/juno-base.dtsi
>>>>> @@ -69,7 +69,7 @@
>>>>>      };
>>>>> 
>>>>>      gic: interrupt-controller@2c010000 {
>>>>> -        compatible = "arm,gic-400", "arm,cortex-a15-gic";
>>>>> +        compatible = "arm,cortex-a15-gic";
>>>> 
>>>> Why? GIC-400 is definitely the most correct compatible string. I'd
>>>> rather see this compatible being generalised to the models rather 
>>>> than
>>>> only referencing the A15 GIC.
>>> 
>>> I agree that gic-400 is the far better name, but it was only 
>>> introduced
>>> in v3.16. So omitting arm,cortex-a15-gic would break any kernels 
>>> before
>>> that, which I would like to avoid.
>> 
>> I am not talking about dropping the A15 GIC. I'm saying that both 
>> should
>> stay. Is there anything in the DT binding that forbids multiple names 
>> in
>> the compatible property?
> 
> Well, the current form of the YAML bindings require every combination 
> of
> compatible strings to be listed, either explicitly, or using an list of
> allowed strings for each position. This combination here is not listed
> at the moment.

I think this should be relaxed. What the tool should be warning against
is a set of incompatible "compatible" strings (like a15 + a9, which is
totally bonkers).

>>> It's actually a pity that we are so picky about the compatible 
>>> listings,
>>> because the existing combination is actually quite nice: we get
>>> compatibility with older DT consumers, but still can say what it
>>> actually is.
>>> I wonder if I should introduce this combination to the GIC DT binding
>>> instead, it seems like there are other users in the tree as well.
>>> 
>>> What do you think?
>> 
>> I'd say that if the binding forbids multiple compatible strings, the
>> binding is likely to be wrong. We should fix it, and not make the DTs
>> worse as a result of a binding issue.
> 
> OK, thanks for the confirmation, and I agree. I will ditch this patch
> and replace it with a respective bindings fix.

Please keep removal of the A9 GIC reference though, because it doesn't
make any sense as it is.

Thanks,

         M.
-- 
Jazz is not dead. It just smells funny...

WARNING: multiple messages have this Message-ID (diff)
From: Marc Zyngier <maz@kernel.org>
To: "André Przywara" <andre.przywara@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>,
	Rob Herring <robh@kernel.org>,
	Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>,
	devicetree@vger.kernel.org, Liviu Dudau <liviu.dudau@arm.com>,
	Sudeep Holla <sudeep.holla@arm.com>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 07/16] arm64: dts: arm: Fix GIC compatible names
Date: Wed, 06 May 2020 11:11:57 +0100	[thread overview]
Message-ID: <cfb1e6ee9d8f41cd5332eae75eec2647@kernel.org> (raw)
In-Reply-To: <72e7ca7e-003f-7edf-267c-763014f33fdc@arm.com>

On 2020-05-06 11:00, André Przywara wrote:
> On 06/05/2020 10:16, Marc Zyngier wrote:
>> On 2020-05-06 09:45, André Przywara wrote:
>>> On 05/05/2020 19:25, Marc Zyngier wrote:
>>>> On Tue, 05 May 2020 17:52:03 +0100,
>>>> Andre Przywara <andre.przywara@arm.com> wrote:
>>>>> 
>>>>> The GIC DT binding only allows a certain combination of DT 
>>>>> compatible
>>>>> strings, mostly just consisting of one name.
>>>>> 
>>>>> Drop the combination of multiple names and go with the
>>>>> "arm,cortex-a15-gic" name for GICv2, as this seems to be the most
>>>>> widely
>>>>> accepted string. "arm,gic-400" would be more correct, but was
>>>>> introduced
>>>>> much later into the kernel's GIC driver.
>>>>> 
>>>>> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
>>>>> ---
>>>>>  arch/arm64/boot/dts/arm/foundation-v8-gicv2.dtsi | 2 +-
>>>>>  arch/arm64/boot/dts/arm/juno-base.dtsi           | 2 +-
>>>>>  arch/arm64/boot/dts/arm/rtsm_ve-aemv8a.dts       | 2 +-
>>>>>  3 files changed, 3 insertions(+), 3 deletions(-)
>>>>> 
>>>>> diff --git a/arch/arm64/boot/dts/arm/foundation-v8-gicv2.dtsi
>>>>> b/arch/arm64/boot/dts/arm/foundation-v8-gicv2.dtsi
>>>>> index 15fe81738e94..61a1750fcdd6 100644
>>>>> --- a/arch/arm64/boot/dts/arm/foundation-v8-gicv2.dtsi
>>>>> +++ b/arch/arm64/boot/dts/arm/foundation-v8-gicv2.dtsi
>>>>> @@ -6,7 +6,7 @@
>>>>> 
>>>>>  / {
>>>>>      gic: interrupt-controller@2c001000 {
>>>>> -        compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic";
>>>>> +        compatible = "arm,cortex-a15-gic";
>>>>>          #interrupt-cells = <3>;
>>>>>          #address-cells = <2>;
>>>>>          interrupt-controller;
>>>>> diff --git a/arch/arm64/boot/dts/arm/juno-base.dtsi
>>>>> b/arch/arm64/boot/dts/arm/juno-base.dtsi
>>>>> index 3feefd61eb76..62392ab1f880 100644
>>>>> --- a/arch/arm64/boot/dts/arm/juno-base.dtsi
>>>>> +++ b/arch/arm64/boot/dts/arm/juno-base.dtsi
>>>>> @@ -69,7 +69,7 @@
>>>>>      };
>>>>> 
>>>>>      gic: interrupt-controller@2c010000 {
>>>>> -        compatible = "arm,gic-400", "arm,cortex-a15-gic";
>>>>> +        compatible = "arm,cortex-a15-gic";
>>>> 
>>>> Why? GIC-400 is definitely the most correct compatible string. I'd
>>>> rather see this compatible being generalised to the models rather 
>>>> than
>>>> only referencing the A15 GIC.
>>> 
>>> I agree that gic-400 is the far better name, but it was only 
>>> introduced
>>> in v3.16. So omitting arm,cortex-a15-gic would break any kernels 
>>> before
>>> that, which I would like to avoid.
>> 
>> I am not talking about dropping the A15 GIC. I'm saying that both 
>> should
>> stay. Is there anything in the DT binding that forbids multiple names 
>> in
>> the compatible property?
> 
> Well, the current form of the YAML bindings require every combination 
> of
> compatible strings to be listed, either explicitly, or using an list of
> allowed strings for each position. This combination here is not listed
> at the moment.

I think this should be relaxed. What the tool should be warning against
is a set of incompatible "compatible" strings (like a15 + a9, which is
totally bonkers).

>>> It's actually a pity that we are so picky about the compatible 
>>> listings,
>>> because the existing combination is actually quite nice: we get
>>> compatibility with older DT consumers, but still can say what it
>>> actually is.
>>> I wonder if I should introduce this combination to the GIC DT binding
>>> instead, it seems like there are other users in the tree as well.
>>> 
>>> What do you think?
>> 
>> I'd say that if the binding forbids multiple compatible strings, the
>> binding is likely to be wrong. We should fix it, and not make the DTs
>> worse as a result of a binding issue.
> 
> OK, thanks for the confirmation, and I agree. I will ditch this patch
> and replace it with a respective bindings fix.

Please keep removal of the A9 GIC reference though, because it doesn't
make any sense as it is.

Thanks,

         M.
-- 
Jazz is not dead. It just smells funny...

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-05-06 10:12 UTC|newest]

Thread overview: 69+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-05 16:51 [PATCH 00/16] dts/dt-bindings: Fix Arm Ltd. ARMv8 "boards" Andre Przywara
2020-05-05 16:51 ` Andre Przywara
2020-05-05 16:51 ` Andre Przywara
2020-05-05 16:51   ` Andre Przywara
2020-05-05 16:51   ` Andre Przywara
2020-05-05 18:10   ` Robin Murphy
2020-05-05 18:10     ` Robin Murphy
2020-05-05 18:10     ` Robin Murphy
2020-05-05 16:51 ` Andre Przywara
2020-05-05 16:51   ` Andre Przywara
2020-05-05 16:51   ` Andre Przywara
2020-05-05 17:06   ` Robin Murphy
2020-05-05 17:06     ` Robin Murphy
2020-05-05 17:06     ` Robin Murphy
2020-05-05 17:13     ` André Przywara
2020-05-05 17:13       ` André Przywara
2020-05-05 17:13       ` André Przywara
2020-05-05 16:51 ` Andre Przywara
2020-05-05 16:51   ` Andre Przywara
2020-05-05 17:38   ` Greg Kroah-Hartman
2020-05-05 17:38     ` Greg Kroah-Hartman
2020-05-05 17:51   ` Robin Murphy
2020-05-05 17:51     ` Robin Murphy
2020-05-05 18:01     ` [PATCH 03/16] dt-bindings: ehci/ohci: Allow iommus property (fixed subject line) André Przywara
2020-05-05 18:01       ` André Przywara
2020-05-05 22:31     ` [PATCH 00/16] dts/dt-bindings: Fix Arm Ltd. ARMv8 "boards" Rob Herring
2020-05-05 22:31       ` Rob Herring
2020-05-05 16:52 ` [PATCH 04/16] arm64: dts: arm: Fix node address fields Andre Przywara
2020-05-05 16:52   ` Andre Przywara
2020-05-05 17:18   ` Robin Murphy
2020-05-05 17:18     ` Robin Murphy
2020-05-21 14:40     ` Liviu Dudau
2020-05-21 14:40       ` Liviu Dudau
2020-05-22  9:25       ` André Przywara
2020-05-22  9:25         ` André Przywara
2020-05-05 16:52 ` [PATCH 05/16] arm64: dts: arm: FVP: Fix motherboard .dtsi Andre Przywara
2020-05-05 16:52   ` Andre Przywara
2020-05-05 16:52 ` [PATCH 06/16] arm64: dts: juno: Fix mem-timer Andre Przywara
2020-05-05 16:52   ` Andre Przywara
2020-05-05 16:52 ` [PATCH 07/16] arm64: dts: arm: Fix GIC compatible names Andre Przywara
2020-05-05 16:52   ` Andre Przywara
2020-05-05 18:25   ` Marc Zyngier
2020-05-05 18:25     ` Marc Zyngier
2020-05-06  8:45     ` André Przywara
2020-05-06  8:45       ` André Przywara
2020-05-06  9:16       ` Marc Zyngier
2020-05-06  9:16         ` Marc Zyngier
2020-05-06 10:00         ` André Przywara
2020-05-06 10:00           ` André Przywara
2020-05-06 10:11           ` Marc Zyngier [this message]
2020-05-06 10:11             ` Marc Zyngier
2020-05-05 16:52 ` [PATCH 08/16] arm64: dts: arm: Fix GIC child nodes Andre Przywara
2020-05-05 16:52   ` Andre Przywara
2020-05-05 16:52 ` [PATCH 09/16] arm64: dts: arm: Fix ITS node names and #msi-cells Andre Przywara
2020-05-05 16:52   ` Andre Przywara
2020-05-05 16:52 ` [PATCH 10/16] arm64: dts: juno: usb: Use proper DT node name Andre Przywara
2020-05-05 16:52   ` Andre Przywara
2020-05-05 16:52 ` [PATCH 11/16] arm64: dts: arm: Fix serial node names Andre Przywara
2020-05-05 16:52   ` Andre Przywara
2020-05-05 16:52 ` [PATCH 12/16] arm64: dts: fvp: Fix SMMU DT node Andre Przywara
2020-05-05 16:52   ` Andre Przywara
2020-05-05 16:52 ` [PATCH 13/16] arm64: dts: arm: Fix bus node names Andre Przywara
2020-05-05 16:52   ` Andre Przywara
2020-05-05 16:52 ` [PATCH 14/16] arm64: dts: juno: Fix GPU interrupt order Andre Przywara
2020-05-05 16:52   ` Andre Przywara
2020-05-05 16:52 ` [PATCH 15/16] arm64: dts: arm: Fix VExpress LED names Andre Przywara
2020-05-05 16:52   ` Andre Przywara
2020-05-05 16:52 ` [PATCH 16/16] arm64: dts: juno: Fix SCPI shared mem node name Andre Przywara
2020-05-05 16:52   ` Andre Przywara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cfb1e6ee9d8f41cd5332eae75eec2647@kernel.org \
    --to=maz@kernel.org \
    --cc=andre.przywara@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=liviu.dudau@arm.com \
    --cc=lorenzo.pieralisi@arm.com \
    --cc=mark.rutland@arm.com \
    --cc=robh@kernel.org \
    --cc=sudeep.holla@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.