Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Daniel Palmer" <daniel@thingy.jp>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: (no subject)
Date: Fri, 26 Jun 2026 17:33:08 +0000	[thread overview]
Message-ID: <20260626173309.74B2B1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260626171747.202269-1-daniel@thingy.jp>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] Conditionally compiling the OF 'isa' bus translator based on `CONFIG_ISA` breaks device tree address translation for non-ISA architectures (e.g., ARM64) that use 'isa' nodes for LPC or legacy I/O bridges.
--

commit 3f535ae9ca6c863a12c1d6dbcfcb4358a6f6ed4b
Author: Daniel Palmer <daniel@thingy.jp>

of/address: Drop ISA parts when !CONFIG_ISA

This patch conditionally compiles the ISA parts of the Open Firmware address
translator based on CONFIG_ISA to reduce code size.

> diff --git a/drivers/of/address.c b/drivers/of/address.c
> index cf4aab11e9b1f..9b2f0d462fb59 100644
> --- a/drivers/of/address.c
> +++ b/drivers/of/address.c
[ ... ]
> @@ -349,6 +351,7 @@ static const struct of_bus of_busses[] = {
>  		.get_flags = of_bus_pci_get_flags,
>  	},
>  #endif /* CONFIG_PCI */
> +#ifdef CONFIG_ISA
>  	/* ISA */
>  	{
>  		.name = "isa",
> @@ -360,6 +363,7 @@ static const struct of_bus of_busses[] = {
>  		.flag_cells = 1,
>  		.get_flags = of_bus_isa_get_flags,
>  	},
> +#endif /* CONFIG_ISA */

[Severity: High]
Does this break device tree address translation for non-ISA architectures (like
ARM64) that use 'isa' nodes for LPC or legacy I/O bridges?

Platforms like Hisilicon hip06/hip07 don't have CONFIG_ISA defined but still
use 'isa' nodes. If this bus entry is compiled out, they will fall back to the
'default' OF bus translator.

The 'default' bus translator's get_flags method (of_bus_default_get_flags)
unconditionally returns IORESOURCE_MEM. This causes __of_address_to_resource()
to misclassify the I/O port and call of_translate_address() instead of
of_translate_ioport().

Because Hisilicon LPC registers an indirect I/O host, of_translate_address()
then fails with OF_BAD_ADDR (-EINVAL), causing probe failures for devices like
UART and IPMI.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260626171747.202269-1-daniel@thingy.jp?part=1

  reply	other threads:[~2026-06-26 17:33 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-26 17:17 Daniel Palmer
2026-06-26 17:33 ` sashiko-bot [this message]
  -- strict thread matches above, loose matches on Subject: below --
2021-06-22 16:20 (No Subject) Yassine Oudjana
2021-07-14 18:03 ` Rob Herring
2019-05-22  8:53 [No Subject] Gardner, Tim
2016-06-29  6:16 (no subject) Jason Gunthorpe

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=20260626173309.74B2B1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=daniel@thingy.jp \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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