xref: /linux/arch/x86/kernel/cpu/Makefile (revision d91517839e5d95adc0cf4b28caa7af62a71de526)
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			+= proc.o capflags.o powerflags.o common.o
17obj-y			+= rdrand.o
18obj-y			+= match.o
19
20obj-$(CONFIG_X86_32)	+= bugs.o
21obj-$(CONFIG_X86_64)	+= bugs_64.o
22
23obj-$(CONFIG_CPU_SUP_INTEL)		+= intel.o
24obj-$(CONFIG_CPU_SUP_AMD)		+= amd.o
25obj-$(CONFIG_CPU_SUP_CYRIX_32)		+= cyrix.o
26obj-$(CONFIG_CPU_SUP_CENTAUR)		+= centaur.o
27obj-$(CONFIG_CPU_SUP_TRANSMETA_32)	+= transmeta.o
28obj-$(CONFIG_CPU_SUP_UMC_32)		+= umc.o
29
30obj-$(CONFIG_PERF_EVENTS)		+= perf_event.o
31
32ifdef CONFIG_PERF_EVENTS
33obj-$(CONFIG_CPU_SUP_AMD)		+= perf_event_amd.o perf_event_amd_uncore.o
34ifdef CONFIG_AMD_IOMMU
35obj-$(CONFIG_CPU_SUP_AMD)		+= perf_event_amd_iommu.o
36endif
37obj-$(CONFIG_CPU_SUP_INTEL)		+= perf_event_p6.o perf_event_knc.o perf_event_p4.o
38obj-$(CONFIG_CPU_SUP_INTEL)		+= perf_event_intel_lbr.o perf_event_intel_ds.o perf_event_intel.o
39obj-$(CONFIG_CPU_SUP_INTEL)		+= perf_event_intel_uncore.o perf_event_intel_rapl.o
40endif
41
42
43obj-$(CONFIG_X86_MCE)			+= mcheck/
44obj-$(CONFIG_MTRR)			+= mtrr/
45obj-$(CONFIG_MICROCODE)			+= microcode/
46
47obj-$(CONFIG_X86_LOCAL_APIC)		+= perfctr-watchdog.o perf_event_amd_ibs.o
48
49obj-$(CONFIG_HYPERVISOR_GUEST)		+= vmware.o hypervisor.o mshyperv.o
50
51quiet_cmd_mkcapflags = MKCAP   $@
52      cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $< $@
53
54cpufeature = $(src)/../../include/asm/cpufeature.h
55
56targets += capflags.c
57$(obj)/capflags.c: $(cpufeature) $(src)/mkcapflags.sh FORCE
58	$(call if_changed,mkcapflags)
59