riscv: implement remote sfence.i using IPIs
authorChristoph Hellwig <hch@lst.de>
Mon, 28 Oct 2019 12:10:36 +0000 (13:10 +0100)
committerPaul Walmsley <paul.walmsley@sifive.com>
Wed, 13 Nov 2019 21:24:21 +0000 (13:24 -0800)
commit8bf90f320d9ab4d642cdc0c1c5f05e8aa0a68db6
tree77164acfa1d0b97b5cfe175623210ee838279136
parent3320648ecc38190caad298fbbce949f591a10253
riscv: implement remote sfence.i using IPIs

The RISC-V ISA only supports flushing the instruction cache for the
local CPU core.  Currently we always offload the remote TLB flushing to
the SBI, which then issues an IPI under the hoods.  But with M-mode
we do not have an SBI so we have to do it ourselves.   IPI to the
other nodes using the existing kernel helpers instead if we have
native clint support and thus can IPI directly from the kernel.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Anup Patel <anup@brainfault.org>
[paul.walmsley@sifive.com: cleaned up code comment]
Signed-off-by: Paul Walmsley <paul.walmsley@sifive.com>
arch/riscv/include/asm/sbi.h
arch/riscv/mm/cacheflush.c