Devicetree
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Krzysztof Kozlowski <krzk@kernel.org>
Cc: Tejas Mutalikdesai <tejasmutalikdesai@gmail.com>,
	devicetree@vger.kernel.org, krzk+dt@kernel.org,
	conor+dt@kernel.org, sstabellini@kernel.org
Subject: Re: [PATCH v5 1/2] dt-bindings: arm: xen: Convert to DT schema
Date: Tue, 30 Jun 2026 09:27:09 -0500	[thread overview]
Message-ID: <20260630142709.GA2993298-robh@kernel.org> (raw)
In-Reply-To: <20260622-tall-moth-of-imagination-cf57fe@quoll>

On Mon, Jun 22, 2026 at 09:48:08AM +0200, Krzysztof Kozlowski wrote:
> On Thu, Jun 18, 2026 at 08:41:46PM +0530, Tejas Mutalikdesai wrote:
> > Convert the Xen ARM device tree binding documentation from the legacy
> > plain-text format (Documentation/devicetree/bindings/arm/xen.txt) to
> > the DT schema format, as required by the modern DT binding process.
> > 
> > The "hypervisor" node is named without a unit-address. The name is part
> > of the Xen ABI and is matched verbatim by the kernel using strcmp() in
> > arch/arm/xen/enlighten.c and arch/arm64/kernel/acpi.c, so $nodename uses
> > 'const: hypervisor'. The node has a reg but no unit-address, so dtc emits
> 
> Honestly, this is a violation of DT spec, chapter 2.2.1.1:
> 
> "The unit-address must match the first address specified in the reg
> property of the node."
> 
> I understand that you did not introduce this, but you do introduce DTC
> warning into bindings, which I think we do not allow. dt_binding_check
> must be warning free.
> 
> If I understood correctly this broken behavior was introduced in commit
> 9b08aaa3199a4dffca73c7cdec813b483b5b2d3b. Without any explanation why a
> correct method of matching/finding by compatible is changed into
> INCORRECT (nodename is not proper ABI) finding by node name and ignoring
> DT Spec.
> 
> That commit message is simply terrible. Tells one thing - move some code
> - but does something completely different - introduces ABI for node
> name! ABI which is heavily discouraged and plain wrong.
> 
> I don't have enough of words to express the poor quality of that commit.
> 
> That said, IMO, the Xen/driver code should be changed to conform to DT
> spec. If Xen is not interested in conforming to DT spec, then we should
> not have in it upstream Linux kernel. This is that simple. Xen does not
> get exceptions.

The kernel has lots of things which are exceptions now (see PowerMac 
or anything older than 15 years). It's our fault for not having tools 
to check anything back then.
 
> I also get that task might be something more than you signed up for,
> thus the binding should stay unconverted till someone wants to fixup
> this broken Xen code.

I think we just update the nodename in the schema to allow (but not 
require) a unit-address and add one to the example and move on. It's not 
clear to me how much this is being used.

I've updated the schema to do that and applied. Patch 2 will need to go 
in Russell's patch system.

Rob

      reply	other threads:[~2026-06-30 14:27 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-18 15:11 [PATCH v5 1/2] dt-bindings: arm: xen: Convert to DT schema Tejas Mutalikdesai
2026-06-18 15:11 ` [PATCH v5 2/2] arm/xen: Update DT binding documentation reference Tejas Mutalikdesai
2026-06-22  7:48 ` [PATCH v5 1/2] dt-bindings: arm: xen: Convert to DT schema Krzysztof Kozlowski
2026-06-30 14:27   ` Rob Herring [this message]

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=20260630142709.GA2993298-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=krzk@kernel.org \
    --cc=sstabellini@kernel.org \
    --cc=tejasmutalikdesai@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox