All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh+dt@kernel.org>
To: Andre Przywara <andre.przywara@arm.com>
Cc: Michal Simek <michal.simek@xilinx.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Michal Simek <monstr@monstr.eu>, git <git@xilinx.com>,
	devicetree@vger.kernel.org,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] ARM: dts: zynq: Add address-cells property to interrupt controllers
Date: Wed, 3 Feb 2021 10:49:29 -0600	[thread overview]
Message-ID: <CAL_JsqKfLM03of1Pzoxx=n_PaU9gnFuxt2zikGPuc1UkMK9PVQ@mail.gmail.com> (raw)
In-Reply-To: <20210203144344.4e261aea@slackpad.fritz.box>

On Wed, Feb 3, 2021 at 8:44 AM Andre Przywara <andre.przywara@arm.com> wrote:
>
> On Wed, 3 Feb 2021 15:15:19 +0100
> Michal Simek <michal.simek@xilinx.com> wrote:
>
> > On 2/3/21 3:12 PM, Rob Herring wrote:
> > > On Wed, Feb 3, 2021 at 1:01 AM Michal Simek <michal.simek@xilinx.com> wrote:
> > >>
> > >>
> > >>
> > >> On 2/1/21 6:41 PM, Rob Herring wrote:
> > >>> On Mon, Feb 1, 2021 at 8:27 AM Michal Simek <michal.simek@xilinx.com> wrote:
> > >>>>
> > >>>> The commit 3eb619b2f7d8 ("scripts/dtc: Update to upstream version
> > >>>> v1.6.0-11-g9d7888cbf19c") updated dtc version which also contained DTC
> > >>>> commit
> > >>>> "81e0919a3e21 checks: Add interrupt provider test"
> > >>>> where reasons for this checking are mentioned as
> > >>>> "A missing #address-cells property is less critical, but creates
> > >>>> ambiguities when used in interrupt-map properties, so warn about this as
> > >>>> well now."
> > >>>>
> > >>>> Add address-cells property to gic and gpio nodes to get rid of this warning.
> > >>>> The similar change has been done for ZynqMP too.
> > >>>
> > >>> FYI, we're going to make this check dependent on having an
> > >>> interrupt-map property. So adding these isn't necessary.
> > >>
> > >> Good to know. Is there going to be report if interrupt-map doesn't
> > >> exist? Which can end up with reverting these changes?
> > >
> > > You mean a warning if '#address-cells' is present and interrupt-map is
> > > not? No, that would cause lots of warnings.
> >
> > yep.
>
> Why would we do that? That sounds dangerous and would be broken if the
> IRQ controller is in a generic .dtsi (as it usually is), but the
> interrupt map is only in *some* of the board .dts files.
>
> What is the problem of just putting #address-cells = <0>; in the
> IRQ controller node, after checking that there currently no interrupt
> maps in use and no IRQ children? And be safe for good? That's 16 bytes
> in the DTB, IIUC.

Because I don't think we need a bunch of warning fix patches to add
these everywhere. Also, the need for #address-cells pretty much makes
no sense on any modern system. It is a relic from days when the bus
(address) topology and interrupt topology were related.

> Because otherwise we have that lovely ambiguity between the
> implicit default #address-cells = 2; and the assumed default of 0.
>
> And that's why I think we also cannot *automatically* add an #ac = <0>;
> property, because that would change behaviour.

I'd rather try to limit where we assume the default of 2. My guess is
that's only some combination of old PowerPC and/or Sparc and no FDT
based DT.

Rob

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh+dt@kernel.org>
To: Andre Przywara <andre.przywara@arm.com>
Cc: devicetree@vger.kernel.org, Michal Simek <monstr@monstr.eu>,
	Michal Simek <michal.simek@xilinx.com>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	git <git@xilinx.com>,
	linux-arm-kernel <linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH] ARM: dts: zynq: Add address-cells property to interrupt controllers
Date: Wed, 3 Feb 2021 10:49:29 -0600	[thread overview]
Message-ID: <CAL_JsqKfLM03of1Pzoxx=n_PaU9gnFuxt2zikGPuc1UkMK9PVQ@mail.gmail.com> (raw)
In-Reply-To: <20210203144344.4e261aea@slackpad.fritz.box>

On Wed, Feb 3, 2021 at 8:44 AM Andre Przywara <andre.przywara@arm.com> wrote:
>
> On Wed, 3 Feb 2021 15:15:19 +0100
> Michal Simek <michal.simek@xilinx.com> wrote:
>
> > On 2/3/21 3:12 PM, Rob Herring wrote:
> > > On Wed, Feb 3, 2021 at 1:01 AM Michal Simek <michal.simek@xilinx.com> wrote:
> > >>
> > >>
> > >>
> > >> On 2/1/21 6:41 PM, Rob Herring wrote:
> > >>> On Mon, Feb 1, 2021 at 8:27 AM Michal Simek <michal.simek@xilinx.com> wrote:
> > >>>>
> > >>>> The commit 3eb619b2f7d8 ("scripts/dtc: Update to upstream version
> > >>>> v1.6.0-11-g9d7888cbf19c") updated dtc version which also contained DTC
> > >>>> commit
> > >>>> "81e0919a3e21 checks: Add interrupt provider test"
> > >>>> where reasons for this checking are mentioned as
> > >>>> "A missing #address-cells property is less critical, but creates
> > >>>> ambiguities when used in interrupt-map properties, so warn about this as
> > >>>> well now."
> > >>>>
> > >>>> Add address-cells property to gic and gpio nodes to get rid of this warning.
> > >>>> The similar change has been done for ZynqMP too.
> > >>>
> > >>> FYI, we're going to make this check dependent on having an
> > >>> interrupt-map property. So adding these isn't necessary.
> > >>
> > >> Good to know. Is there going to be report if interrupt-map doesn't
> > >> exist? Which can end up with reverting these changes?
> > >
> > > You mean a warning if '#address-cells' is present and interrupt-map is
> > > not? No, that would cause lots of warnings.
> >
> > yep.
>
> Why would we do that? That sounds dangerous and would be broken if the
> IRQ controller is in a generic .dtsi (as it usually is), but the
> interrupt map is only in *some* of the board .dts files.
>
> What is the problem of just putting #address-cells = <0>; in the
> IRQ controller node, after checking that there currently no interrupt
> maps in use and no IRQ children? And be safe for good? That's 16 bytes
> in the DTB, IIUC.

Because I don't think we need a bunch of warning fix patches to add
these everywhere. Also, the need for #address-cells pretty much makes
no sense on any modern system. It is a relic from days when the bus
(address) topology and interrupt topology were related.

> Because otherwise we have that lovely ambiguity between the
> implicit default #address-cells = 2; and the assumed default of 0.
>
> And that's why I think we also cannot *automatically* add an #ac = <0>;
> property, because that would change behaviour.

I'd rather try to limit where we assume the default of 2. My guess is
that's only some combination of old PowerPC and/or Sparc and no FDT
based DT.

Rob

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

  reply	other threads:[~2021-02-03 16:50 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-01 14:27 [PATCH] ARM: dts: zynq: Add address-cells property to interrupt controllers Michal Simek
2021-02-01 14:27 ` Michal Simek
2021-02-01 17:41 ` Rob Herring
2021-02-01 17:41   ` Rob Herring
2021-02-03  7:00   ` Michal Simek
2021-02-03  7:00     ` Michal Simek
2021-02-03 14:12     ` Rob Herring
2021-02-03 14:12       ` Rob Herring
2021-02-03 14:15       ` Michal Simek
2021-02-03 14:15         ` Michal Simek
2021-02-03 14:43         ` Andre Przywara
2021-02-03 14:43           ` Andre Przywara
2021-02-03 16:49           ` Rob Herring [this message]
2021-02-03 16:49             ` Rob Herring
2021-02-03 18:03             ` Rob Herring
2021-02-03 18:03               ` Rob Herring
2021-02-04 20:09               ` Rob Herring
2021-02-04 20:09                 ` Rob Herring

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='CAL_JsqKfLM03of1Pzoxx=n_PaU9gnFuxt2zikGPuc1UkMK9PVQ@mail.gmail.com' \
    --to=robh+dt@kernel.org \
    --cc=andre.przywara@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=git@xilinx.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michal.simek@xilinx.com \
    --cc=monstr@monstr.eu \
    /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.