GNU Linux-libre 4.9.288-gnu1
[releases.git] / arch / s390 / kernel / Makefile
1 #
2 # Makefile for the linux kernel.
3 #
4
5 KCOV_INSTRUMENT_early.o := n
6 KCOV_INSTRUMENT_sclp.o := n
7 KCOV_INSTRUMENT_als.o := n
8
9 ifdef CONFIG_FUNCTION_TRACER
10 # Don't trace early setup code and tracing code
11 CFLAGS_REMOVE_early.o = $(CC_FLAGS_FTRACE)
12 CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE)
13 endif
14
15 #
16 # Passing null pointers is ok for smp code, since we access the lowcore here.
17 #
18 CFLAGS_smp.o    := -Wno-nonnull
19
20 #
21 # Disable tailcall optimizations for stack / callchain walking functions
22 # since this might generate broken code when accessing register 15 and
23 # passing its content to other functions.
24 #
25 CFLAGS_stacktrace.o     += -fno-optimize-sibling-calls
26 CFLAGS_dumpstack.o      += -fno-optimize-sibling-calls
27
28 #
29 # Pass UTS_MACHINE for user_regset definition
30 #
31 CFLAGS_ptrace.o         += -DUTS_MACHINE='"$(UTS_MACHINE)"'
32
33 CFLAGS_sysinfo.o += -w
34
35 #
36 # Use -march=z900 for sclp.c and als.c to be able to print an error
37 # message if the kernel is started on a machine which is too old
38 #
39 CFLAGS_REMOVE_sclp.o = $(CC_FLAGS_FTRACE)
40 CFLAGS_REMOVE_als.o = $(CC_FLAGS_FTRACE)
41 ifneq ($(CC_FLAGS_MARCH),-march=z900)
42 CFLAGS_REMOVE_sclp.o    += $(CC_FLAGS_MARCH)
43 CFLAGS_sclp.o           += -march=z900
44 CFLAGS_REMOVE_als.o     += $(CC_FLAGS_MARCH)
45 CFLAGS_REMOVE_als.o     += $(CC_FLAGS_EXPOLINE)
46 CFLAGS_als.o            += -march=z900
47 AFLAGS_REMOVE_head.o    += $(CC_FLAGS_MARCH)
48 AFLAGS_head.o           += -march=z900
49 endif
50 GCOV_PROFILE_sclp.o := n
51 GCOV_PROFILE_als.o := n
52 UBSAN_SANITIZE_als.o := n
53 UBSAN_SANITIZE_early.o := n
54 UBSAN_SANITIZE_sclp.o := n
55
56 obj-y   := traps.o time.o process.o base.o early.o setup.o idle.o vtime.o
57 obj-y   += processor.o sys_s390.o ptrace.o signal.o cpcmd.o ebcdic.o nmi.o
58 obj-y   += debug.o irq.o ipl.o dis.o diag.o sclp.o vdso.o als.o
59 obj-y   += sysinfo.o jump_label.o lgr.o os_info.o machine_kexec.o pgm_check.o
60 obj-y   += runtime_instr.o cache.o fpu.o dumpstack.o
61 obj-y   += entry.o reipl.o relocate_kernel.o alternative.o
62 obj-y   += nospec-branch.o
63
64 extra-y                         += head.o head64.o vmlinux.lds
65
66 obj-$(CONFIG_SYSFS)             += nospec-sysfs.o
67 CFLAGS_REMOVE_nospec-branch.o   += $(CC_FLAGS_EXPOLINE)
68
69 obj-$(CONFIG_MODULES)           += module.o
70 obj-$(CONFIG_SMP)               += smp.o
71 obj-$(CONFIG_SCHED_TOPOLOGY)    += topology.o
72 obj-$(CONFIG_HIBERNATION)       += suspend.o swsusp.o
73 obj-$(CONFIG_AUDIT)             += audit.o
74 compat-obj-$(CONFIG_AUDIT)      += compat_audit.o
75 obj-$(CONFIG_COMPAT)            += compat_linux.o compat_signal.o
76 obj-$(CONFIG_COMPAT)            += compat_wrapper.o $(compat-obj-y)
77
78 obj-$(CONFIG_STACKTRACE)        += stacktrace.o
79 obj-$(CONFIG_KPROBES)           += kprobes.o
80 obj-$(CONFIG_FUNCTION_TRACER)   += mcount.o ftrace.o
81 obj-$(CONFIG_CRASH_DUMP)        += crash_dump.o
82 obj-$(CONFIG_UPROBES)           += uprobes.o
83
84 obj-$(CONFIG_PERF_EVENTS)       += perf_event.o perf_cpum_cf.o perf_cpum_sf.o
85 obj-$(CONFIG_PERF_EVENTS)       += perf_cpum_cf_events.o
86
87 obj-$(CONFIG_TRACEPOINTS)       += trace.o
88
89 # vdso
90 obj-y                           += vdso64/
91 obj-$(CONFIG_COMPAT)            += vdso32/