xref: /linux/arch/x86/kernel/cpu/Makefile (revision 1c07425e902cd3137961c3d45b4271bf8a9b8eb9)
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
15KMSAN_SANITIZE_common.o := n
16
17# As above, instrumenting secondary CPU boot code causes boot hangs.
18KCSAN_SANITIZE_common.o := n
19
20obj-y			:= cacheinfo.o scattered.o topology.o
21obj-y			+= common.o
22obj-y			+= rdrand.o
23obj-y			+= match.o
24obj-y			+= bugs.o
25obj-y			+= aperfmperf.o
26obj-y			+= cpuid-deps.o
27obj-y			+= umwait.o
28
29obj-$(CONFIG_PROC_FS)	+= proc.o
30obj-$(CONFIG_X86_FEATURE_NAMES) += capflags.o powerflags.o
31
32obj-$(CONFIG_IA32_FEAT_CTL) += feat_ctl.o
33ifdef CONFIG_CPU_SUP_INTEL
34obj-y			+= intel.o intel_pconfig.o tsx.o
35obj-$(CONFIG_PM)	+= intel_epb.o
36endif
37obj-$(CONFIG_CPU_SUP_AMD)		+= amd.o
38obj-$(CONFIG_CPU_SUP_HYGON)		+= hygon.o
39obj-$(CONFIG_CPU_SUP_CYRIX_32)		+= cyrix.o
40obj-$(CONFIG_CPU_SUP_CENTAUR)		+= centaur.o
41obj-$(CONFIG_CPU_SUP_TRANSMETA_32)	+= transmeta.o
42obj-$(CONFIG_CPU_SUP_UMC_32)		+= umc.o
43obj-$(CONFIG_CPU_SUP_ZHAOXIN)		+= zhaoxin.o
44obj-$(CONFIG_CPU_SUP_VORTEX_32)		+= vortex.o
45
46obj-$(CONFIG_X86_MCE)			+= mce/
47obj-$(CONFIG_MTRR)			+= mtrr/
48obj-$(CONFIG_MICROCODE)			+= microcode/
49obj-$(CONFIG_X86_CPU_RESCTRL)		+= resctrl/
50obj-$(CONFIG_X86_SGX)			+= sgx/
51
52obj-$(CONFIG_X86_LOCAL_APIC)		+= perfctr-watchdog.o
53
54obj-$(CONFIG_HYPERVISOR_GUEST)		+= vmware.o hypervisor.o mshyperv.o
55obj-$(CONFIG_ACRN_GUEST)		+= acrn.o
56
57ifdef CONFIG_X86_FEATURE_NAMES
58quiet_cmd_mkcapflags = MKCAP   $@
59      cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $@ $^
60
61cpufeature = $(src)/../../include/asm/cpufeatures.h
62vmxfeature = $(src)/../../include/asm/vmxfeatures.h
63
64$(obj)/capflags.c: $(cpufeature) $(vmxfeature) $(src)/mkcapflags.sh FORCE
65	$(call if_changed,mkcapflags)
66endif
67targets += capflags.c
68