Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Aleksa Paunovic" <aleksa.paunovic@htecgroup.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH 8/9] riscv: dts: gf: Initial support for the P8700 Boston board
Date: Mon, 14 Sep 2026 15:08:33 +0000	[thread overview]
Message-ID: <20260914150833.8AC441F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260914-p8700-dts-v1-8-3267f14ebce1@htecgroup.com>

Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [High] The `riscv,isa-extensions` array omits the required 'zicbom' extension and is not sorted alphanumerically.
- [High] Mismatch between PCI 'bus-range' and memory-mapped ECAM 'reg' size allows out-of-bounds memory access.
- [Low] Missing `#include <dt-bindings/gpio/gpio.h>` and usage of magic number instead of macro for GPIO flags.
- [Low] Missing mandatory `device_type = "pci"` and `ranges` properties in PCI-to-PCI bridge nodes.
--

commit 79e1dd46e7add2552901143ed6ac7196cb0914df
Author: Aleksa Paunovic <aleksa.paunovic@htecgroup.com>

riscv: dts: gf: Initial support for the P8700 Boston board

This patch adds the initial device tree for the MIPS P8700 and the Boston
FPGA development board. It includes the corresponding bitfile configurations,
Makefile, and Kconfig updates.

> diff --git a/arch/riscv/boot/dts/gf/p8700-boston.dts b/arch/riscv/boot/dts/gf/p8700-boston.dts
> new file mode 100644
> index 0000000000000..b829899592aee
> --- /dev/null
> +++ b/arch/riscv/boot/dts/gf/p8700-boston.dts

[ ... ]

> +	pci2: pci@14000000 {
> +		compatible = "xlnx,axi-pcie-host-1.00.a";
> +		device_type = "pci";
> +		reg = <0x14000000 0x2000000>;
> +
> +		#address-cells = <3>;
> +		#size-cells = <2>;
> +		#interrupt-cells = <1>;
> +
> +		interrupt-parent = <&aplic_s0>;
> +		interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
> +
> +		ranges = <0x02000000 0 0x16000000
> +			  0x16000000 0 0x100000>;
> +
> +		bus-range = <0x00 0xff>;

[Severity: High]
Can this mismatch between bus-range and memory-mapped ECAM size allow an
out-of-bounds memory access?

The defined reg maps only 32MB of ECAM configuration space, which safely
covers buses 0 to 31. However, bus-range advertises up to 256 buses to the
PCI core. If the PCI core attempts to enumerate buses 32 or higher (e.g.,
during hotplug or if a bridge's subordinate bus is configured > 31), it will
generate an offset past the 32MB mapping.

Should bus-range be restricted to <0x00 0x1f>, or should the reg size be
expanded to 256MB?

[ ... ]

> +		pci2_root@0,0 {
> +			compatible = "pci10ee,7021", "pci-bridge";
> +			reg = <0x00000000 0 0 0 0>;
> +
> +			#address-cells = <3>;
> +			#size-cells = <2>;
> +
> +			eg20t_bridge@1,0,0 {
> +				compatible = "pci8086,8800", "pci-bridge";
> +				reg = <0x00010000 0 0 0 0>;
> +
> +				#address-cells = <3>;
> +				#size-cells = <2>;

[Severity: Low]
Do these nested PCI bridge nodes (pci2_root@0,0 and eg20t_bridge@1,0,0) need
the mandatory device_type = "pci" and ranges properties?

Standard bindings for PCI bridges require these properties for correct OF
tree parsing, even if Linux typically enumerates them via config space reads.

> +				eg20t_mac@2,0,1 {
> +					compatible = "pci8086,8802",
> +						     "intel,pch-gbe";
> +					reg = <0x00020100 0 0 0 0>;
> +					phy-reset-gpios = <&eg20t_gpio 6 1>;

[Severity: Low]
Can this magic number 1 be replaced with the GPIO_ACTIVE_LOW macro?

Including <dt-bindings/gpio/gpio.h> and using the macro would improve
readability and adhere to standard GPIO flag conventions.

> diff --git a/arch/riscv/boot/dts/gf/p8700.dtsi b/arch/riscv/boot/dts/gf/p8700.dtsi
> new file mode 100644
> index 0000000000000..ba1854df5201b
> --- /dev/null
> +++ b/arch/riscv/boot/dts/gf/p8700.dtsi

[ ... ]

> +		cpu0: cpu@0 {
> +			device_type = "cpu";
> +			compatible = "gf,mips-p8700", "riscv";
> +			reg = <0x0>;
> +			mmu-type = "riscv,sv39";
> +			riscv,cbom-block-size = <64>;
> +			riscv,isa-base = "rv64i";
> +			riscv,isa-extensions = "i", "m", "a", "f", "d", "c",
> +					       "zicntr", "zicsr", "zifencei",
> +					       "zihpm", "zba", "zbb",
> +					       "xmipsexectl";

[Severity: High]
Will the omission of the "zicbom" string in riscv,isa-extensions break DMA
cache flushing for non-coherent devices?

The CPU nodes define riscv,cbom-block-size = <64>, indicating hardware
support for Cache Block Management. Without "zicbom" present in the
extensions array, the RISC-V kernel feature framework will not set
RISCV_ISA_EXT_ZICBOM. This causes the ALT_CMO_OP macro to compile as NOPs,
which could result in corrupted transfers for devices requiring non-coherent
DMA, like pci2.

Also, should the multi-letter extensions be sorted alphanumerically to comply
with Devicetree bindings (e.g., placing "zba" and "zbb" before "zicntr")?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260914-p8700-dts-v1-0-3267f14ebce1@htecgroup.com?part=8

  reply	other threads:[~2026-09-14 15:08 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14 13:55 [PATCH 0/9] Add support for MIPS P8700 Aleksa Paunovic via B4 Relay
2026-09-14 13:55 ` [PATCH 1/9] dt-bindings: vendor-prefixes: Add GlobalFoundries, Inc Aleksa Paunovic via B4 Relay
2026-09-15 17:23   ` Conor Dooley
2026-09-17 11:50     ` Maciej W. Rozycki
2026-09-14 13:55 ` [PATCH 2/9] dt-bindings: riscv: cpus: add gf,mips-p8700 Aleksa Paunovic via B4 Relay
2026-09-14 13:55 ` [PATCH 3/9] dt-bindings: riscv: Add MIPS Boston board compatible Aleksa Paunovic via B4 Relay
2026-09-15 17:58   ` Conor Dooley
2026-09-17 13:23     ` Maciej W. Rozycki
2026-09-14 13:55 ` [PATCH 4/9] dt-bindings: interrupt-controller: Add MIPS P8700 APLIC Aleksa Paunovic via B4 Relay
2026-09-15 18:16   ` Conor Dooley
2026-09-14 13:55 ` [PATCH 5/9] dt-bindings: interrupt-controller: Add MIPS P8700 ACLINT MSWI Aleksa Paunovic via B4 Relay
2026-09-15 18:15   ` Conor Dooley
2026-09-14 13:55 ` [PATCH 6/9] dt-bindings: timer: Add MIPS P8700 ACLINT MTIMER Aleksa Paunovic via B4 Relay
2026-09-21 18:21   ` Rob Herring
2026-09-14 13:55 ` [PATCH 7/9] dt-bindings: interrupt-controller: thead,c900-aclint-sswi: Add MIPS P8700 gf compatible Aleksa Paunovic via B4 Relay
2026-09-18 22:03   ` Rob Herring
2026-09-14 13:55 ` [PATCH 8/9] riscv: dts: gf: Initial support for the P8700 Boston board Aleksa Paunovic via B4 Relay
2026-09-14 15:08   ` sashiko-bot [this message]
2026-09-14 13:55 ` [PATCH 9/9] riscv: defconfig: Enable GF SoCs Aleksa Paunovic via B4 Relay

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=20260914150833.8AC441F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=aleksa.paunovic@htecgroup.com \
    --cc=conor+dt@kernel.org \
    --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