blob: 43afe707c6fb90d0ae7627760eed3da4eae11a4a [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
Linus Torvalds1da177e2005-04-16 15:20:36 -07002#
Ingo Molnar241771e2008-12-03 10:39:53 +01003# Makefile for x86-compatible CPU details, features and quirks
Linus Torvalds1da177e2005-04-16 15:20:36 -07004#
5
Frederic Weisbecker0ca59dd2008-12-24 23:30:02 +01006# Don't trace early stages of a secondary CPU boot
7ifdef CONFIG_FUNCTION_TRACER
8CFLAGS_REMOVE_common.o = -pg
Ingo Molnar6e3d8332009-11-23 10:19:20 +01009CFLAGS_REMOVE_perf_event.o = -pg
Frederic Weisbecker0ca59dd2008-12-24 23:30:02 +010010endif
11
Dmitry Vyukov5c9a8752016-03-22 14:27:30 -070012# If these files are instrumented, boot hangs during the first second.
13KCOV_INSTRUMENT_common.o := n
14KCOV_INSTRUMENT_perf_event.o := n
15
Jeremy Fitzhardinge5416c262009-08-17 12:25:41 -070016# Make sure load_percpu_segment has no stackprotector
17nostackp := $(call cc-option, -fno-stack-protector)
18CFLAGS_common.o := $(nostackp)
19
Borislav Petkov1d200c072018-04-27 16:34:36 -050020obj-y := cacheinfo.o scattered.o topology.o
Josh Triplett9def39be2013-10-30 08:09:45 -070021obj-y += common.o
H. Peter Anvin49d859d2011-07-31 14:02:19 -070022obj-y += rdrand.o
Andi Kleen644e9cb2012-01-26 00:09:05 +010023obj-y += match.o
Borislav Petkov62a67e12016-10-24 19:38:43 +020024obj-y += bugs.o
Rafael J. Wysocki7d5905d2017-11-15 02:13:40 +010025obj-y += aperfmperf.o
Andi Kleen0b00de82017-10-13 14:56:42 -070026obj-y += cpuid-deps.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070027
Josh Triplett39f838e2013-10-30 14:21:53 +000028obj-$(CONFIG_PROC_FS) += proc.o
Josh Triplett9def39be2013-10-30 08:09:45 -070029obj-$(CONFIG_X86_FEATURE_NAMES) += capflags.o powerflags.o
Josh Triplett39f838e2013-10-30 14:21:53 +000030
Kirill A. Shutemovbe7825c2018-03-05 19:25:52 +030031obj-$(CONFIG_CPU_SUP_INTEL) += intel.o intel_pconfig.o
Yinghai Luff731522008-09-07 17:58:56 -070032obj-$(CONFIG_CPU_SUP_AMD) += amd.o
Pu Wenc9661c12018-09-23 17:33:12 +080033obj-$(CONFIG_CPU_SUP_HYGON) += hygon.o
Thomas Petazzoni8d02c212008-08-05 11:45:19 +020034obj-$(CONFIG_CPU_SUP_CYRIX_32) += cyrix.o
Sebastian Andrzej Siewior48f4c482009-03-14 12:24:02 +010035obj-$(CONFIG_CPU_SUP_CENTAUR) += centaur.o
Thomas Petazzoni8d02c212008-08-05 11:45:19 +020036obj-$(CONFIG_CPU_SUP_TRANSMETA_32) += transmeta.o
Thomas Petazzoni8d02c212008-08-05 11:45:19 +020037obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070038
Reinette Chatre2a5d76a2018-06-22 15:42:13 -070039obj-$(CONFIG_INTEL_RDT) += intel_rdt.o intel_rdt_rdtgroup.o intel_rdt_monitor.o
40obj-$(CONFIG_INTEL_RDT) += intel_rdt_ctrlmondata.o intel_rdt_pseudo_lock.o
Reinette Chatre443810f2018-06-22 15:42:26 -070041CFLAGS_intel_rdt_pseudo_lock.o = -I$(src)
Fenghua Yu78e99b42016-10-22 06:19:53 -070042
Borislav Petkov21afaf12018-11-18 15:15:05 +010043obj-$(CONFIG_X86_MCE) += mce/
Ingo Molnar241771e2008-12-03 10:39:53 +010044obj-$(CONFIG_MTRR) += mtrr/
Borislav Petkovbad5fa62013-12-01 18:09:58 +010045obj-$(CONFIG_MICROCODE) += microcode/
Ingo Molnar241771e2008-12-03 10:39:53 +010046
Borislav Petkov218cfe42016-02-08 17:09:06 +010047obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o
H. Peter Anvin7414aa42008-08-27 17:56:44 -070048
Borislav Petkov6276a072013-03-04 21:20:21 +010049obj-$(CONFIG_HYPERVISOR_GUEST) += vmware.o hypervisor.o mshyperv.o
50
Josh Triplett9def39be2013-10-30 08:09:45 -070051ifdef CONFIG_X86_FEATURE_NAMES
H. Peter Anvin7414aa42008-08-27 17:56:44 -070052quiet_cmd_mkcapflags = MKCAP $@
Rob Landley0c0de192013-04-29 15:05:53 -070053 cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $< $@
H. Peter Anvin7414aa42008-08-27 17:56:44 -070054
Borislav Petkovcd4d09e2016-01-26 22:12:04 +010055cpufeature = $(src)/../../include/asm/cpufeatures.h
H. Peter Anvin7414aa42008-08-27 17:56:44 -070056
57targets += capflags.c
Rob Landley0c0de192013-04-29 15:05:53 -070058$(obj)/capflags.c: $(cpufeature) $(src)/mkcapflags.sh FORCE
H. Peter Anvin7414aa42008-08-27 17:56:44 -070059 $(call if_changed,mkcapflags)
Josh Triplett9def39be2013-10-30 08:09:45 -070060endif
Bjørn Mork280dbc52014-12-23 12:57:43 +010061clean-files += capflags.c