GNU Linux-libre 6.7.9-gnu
[releases.git] / arch / riscv / mm / Makefile
1 # SPDX-License-Identifier: GPL-2.0-only
2
3 CFLAGS_init.o := -mcmodel=medany
4 ifdef CONFIG_RELOCATABLE
5 CFLAGS_init.o += -fno-pie
6 endif
7
8 ifdef CONFIG_FTRACE
9 CFLAGS_REMOVE_init.o = $(CC_FLAGS_FTRACE)
10 CFLAGS_REMOVE_cacheflush.o = $(CC_FLAGS_FTRACE)
11 endif
12
13 KCOV_INSTRUMENT_init.o := n
14
15 obj-y += init.o
16 obj-$(CONFIG_MMU) += extable.o fault.o pageattr.o
17 obj-y += cacheflush.o
18 obj-y += context.o
19 obj-y += pgtable.o
20 obj-y += pmem.o
21
22 ifeq ($(CONFIG_MMU),y)
23 obj-$(CONFIG_SMP) += tlbflush.o
24 endif
25 obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
26 obj-$(CONFIG_PTDUMP_CORE) += ptdump.o
27 obj-$(CONFIG_KASAN)   += kasan_init.o
28
29 ifdef CONFIG_KASAN
30 KASAN_SANITIZE_kasan_init.o := n
31 KASAN_SANITIZE_init.o := n
32 ifdef CONFIG_DEBUG_VIRTUAL
33 KASAN_SANITIZE_physaddr.o := n
34 endif
35 endif
36
37 obj-$(CONFIG_DEBUG_VIRTUAL) += physaddr.o
38 obj-$(CONFIG_RISCV_DMA_NONCOHERENT) += dma-noncoherent.o
39 obj-$(CONFIG_RISCV_NONSTANDARD_CACHE_OPS) += cache-ops.o