xref: /openbmc/linux/arch/x86/kernel/cpu/Makefile (revision 6b342707)
1# SPDX-License-Identifier: GPL-2.0
2#
3# Makefile for x86-compatible CPU details, features and quirks
4#
5
6# Don't trace early stages of a secondary CPU boot
7ifdef CONFIG_FUNCTION_TRACER
8CFLAGS_REMOVE_common.o = -pg
9CFLAGS_REMOVE_perf_event.o = -pg
10endif
11
12# If these files are instrumented, boot hangs during the first second.
13KCOV_INSTRUMENT_common.o := n
14KCOV_INSTRUMENT_perf_event.o := n
15
16# As above, instrumenting secondary CPU boot code causes boot hangs.
17KCSAN_SANITIZE_common.o := n
18
19# Make sure load_percpu_segment has no stackprotector
20CFLAGS_common.o		:= -fno-stack-protector
21
22obj-y			:= cacheinfo.o scattered.o topology.o
23obj-y			+= common.o
24obj-y			+= rdrand.o
25obj-y			+= match.o
26obj-y			+= bugs.o
27obj-y			+= aperfmperf.o
28obj-y			+= cpuid-deps.o
29obj-y			+= umwait.o
30
31obj-$(CONFIG_PROC_FS)	+= proc.o
32obj-$(CONFIG_X86_FEATURE_NAMES) += capflags.o powerflags.o
33
34obj-$(CONFIG_IA32_FEAT_CTL) += feat_ctl.o
35ifdef CONFIG_CPU_SUP_INTEL
36obj-y			+= intel.o intel_pconfig.o tsx.o
37obj-$(CONFIG_PM)	+= intel_epb.o
38endif
39obj-$(CONFIG_CPU_SUP_AMD)		+= amd.o
40obj-$(CONFIG_CPU_SUP_HYGON)		+= hygon.o
41obj-$(CONFIG_CPU_SUP_CYRIX_32)		+= cyrix.o
42obj-$(CONFIG_CPU_SUP_CENTAUR)		+= centaur.o
43obj-$(CONFIG_CPU_SUP_TRANSMETA_32)	+= transmeta.o
44obj-$(CONFIG_CPU_SUP_UMC_32)		+= umc.o
45obj-$(CONFIG_CPU_SUP_ZHAOXIN)		+= zhaoxin.o
46obj-$(CONFIG_CPU_SUP_VORTEX_32)		+= vortex.o
47
48obj-$(CONFIG_X86_MCE)			+= mce/
49obj-$(CONFIG_MTRR)			+= mtrr/
50obj-$(CONFIG_MICROCODE)			+= microcode/
51obj-$(CONFIG_X86_CPU_RESCTRL)		+= resctrl/
52obj-$(CONFIG_X86_SGX)			+= sgx/
53
54obj-$(CONFIG_X86_LOCAL_APIC)		+= perfctr-watchdog.o
55
56obj-$(CONFIG_HYPERVISOR_GUEST)		+= vmware.o hypervisor.o mshyperv.o
57obj-$(CONFIG_ACRN_GUEST)		+= acrn.o
58
59ifdef CONFIG_X86_FEATURE_NAMES
60quiet_cmd_mkcapflags = MKCAP   $@
61      cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $@ $^
62
63cpufeature = $(src)/../../include/asm/cpufeatures.h
64vmxfeature = $(src)/../../include/asm/vmxfeatures.h
65
66$(obj)/capflags.c: $(cpufeature) $(vmxfeature) $(src)/mkcapflags.sh FORCE
67	$(call if_changed,mkcapflags)
68endif
69targets += capflags.c
70