xref: /openbmc/linux/arch/x86/kernel/Makefile (revision 63dc02bd)
1#
2# Makefile for the linux kernel.
3#
4
5extra-y                := head_$(BITS).o head$(BITS).o head.o init_task.o vmlinux.lds
6
7CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE)
8
9ifdef CONFIG_FUNCTION_TRACER
10# Do not profile debug and lowlevel utilities
11CFLAGS_REMOVE_tsc.o = -pg
12CFLAGS_REMOVE_rtc.o = -pg
13CFLAGS_REMOVE_paravirt-spinlocks.o = -pg
14CFLAGS_REMOVE_pvclock.o = -pg
15CFLAGS_REMOVE_kvmclock.o = -pg
16CFLAGS_REMOVE_ftrace.o = -pg
17CFLAGS_REMOVE_early_printk.o = -pg
18endif
19
20obj-y			:= process_$(BITS).o signal.o entry_$(BITS).o
21obj-y			+= traps.o irq.o irq_$(BITS).o dumpstack_$(BITS).o
22obj-y			+= time.o ioport.o ldt.o dumpstack.o nmi.o
23obj-y			+= setup.o x86_init.o i8259.o irqinit.o jump_label.o
24obj-$(CONFIG_IRQ_WORK)  += irq_work.o
25obj-y			+= probe_roms.o
26obj-$(CONFIG_X86_32)	+= sys_i386_32.o i386_ksyms_32.o
27obj-$(CONFIG_X86_64)	+= sys_x86_64.o x8664_ksyms_64.o
28obj-y			+= syscall_$(BITS).o
29obj-$(CONFIG_X86_64)	+= vsyscall_64.o
30obj-$(CONFIG_X86_64)	+= vsyscall_emu_64.o
31obj-y			+= bootflag.o e820.o
32obj-y			+= pci-dma.o quirks.o topology.o kdebugfs.o
33obj-y			+= alternative.o i8253.o pci-nommu.o hw_breakpoint.o
34obj-y			+= tsc.o io_delay.o rtc.o
35obj-y			+= pci-iommu_table.o
36obj-y			+= resource.o
37
38obj-y				+= trampoline.o trampoline_$(BITS).o
39obj-y				+= process.o
40obj-y				+= i387.o xsave.o
41obj-y				+= ptrace.o
42obj-$(CONFIG_X86_32)		+= tls.o
43obj-$(CONFIG_IA32_EMULATION)	+= tls.o
44obj-y				+= step.o
45obj-$(CONFIG_INTEL_TXT)		+= tboot.o
46obj-$(CONFIG_ISA_DMA_API)	+= i8237.o
47obj-$(CONFIG_STACKTRACE)	+= stacktrace.o
48obj-y				+= cpu/
49obj-y				+= acpi/
50obj-y				+= reboot.o
51obj-$(CONFIG_X86_32)		+= reboot_32.o
52obj-$(CONFIG_MCA)		+= mca_32.o
53obj-$(CONFIG_X86_MSR)		+= msr.o
54obj-$(CONFIG_X86_CPUID)		+= cpuid.o
55obj-$(CONFIG_PCI)		+= early-quirks.o
56apm-y				:= apm_32.o
57obj-$(CONFIG_APM)		+= apm.o
58obj-$(CONFIG_SMP)		+= smp.o
59obj-$(CONFIG_SMP)		+= smpboot.o
60obj-$(CONFIG_SMP)		+= tsc_sync.o
61obj-$(CONFIG_SMP)		+= setup_percpu.o
62obj-$(CONFIG_X86_MPPARSE)	+= mpparse.o
63obj-y				+= apic/
64obj-$(CONFIG_X86_REBOOTFIXUPS)	+= reboot_fixups_32.o
65obj-$(CONFIG_DYNAMIC_FTRACE)	+= ftrace.o
66obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o
67obj-$(CONFIG_FTRACE_SYSCALLS)	+= ftrace.o
68obj-$(CONFIG_KEXEC)		+= machine_kexec_$(BITS).o
69obj-$(CONFIG_KEXEC)		+= relocate_kernel_$(BITS).o crash.o
70obj-$(CONFIG_CRASH_DUMP)	+= crash_dump_$(BITS).o
71obj-$(CONFIG_KPROBES)		+= kprobes.o
72obj-$(CONFIG_OPTPROBES)		+= kprobes-opt.o
73obj-$(CONFIG_MODULES)		+= module.o
74obj-$(CONFIG_DOUBLEFAULT) 	+= doublefault_32.o
75obj-$(CONFIG_KGDB)		+= kgdb.o
76obj-$(CONFIG_VM86)		+= vm86_32.o
77obj-$(CONFIG_EARLY_PRINTK)	+= early_printk.o
78
79obj-$(CONFIG_HPET_TIMER) 	+= hpet.o
80obj-$(CONFIG_APB_TIMER)		+= apb_timer.o
81
82obj-$(CONFIG_AMD_NB)		+= amd_nb.o
83obj-$(CONFIG_DEBUG_RODATA_TEST)	+= test_rodata.o
84obj-$(CONFIG_DEBUG_NX_TEST)	+= test_nx.o
85obj-$(CONFIG_DEBUG_NMI_SELFTEST) += nmi_selftest.o
86
87obj-$(CONFIG_KVM_GUEST)		+= kvm.o
88obj-$(CONFIG_KVM_CLOCK)		+= kvmclock.o
89obj-$(CONFIG_PARAVIRT)		+= paravirt.o paravirt_patch_$(BITS).o
90obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= paravirt-spinlocks.o
91obj-$(CONFIG_PARAVIRT_CLOCK)	+= pvclock.o
92
93obj-$(CONFIG_PCSPKR_PLATFORM)	+= pcspeaker.o
94
95microcode-y				:= microcode_core.o
96microcode-$(CONFIG_MICROCODE_INTEL)	+= microcode_intel.o
97microcode-$(CONFIG_MICROCODE_AMD)	+= microcode_amd.o
98obj-$(CONFIG_MICROCODE)			+= microcode.o
99
100obj-$(CONFIG_X86_CHECK_BIOS_CORRUPTION) += check.o
101
102obj-$(CONFIG_SWIOTLB)			+= pci-swiotlb.o
103obj-$(CONFIG_OF)			+= devicetree.o
104
105###
106# 64 bit specific files
107ifeq ($(CONFIG_X86_64),y)
108	obj-$(CONFIG_AUDIT)		+= audit_64.o
109
110	obj-$(CONFIG_GART_IOMMU)	+= amd_gart_64.o aperture_64.o
111	obj-$(CONFIG_CALGARY_IOMMU)	+= pci-calgary_64.o tce_64.o
112
113	obj-$(CONFIG_PCI_MMCONFIG)	+= mmconf-fam10h_64.o
114	obj-y				+= vsmp_64.o
115endif
116