blob: 56d5cd2a598277b1223df60a5c6605e512d0edce [file] [log] [blame]
Thomas Gleixnerec8f24b2019-05-19 13:07:45 +01001# SPDX-License-Identifier: GPL-2.0-only
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -07002#
3# Makefile for the RISC-V Linux kernel
4#
5
Alan Kao10626c32017-12-18 17:52:48 +08006ifdef CONFIG_FTRACE
Guo Ren67d94572020-12-17 16:01:39 +00007CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE)
8CFLAGS_REMOVE_patch.o = $(CC_FLAGS_FTRACE)
Guo Ren5ad84ad2020-12-17 16:01:40 +00009CFLAGS_REMOVE_sbi.o = $(CC_FLAGS_FTRACE)
Alan Kao10626c32017-12-18 17:52:48 +080010endif
11
Nick Kossifidisfba8a862021-04-19 03:55:36 +030012ifdef CONFIG_KEXEC
13AFLAGS_kexec_relocate.o := -mcmodel=medany -mno-relax
14endif
15
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070016extra-y += head.o
17extra-y += vmlinux.lds
18
Damien Le Moal335b1392020-03-16 09:47:38 +090019obj-y += soc.o
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070020obj-y += cpu.o
21obj-y += cpufeature.o
22obj-y += entry.o
23obj-y += irq.o
24obj-y += process.o
25obj-y += ptrace.o
26obj-y += reset.o
27obj-y += setup.o
28obj-y += signal.o
29obj-y += syscall_table.o
30obj-y += sys_riscv.o
31obj-y += time.o
32obj-y += traps.o
33obj-y += riscv_ksyms.o
34obj-y += stacktrace.o
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070035obj-y += cacheinfo.o
Zong Li043cb412020-03-10 00:55:43 +080036obj-y += patch.o
Guo Renc22b0bc2020-12-17 16:01:42 +000037obj-y += probes/
Christoph Hellwig6bd33e12019-10-28 13:10:41 +010038obj-$(CONFIG_MMU) += vdso.o vdso/
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070039
Anup Patel2bc3fc82020-08-17 18:12:50 +053040obj-$(CONFIG_RISCV_M_MODE) += traps_misaligned.o
Alan Kao9671f702018-10-09 10:18:33 +080041obj-$(CONFIG_FPU) += fpu.o
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070042obj-$(CONFIG_SMP) += smpboot.o
43obj-$(CONFIG_SMP) += smp.o
Atish Patra2875fe02020-03-17 18:11:40 -070044obj-$(CONFIG_SMP) += cpu_ops.o
45obj-$(CONFIG_SMP) += cpu_ops_spinwait.o
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070046obj-$(CONFIG_MODULES) += module.o
Zong Liab1ef682018-03-15 16:50:41 +080047obj-$(CONFIG_MODULE_SECTIONS) += module-sections.o
Alan Kaoc15ac4f2018-02-13 13:13:17 +080048
49obj-$(CONFIG_FUNCTION_TRACER) += mcount.o ftrace.o
50obj-$(CONFIG_DYNAMIC_FTRACE) += mcount-dyn.o
Palmer Dabbeltfbe934d2017-07-10 18:08:08 -070051
Kefeng Wang48084c32020-05-07 23:04:45 +080052obj-$(CONFIG_RISCV_BASE_PMU) += perf_event.o
Mao Handbeb90b2019-08-29 14:57:00 +080053obj-$(CONFIG_PERF_EVENTS) += perf_callchain.o
Mao Han98a93b02019-09-05 11:46:35 +080054obj-$(CONFIG_HAVE_PERF_REGS) += perf_regs.o
Christoph Hellwig33206482019-10-28 13:10:35 +010055obj-$(CONFIG_RISCV_SBI) += sbi.o
Atish Patracfafe262020-03-17 18:11:43 -070056ifeq ($(CONFIG_RISCV_SBI), y)
57obj-$(CONFIG_SMP) += cpu_ops_sbi.o
58endif
Atish Patraf1e58582020-03-17 18:11:44 -070059obj-$(CONFIG_HOTPLUG_CPU) += cpu-hotplug.o
Vincent Chenfe89bd22020-04-16 10:38:05 +080060obj-$(CONFIG_KGDB) += kgdb.o
Nick Kossifidise53d2812021-04-19 03:55:38 +030061obj-$(CONFIG_KEXEC) += kexec_relocate.o crash_save_regs.o machine_kexec.o
Nick Kossifidis56409752021-04-19 03:55:39 +030062obj-$(CONFIG_CRASH_DUMP) += crash_dump.o
Alan Kao178e9fc2018-04-20 07:27:49 +080063
Emil Renner Berthingebc00dd2020-07-14 09:40:44 +020064obj-$(CONFIG_JUMP_LABEL) += jump_label.o
65
Atish Patrab91540d2020-09-17 15:37:15 -070066obj-$(CONFIG_EFI) += efi.o