From: sashiko-bot@kernel.org
To: "Josua Mayer" <josua@solid-run.com>
Cc: imx@lists.linux.dev, Frank.Li@kernel.org, robh@kernel.org,
krzk+dt@kernel.org, conor+dt@kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v5 01/10] arm64: dts: lx2160a: extend 32-bit, and add 64-bit pci regions
Date: Mon, 11 May 2026 21:20:32 +0000 [thread overview]
Message-ID: <20260511212033.23E72C2BCB0@smtp.kernel.org> (raw)
In-Reply-To: <20260510-lx2160-pci-v5-1-540b83852227@solid-run.com>
Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [High] Incorrect PCI Address Space Code for 64-bit prefetchable memory windows.
- [High] Fragmenting the 16GB region into 4GB chunks breaks allocation of large PCIe BARs.
- [Medium] Incorrect size for the `pcie4` 64-bit memory region in `fsl-lx2160a-rev2.dtsi`.
- [Low] Conflation of the Open Firmware `relocatable` bit with the Linux-internal `IORESOURCE_BUSY` macro.
--
commit bfb49a7c3467d68eca95268c94cbd76b1401fb15
Author: Josua Mayer <josua@solid-run.com>
arm64: dts: lx2160a: extend 32-bit, and add 64-bit pci regions
This commit extends the 32-bit PCIe memory regions to 3GB and adds new
64-bit memory regions up to 16GB for the LX2160A SoC. It also drops the
relocatable bit from the existing ranges, and splits the 16GB area into
4GB chunks for silicon revision 1 to avoid an ATU programming limitation.
The commit message states:
> - drop IORESOURCE_BUSY flag
>
> IORESOURCE_BUSY is dropped since it has no effect when specified in dts.
Is this description accurate? The bit being dropped (0x80000000, changing
0x82000000 to 0x02000000) is the Open Firmware 'n' bit, which designates
whether the region is relocatable or fixed.
It doesn't appear to be related to the Linux-internal IORESOURCE_BUSY macro.
Could the commit message be more precise about the flag being modified?
diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a-rev2.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx2160a-rev2.dtsi
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a-rev2.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a-rev2.dtsi
@@ -14,8 +14,9 @@ &pcie1 {
0x80 0x00000000 0x0 0x00002000>; /* configuration space */
reg-names = "regs", "config";
- ranges = <0x81000000 0x0 0x00000000 0x80 0x00010000 0x0 0x00010000
- 0x82000000 0x0 0x40000000 0x80 0x40000000 0x0 0x40000000>;
+ ranges = <0x42000000 0x84 0x00000000 0x84 0x00000000 0x04 0x00000000>, /* 64-Bit - prefetchable - 16GB */
Does the 0x42000000 value correctly specify a 64-bit memory space?
In the device tree PCI bindings, bits 24-25 of the phys.hi cell denote
the address space. The value 0b10 (0x02000000 or 0x42000000) designates
a 32-bit memory space, while 0b11 (0x43000000) is required for a 64-bit
memory space.
If it is flagged as 32-bit, the PCI core's of_pci_range_to_resource()
will omit the IORESOURCE_MEM_64 flag. Will this cause the PCI allocator
to fail when assigning 64-bit BARs, as shown in the commit log ("failed
to assign [mem size 0x200000000 64bit pref]")?
[ ... ]
@@ -63,8 +66,9 @@ &pcie4 {
0x98 0x00000000 0x0 0x00002000>; /* configuration space */
reg-names = "regs", "config";
- ranges = <0x81000000 0x0 0x00000000 0x98 0x00010000 0x0 0x00010000
- 0x82000000 0x0 0x40000000 0x98 0x40000000 0x0 0x40000000>;
+ ranges = <0x42000000 0x9c 0x00000000 0x9c 0x00000000 0x01 0x00000000>, /* 64-Bit - prefetchable - 16GB */
This isn't a bug, but there might be a typo in the size here. The comment
says 16GB, but the size cells are 0x01 0x00000000 (4GB). The other PCIe
controllers in this file use 0x04 0x00000000.
[ ... ]
diff --git a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
--- a/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
+++ b/arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi
@@ -1193,7 +1193,12 @@ pcie1: pcie@3400000 {
apio-wins = <8>;
ppio-wins = <8>;
bus-range = <0x0 0xff>;
- ranges = <0x82000000 0x0 0x40000000 0x80 0x40000000 0x0 0x40000000>; /* non-prefetchable memory */
+ ranges = <0x42000000 0x87 0x00000000 0x87 0x00000000 0x01 0x00000000>, /* 64-Bit - prefetchable - 4GB chunk */
+ <0x42000000 0x86 0x00000000 0x86 0x00000000 0x01 0x00000000>, /* 64-Bit - prefetchable - 4GB chunk */
+ <0x42000000 0x85 0x00000000 0x85 0x00000000 0x01 0x00000000>, /* 64-Bit - prefetchable - 4GB chunk */
+ <0x42000000 0x84 0x00000000 0x84 0x00000000 0x01 0x00000000>, /* 64-Bit - prefetchable - 4GB chunk */
Does fragmenting the 16GB region into multiple 4GB chunks prevent the
allocation of larger PCIe BARs?
The Linux PCI allocator requires a single contiguous parent window to
satisfy a BAR allocation request. By splitting the address space here,
the root bus will have four separate 4GB parent windows.
Will this make it impossible for the kernel to allocate any contiguous
BAR larger than 4GB, preventing the successful mapping of the 8GB AI
accelerator BAR mentioned in the commit message?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260510-lx2160-pci-v5-0-540b83852227@solid-run.com?part=1
next prev parent reply other threads:[~2026-05-11 21:20 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-10 15:12 [PATCH v5 00/10] arm64: dts: lx2160a: cleanups, add new board, large pci bars Josua Mayer
2026-05-10 15:12 ` [PATCH v5 01/10] arm64: dts: lx2160a: extend 32-bit, and add 64-bit pci regions Josua Mayer
2026-05-11 21:20 ` sashiko-bot [this message]
2026-05-12 14:21 ` Josua Mayer
2026-05-10 15:12 ` [PATCH v5 02/10] arm64: dts: lx2162a-clearfog: use rev2 SoC dtsi Josua Mayer
2026-05-10 15:12 ` [PATCH v5 03/10] arm64: dts: lx2162a-clearfog: cleanup superfluous status properties Josua Mayer
2026-05-10 15:12 ` [PATCH v5 04/10] arm64: dts: lx2162a-clearfog: specify sfp ports led colour and function Josua Mayer
2026-05-10 15:12 ` [PATCH v5 05/10] dt-bindings: arm: fsl: Add solidrun lx2160a twins board Josua Mayer
2026-05-10 15:12 ` [PATCH v5 06/10] arm64: dts: lx2160a-clearfog-itx: remove redundant dts version tag Josua Mayer
2026-05-10 15:12 ` [PATCH v5 07/10] arm64: dts: lx2160a-clearfog-itx: move shared includes to dts Josua Mayer
2026-05-10 15:12 ` [PATCH v5 08/10] arm64: dts: lx2160a: add labels to thermal trip-point nodes Josua Mayer
2026-05-10 15:12 ` [PATCH v5 09/10] arm64: dts: lx2160a-cex7: add labels to i2c buses behind mux Josua Mayer
2026-05-10 15:12 ` [PATCH v5 10/10] arm64: dts: Add support for LX2160 Twins board in single configuration Josua Mayer
2026-05-10 15:23 ` Josua Mayer
2026-05-11 22:29 ` sashiko-bot
2026-05-12 13:39 ` Josua Mayer
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=20260511212033.23E72C2BCB0@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=Frank.Li@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=imx@lists.linux.dev \
--cc=josua@solid-run.com \
--cc=krzk+dt@kernel.org \
--cc=robh@kernel.org \
--cc=sashiko@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