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 3976b04384SDavid Woodhouselib-$(CONFIG_RETPOLINE) += retpoline.o 40583d0e90SSam Ravnborg 41f5967101SBorislav Petkovobj-y += msr.o msr-reg.o msr-reg-export.o hweight.o 42170d13caSLinus Torvaldsobj-y += iomem.o 4344f0257fSThomas Gleixner 4444f0257fSThomas Gleixnerifeq ($(CONFIG_X86_32),y) 451fde902dSIngo Molnar obj-y += atomic64_32.o 46a7e926abSLuca Barbieri lib-y += atomic64_cx8_32.o 47583d0e90SSam Ravnborg lib-y += checksum_32.o 48583d0e90SSam Ravnborg lib-y += strstr_32.o 494625cd63SJan Beulich lib-y += string_32.o 50bce5a1e8SNick Desaulniers lib-y += memmove_32.o 51*6d12c8d3SPeter Zijlstra lib-y += cmpxchg8b_emu.o 5204edbdefSEric Dumazetifneq ($(CONFIG_X86_CMPXCHG64),y) 53*6d12c8d3SPeter Zijlstra lib-y += atomic64_386_32.o 5404edbdefSEric Dumazetendif 5544f0257fSThomas Gleixnerelse 566175ddf0SBrian Gerst obj-y += iomap_copy_64.o 57d911c67eSAlexander Potapenkoifneq ($(CONFIG_GENERIC_CSUM),y) 58583d0e90SSam Ravnborg lib-y += csum-partial_64.o csum-copy_64.o csum-wrappers_64.o 59d911c67eSAlexander Potapenkoendif 60212be3b2SOleg Nesterov lib-y += clear_page_64.o copy_page_64.o 61583d0e90SSam Ravnborg lib-y += memmove_64.o memset_64.o 62034ff37dSLinus Torvalds lib-y += copy_user_64.o copy_user_uncached_64.o 63b9ec40afSChristoph Lameter lib-y += cmpxchg16b_emu.o 6444f0257fSThomas Gleixnerendif 65