Devicetree
 help / color / mirror / Atom feed
* [PATCH V2] riscv: dts: spacemit: k3: fix IMSIC num-guest-ids
@ 2026-08-17  3:30 Guo Ren
  2026-08-17  8:50 ` Yixun Lan
  2026-08-17 14:29 ` Junhui Liu
  0 siblings, 2 replies; 3+ messages in thread
From: Guo Ren @ 2026-08-17  3:30 UTC (permalink / raw)
  To: linux-riscv, linux-kernel
  Cc: dlan, devicetree, spacemit, junhui.liu, GUO Ren (XuanTie), stable,
	Guodong Xu

From: "GUO Ren (XuanTie)" <guoren@kernel.org>

The initial K3 device tree used generic/placeholder values for the
IMSIC guest configuration:

  riscv,num-guest-ids    = <511>;

According to the SpacemiT K3 User Manual this values is incorrect
for the X100 cores:

 - Advanced Interrupt Architecture (AIA):
    - M-mode MSI: 512
    - S-mode MSI: 512
    - VS-mode MSI: 64

Therefore, S-mode IMSIC (simsic) needs num-guest-ids = 63.

Fixes: 56f37e391a62 ("riscv: dts: spacemit: add initial support for K3 SoC")
Cc: stable@vger.kernel.org
Cc: Guodong Xu <docular.xu@gmail.com>
Cc: Yixun Lan <dlan@kernel.org>
Signed-off-by: GUO Ren (XuanTie) <guoren@kernel.org>
---
V2:
 - Drop the riscv,guest-index-bits change for simsic: the property
   describes the number of guest index bits in the MSI target address,
   and the per-hart stride on K3 is 0x40000 = 2^(6 + 12), so 6 is
   correct as is.
 - Drop the mimsic changes: already fixed by Junhui.
 - Reword the subject and commit log accordingly.
---
 arch/riscv/boot/dts/spacemit/k3.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/riscv/boot/dts/spacemit/k3.dtsi b/arch/riscv/boot/dts/spacemit/k3.dtsi
index 19fc9b49668e..4a4a9ec7c981 100644
--- a/arch/riscv/boot/dts/spacemit/k3.dtsi
+++ b/arch/riscv/boot/dts/spacemit/k3.dtsi
@@ -1129,7 +1129,7 @@ simsic: interrupt-controller@e0400000 {
 			msi-controller;
 			riscv,guest-index-bits = <6>;
 			riscv,hart-index-bits = <4>;
-			riscv,num-guest-ids = <511>;
+			riscv,num-guest-ids = <63>;
 			riscv,num-ids = <511>;
 		};
 
-- 
2.43.0


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

* Re: [PATCH V2] riscv: dts: spacemit: k3: fix IMSIC num-guest-ids
  2026-08-17  3:30 [PATCH V2] riscv: dts: spacemit: k3: fix IMSIC num-guest-ids Guo Ren
@ 2026-08-17  8:50 ` Yixun Lan
  2026-08-17 14:29 ` Junhui Liu
  1 sibling, 0 replies; 3+ messages in thread
From: Yixun Lan @ 2026-08-17  8:50 UTC (permalink / raw)
  To: Guo Ren
  Cc: linux-riscv, linux-kernel, devicetree, spacemit, junhui.liu,
	stable, Guodong Xu

Hi Guo

On 03:30 Mon 17 Aug     , Guo Ren wrote:
> From: "GUO Ren (XuanTie)" <guoren@kernel.org>
> 
> The initial K3 device tree used generic/placeholder values for the
> IMSIC guest configuration:
> 
>   riscv,num-guest-ids    = <511>;
> 
> According to the SpacemiT K3 User Manual this values is incorrect
> for the X100 cores:
> 
>  - Advanced Interrupt Architecture (AIA):
>     - M-mode MSI: 512
>     - S-mode MSI: 512
>     - VS-mode MSI: 64
> 
> Therefore, S-mode IMSIC (simsic) needs num-guest-ids = 63.
> 
> Fixes: 56f37e391a62 ("riscv: dts: spacemit: add initial support for K3 SoC")
> Cc: stable@vger.kernel.org
> Cc: Guodong Xu <docular.xu@gmail.com>
> Cc: Yixun Lan <dlan@kernel.org>
> Signed-off-by: GUO Ren (XuanTie) <guoren@kernel.org>
> ---
> V2:
>  - Drop the riscv,guest-index-bits change for simsic: the property
>    describes the number of guest index bits in the MSI target address,
>    and the per-hart stride on K3 is 0x40000 = 2^(6 + 12), so 6 is
>    correct as is.
>  - Drop the mimsic changes: already fixed by Junhui.
>  - Reword the subject and commit log accordingly.
> ---
>  arch/riscv/boot/dts/spacemit/k3.dtsi | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
Reviewed-by: Yixun Lan <dlan@kernel.org>

-- 
Yixun Lan (dlan)

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

* Re: [PATCH V2] riscv: dts: spacemit: k3: fix IMSIC num-guest-ids
  2026-08-17  3:30 [PATCH V2] riscv: dts: spacemit: k3: fix IMSIC num-guest-ids Guo Ren
  2026-08-17  8:50 ` Yixun Lan
@ 2026-08-17 14:29 ` Junhui Liu
  1 sibling, 0 replies; 3+ messages in thread
From: Junhui Liu @ 2026-08-17 14:29 UTC (permalink / raw)
  To: Guo Ren, linux-riscv, linux-kernel
  Cc: dlan, devicetree, spacemit, junhui.liu, stable, Guodong Xu

Hi Guo,

On Mon Aug 17, 2026 at 11:30 AM CST, Guo Ren wrote:
> From: "GUO Ren (XuanTie)" <guoren@kernel.org>
>
> The initial K3 device tree used generic/placeholder values for the
> IMSIC guest configuration:
>
>   riscv,num-guest-ids    = <511>;
>
> According to the SpacemiT K3 User Manual this values is incorrect
> for the X100 cores:
>
>  - Advanced Interrupt Architecture (AIA):
>     - M-mode MSI: 512
>     - S-mode MSI: 512
>     - VS-mode MSI: 64
>
> Therefore, S-mode IMSIC (simsic) needs num-guest-ids = 63.
>
> Fixes: 56f37e391a62 ("riscv: dts: spacemit: add initial support for K3 SoC")
> Cc: stable@vger.kernel.org
> Cc: Guodong Xu <docular.xu@gmail.com>
> Cc: Yixun Lan <dlan@kernel.org>
> Signed-off-by: GUO Ren (XuanTie) <guoren@kernel.org>

Reviewed-by: Junhui Liu <junhui.liu@pigmoral.tech>

-- 
Best regards,
Junhui Liu

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

end of thread, other threads:[~2026-08-17 14:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-17  3:30 [PATCH V2] riscv: dts: spacemit: k3: fix IMSIC num-guest-ids Guo Ren
2026-08-17  8:50 ` Yixun Lan
2026-08-17 14:29 ` Junhui Liu

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