]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: dts: k210: fix broken IRQs on hart1
authorNiklas Cassel <niklas.cassel@wdc.com>
Tue, 1 Mar 2022 00:44:18 +0000 (00:44 +0000)
committerPalmer Dabbelt <palmer@rivosinc.com>
Fri, 4 Mar 2022 04:04:21 +0000 (20:04 -0800)
commit73e04bdcfca0b09b18916e2f5b72b35fb0969c4f
tree5ad35d0e6681071318c48f7be61d3cbaea705403
parentb5df5e12db9f122d19d3b57fafec030da1bccae0
riscv: dts: k210: fix broken IRQs on hart1

Commit b3cd7dfef91a ("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: b3cd7dfef91a ("riscv: Update Canaan Kendryte K210 device tree")
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/boot/dts/canaan/k210.dtsi