blob: d7a1e5a9331ca82216a5a5c6f93504c3a347c385 [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
Fenghua Yubd688c62019-06-19 18:33:55 -070027obj-y += umwait.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070028
Josh Triplett39f838e2013-10-30 14:21:53 +000029obj-$(CONFIG_PROC_FS) += proc.o
Josh Triplett9def39be2013-10-30 08:09:45 -070030obj-$(CONFIG_X86_FEATURE_NAMES) += capflags.o powerflags.o
Josh Triplett39f838e2013-10-30 14:21:53 +000031
Rafael J. Wysockibe1fcde2019-05-27 12:56:07 +020032ifdef CONFIG_CPU_SUP_INTEL
33obj-y += intel.o intel_pconfig.o
34obj-$(CONFIG_PM) += intel_epb.o
35endif
Yinghai Luff731522008-09-07 17:58:56 -070036obj-$(CONFIG_CPU_SUP_AMD) += amd.o
Pu Wenc9661c12018-09-23 17:33:12 +080037obj-$(CONFIG_CPU_SUP_HYGON) += hygon.o
Thomas Petazzoni8d02c212008-08-05 11:45:19 +020038obj-$(CONFIG_CPU_SUP_CYRIX_32) += cyrix.o
Sebastian Andrzej Siewior48f4c482009-03-14 12:24:02 +010039obj-$(CONFIG_CPU_SUP_CENTAUR) += centaur.o
Thomas Petazzoni8d02c212008-08-05 11:45:19 +020040obj-$(CONFIG_CPU_SUP_TRANSMETA_32) += transmeta.o
Thomas Petazzoni8d02c212008-08-05 11:45:19 +020041obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o
Tony W Wang-oc761fdd52019-06-18 08:37:05 +000042obj-$(CONFIG_CPU_SUP_ZHAOXIN) += zhaoxin.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070043
Borislav Petkov21afaf12018-11-18 15:15:05 +010044obj-$(CONFIG_X86_MCE) += mce/
Ingo Molnar241771e2008-12-03 10:39:53 +010045obj-$(CONFIG_MTRR) += mtrr/
Borislav Petkovbad5fa62013-12-01 18:09:58 +010046obj-$(CONFIG_MICROCODE) += microcode/
Johannes Weinere6d42932019-01-29 17:44:36 -050047obj-$(CONFIG_X86_CPU_RESCTRL) += resctrl/
Ingo Molnar241771e2008-12-03 10:39:53 +010048
Borislav Petkov218cfe42016-02-08 17:09:06 +010049obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o
H. Peter Anvin7414aa42008-08-27 17:56:44 -070050
Borislav Petkov6276a072013-03-04 21:20:21 +010051obj-$(CONFIG_HYPERVISOR_GUEST) += vmware.o hypervisor.o mshyperv.o
Zhao Yakuiec7972c2019-04-30 11:45:24 +080052obj-$(CONFIG_ACRN_GUEST) += acrn.o
Borislav Petkov6276a072013-03-04 21:20:21 +010053
Josh Triplett9def39be2013-10-30 08:09:45 -070054ifdef CONFIG_X86_FEATURE_NAMES
H. Peter Anvin7414aa42008-08-27 17:56:44 -070055quiet_cmd_mkcapflags = MKCAP $@
Rob Landley0c0de192013-04-29 15:05:53 -070056 cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $< $@
H. Peter Anvin7414aa42008-08-27 17:56:44 -070057
Borislav Petkovcd4d09e2016-01-26 22:12:04 +010058cpufeature = $(src)/../../include/asm/cpufeatures.h
H. Peter Anvin7414aa42008-08-27 17:56:44 -070059
Rob Landley0c0de192013-04-29 15:05:53 -070060$(obj)/capflags.c: $(cpufeature) $(src)/mkcapflags.sh FORCE
H. Peter Anvin7414aa42008-08-27 17:56:44 -070061 $(call if_changed,mkcapflags)
Josh Triplett9def39be2013-10-30 08:09:45 -070062endif
Masahiro Yamada87b61862019-06-25 16:33:11 +090063targets += capflags.c