1# SPDX-License-Identifier: GPL-2.0-only 2# 3# Makefile for the RISC-V Linux kernel 4# 5 6ifdef CONFIG_FTRACE 7CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE) 8CFLAGS_REMOVE_patch.o = $(CC_FLAGS_FTRACE) 9CFLAGS_REMOVE_sbi.o = $(CC_FLAGS_FTRACE) 10endif 11CFLAGS_syscall_table.o += $(call cc-option,-Wno-override-init,) 12 13ifdef CONFIG_KEXEC 14AFLAGS_kexec_relocate.o := -mcmodel=medany $(call cc-option,-mno-relax) 15endif 16 17extra-y += head.o 18extra-y += vmlinux.lds 19 20obj-y += soc.o 21obj-y += cpu.o 22obj-y += cpufeature.o 23obj-y += entry.o 24obj-y += irq.o 25obj-y += process.o 26obj-y += ptrace.o 27obj-y += reset.o 28obj-y += setup.o 29obj-y += signal.o 30obj-y += syscall_table.o 31obj-y += sys_riscv.o 32obj-y += time.o 33obj-y += traps.o 34obj-y += riscv_ksyms.o 35obj-y += stacktrace.o 36obj-y += cacheinfo.o 37obj-y += patch.o 38obj-y += probes/ 39obj-$(CONFIG_MMU) += vdso.o vdso/ 40 41obj-$(CONFIG_RISCV_M_MODE) += traps_misaligned.o 42obj-$(CONFIG_FPU) += fpu.o 43obj-$(CONFIG_SMP) += smpboot.o 44obj-$(CONFIG_SMP) += smp.o 45obj-$(CONFIG_SMP) += cpu_ops.o 46 47obj-$(CONFIG_RISCV_BOOT_SPINWAIT) += cpu_ops_spinwait.o 48obj-$(CONFIG_MODULES) += module.o 49obj-$(CONFIG_MODULE_SECTIONS) += module-sections.o 50 51obj-$(CONFIG_CPU_PM) += suspend_entry.o suspend.o 52 53obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o 54obj-$(CONFIG_DYNAMIC_FTRACE) += mcount-dyn.o 55 56obj-$(CONFIG_TRACE_IRQFLAGS) += trace_irq.o 57 58obj-$(CONFIG_PERF_EVENTS) += perf_callchain.o 59obj-$(CONFIG_HAVE_PERF_REGS) += perf_regs.o 60obj-$(CONFIG_RISCV_SBI) += sbi.o 61ifeq ($(CONFIG_RISCV_SBI), y) 62obj-$(CONFIG_SMP) += cpu_ops_sbi.o 63endif 64obj-$(CONFIG_HOTPLUG_CPU) += cpu-hotplug.o 65obj-$(CONFIG_KGDB) += kgdb.o 66obj-$(CONFIG_KEXEC) += kexec_relocate.o crash_save_regs.o machine_kexec.o 67obj-$(CONFIG_CRASH_DUMP) += crash_dump.o 68 69obj-$(CONFIG_JUMP_LABEL) += jump_label.o 70 71obj-$(CONFIG_EFI) += efi.o 72