xref: /linux/arch/x86/mm/Makefile (revision 3a39d672e7f48b8d6b91a09afa4b55352773b4b5)
1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
21cd9c22fSKirill A. Shutemov# Kernel does not boot with instrumentation of tlb.c and mem_encrypt*.c
35c9a8750SDmitry VyukovKCOV_INSTRUMENT_tlb.o			:= n
420f07a04SKirill A. ShutemovKCOV_INSTRUMENT_mem_encrypt.o		:= n
5dbca5e1aSKuppuswamy SathyanarayananKCOV_INSTRUMENT_mem_encrypt_amd.o	:= n
61cd9c22fSKirill A. ShutemovKCOV_INSTRUMENT_mem_encrypt_identity.o	:= n
7818c4fdaSNaohiro AotaKCOV_INSTRUMENT_pgprot.o		:= n
867bb8e99STom Lendacky
920f07a04SKirill A. ShutemovKASAN_SANITIZE_mem_encrypt.o		:= n
10dbca5e1aSKuppuswamy SathyanarayananKASAN_SANITIZE_mem_encrypt_amd.o	:= n
111cd9c22fSKirill A. ShutemovKASAN_SANITIZE_mem_encrypt_identity.o	:= n
12818c4fdaSNaohiro AotaKASAN_SANITIZE_pgprot.o		:= n
1367bb8e99STom Lendacky
1440d04110SMarco Elver# Disable KCSAN entirely, because otherwise we get warnings that some functions
1540d04110SMarco Elver# reference __initdata sections.
1640d04110SMarco ElverKCSAN_SANITIZE := n
1793324e68SAlexander Potapenko# Avoid recursion by not calling KMSAN hooks for CEA code.
1893324e68SAlexander PotapenkoKMSAN_SANITIZE_cpu_entry_area.o := n
19c0935fcaSChangbin DuKMSAN_SANITIZE_mem_encrypt_identity.o := n
2040d04110SMarco Elver
2167bb8e99STom Lendackyifdef CONFIG_FUNCTION_TRACER
2220f07a04SKirill A. ShutemovCFLAGS_REMOVE_mem_encrypt.o		= -pg
23dbca5e1aSKuppuswamy SathyanarayananCFLAGS_REMOVE_mem_encrypt_amd.o		= -pg
241cd9c22fSKirill A. ShutemovCFLAGS_REMOVE_mem_encrypt_identity.o	= -pg
25818c4fdaSNaohiro AotaCFLAGS_REMOVE_pgprot.o			= -pg
2667bb8e99STom Lendackyendif
275c9a8750SDmitry Vyukov
28f9b57cf8SIngo Molnarobj-y				:=  init.o init_$(BITS).o fault.o ioremap.o extable.o mmap.o \
2998931dd9SLinus Torvalds				    pgtable.o physaddr.o tlb.o cpu_entry_area.o maccess.o pgprot.o
30f9b57cf8SIngo Molnar
31f9b57cf8SIngo Molnarobj-y				+= pat/
322596e0faSH. Peter Anvin
33577eebeaSJeremy Fitzhardinge# Make sure __phys_addr has no stackprotector
34893ab004SMasahiro YamadaCFLAGS_physaddr.o		:= -fno-stack-protector
35893ab004SMasahiro YamadaCFLAGS_mem_encrypt_identity.o	:= -fno-stack-protector
36577eebeaSJeremy Fitzhardinge
37*b1992c37SMasahiro YamadaCFLAGS_fault.o := -I $(src)/../include/asm/trace
38d34603b0SSeiji Aguchi
39fd940934SKeith Packardobj-$(CONFIG_X86_32)		+= pgtable_32.o iomap_32.o
402596e0faSH. Peter Anvin
412596e0faSH. Peter Anvinobj-$(CONFIG_HUGETLB_PAGE)	+= hugetlbpage.o
422ae27137SSteven Priceobj-$(CONFIG_PTDUMP_CORE)	+= dump_pagetables.o
432ae27137SSteven Priceobj-$(CONFIG_PTDUMP_DEBUGFS)	+= debug_pagetables.o
442596e0faSH. Peter Anvin
452596e0faSH. Peter Anvinobj-$(CONFIG_HIGHMEM)		+= highmem_32.o
462596e0faSH. Peter Anvin
47ef7f0d6aSAndrey RyabininKASAN_SANITIZE_kasan_init_$(BITS).o := n
48ef7f0d6aSAndrey Ryabininobj-$(CONFIG_KASAN)		+= kasan_init_$(BITS).o
49ef7f0d6aSAndrey Ryabinin
50ce732a75SAlexander PotapenkoKMSAN_SANITIZE_kmsan_shadow.o	:= n
51ce732a75SAlexander Potapenkoobj-$(CONFIG_KMSAN)		+= kmsan_shadow.o
52ce732a75SAlexander Potapenko
53ff3a3e9bSPekka Paalanenobj-$(CONFIG_MMIOTRACE)		+= mmiotrace.o
54fd3fdf11SPekka Paalanenmmiotrace-y			:= kmmio.o pf_in.o mmio-mod.o
55ff3a3e9bSPekka Paalanenobj-$(CONFIG_MMIOTRACE_TEST)	+= testmmiotrace.o
56ff3a3e9bSPekka Paalanen
5771ee73e7SRusty Russellobj-$(CONFIG_NUMA)		+= numa.o numa_$(BITS).o
58c6f58878STejun Heoobj-$(CONFIG_AMD_NUMA)		+= amdtopology.o
595acd91abSTejun Heoobj-$(CONFIG_ACPI_NUMA)		+= srat.o
606247943dSYinghai Lu
6162b5f7d0SDave Hansenobj-$(CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS)	+= pkeys.o
620483e1faSThomas Garnierobj-$(CONFIG_RANDOMIZE_MEMORY)			+= kaslr.o
63ea4654e0SBreno Leitaoobj-$(CONFIG_MITIGATION_PAGE_TABLE_ISOLATION)	+= pti.o
6462b5f7d0SDave Hansen
6520f07a04SKirill A. Shutemovobj-$(CONFIG_X86_MEM_ENCRYPT)	+= mem_encrypt.o
66dbca5e1aSKuppuswamy Sathyanarayananobj-$(CONFIG_AMD_MEM_ENCRYPT)	+= mem_encrypt_amd.o
6720f07a04SKirill A. Shutemov
681cd9c22fSKirill A. Shutemovobj-$(CONFIG_AMD_MEM_ENCRYPT)	+= mem_encrypt_identity.o
696ebcb060STom Lendackyobj-$(CONFIG_AMD_MEM_ENCRYPT)	+= mem_encrypt_boot.o
70