diff options
author | Niklas Cassel <niklas.cassel@wdc.com> | 2022-03-01 00:44:18 +0000 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-03-16 14:26:52 +0100 |
commit | 2777252d116a86f9a95de3cedc35d56e6cdc3e14 (patch) | |
tree | b6b4f0475c32b28373801c84c72869969aa1c90a | |
parent | 00a742934a651ee074b6650f33a360d74df30702 (diff) | |
download | linux-stable-2777252d116a86f9a95de3cedc35d56e6cdc3e14.tar.gz linux-stable-2777252d116a86f9a95de3cedc35d56e6cdc3e14.tar.bz2 linux-stable-2777252d116a86f9a95de3cedc35d56e6cdc3e14.zip |
riscv: dts: k210: fix broken IRQs on hart1
commit 74583f1b92cb3bbba1a3741cea237545c56f506c upstream.
Commit 67d96729a9e7 ("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: 67d96729a9e7 ("riscv: Update Canaan Kendryte K210 device tree")
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | arch/riscv/boot/dts/canaan/k210.dtsi | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/riscv/boot/dts/canaan/k210.dtsi b/arch/riscv/boot/dts/canaan/k210.dtsi index 5e8ca8142482..780416d489aa 100644 --- a/arch/riscv/boot/dts/canaan/k210.dtsi +++ b/arch/riscv/boot/dts/canaan/k210.dtsi @@ -113,7 +113,8 @@ compatible = "canaan,k210-plic", "sifive,plic-1.0.0"; reg = <0xC000000 0x4000000>; interrupt-controller; - interrupts-extended = <&cpu0_intc 11 &cpu1_intc 11>; + interrupts-extended = <&cpu0_intc 11>, <&cpu0_intc 9>, + <&cpu1_intc 11>, <&cpu1_intc 9>; riscv,ndev = <65>; }; |