blob: 1796d2bdcaaa2f1f23bf420b92e8be54bcd9bee1 [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
Rafael J. Wysocki58613812019-03-21 23:18:01 +010031obj-$(CONFIG_CPU_SUP_INTEL) += intel.o intel_pconfig.o intel_epb.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
Borislav Petkov21afaf12018-11-18 15:15:05 +010039obj-$(CONFIG_X86_MCE) += mce/
Ingo Molnar241771e2008-12-03 10:39:53 +010040obj-$(CONFIG_MTRR) += mtrr/
Borislav Petkovbad5fa62013-12-01 18:09:58 +010041obj-$(CONFIG_MICROCODE) += microcode/
Johannes Weinere6d42932019-01-29 17:44:36 -050042obj-$(CONFIG_X86_CPU_RESCTRL) += resctrl/
Ingo Molnar241771e2008-12-03 10:39:53 +010043
Borislav Petkov218cfe42016-02-08 17:09:06 +010044obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o
H. Peter Anvin7414aa42008-08-27 17:56:44 -070045
Borislav Petkov6276a072013-03-04 21:20:21 +010046obj-$(CONFIG_HYPERVISOR_GUEST) += vmware.o hypervisor.o mshyperv.o
47
Josh Triplett9def39be2013-10-30 08:09:45 -070048ifdef CONFIG_X86_FEATURE_NAMES
H. Peter Anvin7414aa42008-08-27 17:56:44 -070049quiet_cmd_mkcapflags = MKCAP $@
Rob Landley0c0de192013-04-29 15:05:53 -070050 cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $< $@
H. Peter Anvin7414aa42008-08-27 17:56:44 -070051
Borislav Petkovcd4d09e2016-01-26 22:12:04 +010052cpufeature = $(src)/../../include/asm/cpufeatures.h
H. Peter Anvin7414aa42008-08-27 17:56:44 -070053
54targets += capflags.c
Rob Landley0c0de192013-04-29 15:05:53 -070055$(obj)/capflags.c: $(cpufeature) $(src)/mkcapflags.sh FORCE
H. Peter Anvin7414aa42008-08-27 17:56:44 -070056 $(call if_changed,mkcapflags)
Josh Triplett9def39be2013-10-30 08:09:45 -070057endif
Bjørn Mork280dbc52014-12-23 12:57:43 +010058clean-files += capflags.c