[RFC PATCH v1 0/3] IPI and remote TBL flush improvement

Palmer Dabbelt palmerdabbelt at google.com
Wed Mar 17 04:53:03 GMT 2021


On Thu, 11 Mar 2021 08:47:09 PST (-0800), Anup Patel wrote:
> This series primarily does two things:
> 1. Allows RISC-V IPI provider to specificy whether IPI operations are
>    suitable for remote TLB flush (PATCH1)
> 2. Improve remote TLB flush to use IPIs whenever possible (PATCH2)
> 3. Allow irqchip drivers to handle IPIs from chained IRQ handlers (PATCH3)

IIUC this last one isn't technically used in both forms, as we don't have any
drivers that behave that way yet?  I'm OK taking it, under the assumption it
makes keeping the out-of-tree driver for the draft interrupt controller easier,
but I was wrong then it's probably out of order so I figured I'd check.

Aside from that this generally LGTM.  We are making quite a bit of mess in
here, but I don't really see a way around that as we need to support the old
hardware.  We can always do a cleanup when the specifications settle down.

Oddly enough this did come up in IRC recently and there may be some new bits in
the CLINT on the FU740 that allow S-mode SW interrupts to show up directly --
there's at least a "delegate supervisor software interrupt" bit now, but the
manual only calls out machine mode as being able to set it (though IIUC it's
memory mapped, so not sure how that would be enforced).  Not saying we need
that in order to take the last patch, but if it is possible it's probably worth
giving it a shot when the boards show up.

> This series also a preparatory series for upcoming RISC-V advanced
> interrupt architecture (AIA) support.
>
> These patches can be found in riscv_ipi_imp_v1 branch at
> https://github.com/avpatel/linux
>
> Anup Patel (3):
>   RISC-V: IPI provider should specify if we can use IPI for remote FENCE
>   RISC-V: Use IPIs for remote TLB flush when possible
>   RISC-V: Add handle_IPI_noregs() for irqchip drivers
>
>  arch/riscv/include/asm/smp.h      | 19 +++++++++-
>  arch/riscv/kernel/sbi.c           |  2 +-
>  arch/riscv/kernel/smp.c           | 30 +++++++++++----
>  arch/riscv/mm/cacheflush.c        |  2 +-
>  arch/riscv/mm/tlbflush.c          | 62 ++++++++++++++++++++++++-------
>  drivers/clocksource/timer-clint.c |  2 +-
>  6 files changed, 91 insertions(+), 26 deletions(-)



More information about the linux-riscv mailing list