xref: /openbmc/linux/arch/x86/kernel/Makefile (revision 5039e316)
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
1983ab8514SSteven Rostedt (Red Hat)CFLAGS_irq.o := -I$(src)/../include/asm/trace
2083ab8514SSteven Rostedt (Red Hat)
215ceb40daSHiroshi Shimamotoobj-y			:= process_$(BITS).o signal.o entry_$(BITS).o
226b39ba77SThomas Gleixnerobj-y			+= traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o
231d48922cSDon Zickusobj-y			+= time.o ioport.o ldt.o dumpstack.o nmi.o
24d9f5ab7bSJason Baronobj-y			+= setup.o x86_init.o i8259.o irqinit.o jump_label.o
25e360adbeSPeter Zijlstraobj-$(CONFIG_IRQ_WORK)  += irq_work.o
265d94e81fSDan Williamsobj-y			+= probe_roms.o
276783eaa2SAl Viroobj-$(CONFIG_X86_32)	+= i386_ksyms_32.o
286b0c3d44SSam Ravnborgobj-$(CONFIG_X86_64)	+= sys_x86_64.o x8664_ksyms_64.o
29303395acSH. Peter Anvinobj-y			+= syscall_$(BITS).o
30303395acSH. Peter Anvinobj-$(CONFIG_X86_64)	+= vsyscall_64.o
315cec93c2SAndy Lutomirskiobj-$(CONFIG_X86_64)	+= vsyscall_emu_64.o
325039e316SDave Youngobj-$(CONFIG_SYSFS)	+= ksysfs.o
33064d25f1SYinghai Luobj-y			+= bootflag.o e820.o
344061d68eSDavid Rientjesobj-y			+= pci-dma.o quirks.o topology.o kdebugfs.o
350067f129SK.Prasadobj-y			+= alternative.o i8253.o pci-nommu.o hw_breakpoint.o
368fbbc4b4SAlok Katariaobj-y			+= tsc.o io_delay.o rtc.o
375bef80a4SKonrad Rzeszutek Wilkobj-y			+= pci-iommu_table.o
3830919b0bSBjorn Helgaasobj-y			+= resource.o
396b0c3d44SSam Ravnborg
401a338ac3SPeter Zijlstraobj-$(CONFIG_PREEMPT)	+= preempt.o
411a338ac3SPeter Zijlstra
4261c4628bSSuresh Siddhaobj-y				+= process.o
43dc1e35c6SSuresh Siddhaobj-y				+= i387.o xsave.o
446b0c3d44SSam Ravnborgobj-y				+= ptrace.o
456b0c3d44SSam Ravnborgobj-$(CONFIG_X86_32)		+= tls.o
466b0c3d44SSam Ravnborgobj-$(CONFIG_IA32_EMULATION)	+= tls.o
476b0c3d44SSam Ravnborgobj-y				+= step.o
4831625340SJoseph Cihulaobj-$(CONFIG_INTEL_TXT)		+= tboot.o
494061d68eSDavid Rientjesobj-$(CONFIG_ISA_DMA_API)	+= i8237.o
506b0c3d44SSam Ravnborgobj-$(CONFIG_STACKTRACE)	+= stacktrace.o
516b0c3d44SSam Ravnborgobj-y				+= cpu/
526b0c3d44SSam Ravnborgobj-y				+= acpi/
53f095df0aSIngo Molnarobj-y				+= reboot.o
546b0c3d44SSam Ravnborgobj-$(CONFIG_X86_MSR)		+= msr.o
556b0c3d44SSam Ravnborgobj-$(CONFIG_X86_CPUID)		+= cpuid.o
566b0c3d44SSam Ravnborgobj-$(CONFIG_PCI)		+= early-quirks.o
573a900d89SSam Ravnborgapm-y				:= apm_32.o
583a900d89SSam Ravnborgobj-$(CONFIG_APM)		+= apm.o
593e5095d1SIngo Molnarobj-$(CONFIG_SMP)		+= smp.o
60ec8df88fSHenrik Kretzschmarobj-$(CONFIG_SMP)		+= smpboot.o
61ec8df88fSHenrik Kretzschmarobj-$(CONFIG_SMP)		+= tsc_sync.o
62996db817SBrian Gerstobj-$(CONFIG_SMP)		+= setup_percpu.o
6385bdddecSAlexey Starikovskiyobj-$(CONFIG_X86_MPPARSE)	+= mpparse.o
649be1b56aSIngo Molnarobj-y				+= apic/
656b0c3d44SSam Ravnborgobj-$(CONFIG_X86_REBOOTFIXUPS)	+= reboot_fixups_32.o
663d083395SSteven Rostedtobj-$(CONFIG_DYNAMIC_FTRACE)	+= ftrace.o
67fb52607aSFrederic Weisbeckerobj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o
68ccd50dfdSIngo Molnarobj-$(CONFIG_FTRACE_SYSCALLS)	+= ftrace.o
698cbd9cc6SDavid Sharpobj-$(CONFIG_X86_TSC)		+= trace_clock.o
706b0c3d44SSam Ravnborgobj-$(CONFIG_KEXEC)		+= machine_kexec_$(BITS).o
716b0c3d44SSam Ravnborgobj-$(CONFIG_KEXEC)		+= relocate_kernel_$(BITS).o crash.o
726b0c3d44SSam Ravnborgobj-$(CONFIG_CRASH_DUMP)	+= crash_dump_$(BITS).o
73f684199fSMasami Hiramatsuobj-y				+= kprobes/
740fdc83b9SAmerigo Wangobj-$(CONFIG_MODULES)		+= module.o
754d067d8eSBorislav Petkovobj-$(CONFIG_DOUBLEFAULT)	+= doublefault.o
7682da3ff8SIngo Molnarobj-$(CONFIG_KGDB)		+= kgdb.o
776b0c3d44SSam Ravnborgobj-$(CONFIG_VM86)		+= vm86_32.o
786b0c3d44SSam Ravnborgobj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
796b0c3d44SSam Ravnborg
806b0c3d44SSam Ravnborgobj-$(CONFIG_HPET_TIMER) 	+= hpet.o
81bb24c471SJacob Panobj-$(CONFIG_APB_TIMER)		+= apb_timer.o
826b0c3d44SSam Ravnborg
8323ac4ae8SAndreas Herrmannobj-$(CONFIG_AMD_NB)		+= amd_nb.o
84aba8391fSIngo Molnarobj-$(CONFIG_DEBUG_RODATA_TEST)	+= test_rodata.o
85aba8391fSIngo Molnarobj-$(CONFIG_DEBUG_NX_TEST)	+= test_nx.o
8699e8b9caSDon Zickusobj-$(CONFIG_DEBUG_NMI_SELFTEST) += nmi_selftest.o
876b0c3d44SSam Ravnborg
8890993cddSMarcelo Tosattiobj-$(CONFIG_KVM_GUEST)		+= kvm.o kvmclock.o
89b4ecc126SJeremy Fitzhardingeobj-$(CONFIG_PARAVIRT)		+= paravirt.o paravirt_patch_$(BITS).o
90b4ecc126SJeremy Fitzhardingeobj-$(CONFIG_PARAVIRT_SPINLOCKS)+= paravirt-spinlocks.o
917af192c9SGerd Hoffmannobj-$(CONFIG_PARAVIRT_CLOCK)	+= pvclock.o
9267926892SMichael Opdenacker
93e5e1d3cbSStas Sergeevobj-$(CONFIG_PCSPKR_PLATFORM)	+= pcspeaker.o
946b0c3d44SSam Ravnborg
959cd4d78eSFenghua Yuobj-$(CONFIG_MICROCODE_EARLY)		+= microcode_core_early.o
969cd4d78eSFenghua Yuobj-$(CONFIG_MICROCODE_INTEL_EARLY)	+= microcode_intel_early.o
979cd4d78eSFenghua Yuobj-$(CONFIG_MICROCODE_INTEL_LIB)	+= microcode_intel_lib.o
9818dbc916SDmitry Adamushkomicrocode-y				:= microcode_core.o
9918dbc916SDmitry Adamushkomicrocode-$(CONFIG_MICROCODE_INTEL)	+= microcode_intel.o
10018dbc916SDmitry Adamushkomicrocode-$(CONFIG_MICROCODE_AMD)	+= microcode_amd.o
101757885e9SJacob Shinobj-$(CONFIG_MICROCODE_AMD_EARLY)	+= microcode_amd_early.o
10218dbc916SDmitry Adamushkoobj-$(CONFIG_MICROCODE)			+= microcode.o
10318dbc916SDmitry Adamushko
104b43d196cSArjan van de Venobj-$(CONFIG_X86_CHECK_BIOS_CORRUPTION) += check.o
105b43d196cSArjan van de Ven
106b041cf22SIan Campbellobj-$(CONFIG_SWIOTLB)			+= pci-swiotlb.o
107da6b737bSSebastian Andrzej Siewiorobj-$(CONFIG_OF)			+= devicetree.o
1082b144498SSrikar Dronamrajuobj-$(CONFIG_UPROBES)			+= uprobes.o
109e3263ab3SDavid Herrmannobj-y					+= sysfb.o
110e3263ab3SDavid Herrmannobj-$(CONFIG_X86_SYSFB)			+= sysfb_simplefb.o
1112995e506SDavid Herrmannobj-$(CONFIG_EFI)			+= sysfb_efi.o
112cfb80c9eSJeremy Fitzhardinge
113c5e63197SJiri Olsaobj-$(CONFIG_PERF_EVENTS)		+= perf_regs.o
114cf910e83SSeiji Aguchiobj-$(CONFIG_TRACING)			+= tracepoint.o
115c5e63197SJiri Olsa
1166b0c3d44SSam Ravnborg###
1176b0c3d44SSam Ravnborg# 64 bit specific files
1186b0c3d44SSam Ravnborgifeq ($(CONFIG_X86_64),y)
1196b0c3d44SSam Ravnborg	obj-$(CONFIG_AUDIT)		+= audit_64.o
1206b0c3d44SSam Ravnborg
121fffcda11SJoerg Roedel	obj-$(CONFIG_GART_IOMMU)	+= amd_gart_64.o aperture_64.o
1226b0c3d44SSam Ravnborg	obj-$(CONFIG_CALGARY_IOMMU)	+= pci-calgary_64.o tce_64.o
123d39398a3SYinghai Lu
124d39398a3SYinghai Lu	obj-$(CONFIG_PCI_MMCONFIG)	+= mmconf-fam10h_64.o
12570511134SRavikiran G Thirumalai	obj-y				+= vsmp_64.o
1266b0c3d44SSam Ravnborgendif
127