xref: /openbmc/linux/arch/x86/kernel/Makefile (revision 6cf87efb)
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
118e9509c8SIngo MolnarCFLAGS_REMOVE_tsc.o = -pg
127fa09f24SSteven RostedtCFLAGS_REMOVE_rtc.o = -pg
13d5de8841SJeremy FitzhardingeCFLAGS_REMOVE_paravirt-spinlocks.o = -pg
1415adc048SSteven RostedtCFLAGS_REMOVE_ftrace.o = -pg
156cf87efbSIngo MolnarCFLAGS_REMOVE_early_printk.o = -pg
167fa09f24SSteven Rostedtendif
177fa09f24SSteven Rostedt
18e43eb7baSIngo Molnar#
19e43eb7baSIngo Molnar# vsyscalls (which work on the user stack) should have
20e43eb7baSIngo Molnar# no stack-protector checks:
21e43eb7baSIngo Molnar#
22e43eb7baSIngo Molnarnostackp := $(call cc-option, -fno-stack-protector)
23e43eb7baSIngo MolnarCFLAGS_vsyscall_64.o	:= $(PROFILING) -g0 $(nostackp)
24e43eb7baSIngo MolnarCFLAGS_hpet.o		:= $(nostackp)
253d0decc4SIngo MolnarCFLAGS_tsc.o		:= $(nostackp)
266b0c3d44SSam Ravnborg
276b0c3d44SSam Ravnborgobj-y			:= process_$(BITS).o signal_$(BITS).o entry_$(BITS).o
286b39ba77SThomas Gleixnerobj-y			+= traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o
29ccafa59aSmboton@gmail.comobj-y			+= time_$(BITS).o ioport.o ldt.o
3055f26239SYinghai Luobj-y			+= setup.o i8259.o irqinit_$(BITS).o setup_percpu.o
3126dd9fcfSIngo Molnarobj-$(CONFIG_X86_VISWS)	+= visws_quirks.o
32a9c1182fSYinghai Luobj-$(CONFIG_X86_32)	+= probe_roms_32.o
336fcbede3SAlexander van Heukelumobj-$(CONFIG_X86_32)	+= sys_i386_32.o i386_ksyms_32.o
346b0c3d44SSam Ravnborgobj-$(CONFIG_X86_64)	+= sys_x86_64.o x8664_ksyms_64.o
350f0124faSYinghai Luobj-$(CONFIG_X86_64)	+= syscall_64.o vsyscall_64.o
36064d25f1SYinghai Luobj-y			+= bootflag.o e820.o
37459121c9SGlauber Costaobj-y			+= pci-dma.o quirks.o i8237.o topology.o kdebugfs.o
38f9c258deSGlauber Costaobj-y			+= alternative.o i8253.o pci-nommu.o
398fbbc4b4SAlok Katariaobj-y			+= tsc.o io_delay.o rtc.o
406b0c3d44SSam Ravnborg
4177ad386eSIngo Molnarobj-$(CONFIG_X86_TRAMPOLINE)	+= trampoline.o
4261c4628bSSuresh Siddhaobj-y				+= process.o
43dc1e35c6SSuresh Siddhaobj-y				+= i387.o xsave.o
446b0c3d44SSam Ravnborgobj-y				+= ptrace.o
456b0c3d44SSam Ravnborgobj-y				+= ds.o
466b0c3d44SSam Ravnborgobj-$(CONFIG_X86_32)		+= tls.o
476b0c3d44SSam Ravnborgobj-$(CONFIG_IA32_EMULATION)	+= tls.o
486b0c3d44SSam Ravnborgobj-y				+= step.o
496b0c3d44SSam Ravnborgobj-$(CONFIG_STACKTRACE)	+= stacktrace.o
506b0c3d44SSam Ravnborgobj-y				+= cpu/
516b0c3d44SSam Ravnborgobj-y				+= acpi/
524d022e35SMiguel Botonobj-$(CONFIG_X86_BIOS_REBOOT)	+= reboot.o
536b0c3d44SSam Ravnborgobj-$(CONFIG_MCA)		+= mca_32.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
594cedb334SGlauber de Oliveira Costaobj-$(CONFIG_X86_SMP)		+= smp.o
60c048fdfeSGlauber Costaobj-$(CONFIG_X86_SMP)		+= smpboot.o tsc_sync.o ipi.o tlb_$(BITS).o
61e32640a2SGlauber Costaobj-$(CONFIG_X86_32_SMP)	+= smpcommon.o
624cedb334SGlauber de Oliveira Costaobj-$(CONFIG_X86_64_SMP)	+= tsc_sync.o smpcommon.o
636b0c3d44SSam Ravnborgobj-$(CONFIG_X86_TRAMPOLINE)	+= trampoline_$(BITS).o
6485bdddecSAlexey Starikovskiyobj-$(CONFIG_X86_MPPARSE)	+= mpparse.o
650f611ffaSYinghai Luobj-$(CONFIG_X86_LOCAL_APIC)	+= apic.o nmi.o
6626d347c2SYinghai Luobj-$(CONFIG_X86_IO_APIC)	+= io_apic.o
676b0c3d44SSam Ravnborgobj-$(CONFIG_X86_REBOOTFIXUPS)	+= reboot_fixups_32.o
683d083395SSteven Rostedtobj-$(CONFIG_DYNAMIC_FTRACE)	+= ftrace.o
696b0c3d44SSam Ravnborgobj-$(CONFIG_KEXEC)		+= machine_kexec_$(BITS).o
706b0c3d44SSam Ravnborgobj-$(CONFIG_KEXEC)		+= relocate_kernel_$(BITS).o crash.o
716b0c3d44SSam Ravnborgobj-$(CONFIG_CRASH_DUMP)	+= crash_dump_$(BITS).o
726b0c3d44SSam Ravnborgobj-$(CONFIG_X86_NUMAQ)		+= numaq_32.o
731625324dSYinghai Luobj-$(CONFIG_X86_ES7000)	+= es7000_32.o
746b0c3d44SSam Ravnborgobj-$(CONFIG_X86_SUMMIT_NUMA)	+= summit_32.o
75aa7d8e25SRavikiran G Thirumalaiobj-y				+= vsmp_64.o
766b0c3d44SSam Ravnborgobj-$(CONFIG_KPROBES)		+= kprobes.o
776b0c3d44SSam Ravnborgobj-$(CONFIG_MODULES)		+= module_$(BITS).o
786b0c3d44SSam Ravnborgobj-$(CONFIG_EFI) 		+= efi.o efi_$(BITS).o efi_stub_$(BITS).o
796b0c3d44SSam Ravnborgobj-$(CONFIG_DOUBLEFAULT) 	+= doublefault_32.o
8082da3ff8SIngo Molnarobj-$(CONFIG_KGDB)		+= kgdb.o
816b0c3d44SSam Ravnborgobj-$(CONFIG_VM86)		+= vm86_32.o
826b0c3d44SSam Ravnborgobj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
836b0c3d44SSam Ravnborg
846b0c3d44SSam Ravnborgobj-$(CONFIG_HPET_TIMER) 	+= hpet.o
856b0c3d44SSam Ravnborg
866b0c3d44SSam Ravnborgobj-$(CONFIG_K8_NB)		+= k8.o
876b0c3d44SSam Ravnborgobj-$(CONFIG_MGEODE_LX)		+= geode_32.o mfgpt_32.o
88aba8391fSIngo Molnarobj-$(CONFIG_DEBUG_RODATA_TEST)	+= test_rodata.o
89aba8391fSIngo Molnarobj-$(CONFIG_DEBUG_NX_TEST)	+= test_nx.o
906b0c3d44SSam Ravnborg
916b0c3d44SSam Ravnborgobj-$(CONFIG_VMI)		+= vmi_32.o vmiclock_32.o
920cf1bfd2SMarcelo Tosattiobj-$(CONFIG_KVM_GUEST)		+= kvm.o
93790c73f6SGlauber de Oliveira Costaobj-$(CONFIG_KVM_CLOCK)		+= kvmclock.o
94d5de8841SJeremy Fitzhardingeobj-$(CONFIG_PARAVIRT)		+= paravirt.o paravirt_patch_$(BITS).o paravirt-spinlocks.o
957af192c9SGerd Hoffmannobj-$(CONFIG_PARAVIRT_CLOCK)	+= pvclock.o
9667926892SMichael Opdenacker
97e5e1d3cbSStas Sergeevobj-$(CONFIG_PCSPKR_PLATFORM)	+= pcspeaker.o
986b0c3d44SSam Ravnborg
993bc9a77eSSam Ravnborgobj-$(CONFIG_SCx200)		+= scx200.o
1003bc9a77eSSam Ravnborgscx200-y			+= scx200_32.o
1016b0c3d44SSam Ravnborg
1023ef0e1f8SAndres Salomonobj-$(CONFIG_OLPC)		+= olpc.o
1033ef0e1f8SAndres Salomon
10418dbc916SDmitry Adamushkomicrocode-y				:= microcode_core.o
10518dbc916SDmitry Adamushkomicrocode-$(CONFIG_MICROCODE_INTEL)	+= microcode_intel.o
10618dbc916SDmitry Adamushkomicrocode-$(CONFIG_MICROCODE_AMD)	+= microcode_amd.o
10718dbc916SDmitry Adamushkoobj-$(CONFIG_MICROCODE)			+= microcode.o
10818dbc916SDmitry Adamushko
1096b0c3d44SSam Ravnborg###
1106b0c3d44SSam Ravnborg# 64 bit specific files
1116b0c3d44SSam Ravnborgifeq ($(CONFIG_X86_64),y)
1121812924bSCliff Wickman        obj-y				+= genapic_64.o genapic_flat_64.o genx2apic_uv_x.o tlb_uv.o
113fc8c2d76SRuss Anderson	obj-y				+= bios_uv.o uv_irq.o uv_sysfs.o
11412a67cf6SSuresh Siddha        obj-y				+= genx2apic_cluster.o
1152d9579a1SSuresh Siddha        obj-y				+= genx2apic_phys.o
1166b0c3d44SSam Ravnborg        obj-$(CONFIG_X86_PM_TIMER)	+= pmtimer_64.o
1176b0c3d44SSam Ravnborg        obj-$(CONFIG_AUDIT)		+= audit_64.o
1186b0c3d44SSam Ravnborg
1196b0c3d44SSam Ravnborg        obj-$(CONFIG_GART_IOMMU)	+= pci-gart_64.o aperture_64.o
1206b0c3d44SSam Ravnborg        obj-$(CONFIG_CALGARY_IOMMU)	+= pci-calgary_64.o tce_64.o
121000fca2dSJoerg Roedel        obj-$(CONFIG_AMD_IOMMU)		+= amd_iommu_init.o amd_iommu.o
1226b0c3d44SSam Ravnborg        obj-$(CONFIG_SWIOTLB)		+= pci-swiotlb_64.o
123d39398a3SYinghai Lu
124d39398a3SYinghai Lu        obj-$(CONFIG_PCI_MMCONFIG)	+= mmconf-fam10h_64.o
1256b0c3d44SSam Ravnborgendif
126