* [PATCH] riscv: dts: spacemit: k3: Drop guest properties from M-level IMSIC
@ 2026-07-28 16:40 Junhui Liu
2026-09-07 7:44 ` Yixun Lan
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Junhui Liu @ 2026-07-28 16:40 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Yixun Lan,
Paul Walmsley, Palmer Dabbelt, Albert Ou, Alexandre Ghiti,
Guodong Xu
Cc: devicetree, linux-riscv, spacemit, linux-kernel, Junhui Liu
The mimsic node describes the machine-level IMSIC, whose MMIO region is
0x10000 (64 KiB) for all 8 harts. However, the node also specifies
riscv,guest-index-bits = <6>, and per the AIA specification the
per-hart stride is 2^(guest-index-bits + 12) bytes when guest interrupt
files exist, i.e. 2^(6 + 12) = 256 KiB per hart and 2 MiB for all 8
harts. The described region cannot hold even a single hart's files, so
the node contradicts itself. OpenSBI enforces exactly this constraint in
imsic_data_check() and rejects the node with -EINVAL, preventing the
M-level IMSIC from initializing:
fdt_driver_init_by_offset: interrupt-controller@f1000000 (riscv,imsics) init failed: -3
init_coldboot: irqchip init failed (error -3)
Moreover, guest interrupt files exist to act as the supervisor-level
interrupt files of virtual harts; there is no machine-level counterpart.
riscv,num-guest-ids is equally meaningless for the machine-level IMSIC.
Drop both "riscv,guest-index-bits" and "riscv,num-guest-ids" properties
from the mimsic node so the node matches the actual hardware layout.
Fixes: 56f37e391a62 ("riscv: dts: spacemit: add initial support for K3 SoC")
Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
---
arch/riscv/boot/dts/spacemit/k3.dtsi | 2 --
1 file changed, 2 deletions(-)
diff --git a/arch/riscv/boot/dts/spacemit/k3.dtsi b/arch/riscv/boot/dts/spacemit/k3.dtsi
index c3f2dce0969c..2d022e1364f1 100644
--- a/arch/riscv/boot/dts/spacemit/k3.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k3.dtsi
@@ -1287,9 +1287,7 @@ mimsic: interrupt-controller@f1000000 {
<&cpu4_intc 11>, <&cpu5_intc 11>,
<&cpu6_intc 11>, <&cpu7_intc 11>;
msi-controller;
- riscv,guest-index-bits = <6>;
riscv,hart-index-bits = <4>;
- riscv,num-guest-ids = <511>;
riscv,num-ids = <511>;
status = "reserved";
};
---
base-commit: 46380e4b1534c1626cecd7f4d0abb5e0cce09af6
change-id: 20260729-k3-mimsic-fix-610db8caa3cd
Best regards,
--
Junhui Liu <junhui.liu@pigmoral.tech>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH] riscv: dts: spacemit: k3: Drop guest properties from M-level IMSIC
2026-07-28 16:40 [PATCH] riscv: dts: spacemit: k3: Drop guest properties from M-level IMSIC Junhui Liu
@ 2026-09-07 7:44 ` Yixun Lan
2026-09-07 13:31 ` Troy Mitchell
2026-09-08 21:26 ` Yixun Lan
2 siblings, 0 replies; 4+ messages in thread
From: Yixun Lan @ 2026-09-07 7:44 UTC (permalink / raw)
To: Junhui Liu
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Guodong Xu,
devicetree, linux-riscv, spacemit, linux-kernel
Hi Junhui,
On 00:40 Wed 29 Jul , Junhui Liu wrote:
> The mimsic node describes the machine-level IMSIC, whose MMIO region is
> 0x10000 (64 KiB) for all 8 harts. However, the node also specifies
> riscv,guest-index-bits = <6>, and per the AIA specification the
> per-hart stride is 2^(guest-index-bits + 12) bytes when guest interrupt
> files exist, i.e. 2^(6 + 12) = 256 KiB per hart and 2 MiB for all 8
> harts. The described region cannot hold even a single hart's files, so
> the node contradicts itself. OpenSBI enforces exactly this constraint in
> imsic_data_check() and rejects the node with -EINVAL, preventing the
> M-level IMSIC from initializing:
>
> fdt_driver_init_by_offset: interrupt-controller@f1000000 (riscv,imsics) init failed: -3
> init_coldboot: irqchip init failed (error -3)
>
> Moreover, guest interrupt files exist to act as the supervisor-level
> interrupt files of virtual harts; there is no machine-level counterpart.
> riscv,num-guest-ids is equally meaningless for the machine-level IMSIC.
>
> Drop both "riscv,guest-index-bits" and "riscv,num-guest-ids" properties
> from the mimsic node so the node matches the actual hardware layout.
>
> Fixes: 56f37e391a62 ("riscv: dts: spacemit: add initial support for K3 SoC")
> Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Reviewed-by: Yixun Lan <dlan@kernel.org>
--
Yixun Lan (dlan)
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] riscv: dts: spacemit: k3: Drop guest properties from M-level IMSIC
2026-07-28 16:40 [PATCH] riscv: dts: spacemit: k3: Drop guest properties from M-level IMSIC Junhui Liu
2026-09-07 7:44 ` Yixun Lan
@ 2026-09-07 13:31 ` Troy Mitchell
2026-09-08 21:26 ` Yixun Lan
2 siblings, 0 replies; 4+ messages in thread
From: Troy Mitchell @ 2026-09-07 13:31 UTC (permalink / raw)
To: Junhui Liu, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
Yixun Lan, Paul Walmsley, Palmer Dabbelt, Albert Ou,
Alexandre Ghiti, Guodong Xu
Cc: devicetree, linux-riscv, spacemit, linux-kernel, Troy Mitchell
[-- Attachment #1.1: Type: text/plain, Size: 1423 bytes --]
On Wed Jul 29, 2026 at 12:40 AM +08, Junhui Liu wrote:
> The mimsic node describes the machine-level IMSIC, whose MMIO region is
> 0x10000 (64 KiB) for all 8 harts. However, the node also specifies
> riscv,guest-index-bits = <6>, and per the AIA specification the
> per-hart stride is 2^(guest-index-bits + 12) bytes when guest interrupt
> files exist, i.e. 2^(6 + 12) = 256 KiB per hart and 2 MiB for all 8
> harts. The described region cannot hold even a single hart's files, so
> the node contradicts itself. OpenSBI enforces exactly this constraint in
> imsic_data_check() and rejects the node with -EINVAL, preventing the
> M-level IMSIC from initializing:
>
> fdt_driver_init_by_offset: interrupt-controller@f1000000 (riscv,imsics) init failed: -3
> init_coldboot: irqchip init failed (error -3)
>
> Moreover, guest interrupt files exist to act as the supervisor-level
> interrupt files of virtual harts; there is no machine-level counterpart.
> riscv,num-guest-ids is equally meaningless for the machine-level IMSIC.
>
> Drop both "riscv,guest-index-bits" and "riscv,num-guest-ids" properties
> from the mimsic node so the node matches the actual hardware layout.
>
> Fixes: 56f37e391a62 ("riscv: dts: spacemit: add initial support for K3 SoC")
> Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
Reviewed-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
--
Troy Mitchell
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 248 bytes --]
[-- Attachment #2: Type: text/plain, Size: 161 bytes --]
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH] riscv: dts: spacemit: k3: Drop guest properties from M-level IMSIC
2026-07-28 16:40 [PATCH] riscv: dts: spacemit: k3: Drop guest properties from M-level IMSIC Junhui Liu
2026-09-07 7:44 ` Yixun Lan
2026-09-07 13:31 ` Troy Mitchell
@ 2026-09-08 21:26 ` Yixun Lan
2 siblings, 0 replies; 4+ messages in thread
From: Yixun Lan @ 2026-09-08 21:26 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, Guodong Xu,
Junhui Liu
Cc: Yixun Lan, devicetree, linux-riscv, spacemit, linux-kernel
On Wed, 29 Jul 2026 00:40:15 +0800, Junhui Liu wrote:
> The mimsic node describes the machine-level IMSIC, whose MMIO region is
> 0x10000 (64 KiB) for all 8 harts. However, the node also specifies
> riscv,guest-index-bits = <6>, and per the AIA specification the
> per-hart stride is 2^(guest-index-bits + 12) bytes when guest interrupt
> files exist, i.e. 2^(6 + 12) = 256 KiB per hart and 2 MiB for all 8
> harts. The described region cannot hold even a single hart's files, so
> the node contradicts itself. OpenSBI enforces exactly this constraint in
> imsic_data_check() and rejects the node with -EINVAL, preventing the
> M-level IMSIC from initializing:
>
> [...]
Applied, thanks!
[1/1] riscv: dts: spacemit: k3: Drop guest properties from M-level IMSIC
https://git.kernel.org/pub/scm/linux/kernel/git/spacemit/linux.git/commit/?id=01e2f07c44fc46180bdb10e70506f8acf44a53dd
Best regards,
--
Yixun Lan <dlan@kernel.org>
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-09-08 21:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-28 16:40 [PATCH] riscv: dts: spacemit: k3: Drop guest properties from M-level IMSIC Junhui Liu
2026-09-07 7:44 ` Yixun Lan
2026-09-07 13:31 ` Troy Mitchell
2026-09-08 21:26 ` Yixun Lan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).