xref: /linux/arch/x86/kernel/cpu/Makefile (revision ca55b2fef3a9373fcfc30f82fd26bc7fccbda732)
1#
2# Makefile for x86-compatible CPU details, features and quirks
3#
4
5# Don't trace early stages of a secondary CPU boot
6ifdef CONFIG_FUNCTION_TRACER
7CFLAGS_REMOVE_common.o = -pg
8CFLAGS_REMOVE_perf_event.o = -pg
9endif
10
11# Make sure load_percpu_segment has no stackprotector
12nostackp := $(call cc-option, -fno-stack-protector)
13CFLAGS_common.o		:= $(nostackp)
14
15obj-y			:= intel_cacheinfo.o scattered.o topology.o
16obj-y			+= common.o
17obj-y			+= rdrand.o
18obj-y			+= match.o
19
20obj-$(CONFIG_PROC_FS)	+= proc.o
21obj-$(CONFIG_X86_FEATURE_NAMES) += capflags.o powerflags.o
22
23obj-$(CONFIG_X86_32)	+= bugs.o
24obj-$(CONFIG_X86_64)	+= bugs_64.o
25
26obj-$(CONFIG_CPU_SUP_INTEL)		+= intel.o
27obj-$(CONFIG_CPU_SUP_AMD)		+= amd.o
28obj-$(CONFIG_CPU_SUP_CYRIX_32)		+= cyrix.o
29obj-$(CONFIG_CPU_SUP_CENTAUR)		+= centaur.o
30obj-$(CONFIG_CPU_SUP_TRANSMETA_32)	+= transmeta.o
31obj-$(CONFIG_CPU_SUP_UMC_32)		+= umc.o
32
33obj-$(CONFIG_PERF_EVENTS)		+= perf_event.o
34
35ifdef CONFIG_PERF_EVENTS
36obj-$(CONFIG_CPU_SUP_AMD)		+= perf_event_amd.o perf_event_amd_uncore.o
37ifdef CONFIG_AMD_IOMMU
38obj-$(CONFIG_CPU_SUP_AMD)		+= perf_event_amd_iommu.o
39endif
40obj-$(CONFIG_CPU_SUP_INTEL)		+= perf_event_p6.o perf_event_knc.o perf_event_p4.o
41obj-$(CONFIG_CPU_SUP_INTEL)		+= perf_event_intel_lbr.o perf_event_intel_ds.o perf_event_intel.o
42obj-$(CONFIG_CPU_SUP_INTEL)		+= perf_event_intel_rapl.o perf_event_intel_cqm.o
43obj-$(CONFIG_CPU_SUP_INTEL)		+= perf_event_intel_pt.o perf_event_intel_bts.o
44
45obj-$(CONFIG_PERF_EVENTS_INTEL_UNCORE)	+= perf_event_intel_uncore.o \
46					   perf_event_intel_uncore_snb.o \
47					   perf_event_intel_uncore_snbep.o \
48					   perf_event_intel_uncore_nhmex.o
49obj-$(CONFIG_CPU_SUP_INTEL)		+= perf_event_msr.o
50obj-$(CONFIG_CPU_SUP_AMD)		+= perf_event_msr.o
51endif
52
53
54obj-$(CONFIG_X86_MCE)			+= mcheck/
55obj-$(CONFIG_MTRR)			+= mtrr/
56obj-$(CONFIG_MICROCODE)			+= microcode/
57
58obj-$(CONFIG_X86_LOCAL_APIC)		+= perfctr-watchdog.o perf_event_amd_ibs.o
59
60obj-$(CONFIG_HYPERVISOR_GUEST)		+= vmware.o hypervisor.o mshyperv.o
61
62ifdef CONFIG_X86_FEATURE_NAMES
63quiet_cmd_mkcapflags = MKCAP   $@
64      cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $< $@
65
66cpufeature = $(src)/../../include/asm/cpufeature.h
67
68targets += capflags.c
69$(obj)/capflags.c: $(cpufeature) $(src)/mkcapflags.sh FORCE
70	$(call if_changed,mkcapflags)
71endif
72clean-files += capflags.c
73