xref: /openbmc/linux/arch/riscv/mm/Makefile (revision 59c9160a)
1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
2387181dcSAnup Patel
3387181dcSAnup PatelCFLAGS_init.o := -mcmodel=medany
439b33072SAlexandre Ghitiifdef CONFIG_RELOCATABLE
539b33072SAlexandre GhitiCFLAGS_init.o += -fno-pie
639b33072SAlexandre Ghitiendif
739b33072SAlexandre Ghiti
8387181dcSAnup Patelifdef CONFIG_FTRACE
967d94577SGuo RenCFLAGS_REMOVE_init.o = $(CC_FLAGS_FTRACE)
105ad84adfSGuo RenCFLAGS_REMOVE_cacheflush.o = $(CC_FLAGS_FTRACE)
11387181dcSAnup Patelendif
12387181dcSAnup Patel
1320d38f7cSTobias KlauserKCOV_INSTRUMENT_init.o := n
1420d38f7cSTobias Klauser
15fbe934d6SPalmer Dabbeltobj-y += init.o
16*59c9160aSAlexandre Ghitiobj-$(CONFIG_MMU) += extable.o fault.o pageattr.o pgtable.o
1708f051edSAndrew Watermanobj-y += cacheflush.o
18f6635f87SGary Guoobj-y += context.o
19a49ab905SAnup Patelobj-y += pmem.o
209e953cdaSAlexandre Ghiti
2195594cb4SChristoph Hellwigifeq ($(CONFIG_MMU),y)
2295594cb4SChristoph Hellwigobj-$(CONFIG_SMP) += tlbflush.o
2395594cb4SChristoph Hellwigendif
249e953cdaSAlexandre Ghitiobj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
2559c4da86SZong Liobj-$(CONFIG_PTDUMP_CORE) += ptdump.o
268ad8b727SNick Huobj-$(CONFIG_KASAN)   += kasan_init.o
278ad8b727SNick Hu
288ad8b727SNick Huifdef CONFIG_KASAN
298ad8b727SNick HuKASAN_SANITIZE_kasan_init.o := n
308ad8b727SNick HuKASAN_SANITIZE_init.o := n
31c648c4bbSAlexandre Ghitiifdef CONFIG_DEBUG_VIRTUAL
32c648c4bbSAlexandre GhitiKASAN_SANITIZE_physaddr.o := n
33c648c4bbSAlexandre Ghitiendif
348ad8b727SNick Huendif
356435f773SZong Li
366435f773SZong Liobj-$(CONFIG_DEBUG_VIRTUAL) += physaddr.o
371631ba12SHeiko Stuebnerobj-$(CONFIG_RISCV_DMA_NONCOHERENT) += dma-noncoherent.o
38b4ad5617SChristoph Hellwigobj-$(CONFIG_RISCV_NONSTANDARD_CACHE_OPS) += cache-ops.o
39