1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only 2fbe934d6SPalmer Dabbelt# 3fbe934d6SPalmer Dabbelt# Makefile for the RISC-V Linux kernel 4fbe934d6SPalmer Dabbelt# 5fbe934d6SPalmer Dabbelt 610626c32SAlan Kaoifdef CONFIG_FTRACE 767d94577SGuo RenCFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE) 867d94577SGuo RenCFLAGS_REMOVE_patch.o = $(CC_FLAGS_FTRACE) 95ad84adfSGuo RenCFLAGS_REMOVE_sbi.o = $(CC_FLAGS_FTRACE) 1010626c32SAlan Kaoendif 11a6a58ecfSNanyong SunCFLAGS_syscall_table.o += $(call cc-option,-Wno-override-init,) 1210626c32SAlan Kao 13fba8a867SNick Kossifidisifdef CONFIG_KEXEC 14030d6dbfSChangbin DuAFLAGS_kexec_relocate.o := -mcmodel=medany $(call cc-option,-mno-relax) 15fba8a867SNick Kossifidisendif 16fba8a867SNick Kossifidis 17fbe934d6SPalmer Dabbeltextra-y += head.o 18fbe934d6SPalmer Dabbeltextra-y += vmlinux.lds 19fbe934d6SPalmer Dabbelt 20335b1390SDamien Le Moalobj-y += soc.o 21*e64f737aSHeiko Stuebnerobj-$(CONFIG_RISCV_ALTERNATIVE) += alternative.o 22fbe934d6SPalmer Dabbeltobj-y += cpu.o 23fbe934d6SPalmer Dabbeltobj-y += cpufeature.o 24fbe934d6SPalmer Dabbeltobj-y += entry.o 25fbe934d6SPalmer Dabbeltobj-y += irq.o 26fbe934d6SPalmer Dabbeltobj-y += process.o 27fbe934d6SPalmer Dabbeltobj-y += ptrace.o 28fbe934d6SPalmer Dabbeltobj-y += reset.o 29fbe934d6SPalmer Dabbeltobj-y += setup.o 30fbe934d6SPalmer Dabbeltobj-y += signal.o 31fbe934d6SPalmer Dabbeltobj-y += syscall_table.o 32fbe934d6SPalmer Dabbeltobj-y += sys_riscv.o 33fbe934d6SPalmer Dabbeltobj-y += time.o 34fbe934d6SPalmer Dabbeltobj-y += traps.o 35fbe934d6SPalmer Dabbeltobj-y += riscv_ksyms.o 36fbe934d6SPalmer Dabbeltobj-y += stacktrace.o 37fbe934d6SPalmer Dabbeltobj-y += cacheinfo.o 38043cb41aSZong Liobj-y += patch.o 39c22b0bcbSGuo Renobj-y += probes/ 406bd33e1eSChristoph Hellwigobj-$(CONFIG_MMU) += vdso.o vdso/ 41fbe934d6SPalmer Dabbelt 422bc3fc87SAnup Patelobj-$(CONFIG_RISCV_M_MODE) += traps_misaligned.o 439671f706SAlan Kaoobj-$(CONFIG_FPU) += fpu.o 44fbe934d6SPalmer Dabbeltobj-$(CONFIG_SMP) += smpboot.o 45fbe934d6SPalmer Dabbeltobj-$(CONFIG_SMP) += smp.o 462875fe05SAtish Patraobj-$(CONFIG_SMP) += cpu_ops.o 472ffc48fcSAtish Patra 482ffc48fcSAtish Patraobj-$(CONFIG_RISCV_BOOT_SPINWAIT) += cpu_ops_spinwait.o 49fbe934d6SPalmer Dabbeltobj-$(CONFIG_MODULES) += module.o 50ab1ef68eSZong Liobj-$(CONFIG_MODULE_SECTIONS) += module-sections.o 51c15ac4fdSAlan Kao 5263b13e64SAnup Patelobj-$(CONFIG_CPU_PM) += suspend_entry.o suspend.o 5363b13e64SAnup Patel 54c15ac4fdSAlan Kaoobj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o 55c15ac4fdSAlan Kaoobj-$(CONFIG_DYNAMIC_FTRACE) += mcount-dyn.o 56fbe934d6SPalmer Dabbelt 5722e2100bSChangbin Duobj-$(CONFIG_TRACE_IRQFLAGS) += trace_irq.o 5822e2100bSChangbin Du 59dbeb90b0SMao Hanobj-$(CONFIG_PERF_EVENTS) += perf_callchain.o 6098a93b0bSMao Hanobj-$(CONFIG_HAVE_PERF_REGS) += perf_regs.o 613320648eSChristoph Hellwigobj-$(CONFIG_RISCV_SBI) += sbi.o 62cfafe260SAtish Patraifeq ($(CONFIG_RISCV_SBI), y) 63cfafe260SAtish Patraobj-$(CONFIG_SMP) += cpu_ops_sbi.o 64cfafe260SAtish Patraendif 65f1e58583SAtish Patraobj-$(CONFIG_HOTPLUG_CPU) += cpu-hotplug.o 66fe89bd2bSVincent Chenobj-$(CONFIG_KGDB) += kgdb.o 67e53d2818SNick Kossifidisobj-$(CONFIG_KEXEC) += kexec_relocate.o crash_save_regs.o machine_kexec.o 6856409750SNick Kossifidisobj-$(CONFIG_CRASH_DUMP) += crash_dump.o 69178e9fc4SAlan Kao 70ebc00ddeSEmil Renner Berthingobj-$(CONFIG_JUMP_LABEL) += jump_label.o 71ebc00ddeSEmil Renner Berthing 72b91540d5SAtish Patraobj-$(CONFIG_EFI) += efi.o 73