mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-25 13:14:07 +08:00
1631ba1259
The Zicbom ISA-extension was ratified in november 2021 and introduces instructions for dcache invalidate, clean and flush operations. Implement cache management operations for non-coherent devices based on them. Of course not all cores will support this, so implement an alternative-based mechanism that replaces empty instructions with ones done around Zicbom instructions. As discussed in previous versions, assume the platform being coherent by default so that non-coherent devices need to get marked accordingly by firmware. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Guo Ren <guoren@kernel.org> Link: https://lore.kernel.org/r/20220706231536.2041855-4-heiko@sntech.de Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
34 lines
768 B
Makefile
34 lines
768 B
Makefile
# SPDX-License-Identifier: GPL-2.0-only
|
|
|
|
CFLAGS_init.o := -mcmodel=medany
|
|
ifdef CONFIG_FTRACE
|
|
CFLAGS_REMOVE_init.o = $(CC_FLAGS_FTRACE)
|
|
CFLAGS_REMOVE_cacheflush.o = $(CC_FLAGS_FTRACE)
|
|
endif
|
|
|
|
KCOV_INSTRUMENT_init.o := n
|
|
|
|
obj-y += init.o
|
|
obj-y += extable.o
|
|
obj-$(CONFIG_MMU) += fault.o pageattr.o
|
|
obj-y += cacheflush.o
|
|
obj-y += context.o
|
|
|
|
ifeq ($(CONFIG_MMU),y)
|
|
obj-$(CONFIG_SMP) += tlbflush.o
|
|
endif
|
|
obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
|
|
obj-$(CONFIG_PTDUMP_CORE) += ptdump.o
|
|
obj-$(CONFIG_KASAN) += kasan_init.o
|
|
|
|
ifdef CONFIG_KASAN
|
|
KASAN_SANITIZE_kasan_init.o := n
|
|
KASAN_SANITIZE_init.o := n
|
|
ifdef CONFIG_DEBUG_VIRTUAL
|
|
KASAN_SANITIZE_physaddr.o := n
|
|
endif
|
|
endif
|
|
|
|
obj-$(CONFIG_DEBUG_VIRTUAL) += physaddr.o
|
|
obj-$(CONFIG_RISCV_DMA_NONCOHERENT) += dma-noncoherent.o
|