1# SPDX-License-Identifier: GPL-2.0
2#
3# Makefile for the powerpc trace subsystem
4#
5
6ifdef CONFIG_FUNCTION_TRACER
7# do not trace tracer code
8CFLAGS_REMOVE_ftrace.o = $(CC_FLAGS_FTRACE)
9CFLAGS_REMOVE_ftrace_64_pg.o = $(CC_FLAGS_FTRACE)
10endif
11
12obj32-$(CONFIG_FUNCTION_TRACER)		+= ftrace.o ftrace_entry.o
13ifdef CONFIG_MPROFILE_KERNEL
14obj64-$(CONFIG_FUNCTION_TRACER)		+= ftrace.o ftrace_entry.o
15else
16obj64-$(CONFIG_FUNCTION_TRACER)		+= ftrace_64_pg.o ftrace_64_pg_entry.o
17endif
18obj-$(CONFIG_TRACING)			+= trace_clock.o
19
20obj-$(CONFIG_PPC64)			+= $(obj64-y)
21obj-$(CONFIG_PPC32)			+= $(obj32-y)
22
23# Disable GCOV, KCOV & sanitizers in odd or sensitive code
24GCOV_PROFILE_ftrace.o := n
25KCOV_INSTRUMENT_ftrace.o := n
26KCSAN_SANITIZE_ftrace.o := n
27UBSAN_SANITIZE_ftrace.o := n
28GCOV_PROFILE_ftrace_64_pg.o := n
29KCOV_INSTRUMENT_ftrace_64_pg.o := n
30KCSAN_SANITIZE_ftrace_64_pg.o := n
31UBSAN_SANITIZE_ftrace_64_pg.o := n
32