1b2441318SGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 2583d0e90SSam Ravnborg# 3583d0e90SSam Ravnborg# Makefile for x86 specific library files. 4583d0e90SSam Ravnborg# 5583d0e90SSam Ravnborg 65c9a8750SDmitry Vyukov# Produces uninteresting flaky coverage. 75c9a8750SDmitry VyukovKCOV_INSTRUMENT_delay.o := n 85c9a8750SDmitry Vyukov 940d04110SMarco Elver# KCSAN uses udelay for introducing watchpoint delay; avoid recursion. 1040d04110SMarco ElverKCSAN_SANITIZE_delay.o := n 11f5d2313bSMarco Elverifdef CONFIG_KCSAN 12f5d2313bSMarco Elver# In case KCSAN+lockdep+ftrace are enabled, disable ftrace for delay.o to avoid 13f5d2313bSMarco Elver# lockdep -> [other libs] -> KCSAN -> udelay -> ftrace -> lockdep recursion. 14f5d2313bSMarco ElverCFLAGS_REMOVE_delay.o = $(CC_FLAGS_FTRACE) 15f5d2313bSMarco Elverendif 1640d04110SMarco Elver 17eb13296cSMasami Hiramatsuinat_tables_script = $(srctree)/arch/x86/tools/gen-insn-attr-x86.awk 18eb13296cSMasami Hiramatsuinat_tables_maps = $(srctree)/arch/x86/lib/x86-opcode-map.txt 19eb13296cSMasami Hiramatsuquiet_cmd_inat_tables = GEN $@ 20172caf19SMasahiro Yamada cmd_inat_tables = $(AWK) -f $(inat_tables_script) $(inat_tables_maps) > $@ 21eb13296cSMasami Hiramatsu 22eb13296cSMasami Hiramatsu$(obj)/inat-tables.c: $(inat_tables_script) $(inat_tables_maps) 23eb13296cSMasami Hiramatsu $(call cmd,inat_tables) 24eb13296cSMasami Hiramatsu 25eb13296cSMasami Hiramatsu$(obj)/inat.o: $(obj)/inat-tables.c 26eb13296cSMasami Hiramatsu 27eb13296cSMasami Hiramatsuclean-files := inat-tables.c 28eb13296cSMasami Hiramatsu 29a7b480e7SBorislav Petkovobj-$(CONFIG_SMP) += msr-smp.o cache-smp.o 30583d0e90SSam Ravnborg 3199f925ceSBorislav Petkovlib-y := delay.o misc.o cmdline.o cpu.o 321ac2e6caSRobert Richterlib-y += usercopy_$(BITS).o usercopy.o getuser.o putuser.o 33583d0e90SSam Ravnborglib-y += memcpy_$(BITS).o 34fb6a0408SMaciej W. Rozyckilib-y += pc-conf-reg.o 35ec6347bbSDan Williamslib-$(CONFIG_ARCH_HAS_COPY_MC) += copy_mc.o copy_mc_64.o 3632542ee2SRicardo Nerilib-$(CONFIG_INSTRUCTION_DECODER) += insn.o inat.o insn-eval.o 37d899a7d1SThomas Garnierlib-$(CONFIG_RANDOMIZE_BASE) += kaslr.o 38540adea3SMasami Hiramatsulib-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o 39aefb2f2eSBreno Leitaolib-$(CONFIG_MITIGATION_RETPOLINE) += retpoline.o 40583d0e90SSam Ravnborg 4155d1ecceSEric Biggersobj-$(CONFIG_CRC32_ARCH) += crc32-x86.o 4255d1ecceSEric Biggerscrc32-x86-y := crc32-glue.o crc32-pclmul.o 4355d1ecceSEric Biggerscrc32-x86-$(CONFIG_64BIT) += crc32c-3way.o 4455d1ecceSEric Biggers 45ed4bc981SEric Biggersobj-$(CONFIG_CRC64_ARCH) += crc64-x86.o 46ed4bc981SEric Biggerscrc64-x86-y := crc64-glue.o crc64-pclmul.o 47ed4bc981SEric Biggers 48f5967101SBorislav Petkovobj-$(CONFIG_CRC_T10DIF_ARCH) += crc-t10dif-x86.o 49170d13caSLinus Torvaldscrc-t10dif-x86-y := crc-t10dif-glue.o crc16-msb-pclmul.o 5044f0257fSThomas Gleixner 5144f0257fSThomas Gleixnerobj-y += msr.o msr-reg.o msr-reg-export.o hweight.o 521fde902dSIngo Molnarobj-y += iomem.o 53a7e926abSLuca Barbieri 54583d0e90SSam Ravnborgifeq ($(CONFIG_X86_32),y) 55583d0e90SSam Ravnborg obj-y += atomic64_32.o 564625cd63SJan Beulich lib-y += atomic64_cx8_32.o 57bce5a1e8SNick Desaulniers lib-y += checksum_32.o 586d12c8d3SPeter Zijlstra lib-y += strstr_32.o 59*909639aaSH. Peter Anvin (Intel) lib-y += string_32.o 606d12c8d3SPeter Zijlstra lib-y += memmove_32.o 6104edbdefSEric Dumazet lib-y += cmpxchg8b_emu.o 6244f0257fSThomas Gleixnerifneq ($(CONFIG_X86_CX8),y) 63d911c67eSAlexander Potapenko lib-y += atomic64_386_32.o 64583d0e90SSam Ravnborgendif 65d911c67eSAlexander Potapenkoelse 66212be3b2SOleg Nesterovifneq ($(CONFIG_GENERIC_CSUM),y) 67583d0e90SSam Ravnborg lib-y += csum-partial_64.o csum-copy_64.o csum-wrappers_64.o 68034ff37dSLinus Torvaldsendif 69b9ec40afSChristoph Lameter lib-y += clear_page_64.o copy_page_64.o 7044f0257fSThomas Gleixner lib-y += memmove_64.o memset_64.o 71 lib-y += copy_user_64.o copy_user_uncached_64.o 72 lib-y += cmpxchg16b_emu.o 73 lib-y += bhi.o 74endif 75