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
16 # As above, instrumenting secondary CPU boot code causes boot hangs.
17 KCSAN_SANITIZE_common.o
:= n
19 # Make sure load_percpu_segment has no stackprotector
20 CFLAGS_common.o
:= -fno-stack-protector
22 obj-y
:= cacheinfo.o scattered.o topology.o
31 obj-
$(CONFIG_PROC_FS
) += proc.o
32 obj-
$(CONFIG_X86_FEATURE_NAMES
) += capflags.o powerflags.o
34 obj-
$(CONFIG_IA32_FEAT_CTL
) += feat_ctl.o
35 ifdef CONFIG_CPU_SUP_INTEL
36 obj-y
+= intel.o intel_pconfig.o tsx.o
37 obj-
$(CONFIG_PM
) += intel_epb.o
39 obj-
$(CONFIG_CPU_SUP_AMD
) += amd.o
40 obj-
$(CONFIG_CPU_SUP_HYGON
) += hygon.o
41 obj-
$(CONFIG_CPU_SUP_CYRIX_32
) += cyrix.o
42 obj-
$(CONFIG_CPU_SUP_CENTAUR
) += centaur.o
43 obj-
$(CONFIG_CPU_SUP_TRANSMETA_32
) += transmeta.o
44 obj-
$(CONFIG_CPU_SUP_UMC_32
) += umc.o
45 obj-
$(CONFIG_CPU_SUP_ZHAOXIN
) += zhaoxin.o
47 obj-
$(CONFIG_X86_MCE
) += mce
/
48 obj-
$(CONFIG_MTRR
) += mtrr
/
49 obj-
$(CONFIG_MICROCODE
) += microcode
/
50 obj-
$(CONFIG_X86_CPU_RESCTRL
) += resctrl
/
51 obj-
$(CONFIG_X86_SGX
) += sgx
/
53 obj-
$(CONFIG_X86_LOCAL_APIC
) += perfctr-watchdog.o
55 obj-
$(CONFIG_HYPERVISOR_GUEST
) += vmware.o hypervisor.o mshyperv.o
56 obj-
$(CONFIG_ACRN_GUEST
) += acrn.o
58 ifdef CONFIG_X86_FEATURE_NAMES
59 quiet_cmd_mkcapflags
= MKCAP
$@
60 cmd_mkcapflags
= $(CONFIG_SHELL
) $(srctree
)/$(src
)/mkcapflags.sh
$@
$^
62 cpufeature
= $(src
)/..
/..
/include/asm
/cpufeatures.h
63 vmxfeature
= $(src
)/..
/..
/include/asm
/vmxfeatures.h
65 $(obj
)/capflags.c
: $(cpufeature
) $(vmxfeature
) $(src
)/mkcapflags.sh FORCE
66 $(call if_changed
,mkcapflags
)