Re: [PATCH] arm64: dts: ti: k3-j721s2: fix overlapping GICD memory region

From: Robin Murphy
Date: Thu Jun 16 2022 - 08:07:42 EST


On 2022-06-16 11:51, Matt Ranostay wrote:
GICD region was overlapping with GICR causing the latter to not map
successfully, and in turn the gic-v3 driver would fail to initialize.

This issue was hidden till commit 2b2cd74a06c3 ("irqchip/gic-v3: Claim iomem resources")
replaced of_iomap() calls with of_io_request_and_map() that internally
called request_mem_region().

Respective console output before this patchset:

[ 0.000000] GICv3: /bus@100000/interrupt-controller@1800000: couldn't map region 0

Oh, it's nice that this finds bugs, but it seems I hadn't fully considered that making the simple easy change in the DT paths results in different behaviour from ACPI.

Marc, would you like a fix for this to remain non-fatal even in the face of a dodgy DT, or are you happy with being a bit stricter now?

Thanks,
Robin.

Cc: Marc Zyngier <maz@xxxxxxxxxx>
Cc: Robin Murphy <robin.murphy@xxxxxxx>
Cc: Nishanth Menon <nm@xxxxxx>
Signed-off-by: Matt Ranostay <mranostay@xxxxxx>
---
arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
index be7f39299894..19966f72c5b3 100644
--- a/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j721s2-main.dtsi
@@ -33,7 +33,7 @@ gic500: interrupt-controller@1800000 {
ranges;
#interrupt-cells = <3>;
interrupt-controller;
- reg = <0x00 0x01800000 0x00 0x200000>, /* GICD */
+ reg = <0x00 0x01800000 0x00 0x100000>, /* GICD */
<0x00 0x01900000 0x00 0x100000>, /* GICR */
<0x00 0x6f000000 0x00 0x2000>, /* GICC */
<0x00 0x6f010000 0x00 0x1000>, /* GICH */