xref: /openbmc/linux/arch/s390/kernel/Makefile (revision 09bae3b6)
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)
13CFLAGS_REMOVE_early_nobss.o	= $(CC_FLAGS_FTRACE)
14
15endif
16
17GCOV_PROFILE_early.o		:= n
18GCOV_PROFILE_early_nobss.o	:= n
19
20KCOV_INSTRUMENT_early.o		:= n
21KCOV_INSTRUMENT_early_nobss.o	:= n
22
23UBSAN_SANITIZE_early.o		:= n
24UBSAN_SANITIZE_early_nobss.o	:= n
25
26#
27# Passing null pointers is ok for smp code, since we access the lowcore here.
28#
29CFLAGS_smp.o		:= -Wno-nonnull
30
31#
32# Disable tailcall optimizations for stack / callchain walking functions
33# since this might generate broken code when accessing register 15 and
34# passing its content to other functions.
35#
36CFLAGS_stacktrace.o	+= -fno-optimize-sibling-calls
37CFLAGS_dumpstack.o	+= -fno-optimize-sibling-calls
38
39#
40# Pass UTS_MACHINE for user_regset definition
41#
42CFLAGS_ptrace.o		+= -DUTS_MACHINE='"$(UTS_MACHINE)"'
43
44obj-y	:= traps.o time.o process.o base.o early.o setup.o idle.o vtime.o
45obj-y	+= processor.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o nmi.o
46obj-y	+= debug.o irq.o ipl.o dis.o diag.o vdso.o early_nobss.o
47obj-y	+= sysinfo.o jump_label.o lgr.o os_info.o machine_kexec.o pgm_check.o
48obj-y	+= runtime_instr.o cache.o fpu.o dumpstack.o guarded_storage.o sthyi.o
49obj-y	+= entry.o reipl.o relocate_kernel.o kdebugfs.o alternative.o
50obj-y	+= nospec-branch.o
51
52extra-y				+= head64.o vmlinux.lds
53
54obj-$(CONFIG_SYSFS)		+= nospec-sysfs.o
55CFLAGS_REMOVE_nospec-branch.o	+= $(CC_FLAGS_EXPOLINE)
56
57obj-$(CONFIG_MODULES)		+= module.o
58obj-$(CONFIG_SMP)		+= smp.o
59obj-$(CONFIG_SCHED_TOPOLOGY)	+= topology.o
60obj-$(CONFIG_HIBERNATION)	+= suspend.o swsusp.o
61obj-$(CONFIG_AUDIT)		+= audit.o
62compat-obj-$(CONFIG_AUDIT)	+= compat_audit.o
63obj-$(CONFIG_COMPAT)		+= compat_linux.o compat_signal.o
64obj-$(CONFIG_COMPAT)		+= compat_wrapper.o $(compat-obj-y)
65obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
66obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
67obj-$(CONFIG_KPROBES)		+= kprobes.o
68obj-$(CONFIG_FUNCTION_TRACER)	+= mcount.o ftrace.o
69obj-$(CONFIG_CRASH_DUMP)	+= crash_dump.o
70obj-$(CONFIG_UPROBES)		+= uprobes.o
71
72obj-$(CONFIG_KEXEC_FILE)	+= machine_kexec_file.o kexec_image.o
73obj-$(CONFIG_KEXEC_FILE)	+= kexec_elf.o
74
75obj-$(CONFIG_PERF_EVENTS)	+= perf_event.o perf_cpum_cf.o perf_cpum_sf.o
76obj-$(CONFIG_PERF_EVENTS)	+= perf_cpum_cf_events.o perf_regs.o
77
78obj-$(CONFIG_TRACEPOINTS)	+= trace.o
79
80# vdso
81obj-y				+= vdso64/
82obj-$(CONFIG_COMPAT)		+= vdso32/
83
84chkbss := head64.o early_nobss.o
85include $(srctree)/arch/s390/scripts/Makefile.chkbss
86