diff options
author | Anup Patel <anup.patel@wdc.com> | 2020-06-01 14:45:38 +0530 |
---|---|---|
committer | Palmer Dabbelt <palmerdabbelt@google.com> | 2020-06-09 19:11:19 -0700 |
commit | 5cf998ba8c7bbbfec3e0d6534c9a3f860ab9920e (patch) | |
tree | 215fab724b7472222ab135d2eaf7150b325f1aaa /arch/riscv/include | |
parent | e8c7ef7d5819cb7ece70ce0d22bce63ca45a29e2 (diff) | |
download | linux-stable-5cf998ba8c7bbbfec3e0d6534c9a3f860ab9920e.tar.gz linux-stable-5cf998ba8c7bbbfec3e0d6534c9a3f860ab9920e.tar.bz2 linux-stable-5cf998ba8c7bbbfec3e0d6534c9a3f860ab9920e.zip |
RISC-V: self-contained IPI handling routine
Currently, the IPI handling routine riscv_software_interrupt() does
not take any argument and also does not perform irq_enter()/irq_exit().
This patch makes IPI handling routine more self-contained by:
1. Passing "pt_regs *" argument
2. Explicitly doing irq_enter()/irq_exit()
3. Explicitly save/restore "pt_regs *" using set_irq_regs()
With above changes, IPI handling routine does not depend on caller
function to perform irq_enter()/irq_exit() and save/restore of
"pt_regs *" hence its more self-contained. This also enables us
to call IPI handling routine from IRQCHIP drivers.
Signed-off-by: Anup Patel <anup.patel@wdc.com>
Reviewed-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Palmer Dabbelt <palmerdabbelt@google.com>
Acked-by: Palmer Dabbelt <palmerdabbelt@google.com>
Signed-off-by: Palmer Dabbelt <palmerdabbelt@google.com>
Diffstat (limited to 'arch/riscv/include')
-rw-r--r-- | arch/riscv/include/asm/irq.h | 1 | ||||
-rw-r--r-- | arch/riscv/include/asm/smp.h | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/arch/riscv/include/asm/irq.h b/arch/riscv/include/asm/irq.h index 6e1b0e0325eb..0183e15ace66 100644 --- a/arch/riscv/include/asm/irq.h +++ b/arch/riscv/include/asm/irq.h @@ -13,7 +13,6 @@ #define NR_IRQS 0 void riscv_timer_interrupt(void); -void riscv_software_interrupt(void); #include <asm-generic/irq.h> diff --git a/arch/riscv/include/asm/smp.h b/arch/riscv/include/asm/smp.h index f4c7cfda6b7f..40bb1c15a731 100644 --- a/arch/riscv/include/asm/smp.h +++ b/arch/riscv/include/asm/smp.h @@ -28,6 +28,9 @@ void show_ipi_stats(struct seq_file *p, int prec); /* SMP initialization hook for setup_arch */ void __init setup_smp(void); +/* Called from C code, this handles an IPI. */ +void handle_IPI(struct pt_regs *regs); + /* Hook for the generic smp_call_function_many() routine. */ void arch_send_call_function_ipi_mask(struct cpumask *mask); |