1 # SPDX-License-Identifier: GPL-2.0
3 # Makefile for x86-compatible CPU details, features and quirks
6 # Don't trace early stages of a secondary CPU boot
7 ifdef CONFIG_FUNCTION_TRACER
8 CFLAGS_REMOVE_common.o
= -pg
9 CFLAGS_REMOVE_perf_event.o
= -pg
12 # If these files are instrumented, boot hangs during the first second.
13 KCOV_INSTRUMENT_common.o
:= n
14 KCOV_INSTRUMENT_perf_event.o
:= n
15 KMSAN_SANITIZE_common.o
:= n
17 # As above, instrumenting secondary CPU boot code causes boot hangs.
18 KCSAN_SANITIZE_common.o
:= n
20 obj-y
:= cacheinfo.o scattered.o
21 obj-y
+= topology_common.o topology_ext.o topology_amd.o
29 obj-y
+= capflags.o powerflags.o
31 obj-
$(CONFIG_X86_LOCAL_APIC
) += topology.o
33 obj-
$(CONFIG_PROC_FS
) += proc.o
35 obj-
$(CONFIG_IA32_FEAT_CTL
) += feat_ctl.o
36 ifdef CONFIG_CPU_SUP_INTEL
37 obj-y
+= intel.o tsx.o
38 obj-
$(CONFIG_PM
) += intel_epb.o
40 obj-
$(CONFIG_CPU_SUP_AMD
) += amd.o
41 obj-
$(CONFIG_CPU_SUP_HYGON
) += hygon.o
42 obj-
$(CONFIG_CPU_SUP_CYRIX_32
) += cyrix.o
43 obj-
$(CONFIG_CPU_SUP_CENTAUR
) += centaur.o
44 obj-
$(CONFIG_CPU_SUP_TRANSMETA_32
) += transmeta.o
45 obj-
$(CONFIG_CPU_SUP_UMC_32
) += umc.o
46 obj-
$(CONFIG_CPU_SUP_ZHAOXIN
) += zhaoxin.o
47 obj-
$(CONFIG_CPU_SUP_VORTEX_32
) += vortex.o
49 obj-
$(CONFIG_X86_MCE
) += mce
/
50 obj-
$(CONFIG_MTRR
) += mtrr
/
51 obj-
$(CONFIG_MICROCODE
) += microcode
/
52 obj-
$(CONFIG_X86_CPU_RESCTRL
) += resctrl
/
53 obj-
$(CONFIG_X86_SGX
) += sgx
/
55 obj-
$(CONFIG_X86_LOCAL_APIC
) += perfctr-watchdog.o
57 obj-
$(CONFIG_HYPERVISOR_GUEST
) += vmware.o hypervisor.o mshyperv.o
58 obj-
$(CONFIG_ACRN_GUEST
) += acrn.o
60 obj-
$(CONFIG_DEBUG_FS
) += debugfs.o
62 quiet_cmd_mkcapflags
= MKCAP
$@
63 cmd_mkcapflags
= $(CONFIG_SHELL
) $(src
)/mkcapflags.sh
$@
$^
65 cpufeature
= $(src
)/..
/..
/include/asm
/cpufeatures.h
66 vmxfeature
= $(src
)/..
/..
/include/asm
/vmxfeatures.h
68 $(obj
)/capflags.c
: $(cpufeature
) $(vmxfeature
) $(src
)/mkcapflags.sh FORCE
69 $(call if_changed
,mkcapflags
)