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