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 |
| 27 | |
| 28 | obj-$(CONFIG_PROC_FS) += proc.o |
| 29 | obj-$(CONFIG_X86_FEATURE_NAMES) += capflags.o powerflags.o |
| 30 | |
| 31 | obj-$(CONFIG_CPU_SUP_INTEL) += intel.o intel_pconfig.o |
| 32 | obj-$(CONFIG_CPU_SUP_AMD) += amd.o |
| 33 | obj-$(CONFIG_CPU_SUP_CYRIX_32) += cyrix.o |
| 34 | obj-$(CONFIG_CPU_SUP_CENTAUR) += centaur.o |
| 35 | obj-$(CONFIG_CPU_SUP_TRANSMETA_32) += transmeta.o |
| 36 | obj-$(CONFIG_CPU_SUP_UMC_32) += umc.o |
| 37 | |
| 38 | obj-$(CONFIG_INTEL_RDT) += intel_rdt.o intel_rdt_rdtgroup.o intel_rdt_monitor.o |
| 39 | obj-$(CONFIG_INTEL_RDT) += intel_rdt_ctrlmondata.o intel_rdt_pseudo_lock.o |
| 40 | CFLAGS_intel_rdt_pseudo_lock.o = -I$(src) |
| 41 | |
| 42 | obj-$(CONFIG_X86_MCE) += mcheck/ |
| 43 | obj-$(CONFIG_MTRR) += mtrr/ |
| 44 | obj-$(CONFIG_MICROCODE) += microcode/ |
| 45 | |
| 46 | obj-$(CONFIG_X86_LOCAL_APIC) += perfctr-watchdog.o |
| 47 | |
| 48 | obj-$(CONFIG_HYPERVISOR_GUEST) += vmware.o hypervisor.o mshyperv.o |
| 49 | |
| 50 | ifdef CONFIG_X86_FEATURE_NAMES |
| 51 | quiet_cmd_mkcapflags = MKCAP $@ |
| 52 | cmd_mkcapflags = $(CONFIG_SHELL) $(srctree)/$(src)/mkcapflags.sh $< $@ |
| 53 | |
| 54 | cpufeature = $(src)/../../include/asm/cpufeatures.h |
| 55 | |
| 56 | targets += capflags.c |
| 57 | $(obj)/capflags.c: $(cpufeature) $(src)/mkcapflags.sh FORCE |
| 58 | $(call if_changed,mkcapflags) |
| 59 | endif |
| 60 | clean-files += capflags.c |