Greg Kroah-Hartman | b244131 | 2017-11-01 15:07:57 +0100 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
Sam Ravnborg | 6b0c3d4 | 2008-01-30 13:32:27 +0100 | [diff] [blame] | 2 | # |
| 3 | # Makefile for the linux kernel. |
| 4 | # |
Sam Ravnborg | 88e4d25 | 2007-10-17 22:06:30 +0200 | [diff] [blame] | 5 | |
Luis R. Rodriguez | 8d152e7 | 2016-04-13 17:04:34 -0700 | [diff] [blame] | 6 | extra-y := head_$(BITS).o |
| 7 | extra-y += head$(BITS).o |
Luis R. Rodriguez | f2d8529 | 2016-04-13 17:04:43 -0700 | [diff] [blame] | 8 | extra-y += ebda.o |
Luis R. Rodriguez | 8d152e7 | 2016-04-13 17:04:34 -0700 | [diff] [blame] | 9 | extra-y += platform-quirks.o |
| 10 | extra-y += vmlinux.lds |
Sam Ravnborg | 6b0c3d4 | 2008-01-30 13:32:27 +0100 | [diff] [blame] | 11 | |
| 12 | CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE) |
Ingo Molnar | e43eb7b | 2008-02-14 08:38:49 +0100 | [diff] [blame] | 13 | |
Steven Rostedt | 606576c | 2008-10-06 19:06:12 -0400 | [diff] [blame] | 14 | ifdef CONFIG_FUNCTION_TRACER |
Ingo Molnar | 34646bc | 2008-07-09 15:42:09 +0200 | [diff] [blame] | 15 | # Do not profile debug and lowlevel utilities |
Steven Rostedt | 89e1be5 | 2011-05-27 23:11:24 -0400 | [diff] [blame] | 16 | CFLAGS_REMOVE_tsc.o = -pg |
Jeremy Fitzhardinge | d5de884 | 2008-07-23 13:28:58 -0700 | [diff] [blame] | 17 | CFLAGS_REMOVE_paravirt-spinlocks.o = -pg |
Jeremy Fitzhardinge | 9ecd4e1 | 2010-09-22 17:07:27 -0700 | [diff] [blame] | 18 | CFLAGS_REMOVE_pvclock.o = -pg |
Steven Rostedt | 258af47 | 2010-09-22 22:22:25 -0400 | [diff] [blame] | 19 | CFLAGS_REMOVE_kvmclock.o = -pg |
Steven Rostedt | 15adc04 | 2008-10-23 09:33:08 -0400 | [diff] [blame] | 20 | CFLAGS_REMOVE_ftrace.o = -pg |
Ingo Molnar | 6cf87ef | 2008-11-04 10:42:23 +0100 | [diff] [blame] | 21 | CFLAGS_REMOVE_early_printk.o = -pg |
Kirill A. Shutemov | bb43dbc | 2017-06-27 14:59:48 +0300 | [diff] [blame] | 22 | CFLAGS_REMOVE_head64.o = -pg |
Steven Rostedt | 7fa09f2 | 2008-05-14 21:30:32 -0400 | [diff] [blame] | 23 | endif |
| 24 | |
Josh Poimboeuf | c0dd671686 | 2016-02-28 22:22:34 -0600 | [diff] [blame] | 25 | KASAN_SANITIZE_head$(BITS).o := n |
| 26 | KASAN_SANITIZE_dumpstack.o := n |
| 27 | KASAN_SANITIZE_dumpstack_$(BITS).o := n |
Andrey Ryabinin | 12a8cc7 | 2017-09-29 17:08:18 +0300 | [diff] [blame] | 28 | KASAN_SANITIZE_stacktrace.o := n |
| 29 | KASAN_SANITIZE_paravirt.o := n |
Josh Poimboeuf | c0dd671686 | 2016-02-28 22:22:34 -0600 | [diff] [blame] | 30 | |
Marco Elver | 40d0411 | 2019-11-14 19:03:03 +0100 | [diff] [blame] | 31 | # With some compiler versions the generated code results in boot hangs, caused |
| 32 | # by several compilation units. To be safe, disable all instrumentation. |
| 33 | KCSAN_SANITIZE := n |
| 34 | |
Josh Poimboeuf | c0dd671686 | 2016-02-28 22:22:34 -0600 | [diff] [blame] | 35 | OBJECT_FILES_NON_STANDARD_test_nx.o := y |
Thomas Gleixner | fb2af07 | 2019-04-24 15:41:17 +0200 | [diff] [blame] | 36 | OBJECT_FILES_NON_STANDARD_paravirt_patch.o := y |
Andrey Ryabinin | ef7f0d6 | 2015-02-13 14:39:25 -0800 | [diff] [blame] | 37 | |
Josh Poimboeuf | e2ac83d | 2018-01-22 22:07:46 -0600 | [diff] [blame] | 38 | ifdef CONFIG_FRAME_POINTER |
| 39 | OBJECT_FILES_NON_STANDARD_ftrace_$(BITS).o := y |
| 40 | endif |
| 41 | |
Dmitry Vyukov | 5c9a875 | 2016-03-22 14:27:30 -0700 | [diff] [blame] | 42 | # If instrumentation of this dir is enabled, boot hangs during first second. |
| 43 | # Probably could be more selective here, but note that files related to irqs, |
| 44 | # boot, dumpstack/stacktrace, etc are either non-interesting or can lead to |
| 45 | # non-deterministic coverage. |
| 46 | KCOV_INSTRUMENT := n |
| 47 | |
Masahiro Yamada | 9cc342f | 2019-05-13 15:22:16 +0900 | [diff] [blame] | 48 | CFLAGS_irq.o := -I $(srctree)/$(src)/../include/asm/trace |
Steven Rostedt (Red Hat) | 83ab851 | 2013-06-21 10:29:05 -0400 | [diff] [blame] | 49 | |
Ingo Molnar | 905a36a | 2015-06-03 13:37:36 +0200 | [diff] [blame] | 50 | obj-y := process_$(BITS).o signal.o |
Brian Gerst | c0bfd26 | 2015-06-22 07:55:10 -0400 | [diff] [blame] | 51 | obj-$(CONFIG_COMPAT) += signal_compat.o |
Thomas Gleixner | d8ed9d4 | 2017-08-28 08:47:43 +0200 | [diff] [blame] | 52 | obj-y += traps.o idt.o irq.o irq_$(BITS).o dumpstack_$(BITS).o |
Andy Lutomirski | a5b9e5a | 2015-07-30 14:31:34 -0700 | [diff] [blame] | 53 | obj-y += time.o ioport.o dumpstack.o nmi.o |
| 54 | obj-$(CONFIG_MODIFY_LDT_SYSCALL) += ldt.o |
Masahiro Yamada | e9666d1 | 2018-12-31 00:14:15 +0900 | [diff] [blame] | 55 | obj-y += setup.o x86_init.o i8259.o irqinit.o |
| 56 | obj-$(CONFIG_JUMP_LABEL) += jump_label.o |
Peter Zijlstra | e360adb | 2010-10-14 14:01:34 +0800 | [diff] [blame] | 57 | obj-$(CONFIG_IRQ_WORK) += irq_work.o |
Dan Williams | 5d94e81 | 2011-03-08 10:36:19 -0800 | [diff] [blame] | 58 | obj-y += probe_roms.o |
Brian Gerst | 121b32a | 2020-03-13 15:51:41 -0400 | [diff] [blame] | 59 | obj-$(CONFIG_X86_32) += sys_ia32.o |
| 60 | obj-$(CONFIG_IA32_EMULATION) += sys_ia32.o |
Steven Rostedt (VMware) | 1fa9d67 | 2017-03-23 10:33:53 -0400 | [diff] [blame] | 61 | obj-$(CONFIG_X86_64) += sys_x86_64.o |
H. Peter Anvin | 197725d | 2014-05-04 10:00:49 -0700 | [diff] [blame] | 62 | obj-$(CONFIG_X86_ESPFIX64) += espfix_64.o |
Dave Young | 5039e31 | 2013-12-20 18:02:21 +0800 | [diff] [blame] | 63 | obj-$(CONFIG_SYSFS) += ksysfs.o |
Yinghai Lu | 064d25f | 2008-06-16 19:58:28 -0700 | [diff] [blame] | 64 | obj-y += bootflag.o e820.o |
David Rientjes | 4061d68 | 2011-03-22 16:34:57 -0700 | [diff] [blame] | 65 | obj-y += pci-dma.o quirks.o topology.o kdebugfs.o |
Christoph Hellwig | fec777c | 2018-03-19 11:38:15 +0100 | [diff] [blame] | 66 | obj-y += alternative.o i8253.o hw_breakpoint.o |
Bin Gao | 7da7c15 | 2013-10-21 09:16:33 -0700 | [diff] [blame] | 67 | obj-y += tsc.o tsc_msr.o io_delay.o rtc.o |
Konrad Rzeszutek Wilk | 5bef80a | 2010-08-26 13:57:58 -0400 | [diff] [blame] | 68 | obj-y += pci-iommu_table.o |
Bjorn Helgaas | 30919b0 | 2010-12-16 10:38:51 -0700 | [diff] [blame] | 69 | obj-y += resource.o |
Nick Desaulniers | d0a8d93 | 2018-06-21 09:23:24 -0700 | [diff] [blame] | 70 | obj-y += irqflags.o |
Sam Ravnborg | 6b0c3d4 | 2008-01-30 13:32:27 +0100 | [diff] [blame] | 71 | |
Suresh Siddha | 61c4628 | 2008-03-10 15:28:04 -0700 | [diff] [blame] | 72 | obj-y += process.o |
Ingo Molnar | ce4c4c2 | 2015-04-22 10:39:11 +0200 | [diff] [blame] | 73 | obj-y += fpu/ |
Sam Ravnborg | 6b0c3d4 | 2008-01-30 13:32:27 +0100 | [diff] [blame] | 74 | obj-y += ptrace.o |
Sam Ravnborg | 6b0c3d4 | 2008-01-30 13:32:27 +0100 | [diff] [blame] | 75 | obj-$(CONFIG_X86_32) += tls.o |
| 76 | obj-$(CONFIG_IA32_EMULATION) += tls.o |
| 77 | obj-y += step.o |
Joseph Cihula | 3162534 | 2009-06-30 19:30:59 -0700 | [diff] [blame] | 78 | obj-$(CONFIG_INTEL_TXT) += tboot.o |
David Rientjes | 4061d68 | 2011-03-22 16:34:57 -0700 | [diff] [blame] | 79 | obj-$(CONFIG_ISA_DMA_API) += i8237.o |
Sam Ravnborg | 6b0c3d4 | 2008-01-30 13:32:27 +0100 | [diff] [blame] | 80 | obj-$(CONFIG_STACKTRACE) += stacktrace.o |
| 81 | obj-y += cpu/ |
| 82 | obj-y += acpi/ |
Ingo Molnar | f095df0 | 2009-01-27 17:17:55 +0100 | [diff] [blame] | 83 | obj-y += reboot.o |
Sam Ravnborg | 6b0c3d4 | 2008-01-30 13:32:27 +0100 | [diff] [blame] | 84 | obj-$(CONFIG_X86_MSR) += msr.o |
| 85 | obj-$(CONFIG_X86_CPUID) += cpuid.o |
Sam Ravnborg | 6b0c3d4 | 2008-01-30 13:32:27 +0100 | [diff] [blame] | 86 | obj-$(CONFIG_PCI) += early-quirks.o |
Sam Ravnborg | 3a900d8 | 2008-02-04 16:47:55 +0100 | [diff] [blame] | 87 | apm-y := apm_32.o |
| 88 | obj-$(CONFIG_APM) += apm.o |
Ingo Molnar | 3e5095d | 2009-01-27 17:07:08 +0100 | [diff] [blame] | 89 | obj-$(CONFIG_SMP) += smp.o |
Henrik Kretzschmar | ec8df88 | 2011-03-11 08:02:35 +0100 | [diff] [blame] | 90 | obj-$(CONFIG_SMP) += smpboot.o |
Thomas Gleixner | 8b223bc | 2016-11-19 13:47:36 +0000 | [diff] [blame] | 91 | obj-$(CONFIG_X86_TSC) += tsc_sync.o |
Brian Gerst | 996db81 | 2009-01-27 12:56:47 +0900 | [diff] [blame] | 92 | obj-$(CONFIG_SMP) += setup_percpu.o |
Alexey Starikovskiy | 85bddde | 2008-04-04 23:43:18 +0400 | [diff] [blame] | 93 | obj-$(CONFIG_X86_MPPARSE) += mpparse.o |
Ingo Molnar | 9be1b56 | 2009-02-17 23:12:48 +0100 | [diff] [blame] | 94 | obj-y += apic/ |
Sam Ravnborg | 6b0c3d4 | 2008-01-30 13:32:27 +0100 | [diff] [blame] | 95 | obj-$(CONFIG_X86_REBOOTFIXUPS) += reboot_fixups_32.o |
Steven Rostedt | 3d08339 | 2008-05-12 21:20:42 +0200 | [diff] [blame] | 96 | obj-$(CONFIG_DYNAMIC_FTRACE) += ftrace.o |
Steven Rostedt (VMware) | 1fa9d67 | 2017-03-23 10:33:53 -0400 | [diff] [blame] | 97 | obj-$(CONFIG_FUNCTION_TRACER) += ftrace_$(BITS).o |
Ingo Molnar | ccd50df | 2009-03-13 17:02:17 +0100 | [diff] [blame] | 98 | obj-$(CONFIG_FUNCTION_GRAPH_TRACER) += ftrace.o |
| 99 | obj-$(CONFIG_FTRACE_SYSCALLS) += ftrace.o |
David Sharp | 8cbd9cc | 2012-11-13 12:18:21 -0800 | [diff] [blame] | 100 | obj-$(CONFIG_X86_TSC) += trace_clock.o |
Omar Sandoval | 8757dc9 | 2019-12-20 08:22:49 -0800 | [diff] [blame] | 101 | obj-$(CONFIG_CRASH_CORE) += crash_core_$(BITS).o |
Dave Young | 2965faa | 2015-09-09 15:38:55 -0700 | [diff] [blame] | 102 | obj-$(CONFIG_KEXEC_CORE) += machine_kexec_$(BITS).o |
| 103 | obj-$(CONFIG_KEXEC_CORE) += relocate_kernel_$(BITS).o crash.o |
Vivek Goyal | 74ca317 | 2014-08-29 15:18:46 -0700 | [diff] [blame] | 104 | obj-$(CONFIG_KEXEC_FILE) += kexec-bzimage64.o |
Sam Ravnborg | 6b0c3d4 | 2008-01-30 13:32:27 +0100 | [diff] [blame] | 105 | obj-$(CONFIG_CRASH_DUMP) += crash_dump_$(BITS).o |
Masami Hiramatsu | f684199 | 2012-09-28 17:15:22 +0900 | [diff] [blame] | 106 | obj-y += kprobes/ |
Amerigo Wang | 0fdc83b | 2009-06-03 21:46:19 -0400 | [diff] [blame] | 107 | obj-$(CONFIG_MODULES) += module.o |
Borislav Petkov | 5933094 | 2020-04-04 01:33:05 +0200 | [diff] [blame] | 108 | obj-$(CONFIG_X86_32) += doublefault_32.o |
Ingo Molnar | 82da3ff | 2008-04-17 20:05:37 +0200 | [diff] [blame] | 109 | obj-$(CONFIG_KGDB) += kgdb.o |
Sam Ravnborg | 6b0c3d4 | 2008-01-30 13:32:27 +0100 | [diff] [blame] | 110 | obj-$(CONFIG_VM86) += vm86_32.o |
| 111 | obj-$(CONFIG_EARLY_PRINTK) += early_printk.o |
| 112 | |
| 113 | obj-$(CONFIG_HPET_TIMER) += hpet.o |
Jacob Pan | bb24c47 | 2009-09-02 07:37:17 -0700 | [diff] [blame] | 114 | obj-$(CONFIG_APB_TIMER) += apb_timer.o |
Sam Ravnborg | 6b0c3d4 | 2008-01-30 13:32:27 +0100 | [diff] [blame] | 115 | |
Andreas Herrmann | 23ac4ae | 2010-09-17 18:03:43 +0200 | [diff] [blame] | 116 | obj-$(CONFIG_AMD_NB) += amd_nb.o |
Don Zickus | 99e8b9c | 2011-10-13 15:14:26 -0400 | [diff] [blame] | 117 | obj-$(CONFIG_DEBUG_NMI_SELFTEST) += nmi_selftest.o |
Sam Ravnborg | 6b0c3d4 | 2008-01-30 13:32:27 +0100 | [diff] [blame] | 118 | |
Marcelo Tosatti | 90993cd | 2012-08-16 17:00:19 -0300 | [diff] [blame] | 119 | obj-$(CONFIG_KVM_GUEST) += kvm.o kvmclock.o |
Thomas Gleixner | fb2af07 | 2019-04-24 15:41:17 +0200 | [diff] [blame] | 120 | obj-$(CONFIG_PARAVIRT) += paravirt.o paravirt_patch.o |
Jeremy Fitzhardinge | b4ecc12 | 2009-05-13 17:16:55 -0700 | [diff] [blame] | 121 | obj-$(CONFIG_PARAVIRT_SPINLOCKS)+= paravirt-spinlocks.o |
Gerd Hoffmann | 7af192c | 2008-06-03 16:17:29 +0200 | [diff] [blame] | 122 | obj-$(CONFIG_PARAVIRT_CLOCK) += pvclock.o |
Dan Williams | 7a67832 | 2015-08-19 00:34:34 -0400 | [diff] [blame] | 123 | obj-$(CONFIG_X86_PMEM_LEGACY_DEVICE) += pmem.o |
Michael Opdenacker | 6792689 | 2008-01-30 13:33:18 +0100 | [diff] [blame] | 124 | |
Jan Kiszka | 4a36260 | 2017-11-27 09:11:46 +0100 | [diff] [blame] | 125 | obj-$(CONFIG_JAILHOUSE_GUEST) += jailhouse.o |
| 126 | |
Thomas Gleixner | f7eaf6e | 2017-08-28 08:47:20 +0200 | [diff] [blame] | 127 | obj-$(CONFIG_EISA) += eisa.o |
Stas Sergeev | e5e1d3c | 2008-05-07 12:39:56 +0200 | [diff] [blame] | 128 | obj-$(CONFIG_PCSPKR_PLATFORM) += pcspeaker.o |
Sam Ravnborg | 6b0c3d4 | 2008-01-30 13:32:27 +0100 | [diff] [blame] | 129 | |
Arjan van de Ven | b43d196 | 2008-10-05 12:21:32 -0700 | [diff] [blame] | 130 | obj-$(CONFIG_X86_CHECK_BIOS_CORRUPTION) += check.o |
| 131 | |
Ian Campbell | b041cf2 | 2009-01-23 10:56:16 +0000 | [diff] [blame] | 132 | obj-$(CONFIG_SWIOTLB) += pci-swiotlb.o |
Sebastian Andrzej Siewior | da6b737 | 2011-02-22 21:07:37 +0100 | [diff] [blame] | 133 | obj-$(CONFIG_OF) += devicetree.o |
Srikar Dronamraju | 2b14449 | 2012-02-09 14:56:42 +0530 | [diff] [blame] | 134 | obj-$(CONFIG_UPROBES) += uprobes.o |
David Herrmann | e3263ab | 2013-08-02 14:05:22 +0200 | [diff] [blame] | 135 | obj-y += sysfb.o |
| 136 | obj-$(CONFIG_X86_SYSFB) += sysfb_simplefb.o |
David Herrmann | 2995e50 | 2013-08-02 14:05:23 +0200 | [diff] [blame] | 137 | obj-$(CONFIG_EFI) += sysfb_efi.o |
Jeremy Fitzhardinge | cfb80c9 | 2008-12-16 12:17:36 -0800 | [diff] [blame] | 138 | |
Jiri Olsa | c5e6319 | 2012-08-07 15:20:36 +0200 | [diff] [blame] | 139 | obj-$(CONFIG_PERF_EVENTS) += perf_regs.o |
Seiji Aguchi | cf910e8 | 2013-06-20 11:46:53 -0400 | [diff] [blame] | 140 | obj-$(CONFIG_TRACING) += tracepoint.o |
Tim Chen | de966cf | 2016-11-29 10:43:27 -0800 | [diff] [blame] | 141 | obj-$(CONFIG_SCHED_MC_PRIO) += itmt.o |
Babu Moger | b971880 | 2019-11-05 21:25:32 +0000 | [diff] [blame] | 142 | obj-$(CONFIG_X86_UMIP) += umip.o |
Jiri Olsa | c5e6319 | 2012-08-07 15:20:36 +0200 | [diff] [blame] | 143 | |
Josh Poimboeuf | 11af847 | 2017-10-13 15:02:00 -0500 | [diff] [blame] | 144 | obj-$(CONFIG_UNWINDER_ORC) += unwind_orc.o |
| 145 | obj-$(CONFIG_UNWINDER_FRAME_POINTER) += unwind_frame.o |
| 146 | obj-$(CONFIG_UNWINDER_GUESS) += unwind_guess.o |
Josh Poimboeuf | 7c7900f | 2016-09-16 14:18:12 -0500 | [diff] [blame] | 147 | |
Joerg Roedel | f980f9c | 2020-09-07 15:15:39 +0200 | [diff] [blame^] | 148 | obj-$(CONFIG_AMD_MEM_ENCRYPT) += sev-es.o |
Sam Ravnborg | 6b0c3d4 | 2008-01-30 13:32:27 +0100 | [diff] [blame] | 149 | ### |
| 150 | # 64 bit specific files |
| 151 | ifeq ($(CONFIG_X86_64),y) |
Ingo Molnar | f62bae5 | 2009-02-17 18:09:24 +0100 | [diff] [blame] | 152 | obj-$(CONFIG_AUDIT) += audit_64.o |
Sam Ravnborg | 6b0c3d4 | 2008-01-30 13:32:27 +0100 | [diff] [blame] | 153 | |
Joerg Roedel | fffcda1 | 2011-05-10 17:22:06 +0200 | [diff] [blame] | 154 | obj-$(CONFIG_GART_IOMMU) += amd_gart_64.o aperture_64.o |
Yinghai Lu | d39398a | 2008-02-26 11:04:17 -0800 | [diff] [blame] | 155 | |
Jan Kiszka | 8364e1f | 2018-03-07 08:39:17 +0100 | [diff] [blame] | 156 | obj-$(CONFIG_MMCONF_FAM10H) += mmconf-fam10h_64.o |
Ravikiran G Thirumalai | 7051113 | 2009-03-23 23:14:29 -0700 | [diff] [blame] | 157 | obj-y += vsmp_64.o |
Sam Ravnborg | 6b0c3d4 | 2008-01-30 13:32:27 +0100 | [diff] [blame] | 158 | endif |
Nayna Jain | 0914ade | 2018-10-09 23:00:33 +0530 | [diff] [blame] | 159 | |
Nayna Jain | 9e2b4be | 2020-03-08 20:57:51 -0400 | [diff] [blame] | 160 | obj-$(CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT) += ima_arch.o |