xref: /openbmc/linux/arch/x86/kernel/Makefile (revision 5c9a8750)
16b0c3d44SSam Ravnborg#
26b0c3d44SSam Ravnborg# Makefile for the linux kernel.
36b0c3d44SSam Ravnborg#
488e4d250SSam Ravnborg
545046892SThomas Gleixnerextra-y                := head_$(BITS).o head$(BITS).o head.o vmlinux.lds
66b0c3d44SSam Ravnborg
76b0c3d44SSam RavnborgCPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE)
8e43eb7baSIngo Molnar
9606576ceSSteven Rostedtifdef CONFIG_FUNCTION_TRACER
1034646bcaSIngo Molnar# Do not profile debug and lowlevel utilities
1189e1be50SSteven RostedtCFLAGS_REMOVE_tsc.o = -pg
12d5de8841SJeremy FitzhardingeCFLAGS_REMOVE_paravirt-spinlocks.o = -pg
139ecd4e16SJeremy FitzhardingeCFLAGS_REMOVE_pvclock.o = -pg
14258af474SSteven RostedtCFLAGS_REMOVE_kvmclock.o = -pg
1515adc048SSteven RostedtCFLAGS_REMOVE_ftrace.o = -pg
166cf87efbSIngo MolnarCFLAGS_REMOVE_early_printk.o = -pg
177fa09f24SSteven Rostedtendif
187fa09f24SSteven Rostedt
19ef7f0d6aSAndrey RyabininKASAN_SANITIZE_head$(BITS).o				:= n
20c420f167SAndrey RyabininKASAN_SANITIZE_dumpstack.o				:= n
21c420f167SAndrey RyabininKASAN_SANITIZE_dumpstack_$(BITS).o			:= n
22c0dd6716SJosh Poimboeuf
23c0dd6716SJosh PoimboeufOBJECT_FILES_NON_STANDARD_head_$(BITS).o		:= y
24c0dd6716SJosh PoimboeufOBJECT_FILES_NON_STANDARD_relocate_kernel_$(BITS).o	:= y
25c0dd6716SJosh PoimboeufOBJECT_FILES_NON_STANDARD_mcount_$(BITS).o		:= y
26c0dd6716SJosh PoimboeufOBJECT_FILES_NON_STANDARD_test_nx.o			:= y
27ef7f0d6aSAndrey Ryabinin
285c9a8750SDmitry Vyukov# If instrumentation of this dir is enabled, boot hangs during first second.
295c9a8750SDmitry Vyukov# Probably could be more selective here, but note that files related to irqs,
305c9a8750SDmitry Vyukov# boot, dumpstack/stacktrace, etc are either non-interesting or can lead to
315c9a8750SDmitry Vyukov# non-deterministic coverage.
325c9a8750SDmitry VyukovKCOV_INSTRUMENT		:= n
335c9a8750SDmitry Vyukov
3483ab8514SSteven Rostedt (Red Hat)CFLAGS_irq.o := -I$(src)/../include/asm/trace
3583ab8514SSteven Rostedt (Red Hat)
36905a36a2SIngo Molnarobj-y			:= process_$(BITS).o signal.o
37c0bfd26eSBrian Gerstobj-$(CONFIG_COMPAT)	+= signal_compat.o
386b39ba77SThomas Gleixnerobj-y			+= traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o
39a5b9e5a2SAndy Lutomirskiobj-y			+= time.o ioport.o dumpstack.o nmi.o
40a5b9e5a2SAndy Lutomirskiobj-$(CONFIG_MODIFY_LDT_SYSCALL)	+= ldt.o
41d9f5ab7bSJason Baronobj-y			+= setup.o x86_init.o i8259.o irqinit.o jump_label.o
42e360adbeSPeter Zijlstraobj-$(CONFIG_IRQ_WORK)  += irq_work.o
435d94e81fSDan Williamsobj-y			+= probe_roms.o
446783eaa2SAl Viroobj-$(CONFIG_X86_32)	+= i386_ksyms_32.o
456b0c3d44SSam Ravnborgobj-$(CONFIG_X86_64)	+= sys_x86_64.o x8664_ksyms_64.o
46e18eead3SSteven Rostedtobj-$(CONFIG_X86_64)	+= mcount_64.o
47197725deSH. Peter Anvinobj-$(CONFIG_X86_ESPFIX64)	+= espfix_64.o
485039e316SDave Youngobj-$(CONFIG_SYSFS)	+= ksysfs.o
49064d25f1SYinghai Luobj-y			+= bootflag.o e820.o
504061d68eSDavid Rientjesobj-y			+= pci-dma.o quirks.o topology.o kdebugfs.o
510067f129SK.Prasadobj-y			+= alternative.o i8253.o pci-nommu.o hw_breakpoint.o
527da7c156SBin Gaoobj-y			+= tsc.o tsc_msr.o io_delay.o rtc.o
535bef80a4SKonrad Rzeszutek Wilkobj-y			+= pci-iommu_table.o
5430919b0bSBjorn Helgaasobj-y			+= resource.o
556b0c3d44SSam Ravnborg
5661c4628bSSuresh Siddhaobj-y				+= process.o
57ce4c4c26SIngo Molnarobj-y				+= fpu/
586b0c3d44SSam Ravnborgobj-y				+= ptrace.o
596b0c3d44SSam Ravnborgobj-$(CONFIG_X86_32)		+= tls.o
606b0c3d44SSam Ravnborgobj-$(CONFIG_IA32_EMULATION)	+= tls.o
616b0c3d44SSam Ravnborgobj-y				+= step.o
6231625340SJoseph Cihulaobj-$(CONFIG_INTEL_TXT)		+= tboot.o
634061d68eSDavid Rientjesobj-$(CONFIG_ISA_DMA_API)	+= i8237.o
646b0c3d44SSam Ravnborgobj-$(CONFIG_STACKTRACE)	+= stacktrace.o
656b0c3d44SSam Ravnborgobj-y				+= cpu/
666b0c3d44SSam Ravnborgobj-y				+= acpi/
67f095df0aSIngo Molnarobj-y				+= reboot.o
686b0c3d44SSam Ravnborgobj-$(CONFIG_X86_MSR)		+= msr.o
696b0c3d44SSam Ravnborgobj-$(CONFIG_X86_CPUID)		+= cpuid.o
706b0c3d44SSam Ravnborgobj-$(CONFIG_PCI)		+= early-quirks.o
713a900d89SSam Ravnborgapm-y				:= apm_32.o
723a900d89SSam Ravnborgobj-$(CONFIG_APM)		+= apm.o
733e5095d1SIngo Molnarobj-$(CONFIG_SMP)		+= smp.o
74ec8df88fSHenrik Kretzschmarobj-$(CONFIG_SMP)		+= smpboot.o
75ec8df88fSHenrik Kretzschmarobj-$(CONFIG_SMP)		+= tsc_sync.o
76996db817SBrian Gerstobj-$(CONFIG_SMP)		+= setup_percpu.o
7785bdddecSAlexey Starikovskiyobj-$(CONFIG_X86_MPPARSE)	+= mpparse.o
789be1b56aSIngo Molnarobj-y				+= apic/
796b0c3d44SSam Ravnborgobj-$(CONFIG_X86_REBOOTFIXUPS)	+= reboot_fixups_32.o
803d083395SSteven Rostedtobj-$(CONFIG_DYNAMIC_FTRACE)	+= ftrace.o
8112cf89b5SJosh Poimboeufobj-$(CONFIG_LIVEPATCH)		+= livepatch.o
82fb52607aSFrederic Weisbeckerobj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o
83ccd50dfdSIngo Molnarobj-$(CONFIG_FTRACE_SYSCALLS)	+= ftrace.o
848cbd9cc6SDavid Sharpobj-$(CONFIG_X86_TSC)		+= trace_clock.o
852965faa5SDave Youngobj-$(CONFIG_KEXEC_CORE)	+= machine_kexec_$(BITS).o
862965faa5SDave Youngobj-$(CONFIG_KEXEC_CORE)	+= relocate_kernel_$(BITS).o crash.o
8774ca317cSVivek Goyalobj-$(CONFIG_KEXEC_FILE)	+= kexec-bzimage64.o
886b0c3d44SSam Ravnborgobj-$(CONFIG_CRASH_DUMP)	+= crash_dump_$(BITS).o
89f684199fSMasami Hiramatsuobj-y				+= kprobes/
900fdc83b9SAmerigo Wangobj-$(CONFIG_MODULES)		+= module.o
914d067d8eSBorislav Petkovobj-$(CONFIG_DOUBLEFAULT)	+= doublefault.o
9282da3ff8SIngo Molnarobj-$(CONFIG_KGDB)		+= kgdb.o
936b0c3d44SSam Ravnborgobj-$(CONFIG_VM86)		+= vm86_32.o
946b0c3d44SSam Ravnborgobj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
956b0c3d44SSam Ravnborg
966b0c3d44SSam Ravnborgobj-$(CONFIG_HPET_TIMER) 	+= hpet.o
97bb24c471SJacob Panobj-$(CONFIG_APB_TIMER)		+= apb_timer.o
986b0c3d44SSam Ravnborg
9923ac4ae8SAndreas Herrmannobj-$(CONFIG_AMD_NB)		+= amd_nb.o
100aba8391fSIngo Molnarobj-$(CONFIG_DEBUG_RODATA_TEST)	+= test_rodata.o
101aba8391fSIngo Molnarobj-$(CONFIG_DEBUG_NX_TEST)	+= test_nx.o
10299e8b9caSDon Zickusobj-$(CONFIG_DEBUG_NMI_SELFTEST) += nmi_selftest.o
1036b0c3d44SSam Ravnborg
10490993cddSMarcelo Tosattiobj-$(CONFIG_KVM_GUEST)		+= kvm.o kvmclock.o
105b4ecc126SJeremy Fitzhardingeobj-$(CONFIG_PARAVIRT)		+= paravirt.o paravirt_patch_$(BITS).o
106b4ecc126SJeremy Fitzhardingeobj-$(CONFIG_PARAVIRT_SPINLOCKS)+= paravirt-spinlocks.o
1077af192c9SGerd Hoffmannobj-$(CONFIG_PARAVIRT_CLOCK)	+= pvclock.o
1087a67832cSDan Williamsobj-$(CONFIG_X86_PMEM_LEGACY_DEVICE) += pmem.o
10967926892SMichael Opdenacker
110e5e1d3cbSStas Sergeevobj-$(CONFIG_PCSPKR_PLATFORM)	+= pcspeaker.o
1116b0c3d44SSam Ravnborg
112b43d196cSArjan van de Venobj-$(CONFIG_X86_CHECK_BIOS_CORRUPTION) += check.o
113b43d196cSArjan van de Ven
114b041cf22SIan Campbellobj-$(CONFIG_SWIOTLB)			+= pci-swiotlb.o
115da6b737bSSebastian Andrzej Siewiorobj-$(CONFIG_OF)			+= devicetree.o
1162b144498SSrikar Dronamrajuobj-$(CONFIG_UPROBES)			+= uprobes.o
117e3263ab3SDavid Herrmannobj-y					+= sysfb.o
118e3263ab3SDavid Herrmannobj-$(CONFIG_X86_SYSFB)			+= sysfb_simplefb.o
1192995e506SDavid Herrmannobj-$(CONFIG_EFI)			+= sysfb_efi.o
120cfb80c9eSJeremy Fitzhardinge
121c5e63197SJiri Olsaobj-$(CONFIG_PERF_EVENTS)		+= perf_regs.o
122cf910e83SSeiji Aguchiobj-$(CONFIG_TRACING)			+= tracepoint.o
123c5e63197SJiri Olsa
1246b0c3d44SSam Ravnborg###
1256b0c3d44SSam Ravnborg# 64 bit specific files
1266b0c3d44SSam Ravnborgifeq ($(CONFIG_X86_64),y)
1276b0c3d44SSam Ravnborg	obj-$(CONFIG_AUDIT)		+= audit_64.o
1286b0c3d44SSam Ravnborg
129fffcda11SJoerg Roedel	obj-$(CONFIG_GART_IOMMU)	+= amd_gart_64.o aperture_64.o
1306b0c3d44SSam Ravnborg	obj-$(CONFIG_CALGARY_IOMMU)	+= pci-calgary_64.o tce_64.o
131d39398a3SYinghai Lu
132d39398a3SYinghai Lu	obj-$(CONFIG_PCI_MMCONFIG)	+= mmconf-fam10h_64.o
13370511134SRavikiran G Thirumalai	obj-y				+= vsmp_64.o
1346b0c3d44SSam Ravnborgendif
135