Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 1 | # 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 |
| 7 | ifdef CONFIG_FUNCTION_TRACER |
| 8 | CFLAGS_REMOVE_common.o = -pg |
| 9 | CFLAGS_REMOVE_perf_event.o = -pg |
| 10 | endif |
| 11 | |
| 12 | # If these files are instrumented, boot hangs during the first second. |
| 13 | KCOV_INSTRUMENT_common.o := n |
| 14 | KCOV_INSTRUMENT_perf_event.o := n |
| 15 | |
| 16 | # Make sure load_percpu_segment has no stackprotector |
| 17 | nostackp := $(call cc-option, -fno-stack-protector) |
| 18 | CFLAGS_common.o := $(nostackp) |
| 19 | |
| 20 | obj-y := cacheinfo.o scattered.o topology.o |
| 21 | obj-y += common.o |
| 22 | obj-y += rdrand.o |
| 23 | obj-y += match.o |
| 24 | obj-y += bugs.o |
| 25 | obj-y += aperfmperf.o |
| 26 | obj-y += cpuid-deps.o |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 27 | obj-y += umwait.o |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 28 | |
| 29 | obj-$(CONFIG_PROC_FS) += proc.o |
| 30 | obj-$(CONFIG_X86_FEATURE_NAMES) += capflags.o powerflags.o |
| 31 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 32 | ifdef CONFIG_CPU_SUP_INTEL |
| 33 | obj-y += intel.o intel_pconfig.o tsx.o |
| 34 | obj-$(CONFIG_PM) += intel_epb.o |
| 35 | endif |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 36 | obj-$(CONFIG_CPU_SUP_AMD) += amd.o |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 37 | obj-$(CONFIG_CPU_SUP_HYGON) += hygon.o |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 38 | obj-$(CONFIG_CPU_SUP_CYRIX_32) += cyrix.o |
| 39 | obj-$(CONFIG_CPU_SUP_CENTAUR) += centaur.o |
| 40 | obj-$(CONFIG_CPU_SUP_TRANSMETA_32) += transmeta.o |
| 41 | obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 42 | obj-$(CONFIG_CPU_SUP_ZHAOXIN) += zhaoxin.o |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 43 | |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 44 | obj-$(CONFIG_X86_MCE) += mce/ |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 45 | obj-$(CONFIG_MTRR) += mtrr/ |
| 46 | obj-$(CONFIG_MICROCODE) += microcode/ |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 47 | obj-$(CONFIG_X86_CPU_RESCTRL) += resctrl/ |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 48 | |
| 49 | obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o |
| 50 | |
| 51 | obj-$(CONFIG_HYPERVISOR_GUEST) += vmware.o hypervisor.o mshyperv.o |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 52 | obj-$(CONFIG_ACRN_GUEST) += acrn.o |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 53 | |
| 54 | ifdef CONFIG_X86_FEATURE_NAMES |
| 55 | quiet_cmd_mkcapflags = MKCAP $@ |
| 56 | cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $< $@ |
| 57 | |
| 58 | cpufeature = $(src)/../../include/asm/cpufeatures.h |
| 59 | |
Andrew Scull | b4b6d4a | 2019-01-02 15:54:55 +0000 | [diff] [blame] | 60 | $(obj)/capflags.c: $(cpufeature) $(src)/mkcapflags.sh FORCE |
| 61 | $(call if_changed,mkcapflags) |
| 62 | endif |
David Brazdil | 0f672f6 | 2019-12-10 10:32:29 +0000 | [diff] [blame^] | 63 | targets += capflags.c |