]> git.baikalelectronics.ru Git - kernel.git/commit
riscv: move flush_icache_{all,mm} to cacheflush.c
authorGary Guo <gary@garyguo.net>
Wed, 27 Mar 2019 00:41:25 +0000 (00:41 +0000)
committerPalmer Dabbelt <palmer@sifive.com>
Fri, 17 May 2019 03:42:12 +0000 (20:42 -0700)
commitf9162210a818b4df282a79183dd6ef42087300f8
tree2472a19173ceea0148de0e34c5de2fc2ecac6968
parentd80c3125048f9640a200e203086eaa4790b3c678
riscv: move flush_icache_{all,mm} to cacheflush.c

Currently, flush_icache_all is macro-expanded into a SBI call, yet no
asm/sbi.h is included in asm/cacheflush.h. This could be moved to
mm/cacheflush.c instead (SBI call will dominate performance-wise and
there is no worry to not have it inlined.

Currently, flush_icache_mm stays in kernel/smp.c, which looks like a
hack to prevent it from being compiled when CONFIG_SMP=n. It should
also be in mm/cacheflush.c.

Signed-off-by: Gary Guo <gary@garyguo.net>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
arch/riscv/include/asm/cacheflush.h
arch/riscv/kernel/smp.c
arch/riscv/mm/cacheflush.c