16b0c3d44SSam Ravnborg# 26b0c3d44SSam Ravnborg# Makefile for the linux kernel. 36b0c3d44SSam Ravnborg# 488e4d250SSam Ravnborg 50c51a965SHuang, Yingextra-y := head_$(BITS).o head$(BITS).o head.o init_task.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 127fa09f24SSteven RostedtCFLAGS_REMOVE_rtc.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 187fa09f24SSteven Rostedtendif 197fa09f24SSteven Rostedt 20e43eb7baSIngo Molnar# 21e43eb7baSIngo Molnar# vsyscalls (which work on the user stack) should have 22e43eb7baSIngo Molnar# no stack-protector checks: 23e43eb7baSIngo Molnar# 24e43eb7baSIngo Molnarnostackp := $(call cc-option, -fno-stack-protector) 25e43eb7baSIngo MolnarCFLAGS_vsyscall_64.o := $(PROFILING) -g0 $(nostackp) 26e43eb7baSIngo MolnarCFLAGS_hpet.o := $(nostackp) 2744259b1aSAndy LutomirskiCFLAGS_vread_tsc_64.o := $(nostackp) 284c7f8900SIngo MolnarCFLAGS_paravirt.o := $(nostackp) 297bf99fb6SPeter OberparleiterGCOV_PROFILE_vsyscall_64.o := n 307bf99fb6SPeter OberparleiterGCOV_PROFILE_hpet.o := n 31f386c61fSPeter OberparleiterGCOV_PROFILE_tsc.o := n 3289e1be50SSteven RostedtGCOV_PROFILE_vread_tsc_64.o := n 33f386c61fSPeter OberparleiterGCOV_PROFILE_paravirt.o := n 346b0c3d44SSam Ravnborg 3544259b1aSAndy Lutomirski# vread_tsc_64 is hot and should be fully optimized: 3644259b1aSAndy LutomirskiCFLAGS_REMOVE_vread_tsc_64.o = -pg -fno-optimize-sibling-calls 3744259b1aSAndy Lutomirski 385ceb40daSHiroshi Shimamotoobj-y := process_$(BITS).o signal.o entry_$(BITS).o 396b39ba77SThomas Gleixnerobj-y += traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o 4047926214SThomas Gleixnerobj-y += time.o ioport.o ldt.o dumpstack.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 446b0c3d44SSam Ravnborgobj-$(CONFIG_X86_32) += sys_i386_32.o i386_ksyms_32.o 456b0c3d44SSam Ravnborgobj-$(CONFIG_X86_64) += sys_x86_64.o x8664_ksyms_64.o 4644259b1aSAndy Lutomirskiobj-$(CONFIG_X86_64) += syscall_64.o vsyscall_64.o vread_tsc_64.o 475cec93c2SAndy Lutomirskiobj-$(CONFIG_X86_64) += vsyscall_emu_64.o 48064d25f1SYinghai Luobj-y += bootflag.o e820.o 494061d68eSDavid Rientjesobj-y += pci-dma.o quirks.o topology.o kdebugfs.o 500067f129SK.Prasadobj-y += alternative.o i8253.o pci-nommu.o hw_breakpoint.o 518fbbc4b4SAlok Katariaobj-y += tsc.o io_delay.o rtc.o 525bef80a4SKonrad Rzeszutek Wilkobj-y += pci-iommu_table.o 5330919b0bSBjorn Helgaasobj-y += resource.o 546b0c3d44SSam Ravnborg 554822b7fcSH. Peter Anvinobj-y += trampoline.o trampoline_$(BITS).o 5661c4628bSSuresh Siddhaobj-y += process.o 57dc1e35c6SSuresh Siddhaobj-y += i387.o xsave.o 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 683d35ac34SH. Peter Anvinobj-$(CONFIG_X86_32) += reboot_32.o 696b0c3d44SSam Ravnborgobj-$(CONFIG_MCA) += mca_32.o 706b0c3d44SSam Ravnborgobj-$(CONFIG_X86_MSR) += msr.o 716b0c3d44SSam Ravnborgobj-$(CONFIG_X86_CPUID) += cpuid.o 726b0c3d44SSam Ravnborgobj-$(CONFIG_PCI) += early-quirks.o 733a900d89SSam Ravnborgapm-y := apm_32.o 743a900d89SSam Ravnborgobj-$(CONFIG_APM) += apm.o 753e5095d1SIngo Molnarobj-$(CONFIG_SMP) += smp.o 76ec8df88fSHenrik Kretzschmarobj-$(CONFIG_SMP) += smpboot.o 77ec8df88fSHenrik Kretzschmarobj-$(CONFIG_SMP) += tsc_sync.o 78996db817SBrian Gerstobj-$(CONFIG_SMP) += setup_percpu.o 7985bdddecSAlexey Starikovskiyobj-$(CONFIG_X86_MPPARSE) += mpparse.o 809be1b56aSIngo Molnarobj-y += apic/ 816b0c3d44SSam Ravnborgobj-$(CONFIG_X86_REBOOTFIXUPS) += reboot_fixups_32.o 823d083395SSteven Rostedtobj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o 83fb52607aSFrederic Weisbeckerobj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o 84ccd50dfdSIngo Molnarobj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o 856b0c3d44SSam Ravnborgobj-$(CONFIG_KEXEC) += machine_kexec_$(BITS).o 866b0c3d44SSam Ravnborgobj-$(CONFIG_KEXEC) += relocate_kernel_$(BITS).o crash.o 876b0c3d44SSam Ravnborgobj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o 886b0c3d44SSam Ravnborgobj-$(CONFIG_KPROBES) += kprobes.o 890fdc83b9SAmerigo Wangobj-$(CONFIG_MODULES) += module.o 906b0c3d44SSam Ravnborgobj-$(CONFIG_DOUBLEFAULT) += doublefault_32.o 9182da3ff8SIngo Molnarobj-$(CONFIG_KGDB) += kgdb.o 926b0c3d44SSam Ravnborgobj-$(CONFIG_VM86) += vm86_32.o 936b0c3d44SSam Ravnborgobj-$(CONFIG_EARLY_PRINTK) += early_printk.o 946b0c3d44SSam Ravnborg 956b0c3d44SSam Ravnborgobj-$(CONFIG_HPET_TIMER) += hpet.o 96bb24c471SJacob Panobj-$(CONFIG_APB_TIMER) += apb_timer.o 976b0c3d44SSam Ravnborg 9823ac4ae8SAndreas Herrmannobj-$(CONFIG_AMD_NB) += amd_nb.o 99aba8391fSIngo Molnarobj-$(CONFIG_DEBUG_RODATA_TEST) += test_rodata.o 100aba8391fSIngo Molnarobj-$(CONFIG_DEBUG_NX_TEST) += test_nx.o 1016b0c3d44SSam Ravnborg 1020cf1bfd2SMarcelo Tosattiobj-$(CONFIG_KVM_GUEST) += kvm.o 103790c73f6SGlauber de Oliveira Costaobj-$(CONFIG_KVM_CLOCK) += kvmclock.o 104b4ecc126SJeremy Fitzhardingeobj-$(CONFIG_PARAVIRT) += paravirt.o paravirt_patch_$(BITS).o 105b4ecc126SJeremy Fitzhardingeobj-$(CONFIG_PARAVIRT_SPINLOCKS)+= paravirt-spinlocks.o 1067af192c9SGerd Hoffmannobj-$(CONFIG_PARAVIRT_CLOCK) += pvclock.o 10767926892SMichael Opdenacker 108e5e1d3cbSStas Sergeevobj-$(CONFIG_PCSPKR_PLATFORM) += pcspeaker.o 1096b0c3d44SSam Ravnborg 11018dbc916SDmitry Adamushkomicrocode-y := microcode_core.o 11118dbc916SDmitry Adamushkomicrocode-$(CONFIG_MICROCODE_INTEL) += microcode_intel.o 11218dbc916SDmitry Adamushkomicrocode-$(CONFIG_MICROCODE_AMD) += microcode_amd.o 11318dbc916SDmitry Adamushkoobj-$(CONFIG_MICROCODE) += microcode.o 11418dbc916SDmitry Adamushko 115b43d196cSArjan van de Venobj-$(CONFIG_X86_CHECK_BIOS_CORRUPTION) += check.o 116b43d196cSArjan van de Ven 117b041cf22SIan Campbellobj-$(CONFIG_SWIOTLB) += pci-swiotlb.o 118da6b737bSSebastian Andrzej Siewiorobj-$(CONFIG_OF) += devicetree.o 119cfb80c9eSJeremy Fitzhardinge 1206b0c3d44SSam Ravnborg### 1216b0c3d44SSam Ravnborg# 64 bit specific files 1226b0c3d44SSam Ravnborgifeq ($(CONFIG_X86_64),y) 1236b0c3d44SSam Ravnborg obj-$(CONFIG_AUDIT) += audit_64.o 1246b0c3d44SSam Ravnborg 125fffcda11SJoerg Roedel obj-$(CONFIG_GART_IOMMU) += amd_gart_64.o aperture_64.o 1266b0c3d44SSam Ravnborg obj-$(CONFIG_CALGARY_IOMMU) += pci-calgary_64.o tce_64.o 127000fca2dSJoerg Roedel obj-$(CONFIG_AMD_IOMMU) += amd_iommu_init.o amd_iommu.o 128d39398a3SYinghai Lu 129d39398a3SYinghai Lu obj-$(CONFIG_PCI_MMCONFIG) += mmconf-fam10h_64.o 13070511134SRavikiran G Thirumalai obj-y += vsmp_64.o 1316b0c3d44SSam Ravnborgendif 132