Skip to content

Commit 74583f1

Browse files
Niklas Casselpalmer-dabbelt
authored andcommitted
riscv: dts: k210: fix broken IRQs on hart1
Commit 67d9672 ("riscv: Update Canaan Kendryte K210 device tree") incorrectly removed two entries from the PLIC interrupt-controller node's interrupts-extended property. The PLIC driver cannot know the mapping between hart contexts and hart ids, so this information has to be provided by device tree, as specified by the PLIC device tree binding. The PLIC driver uses the interrupts-extended property, and initializes the hart context registers in the exact same order as provided by the interrupts-extended property. In other words, if we don't specify the S-mode interrupts, the PLIC driver will simply initialize the hart0 S-mode hart context with the hart1 M-mode configuration. It is therefore essential to specify the S-mode IRQs even though the system itself will only ever be running in M-mode. Re-add the S-mode interrupts, so that we get working IRQs on hart1 again. Cc: <stable@vger.kernel.org> Fixes: 67d9672 ("riscv: Update Canaan Kendryte K210 device tree") Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com> Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
1 parent e4fcfe6 commit 74583f1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

arch/riscv/boot/dts/canaan/k210.dtsi

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@
113113
compatible = "canaan,k210-plic", "sifive,plic-1.0.0";
114114
reg = <0xC000000 0x4000000>;
115115
interrupt-controller;
116-
interrupts-extended = <&cpu0_intc 11>, <&cpu1_intc 11>;
116+
interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>,
117+
<&cpu1_intc 11>, <&cpu1_intc 9>;
117118
riscv,ndev = <65>;
118119
};
119120

0 commit comments

Comments
 (0)