Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: renesas: r8a78000: Fix GIC-720AE View 1 Redistributor description
@ 2026-05-13 22:30 Marek Vasut
  2026-05-14  7:04 ` Marc Zyngier
  0 siblings, 1 reply; 3+ messages in thread
From: Marek Vasut @ 2026-05-13 22:30 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Marek Vasut, Conor Dooley, Geert Uytterhoeven,
	Krzysztof Kozlowski, Kuninori Morimoto, Magnus Damm, Marc Zyngier,
	Rob Herring, devicetree, linux-renesas-soc

The Renesas R-Car X5H (R8A78000) SoC contains Arm CoreLink GIC-720AE
Generic Interrupt Controller with Multi View capability. Firmware has
access to configuration View 0, Linux kernel has access to View 1.

The Arm CoreLink GIC-720AE Generic Interrupt Controller Technical
Reference Manual, currently latest r2p1 [1], chapter "Programmers model
for GIC-720AE", subchapter "Redistributor registers for control and
physical LPIs summary", part "GICR_TYPER, Redistributor Type Register"
clarifies register "GICR_TYPER" bit 4 "Last" behavior in Multi View
setup as follows:

"
Last
Last Redistributor:

0 ... This Redistributor is not the last Redistributor on the chip.
1 ... This Redistributor is the last Redistributor on the chip.
      When GICD_CFGID.VIEW == 1, for views 1, 2, or 3 this bit
      always returns 1.
"

On this SoC, GICD_CFGID.VIEW is 1 and the Linux kernel has access to
View 1, therefore Linux kernel GICv3 driver will interpret register
"GICR_TYPER" bit 4 "Last" = 1 in the first Redistributor in continuous
Redistributor page as that first Redistributor being the one and only
Redistributor and will stop processing the continuous Redistributor
page further. This will prevent the other Redistributors from being
recognized by the system and used for other PEs.

Because the hardware indicates that the continuous Redistributor page
is not continuous for View 1, 2, or 3, describe every Redistributor
separately in the DT. This makes all Redistributors for all cores
accessible in Linux.

[1] https://developer.arm.com/documentation/102666/0201/Programmers-model-for-GIC-720AE/Redistributor-registers-for-control-and-physical-LPIs-summary/GICR-TYPER--Redistributor-Type-Register?lang=en

Fixes: 63500d12cf76 ("arm64: dts: renesas: Add R8A78000 SoC support")
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
---
Cc: Conor Dooley <conor+dt@kernel.org>
Cc: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: Krzysztof Kozlowski <krzk+dt@kernel.org>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Magnus Damm <magnus.damm@gmail.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org
Cc: linux-renesas-soc@vger.kernel.org
---
 arch/arm64/boot/dts/renesas/r8a78000.dtsi | 36 +++++++++++++++++++++--
 1 file changed, 34 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/renesas/r8a78000.dtsi b/arch/arm64/boot/dts/renesas/r8a78000.dtsi
index 3ec1b53d27828..73be51787265c 100644
--- a/arch/arm64/boot/dts/renesas/r8a78000.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a78000.dtsi
@@ -689,8 +689,40 @@ gic: interrupt-controller@39000000 {
 			#interrupt-cells = <3>;
 			#address-cells = <0>;
 			interrupt-controller;
-			reg = <0 0x39000000 0 0x10000>,
-			      <0 0x39080000 0 0x800000>;
+			#redistributor-regions = <32>;
+			reg = <0x0 0x39000000 0x0 0x10000>,
+			      <0x0 0x39080000 0x0 0x40000>,
+			      <0x0 0x390c0000 0x0 0x40000>,
+			      <0x0 0x39100000 0x0 0x40000>,
+			      <0x0 0x39140000 0x0 0x40000>,
+			      <0x0 0x39180000 0x0 0x40000>,
+			      <0x0 0x391c0000 0x0 0x40000>,
+			      <0x0 0x39200000 0x0 0x40000>,
+			      <0x0 0x39240000 0x0 0x40000>,
+			      <0x0 0x39280000 0x0 0x40000>,
+			      <0x0 0x392c0000 0x0 0x40000>,
+			      <0x0 0x39300000 0x0 0x40000>,
+			      <0x0 0x39340000 0x0 0x40000>,
+			      <0x0 0x39380000 0x0 0x40000>,
+			      <0x0 0x393c0000 0x0 0x40000>,
+			      <0x0 0x39400000 0x0 0x40000>,
+			      <0x0 0x39440000 0x0 0x40000>,
+			      <0x0 0x39480000 0x0 0x40000>,
+			      <0x0 0x394c0000 0x0 0x40000>,
+			      <0x0 0x39500000 0x0 0x40000>,
+			      <0x0 0x39540000 0x0 0x40000>,
+			      <0x0 0x39580000 0x0 0x40000>,
+			      <0x0 0x395c0000 0x0 0x40000>,
+			      <0x0 0x39600000 0x0 0x40000>,
+			      <0x0 0x39640000 0x0 0x40000>,
+			      <0x0 0x39680000 0x0 0x40000>,
+			      <0x0 0x396c0000 0x0 0x40000>,
+			      <0x0 0x39700000 0x0 0x40000>,
+			      <0x0 0x39740000 0x0 0x40000>,
+			      <0x0 0x39780000 0x0 0x40000>,
+			      <0x0 0x397c0000 0x0 0x40000>,
+			      <0x0 0x39800000 0x0 0x40000>,
+			      <0x0 0x39840000 0x0 0x40000>;
 			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
 		};
 
-- 
2.53.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: dts: renesas: r8a78000: Fix GIC-720AE View 1 Redistributor description
  2026-05-13 22:30 [PATCH] arm64: dts: renesas: r8a78000: Fix GIC-720AE View 1 Redistributor description Marek Vasut
@ 2026-05-14  7:04 ` Marc Zyngier
  2026-05-14 12:45   ` Marek Vasut
  0 siblings, 1 reply; 3+ messages in thread
From: Marc Zyngier @ 2026-05-14  7:04 UTC (permalink / raw)
  To: Marek Vasut
  Cc: linux-arm-kernel, Conor Dooley, Geert Uytterhoeven,
	Krzysztof Kozlowski, Kuninori Morimoto, Magnus Damm, Rob Herring,
	devicetree, linux-renesas-soc

On Wed, 13 May 2026 23:30:08 +0100,
Marek Vasut <marek.vasut+renesas@mailbox.org> wrote:
> 
> The Renesas R-Car X5H (R8A78000) SoC contains Arm CoreLink GIC-720AE
> Generic Interrupt Controller with Multi View capability. Firmware has
> access to configuration View 0, Linux kernel has access to View 1.

Huh. That's pretty unexpected. The usual wisdom is to give the APs
view 0 so that it looks like a "normal" machine, rather than only a
partition of the system (which is what view != 0 indicates).

I guess there is some additional fun going on there, such as other
CPUs getting a portion of the GIC for themselves, and firmware
preventing whatever is running on the APs to interact with them...

> 
> The Arm CoreLink GIC-720AE Generic Interrupt Controller Technical
> Reference Manual, currently latest r2p1 [1], chapter "Programmers model
> for GIC-720AE", subchapter "Redistributor registers for control and
> physical LPIs summary", part "GICR_TYPER, Redistributor Type Register"
> clarifies register "GICR_TYPER" bit 4 "Last" behavior in Multi View
> setup as follows:
> 
> "
> Last
> Last Redistributor:
> 
> 0 ... This Redistributor is not the last Redistributor on the chip.
> 1 ... This Redistributor is the last Redistributor on the chip.
>       When GICD_CFGID.VIEW == 1, for views 1, 2, or 3 this bit
>       always returns 1.
> "
> 
> On this SoC, GICD_CFGID.VIEW is 1 and the Linux kernel has access to
> View 1, therefore Linux kernel GICv3 driver will interpret register
> "GICR_TYPER" bit 4 "Last" = 1 in the first Redistributor in continuous
> Redistributor page as that first Redistributor being the one and only
> Redistributor and will stop processing the continuous Redistributor
> page further. This will prevent the other Redistributors from being
> recognized by the system and used for other PEs.
> 
> Because the hardware indicates that the continuous Redistributor page
> is not continuous for View 1, 2, or 3, describe every Redistributor
> separately in the DT. This makes all Redistributors for all cores
> accessible in Linux.
> 
> [1] https://developer.arm.com/documentation/102666/0201/Programmers-model-for-GIC-720AE/Redistributor-registers-for-control-and-physical-LPIs-summary/GICR-TYPER--Redistributor-Type-Register?lang=en
>

I am amazed that you managed to find anything at all on this web site.

I would refrain from adding links to any ARM web sites in a commit
message though. They tend to have a 10 minutes half-life period, and
whole specs to disappear from public view when they are not flavour of
the week anymore.

A link to the equivalent PDF has better chances to survive further
creative^WAI slop driven reorg of the documentation:

https://documentation-service.arm.com/static/69ef3c1cd35efd294e335c43

but your best bet is to download it, archive it, and refer to it
yourself.

> Fixes: 63500d12cf76 ("arm64: dts: renesas: Add R8A78000 SoC support")
> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>

Acked-by: Marc Zyngier <maz@kernel.org>

	M.

-- 
Without deviation from the norm, progress is not possible.


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm64: dts: renesas: r8a78000: Fix GIC-720AE View 1 Redistributor description
  2026-05-14  7:04 ` Marc Zyngier
@ 2026-05-14 12:45   ` Marek Vasut
  0 siblings, 0 replies; 3+ messages in thread
From: Marek Vasut @ 2026-05-14 12:45 UTC (permalink / raw)
  To: Marc Zyngier
  Cc: linux-arm-kernel, Conor Dooley, Geert Uytterhoeven,
	Krzysztof Kozlowski, Kuninori Morimoto, Magnus Damm, Rob Herring,
	devicetree, linux-renesas-soc

On 5/14/26 9:04 AM, Marc Zyngier wrote:
> On Wed, 13 May 2026 23:30:08 +0100,
> Marek Vasut <marek.vasut+renesas@mailbox.org> wrote:
>>
>> The Renesas R-Car X5H (R8A78000) SoC contains Arm CoreLink GIC-720AE
>> Generic Interrupt Controller with Multi View capability. Firmware has
>> access to configuration View 0, Linux kernel has access to View 1.
> 
> Huh. That's pretty unexpected. The usual wisdom is to give the APs
> view 0 so that it looks like a "normal" machine, rather than only a
> partition of the system (which is what view != 0 indicates).
> 
> I guess there is some additional fun going on there, such as other
> CPUs getting a portion of the GIC for themselves, and firmware
> preventing whatever is running on the APs to interact with them...

This is my understanding as well, partitioning of the system is an 
intended use case. On the development hardware I have access to, no 
partitioning is applied, all cores are available to Linux.

>> The Arm CoreLink GIC-720AE Generic Interrupt Controller Technical
>> Reference Manual, currently latest r2p1 [1], chapter "Programmers model
>> for GIC-720AE", subchapter "Redistributor registers for control and
>> physical LPIs summary", part "GICR_TYPER, Redistributor Type Register"
>> clarifies register "GICR_TYPER" bit 4 "Last" behavior in Multi View
>> setup as follows:
>>
>> "
>> Last
>> Last Redistributor:
>>
>> 0 ... This Redistributor is not the last Redistributor on the chip.
>> 1 ... This Redistributor is the last Redistributor on the chip.
>>        When GICD_CFGID.VIEW == 1, for views 1, 2, or 3 this bit
>>        always returns 1.
>> "
>>
>> On this SoC, GICD_CFGID.VIEW is 1 and the Linux kernel has access to
>> View 1, therefore Linux kernel GICv3 driver will interpret register
>> "GICR_TYPER" bit 4 "Last" = 1 in the first Redistributor in continuous
>> Redistributor page as that first Redistributor being the one and only
>> Redistributor and will stop processing the continuous Redistributor
>> page further. This will prevent the other Redistributors from being
>> recognized by the system and used for other PEs.
>>
>> Because the hardware indicates that the continuous Redistributor page
>> is not continuous for View 1, 2, or 3, describe every Redistributor
>> separately in the DT. This makes all Redistributors for all cores
>> accessible in Linux.
>>
>> [1] https://developer.arm.com/documentation/102666/0201/Programmers-model-for-GIC-720AE/Redistributor-registers-for-control-and-physical-LPIs-summary/GICR-TYPER--Redistributor-Type-Register?lang=en
>>
> 
> I am amazed that you managed to find anything at all on this web site.
> 
> I would refrain from adding links to any ARM web sites in a commit
> message though. They tend to have a 10 minutes half-life period, and
> whole specs to disappear from public view when they are not flavour of
> the week anymore.
> 
> A link to the equivalent PDF has better chances to survive further
> creative^WAI slop driven reorg of the documentation:
> 
> https://documentation-service.arm.com/static/69ef3c1cd35efd294e335c43
> 
> but your best bet is to download it, archive it, and refer to it
> yourself.

Thank you for that. That is the one thing I did not manage to find on 
that website, a PDF of the GIC-720AE manual. I will include that link in 
a V2.

>> Fixes: 63500d12cf76 ("arm64: dts: renesas: Add R8A78000 SoC support")
>> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
> 
> Acked-by: Marc Zyngier <maz@kernel.org>
> 
> 	M.
> 


-- 
Best regards,
Marek Vasut


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-05-14 12:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-13 22:30 [PATCH] arm64: dts: renesas: r8a78000: Fix GIC-720AE View 1 Redistributor description Marek Vasut
2026-05-14  7:04 ` Marc Zyngier
2026-05-14 12:45   ` Marek Vasut

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox