Linux 5.7-rc7
[sfrench/cifs-2.6.git] / arch / x86 / kernel / cpu / Makefile
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
7 ifdef CONFIG_FUNCTION_TRACER
8 CFLAGS_REMOVE_common.o = -pg
9 CFLAGS_REMOVE_perf_event.o = -pg
10 endif
11
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
16 # Make sure load_percpu_segment has no stackprotector
17 nostackp := $(call cc-option, -fno-stack-protector)
18 CFLAGS_common.o         := $(nostackp)
19
20 obj-y                   := cacheinfo.o scattered.o topology.o
21 obj-y                   += common.o
22 obj-y                   += rdrand.o
23 obj-y                   += match.o
24 obj-y                   += bugs.o
25 obj-y                   += aperfmperf.o
26 obj-y                   += cpuid-deps.o
27 obj-y                   += umwait.o
28
29 obj-$(CONFIG_PROC_FS)   += proc.o
30 obj-$(CONFIG_X86_FEATURE_NAMES) += capflags.o powerflags.o
31
32 obj-$(CONFIG_IA32_FEAT_CTL) += feat_ctl.o
33 ifdef CONFIG_CPU_SUP_INTEL
34 obj-y                   += intel.o intel_pconfig.o tsx.o
35 obj-$(CONFIG_PM)        += intel_epb.o
36 endif
37 obj-$(CONFIG_CPU_SUP_AMD)               += amd.o
38 obj-$(CONFIG_CPU_SUP_HYGON)             += hygon.o
39 obj-$(CONFIG_CPU_SUP_CYRIX_32)          += cyrix.o
40 obj-$(CONFIG_CPU_SUP_CENTAUR)           += centaur.o
41 obj-$(CONFIG_CPU_SUP_TRANSMETA_32)      += transmeta.o
42 obj-$(CONFIG_CPU_SUP_UMC_32)            += umc.o
43 obj-$(CONFIG_CPU_SUP_ZHAOXIN)           += zhaoxin.o
44
45 obj-$(CONFIG_X86_MCE)                   += mce/
46 obj-$(CONFIG_MTRR)                      += mtrr/
47 obj-$(CONFIG_MICROCODE)                 += microcode/
48 obj-$(CONFIG_X86_CPU_RESCTRL)           += resctrl/
49
50 obj-$(CONFIG_X86_LOCAL_APIC)            += perfctr-watchdog.o
51
52 obj-$(CONFIG_HYPERVISOR_GUEST)          += vmware.o hypervisor.o mshyperv.o
53 obj-$(CONFIG_ACRN_GUEST)                += acrn.o
54
55 ifdef CONFIG_X86_FEATURE_NAMES
56 quiet_cmd_mkcapflags = MKCAP   $@
57       cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $@ $^
58
59 cpufeature = $(src)/../../include/asm/cpufeatures.h
60 vmxfeature = $(src)/../../include/asm/vmxfeatures.h
61
62 $(obj)/capflags.c: $(cpufeature) $(vmxfeature) $(src)/mkcapflags.sh FORCE
63         $(call if_changed,mkcapflags)
64 endif
65 targets += capflags.c