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 += vmlinux.lds 76b0c3d44SSam Ravnborg 86b0c3d44SSam RavnborgCPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE) 9e43eb7baSIngo Molnar 10606576ceSSteven Rostedtifdef CONFIG_FUNCTION_TRACER 1134646bcaSIngo Molnar# Do not profile debug and lowlevel utilities 1289e1be50SSteven RostedtCFLAGS_REMOVE_tsc.o = -pg 13d5de8841SJeremy FitzhardingeCFLAGS_REMOVE_paravirt-spinlocks.o = -pg 149ecd4e16SJeremy FitzhardingeCFLAGS_REMOVE_pvclock.o = -pg 15258af474SSteven RostedtCFLAGS_REMOVE_kvmclock.o = -pg 1615adc048SSteven RostedtCFLAGS_REMOVE_ftrace.o = -pg 176cf87efbSIngo MolnarCFLAGS_REMOVE_early_printk.o = -pg 18bb43dbc5SKirill A. ShutemovCFLAGS_REMOVE_head64.o = -pg 19e759959fSBrijesh SinghCFLAGS_REMOVE_sev.o = -pg 207fa09f24SSteven Rostedtendif 217fa09f24SSteven Rostedt 22ef7f0d6aSAndrey RyabininKASAN_SANITIZE_head$(BITS).o := n 23c420f167SAndrey RyabininKASAN_SANITIZE_dumpstack.o := n 24c420f167SAndrey RyabininKASAN_SANITIZE_dumpstack_$(BITS).o := n 25cd11016eSAlexander PotapenkoKASAN_SANITIZE_stacktrace.o := n 2612a8cc7fSAndrey RyabininKASAN_SANITIZE_paravirt.o := n 27e759959fSBrijesh SinghKASAN_SANITIZE_sev.o := n 28c0dd6716SJosh Poimboeuf 2940d04110SMarco Elver# With some compiler versions the generated code results in boot hangs, caused 3040d04110SMarco Elver# by several compilation units. To be safe, disable all instrumentation. 3140d04110SMarco ElverKCSAN_SANITIZE := n 3240d04110SMarco Elver 335c9a8750SDmitry Vyukov# If instrumentation of this dir is enabled, boot hangs during first second. 345c9a8750SDmitry Vyukov# Probably could be more selective here, but note that files related to irqs, 355c9a8750SDmitry Vyukov# boot, dumpstack/stacktrace, etc are either non-interesting or can lead to 365c9a8750SDmitry Vyukov# non-deterministic coverage. 375c9a8750SDmitry VyukovKCOV_INSTRUMENT := n 385c9a8750SDmitry Vyukov 399cc342f6SMasahiro YamadaCFLAGS_irq.o := -I $(srctree)/$(src)/../include/asm/trace 4083ab8514SSteven Rostedt (Red Hat) 41*32164845SMasahiro Yamadaobj-y += head_$(BITS).o 42*32164845SMasahiro Yamadaobj-y += head$(BITS).o 43*32164845SMasahiro Yamadaobj-y += ebda.o 44*32164845SMasahiro Yamadaobj-y += platform-quirks.o 45*32164845SMasahiro Yamadaobj-y += process_$(BITS).o signal.o 46c0bfd26eSBrian Gerstobj-$(CONFIG_COMPAT) += signal_compat.o 47d8ed9d48SThomas Gleixnerobj-y += traps.o idt.o irq.o irq_$(BITS).o dumpstack_$(BITS).o 48a5b9e5a2SAndy Lutomirskiobj-y += time.o ioport.o dumpstack.o nmi.o 49a5b9e5a2SAndy Lutomirskiobj-$(CONFIG_MODIFY_LDT_SYSCALL) += ldt.o 50e9666d10SMasahiro Yamadaobj-y += setup.o x86_init.o i8259.o irqinit.o 51e9666d10SMasahiro Yamadaobj-$(CONFIG_JUMP_LABEL) += jump_label.o 52e360adbeSPeter Zijlstraobj-$(CONFIG_IRQ_WORK) += irq_work.o 535d94e81fSDan Williamsobj-y += probe_roms.o 54121b32a5SBrian Gerstobj-$(CONFIG_X86_32) += sys_ia32.o 55121b32a5SBrian Gerstobj-$(CONFIG_IA32_EMULATION) += sys_ia32.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 6330919b0bSBjorn Helgaasobj-y += resource.o 64d0a8d937SNick Desaulniersobj-y += irqflags.o 65e6d6c071SJosh Poimboeufobj-y += static_call.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 751614b2b1SPeter Zijlstraobj-y += 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 921fa9d67aSSteven Rostedt (VMware)obj-$(CONFIG_FUNCTION_TRACER) += ftrace_$(BITS).o 93fb52607aSFrederic Weisbeckerobj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o 94ccd50dfdSIngo Molnarobj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o 958cbd9cc6SDavid Sharpobj-$(CONFIG_X86_TSC) += trace_clock.o 96bce29ac9SDaniel Bristot de Oliveiraobj-$(CONFIG_TRACING) += trace.o 97f3a112c0SMasami Hiramatsuobj-$(CONFIG_RETHOOK) += rethook.o 988757dc97SOmar Sandovalobj-$(CONFIG_CRASH_CORE) += crash_core_$(BITS).o 992965faa5SDave Youngobj-$(CONFIG_KEXEC_CORE) += machine_kexec_$(BITS).o 1002965faa5SDave Youngobj-$(CONFIG_KEXEC_CORE) += relocate_kernel_$(BITS).o crash.o 10174ca317cSVivek Goyalobj-$(CONFIG_KEXEC_FILE) += kexec-bzimage64.o 1026b0c3d44SSam Ravnborgobj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o 103f684199fSMasami Hiramatsuobj-y += kprobes/ 1040fdc83b9SAmerigo Wangobj-$(CONFIG_MODULES) += module.o 10559330942SBorislav Petkovobj-$(CONFIG_X86_32) += doublefault_32.o 10682da3ff8SIngo Molnarobj-$(CONFIG_KGDB) += kgdb.o 1076b0c3d44SSam Ravnborgobj-$(CONFIG_VM86) += vm86_32.o 1086b0c3d44SSam Ravnborgobj-$(CONFIG_EARLY_PRINTK) += early_printk.o 1096b0c3d44SSam Ravnborg 1106b0c3d44SSam Ravnborgobj-$(CONFIG_HPET_TIMER) += hpet.o 1116b0c3d44SSam Ravnborg 11223ac4ae8SAndreas Herrmannobj-$(CONFIG_AMD_NB) += amd_nb.o 11399e8b9caSDon Zickusobj-$(CONFIG_DEBUG_NMI_SELFTEST) += nmi_selftest.o 1146b0c3d44SSam Ravnborg 11590993cddSMarcelo Tosattiobj-$(CONFIG_KVM_GUEST) += kvm.o kvmclock.o 116054ac8adSJuergen Grossobj-$(CONFIG_PARAVIRT) += paravirt.o 117b4ecc126SJeremy Fitzhardingeobj-$(CONFIG_PARAVIRT_SPINLOCKS)+= paravirt-spinlocks.o 1187af192c9SGerd Hoffmannobj-$(CONFIG_PARAVIRT_CLOCK) += pvclock.o 1197a67832cSDan Williamsobj-$(CONFIG_X86_PMEM_LEGACY_DEVICE) += pmem.o 12067926892SMichael Opdenacker 1214a362601SJan Kiszkaobj-$(CONFIG_JAILHOUSE_GUEST) += jailhouse.o 1224a362601SJan Kiszka 123f7eaf6e0SThomas Gleixnerobj-$(CONFIG_EISA) += eisa.o 124e5e1d3cbSStas Sergeevobj-$(CONFIG_PCSPKR_PLATFORM) += pcspeaker.o 1256b0c3d44SSam Ravnborg 126b43d196cSArjan van de Venobj-$(CONFIG_X86_CHECK_BIOS_CORRUPTION) += check.o 127b43d196cSArjan van de Ven 128da6b737bSSebastian Andrzej Siewiorobj-$(CONFIG_OF) += devicetree.o 1292b144498SSrikar Dronamrajuobj-$(CONFIG_UPROBES) += uprobes.o 130cfb80c9eSJeremy Fitzhardinge 131c5e63197SJiri Olsaobj-$(CONFIG_PERF_EVENTS) += perf_regs.o 132cf910e83SSeiji Aguchiobj-$(CONFIG_TRACING) += tracepoint.o 133de966cf4STim Chenobj-$(CONFIG_SCHED_MC_PRIO) += itmt.o 134b971880fSBabu Mogerobj-$(CONFIG_X86_UMIP) += umip.o 135c5e63197SJiri Olsa 13611af8474SJosh Poimboeufobj-$(CONFIG_UNWINDER_ORC) += unwind_orc.o 13711af8474SJosh Poimboeufobj-$(CONFIG_UNWINDER_FRAME_POINTER) += unwind_frame.o 13811af8474SJosh Poimboeufobj-$(CONFIG_UNWINDER_GUESS) += unwind_guess.o 1397c7900f8SJosh Poimboeuf 140e759959fSBrijesh Singhobj-$(CONFIG_AMD_MEM_ENCRYPT) += sev.o 141aa5a4611STom Lendacky 1426b0c3d44SSam Ravnborg### 1436b0c3d44SSam Ravnborg# 64 bit specific files 1446b0c3d44SSam Ravnborgifeq ($(CONFIG_X86_64),y) 1456b0c3d44SSam Ravnborg obj-$(CONFIG_AUDIT) += audit_64.o 1466b0c3d44SSam Ravnborg 147fffcda11SJoerg Roedel obj-$(CONFIG_GART_IOMMU) += amd_gart_64.o aperture_64.o 148d39398a3SYinghai Lu 1498364e1f8SJan Kiszka obj-$(CONFIG_MMCONF_FAM10H) += mmconf-fam10h_64.o 15070511134SRavikiran G Thirumalai obj-y += vsmp_64.o 1516b0c3d44SSam Ravnborgendif 152