xref: /linux/arch/s390/kernel/Makefile (revision 03f7c1d2a49acd30e38789cd809d3300721e9b0e)
1# SPDX-License-Identifier: GPL-2.0
2#
3# Makefile for the linux kernel.
4#
5
6ifdef CONFIG_FUNCTION_TRACER
7
8# Do not trace tracer code
9CFLAGS_REMOVE_ftrace.o		= $(CC_FLAGS_FTRACE)
10
11# Do not trace early setup code
12CFLAGS_REMOVE_early.o		= $(CC_FLAGS_FTRACE)
13
14endif
15
16GCOV_PROFILE_early.o		:= n
17KCOV_INSTRUMENT_early.o		:= n
18UBSAN_SANITIZE_early.o		:= n
19KASAN_SANITIZE_ipl.o		:= n
20KASAN_SANITIZE_machine_kexec.o	:= n
21
22#
23# Passing null pointers is ok for smp code, since we access the lowcore here.
24#
25CFLAGS_smp.o		:= -Wno-nonnull
26
27#
28# Disable tailcall optimizations for stack / callchain walking functions
29# since this might generate broken code when accessing register 15 and
30# passing its content to other functions.
31#
32CFLAGS_stacktrace.o	+= -fno-optimize-sibling-calls
33CFLAGS_dumpstack.o	+= -fno-optimize-sibling-calls
34CFLAGS_unwind_bc.o	+= -fno-optimize-sibling-calls
35
36obj-y	:= head64.o traps.o time.o process.o earlypgm.o early.o setup.o idle.o vtime.o
37obj-y	+= processor.o syscall.o ptrace.o signal.o cpcmd.o ebcdic.o nmi.o
38obj-y	+= debug.o irq.o ipl.o dis.o diag.o vdso.o cpufeature.o
39obj-y	+= sysinfo.o lgr.o os_info.o machine_kexec.o
40obj-y	+= runtime_instr.o cache.o fpu.o dumpstack.o guarded_storage.o sthyi.o
41obj-y	+= entry.o reipl.o relocate_kernel.o kdebugfs.o alternative.o
42obj-y	+= nospec-branch.o ipl_vmparm.o machine_kexec_reloc.o unwind_bc.o
43obj-y	+= smp.o text_amode31.o stacktrace.o abs_lowcore.o
44
45extra-y				+= vmlinux.lds
46
47obj-$(CONFIG_SYSFS)		+= nospec-sysfs.o
48CFLAGS_REMOVE_nospec-branch.o	+= $(CC_FLAGS_EXPOLINE)
49
50obj-$(CONFIG_MODULES)		+= module.o
51obj-$(CONFIG_SCHED_TOPOLOGY)	+= topology.o
52obj-$(CONFIG_NUMA)		+= numa.o
53obj-$(CONFIG_AUDIT)		+= audit.o
54compat-obj-$(CONFIG_AUDIT)	+= compat_audit.o
55obj-$(CONFIG_COMPAT)		+= compat_linux.o compat_signal.o
56obj-$(CONFIG_COMPAT)		+= $(compat-obj-y)
57obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
58obj-$(CONFIG_KPROBES)		+= kprobes.o
59obj-$(CONFIG_KPROBES)		+= kprobes_insn_page.o
60obj-$(CONFIG_KPROBES)		+= mcount.o
61obj-$(CONFIG_FUNCTION_TRACER)	+= ftrace.o
62obj-$(CONFIG_FUNCTION_TRACER)	+= mcount.o
63obj-$(CONFIG_CRASH_DUMP)	+= crash_dump.o
64obj-$(CONFIG_UPROBES)		+= uprobes.o
65obj-$(CONFIG_JUMP_LABEL)	+= jump_label.o
66
67obj-$(CONFIG_KEXEC_FILE)	+= machine_kexec_file.o kexec_image.o
68obj-$(CONFIG_KEXEC_FILE)	+= kexec_elf.o
69
70obj-$(CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT)	+= ima_arch.o
71
72obj-$(CONFIG_PERF_EVENTS)	+= perf_event.o perf_cpum_cf_common.o
73obj-$(CONFIG_PERF_EVENTS)	+= perf_cpum_cf.o perf_cpum_sf.o
74obj-$(CONFIG_PERF_EVENTS)	+= perf_cpum_cf_events.o perf_regs.o
75obj-$(CONFIG_PERF_EVENTS)	+= perf_pai_crypto.o perf_pai_ext.o
76
77obj-$(CONFIG_TRACEPOINTS)	+= trace.o
78obj-$(findstring y, $(CONFIG_PROTECTED_VIRTUALIZATION_GUEST) $(CONFIG_PGSTE))	+= uv.o
79
80# vdso
81obj-y				+= vdso64/
82obj-$(CONFIG_COMPAT)		+= vdso32/
83