blob: 890f60083eca7f1486524ffbe0c619531c0f9ad6 [file] [log] [blame]
Andrew Scullb4b6d4a2019-01-02 15:54:55 +00001# SPDX-License-Identifier: GPL-2.0
2#
3# Makefile for x86-compatible CPU details, features and quirks
4#
5
6# Don't trace early stages of a secondary CPU boot
7ifdef CONFIG_FUNCTION_TRACER
8CFLAGS_REMOVE_common.o = -pg
9CFLAGS_REMOVE_perf_event.o = -pg
10endif
11
12# If these files are instrumented, boot hangs during the first second.
13KCOV_INSTRUMENT_common.o := n
14KCOV_INSTRUMENT_perf_event.o := n
15
16# Make sure load_percpu_segment has no stackprotector
17nostackp := $(call cc-option, -fno-stack-protector)
18CFLAGS_common.o := $(nostackp)
19
20obj-y := cacheinfo.o scattered.o topology.o
21obj-y += common.o
22obj-y += rdrand.o
23obj-y += match.o
24obj-y += bugs.o
25obj-y += aperfmperf.o
26obj-y += cpuid-deps.o
David Brazdil0f672f62019-12-10 10:32:29 +000027obj-y += umwait.o
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000028
29obj-$(CONFIG_PROC_FS) += proc.o
30obj-$(CONFIG_X86_FEATURE_NAMES) += capflags.o powerflags.o
31
David Brazdil0f672f62019-12-10 10:32:29 +000032ifdef CONFIG_CPU_SUP_INTEL
33obj-y += intel.o intel_pconfig.o tsx.o
34obj-$(CONFIG_PM) += intel_epb.o
35endif
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000036obj-$(CONFIG_CPU_SUP_AMD) += amd.o
David Brazdil0f672f62019-12-10 10:32:29 +000037obj-$(CONFIG_CPU_SUP_HYGON) += hygon.o
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000038obj-$(CONFIG_CPU_SUP_CYRIX_32) += cyrix.o
39obj-$(CONFIG_CPU_SUP_CENTAUR) += centaur.o
40obj-$(CONFIG_CPU_SUP_TRANSMETA_32) += transmeta.o
41obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o
David Brazdil0f672f62019-12-10 10:32:29 +000042obj-$(CONFIG_CPU_SUP_ZHAOXIN) += zhaoxin.o
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000043
David Brazdil0f672f62019-12-10 10:32:29 +000044obj-$(CONFIG_X86_MCE) += mce/
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000045obj-$(CONFIG_MTRR) += mtrr/
46obj-$(CONFIG_MICROCODE) += microcode/
David Brazdil0f672f62019-12-10 10:32:29 +000047obj-$(CONFIG_X86_CPU_RESCTRL) += resctrl/
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000048
49obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o
50
51obj-$(CONFIG_HYPERVISOR_GUEST) += vmware.o hypervisor.o mshyperv.o
David Brazdil0f672f62019-12-10 10:32:29 +000052obj-$(CONFIG_ACRN_GUEST) += acrn.o
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000053
54ifdef CONFIG_X86_FEATURE_NAMES
55quiet_cmd_mkcapflags = MKCAP $@
56 cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $< $@
57
58cpufeature = $(src)/../../include/asm/cpufeatures.h
59
Andrew Scullb4b6d4a2019-01-02 15:54:55 +000060$(obj)/capflags.c: $(cpufeature) $(src)/mkcapflags.sh FORCE
61 $(call if_changed,mkcapflags)
62endif
David Brazdil0f672f62019-12-10 10:32:29 +000063targets += capflags.c