1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 26b0c3d44SSam Ravnborg# 36b0c3d44SSam Ravnborg# Makefile for the linux kernel. 46b0c3d44SSam Ravnborg# 588e4d250SSam Ravnborg 68d152e7aSLuis R. Rodriguezextra-y := head_$(BITS).o 78d152e7aSLuis R. Rodriguezextra-y += head$(BITS).o 8f2d85299SLuis R. Rodriguezextra-y += ebda.o 98d152e7aSLuis R. Rodriguezextra-y += platform-quirks.o 108d152e7aSLuis R. Rodriguezextra-y += vmlinux.lds 116b0c3d44SSam Ravnborg 126b0c3d44SSam RavnborgCPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE) 13e43eb7baSIngo Molnar 14606576ceSSteven Rostedtifdef CONFIG_FUNCTION_TRACER 1534646bcaSIngo Molnar# Do not profile debug and lowlevel utilities 1689e1be50SSteven RostedtCFLAGS_REMOVE_tsc.o = -pg 17d5de8841SJeremy FitzhardingeCFLAGS_REMOVE_paravirt-spinlocks.o = -pg 189ecd4e16SJeremy FitzhardingeCFLAGS_REMOVE_pvclock.o = -pg 19258af474SSteven RostedtCFLAGS_REMOVE_kvmclock.o = -pg 2015adc048SSteven RostedtCFLAGS_REMOVE_ftrace.o = -pg 216cf87efbSIngo MolnarCFLAGS_REMOVE_early_printk.o = -pg 22bb43dbc5SKirill A. ShutemovCFLAGS_REMOVE_head64.o = -pg 237fa09f24SSteven Rostedtendif 247fa09f24SSteven Rostedt 25ef7f0d6aSAndrey RyabininKASAN_SANITIZE_head$(BITS).o := n 26c420f167SAndrey RyabininKASAN_SANITIZE_dumpstack.o := n 27c420f167SAndrey RyabininKASAN_SANITIZE_dumpstack_$(BITS).o := n 28cd11016eSAlexander PotapenkoKASAN_SANITIZE_stacktrace.o := n 2912a8cc7fSAndrey RyabininKASAN_SANITIZE_paravirt.o := n 30c0dd6716SJosh Poimboeuf 31c0dd6716SJosh PoimboeufOBJECT_FILES_NON_STANDARD_relocate_kernel_$(BITS).o := y 32c0dd6716SJosh PoimboeufOBJECT_FILES_NON_STANDARD_test_nx.o := y 33c207aee4SJosh PoimboeufOBJECT_FILES_NON_STANDARD_paravirt_patch_$(BITS).o := y 34ef7f0d6aSAndrey Ryabinin 35e2ac83d7SJosh Poimboeufifdef CONFIG_FRAME_POINTER 36e2ac83d7SJosh PoimboeufOBJECT_FILES_NON_STANDARD_ftrace_$(BITS).o := y 37e2ac83d7SJosh Poimboeufendif 38e2ac83d7SJosh Poimboeuf 395c9a8750SDmitry Vyukov# If instrumentation of this dir is enabled, boot hangs during first second. 405c9a8750SDmitry Vyukov# Probably could be more selective here, but note that files related to irqs, 415c9a8750SDmitry Vyukov# boot, dumpstack/stacktrace, etc are either non-interesting or can lead to 425c9a8750SDmitry Vyukov# non-deterministic coverage. 435c9a8750SDmitry VyukovKCOV_INSTRUMENT := n 445c9a8750SDmitry Vyukov 4583ab8514SSteven Rostedt (Red Hat)CFLAGS_irq.o := -I$(src)/../include/asm/trace 4683ab8514SSteven Rostedt (Red Hat) 47905a36a2SIngo Molnarobj-y := process_$(BITS).o signal.o 48c0bfd26eSBrian Gerstobj-$(CONFIG_COMPAT) += signal_compat.o 49d8ed9d48SThomas Gleixnerobj-y += traps.o idt.o irq.o irq_$(BITS).o dumpstack_$(BITS).o 50a5b9e5a2SAndy Lutomirskiobj-y += time.o ioport.o dumpstack.o nmi.o 51a5b9e5a2SAndy Lutomirskiobj-$(CONFIG_MODIFY_LDT_SYSCALL) += ldt.o 52e9666d10SMasahiro Yamadaobj-y += setup.o x86_init.o i8259.o irqinit.o 53e9666d10SMasahiro Yamadaobj-$(CONFIG_JUMP_LABEL) += jump_label.o 54e360adbeSPeter Zijlstraobj-$(CONFIG_IRQ_WORK) += irq_work.o 555d94e81fSDan Williamsobj-y += probe_roms.o 561fa9d67aSSteven Rostedt (VMware)obj-$(CONFIG_X86_64) += sys_x86_64.o 57197725deSH. Peter Anvinobj-$(CONFIG_X86_ESPFIX64) += espfix_64.o 585039e316SDave Youngobj-$(CONFIG_SYSFS) += ksysfs.o 59064d25f1SYinghai Luobj-y += bootflag.o e820.o 604061d68eSDavid Rientjesobj-y += pci-dma.o quirks.o topology.o kdebugfs.o 61fec777c3SChristoph Hellwigobj-y += alternative.o i8253.o hw_breakpoint.o 627da7c156SBin Gaoobj-y += tsc.o tsc_msr.o io_delay.o rtc.o 635bef80a4SKonrad Rzeszutek Wilkobj-y += pci-iommu_table.o 6430919b0bSBjorn Helgaasobj-y += resource.o 65d0a8d937SNick Desaulniersobj-y += irqflags.o 666b0c3d44SSam Ravnborg 6761c4628bSSuresh Siddhaobj-y += process.o 68ce4c4c26SIngo Molnarobj-y += fpu/ 696b0c3d44SSam Ravnborgobj-y += ptrace.o 706b0c3d44SSam Ravnborgobj-$(CONFIG_X86_32) += tls.o 716b0c3d44SSam Ravnborgobj-$(CONFIG_IA32_EMULATION) += tls.o 726b0c3d44SSam Ravnborgobj-y += step.o 7331625340SJoseph Cihulaobj-$(CONFIG_INTEL_TXT) += tboot.o 744061d68eSDavid Rientjesobj-$(CONFIG_ISA_DMA_API) += i8237.o 756b0c3d44SSam Ravnborgobj-$(CONFIG_STACKTRACE) += stacktrace.o 766b0c3d44SSam Ravnborgobj-y += cpu/ 776b0c3d44SSam Ravnborgobj-y += acpi/ 78f095df0aSIngo Molnarobj-y += reboot.o 796b0c3d44SSam Ravnborgobj-$(CONFIG_X86_MSR) += msr.o 806b0c3d44SSam Ravnborgobj-$(CONFIG_X86_CPUID) += cpuid.o 816b0c3d44SSam Ravnborgobj-$(CONFIG_PCI) += early-quirks.o 823a900d89SSam Ravnborgapm-y := apm_32.o 833a900d89SSam Ravnborgobj-$(CONFIG_APM) += apm.o 843e5095d1SIngo Molnarobj-$(CONFIG_SMP) += smp.o 85ec8df88fSHenrik Kretzschmarobj-$(CONFIG_SMP) += smpboot.o 868b223bc7SThomas Gleixnerobj-$(CONFIG_X86_TSC) += tsc_sync.o 87996db817SBrian Gerstobj-$(CONFIG_SMP) += setup_percpu.o 8885bdddecSAlexey Starikovskiyobj-$(CONFIG_X86_MPPARSE) += mpparse.o 899be1b56aSIngo Molnarobj-y += apic/ 906b0c3d44SSam Ravnborgobj-$(CONFIG_X86_REBOOTFIXUPS) += reboot_fixups_32.o 913d083395SSteven Rostedtobj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o 92d4c3e6e1SJessica Yuobj-$(CONFIG_LIVEPATCH) += livepatch.o 931fa9d67aSSteven Rostedt (VMware)obj-$(CONFIG_FUNCTION_TRACER) += ftrace_$(BITS).o 94fb52607aSFrederic Weisbeckerobj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o 95ccd50dfdSIngo Molnarobj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o 968cbd9cc6SDavid Sharpobj-$(CONFIG_X86_TSC) += trace_clock.o 972965faa5SDave Youngobj-$(CONFIG_KEXEC_CORE) += machine_kexec_$(BITS).o 982965faa5SDave Youngobj-$(CONFIG_KEXEC_CORE) += relocate_kernel_$(BITS).o crash.o 9974ca317cSVivek Goyalobj-$(CONFIG_KEXEC_FILE) += kexec-bzimage64.o 1006b0c3d44SSam Ravnborgobj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o 101f684199fSMasami Hiramatsuobj-y += kprobes/ 1020fdc83b9SAmerigo Wangobj-$(CONFIG_MODULES) += module.o 1034d067d8eSBorislav Petkovobj-$(CONFIG_DOUBLEFAULT) += doublefault.o 10482da3ff8SIngo Molnarobj-$(CONFIG_KGDB) += kgdb.o 1056b0c3d44SSam Ravnborgobj-$(CONFIG_VM86) += vm86_32.o 1066b0c3d44SSam Ravnborgobj-$(CONFIG_EARLY_PRINTK) += early_printk.o 1076b0c3d44SSam Ravnborg 1086b0c3d44SSam Ravnborgobj-$(CONFIG_HPET_TIMER) += hpet.o 109bb24c471SJacob Panobj-$(CONFIG_APB_TIMER) += apb_timer.o 1106b0c3d44SSam Ravnborg 11123ac4ae8SAndreas Herrmannobj-$(CONFIG_AMD_NB) += amd_nb.o 11299e8b9caSDon Zickusobj-$(CONFIG_DEBUG_NMI_SELFTEST) += nmi_selftest.o 1136b0c3d44SSam Ravnborg 11490993cddSMarcelo Tosattiobj-$(CONFIG_KVM_GUEST) += kvm.o kvmclock.o 115b4ecc126SJeremy Fitzhardingeobj-$(CONFIG_PARAVIRT) += paravirt.o paravirt_patch_$(BITS).o 116b4ecc126SJeremy Fitzhardingeobj-$(CONFIG_PARAVIRT_SPINLOCKS)+= paravirt-spinlocks.o 1177af192c9SGerd Hoffmannobj-$(CONFIG_PARAVIRT_CLOCK) += pvclock.o 1187a67832cSDan Williamsobj-$(CONFIG_X86_PMEM_LEGACY_DEVICE) += pmem.o 11967926892SMichael Opdenacker 1204a362601SJan Kiszkaobj-$(CONFIG_JAILHOUSE_GUEST) += jailhouse.o 1214a362601SJan Kiszka 122f7eaf6e0SThomas Gleixnerobj-$(CONFIG_EISA) += eisa.o 123e5e1d3cbSStas Sergeevobj-$(CONFIG_PCSPKR_PLATFORM) += pcspeaker.o 1246b0c3d44SSam Ravnborg 125b43d196cSArjan van de Venobj-$(CONFIG_X86_CHECK_BIOS_CORRUPTION) += check.o 126b43d196cSArjan van de Ven 127b041cf22SIan Campbellobj-$(CONFIG_SWIOTLB) += pci-swiotlb.o 128da6b737bSSebastian Andrzej Siewiorobj-$(CONFIG_OF) += devicetree.o 1292b144498SSrikar Dronamrajuobj-$(CONFIG_UPROBES) += uprobes.o 130e3263ab3SDavid Herrmannobj-y += sysfb.o 131e3263ab3SDavid Herrmannobj-$(CONFIG_X86_SYSFB) += sysfb_simplefb.o 1322995e506SDavid Herrmannobj-$(CONFIG_EFI) += sysfb_efi.o 133cfb80c9eSJeremy Fitzhardinge 134c5e63197SJiri Olsaobj-$(CONFIG_PERF_EVENTS) += perf_regs.o 135cf910e83SSeiji Aguchiobj-$(CONFIG_TRACING) += tracepoint.o 136de966cf4STim Chenobj-$(CONFIG_SCHED_MC_PRIO) += itmt.o 1371e5db223SRicardo Neriobj-$(CONFIG_X86_INTEL_UMIP) += umip.o 138c5e63197SJiri Olsa 13911af8474SJosh Poimboeufobj-$(CONFIG_UNWINDER_ORC) += unwind_orc.o 14011af8474SJosh Poimboeufobj-$(CONFIG_UNWINDER_FRAME_POINTER) += unwind_frame.o 14111af8474SJosh Poimboeufobj-$(CONFIG_UNWINDER_GUESS) += unwind_guess.o 1427c7900f8SJosh Poimboeuf 1436b0c3d44SSam Ravnborg### 1446b0c3d44SSam Ravnborg# 64 bit specific files 1456b0c3d44SSam Ravnborgifeq ($(CONFIG_X86_64),y) 1466b0c3d44SSam Ravnborg obj-$(CONFIG_AUDIT) += audit_64.o 1476b0c3d44SSam Ravnborg 148fffcda11SJoerg Roedel obj-$(CONFIG_GART_IOMMU) += amd_gart_64.o aperture_64.o 1496b0c3d44SSam Ravnborg obj-$(CONFIG_CALGARY_IOMMU) += pci-calgary_64.o tce_64.o 150d39398a3SYinghai Lu 1518364e1f8SJan Kiszka obj-$(CONFIG_MMCONF_FAM10H) += mmconf-fam10h_64.o 15270511134SRavikiran G Thirumalai obj-y += vsmp_64.o 1536b0c3d44SSam Ravnborgendif 1540914ade2SNayna Jain 155399574c6SMimi Zoharifdef CONFIG_EFI 1560914ade2SNayna Jainobj-$(CONFIG_IMA) += ima_arch.o 157399574c6SMimi Zoharendif 158