]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - include/linux/cpuhotplug.h
irqchip/sifive-plic: Enable/Disable external interrupts upon cpu online/offline
authorAtish Patra <atish.patra@wdc.com>
Mon, 2 Mar 2020 23:11:45 +0000 (15:11 -0800)
committerMarc Zyngier <maz@kernel.org>
Mon, 16 Mar 2020 15:48:54 +0000 (15:48 +0000)
commitccbe80bad571c2f967ad42b25bbb3ef7a4a24705
tree91b3c9bc120a4ef82fcbafc3f44de1a7ac8621e7
parent2ef1cb763d92f3e212005fcf5dcc713eaf42b257
irqchip/sifive-plic: Enable/Disable external interrupts upon cpu online/offline

Currently, PLIC threshold is only initialized once in the beginning.
However, threshold can be set to disabled if a CPU is marked offline with
CPU hotplug feature. This will not allow to change the irq affinity to a
CPU that just came online.

Add PLIC specific CPU hotplug callbacks and enable the threshold when a CPU
comes online. Take this opportunity to move the external interrupt enable
code from trap init to PLIC driver as well. On cpu offline path, the driver
performs the exact opposite operations i.e. disable the interrupt and
the threshold.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20200302231146.15530-2-atish.patra@wdc.com
arch/riscv/kernel/traps.c
drivers/irqchip/irq-sifive-plic.c
include/linux/cpuhotplug.h