blob: 91e9700cc6dcd2152f7488740ad3f9a6e1b766c4 [file] [log] [blame]
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01001# SPDX-License-Identifier: GPL-2.0
Sam Ravnborg583d0e92008-01-30 13:32:31 +01002#
3# Makefile for x86 specific library files.
4#
5
Dmitry Vyukov5c9a8752016-03-22 14:27:30 -07006# Produces uninteresting flaky coverage.
7KCOV_INSTRUMENT_delay.o := n
8
Masami Hiramatsueb132962009-08-13 16:34:13 -04009inat_tables_script = $(srctree)/arch/x86/tools/gen-insn-attr-x86.awk
10inat_tables_maps = $(srctree)/arch/x86/lib/x86-opcode-map.txt
11quiet_cmd_inat_tables = GEN $@
Masami Hiramatsud32ba452009-12-07 12:00:33 -050012 cmd_inat_tables = $(AWK) -f $(inat_tables_script) $(inat_tables_maps) > $@ || rm -f $@
Masami Hiramatsueb132962009-08-13 16:34:13 -040013
14$(obj)/inat-tables.c: $(inat_tables_script) $(inat_tables_maps)
15 $(call cmd,inat_tables)
16
17$(obj)/inat.o: $(obj)/inat-tables.c
18
19clean-files := inat-tables.c
20
Borislav Petkova7b480e2010-01-22 16:01:03 +010021obj-$(CONFIG_SMP) += msr-smp.o cache-smp.o
Sam Ravnborg583d0e92008-01-30 13:32:31 +010022
Borislav Petkov99f925c2015-11-23 11:12:21 +010023lib-y := delay.o misc.o cmdline.o cpu.o
Robert Richter1ac2e6c2011-06-07 11:49:55 +020024lib-y += usercopy_$(BITS).o usercopy.o getuser.o putuser.o
Sam Ravnborg583d0e92008-01-30 13:32:31 +010025lib-y += memcpy_$(BITS).o
Jan Beulicha73866942011-07-19 13:00:19 +010026lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o
Ricardo Neri32542ee2017-10-27 13:25:36 -070027lib-$(CONFIG_INSTRUCTION_DECODER) += insn.o inat.o insn-eval.o
Thomas Garnierd899a7d2016-06-21 17:46:58 -070028lib-$(CONFIG_RANDOMIZE_BASE) += kaslr.o
Masami Hiramatsu540adea2018-01-13 02:55:03 +090029lib-$(CONFIG_FUNCTION_ERROR_INJECTION) += error-inject.o
David Woodhouse76b04382018-01-11 21:46:25 +000030lib-$(CONFIG_RETPOLINE) += retpoline.o
Borislav Petkov1dde7412018-01-27 16:24:33 +000031OBJECT_FILES_NON_STANDARD_retpoline.o :=y
Sam Ravnborg583d0e92008-01-30 13:32:31 +010032
Borislav Petkovf5967102016-05-30 12:56:27 +020033obj-y += msr.o msr-reg.o msr-reg-export.o hweight.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070034
Thomas Gleixner5fde34f2007-10-11 11:13:35 +020035ifeq ($(CONFIG_X86_32),y)
Ingo Molnar1fde9022009-07-03 17:28:57 +020036 obj-y += atomic64_32.o
Luca Barbieria7e926a2010-02-24 10:54:25 +010037 lib-y += atomic64_cx8_32.o
Sam Ravnborg583d0e92008-01-30 13:32:31 +010038 lib-y += checksum_32.o
39 lib-y += strstr_32.o
Jan Beulich4625cd62011-07-19 12:59:51 +010040 lib-y += string_32.o
Eric Dumazet04edbde2009-10-01 07:30:38 +020041ifneq ($(CONFIG_X86_CMPXCHG64),y)
Luca Barbieria7e926a2010-02-24 10:54:25 +010042 lib-y += cmpxchg8b_emu.o atomic64_386_32.o
Eric Dumazet04edbde2009-10-01 07:30:38 +020043endif
Sam Ravnborg583d0e92008-01-30 13:32:31 +010044 lib-$(CONFIG_X86_USE_3DNOW) += mmx_32.o
Thomas Gleixner5fde34f2007-10-11 11:13:35 +020045else
Brian Gerst6175ddf2010-02-05 09:37:07 -050046 obj-y += iomap_copy_64.o
Sam Ravnborg583d0e92008-01-30 13:32:31 +010047 lib-y += csum-partial_64.o csum-copy_64.o csum-wrappers_64.o
Oleg Nesterov212be3b22014-09-21 20:42:32 +020048 lib-y += clear_page_64.o copy_page_64.o
Sam Ravnborg583d0e92008-01-30 13:32:31 +010049 lib-y += memmove_64.o memset_64.o
Borislav Petkovb41e6ec2015-05-13 19:42:24 +020050 lib-y += copy_user_64.o
Christoph Lameterb9ec40af2011-02-28 11:02:24 +010051 lib-y += cmpxchg16b_emu.o
Thomas Gleixner5fde34f2007-10-11 11:13:35 +020052endif