riscv: move switch_mm to its own file
switch_mm is an expensive operations that has two users.
flush_icache_deferred is only called within switch_mm and can be moved
together. The function is expected to be more complicated when ASID
support is added, so clean up eagerly.
By moving them to a separate file we also removes some excessive
dependency of tlbflush.h and cacheflush.h.
Signed-off-by: Gary Guo <email@example.com>
Reviewed-by: Anup Patel <firstname.lastname@example.org>
Signed-off-by: Christoph Hellwig <email@example.com>
Signed-off-by: Palmer Dabbelt <firstname.lastname@example.org>
3 files changed