blob: 675d7b075fedad4980032ca31b3e669d746a7918 [file] [log] [blame]
Sam Ravnborg583d0e92008-01-30 13:32:31 +01001#
2# Makefile for x86 specific library files.
3#
4
Dmitry Vyukov5c9a8752016-03-22 14:27:30 -07005# Produces uninteresting flaky coverage.
6KCOV_INSTRUMENT_delay.o := n
7
Masami Hiramatsueb132962009-08-13 16:34:13 -04008inat_tables_script = $(srctree)/arch/x86/tools/gen-insn-attr-x86.awk
9inat_tables_maps = $(srctree)/arch/x86/lib/x86-opcode-map.txt
10quiet_cmd_inat_tables = GEN $@
Masami Hiramatsud32ba452009-12-07 12:00:33 -050011 cmd_inat_tables = $(AWK) -f $(inat_tables_script) $(inat_tables_maps) > $@ || rm -f $@
Masami Hiramatsueb132962009-08-13 16:34:13 -040012
13$(obj)/inat-tables.c: $(inat_tables_script) $(inat_tables_maps)
14 $(call cmd,inat_tables)
15
16$(obj)/inat.o: $(obj)/inat-tables.c
17
18clean-files := inat-tables.c
19
Borislav Petkova7b480e2010-01-22 16:01:03 +010020obj-$(CONFIG_SMP) += msr-smp.o cache-smp.o
Sam Ravnborg583d0e92008-01-30 13:32:31 +010021
Borislav Petkov99f925c2015-11-23 11:12:21 +010022lib-y := delay.o misc.o cmdline.o cpu.o
Robert Richter1ac2e6c2011-06-07 11:49:55 +020023lib-y += usercopy_$(BITS).o usercopy.o getuser.o putuser.o
Sam Ravnborg583d0e92008-01-30 13:32:31 +010024lib-y += memcpy_$(BITS).o
Jan Beulicha73866942011-07-19 13:00:19 +010025lib-$(CONFIG_RWSEM_XCHGADD_ALGORITHM) += rwsem.o
Ricardo Neri32542ee2017-10-27 13:25:36 -070026lib-$(CONFIG_INSTRUCTION_DECODER) += insn.o inat.o insn-eval.o
Thomas Garnierd899a7d2016-06-21 17:46:58 -070027lib-$(CONFIG_RANDOMIZE_BASE) += kaslr.o
Sam Ravnborg583d0e92008-01-30 13:32:31 +010028
Borislav Petkovf5967102016-05-30 12:56:27 +020029obj-y += msr.o msr-reg.o msr-reg-export.o hweight.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070030
Thomas Gleixner5fde34f2007-10-11 11:13:35 +020031ifeq ($(CONFIG_X86_32),y)
Ingo Molnar1fde9022009-07-03 17:28:57 +020032 obj-y += atomic64_32.o
Luca Barbieria7e926a2010-02-24 10:54:25 +010033 lib-y += atomic64_cx8_32.o
Sam Ravnborg583d0e92008-01-30 13:32:31 +010034 lib-y += checksum_32.o
35 lib-y += strstr_32.o
Jan Beulich4625cd62011-07-19 12:59:51 +010036 lib-y += string_32.o
Eric Dumazet04edbde2009-10-01 07:30:38 +020037ifneq ($(CONFIG_X86_CMPXCHG64),y)
Luca Barbieria7e926a2010-02-24 10:54:25 +010038 lib-y += cmpxchg8b_emu.o atomic64_386_32.o
Eric Dumazet04edbde2009-10-01 07:30:38 +020039endif
Sam Ravnborg583d0e92008-01-30 13:32:31 +010040 lib-$(CONFIG_X86_USE_3DNOW) += mmx_32.o
Thomas Gleixner5fde34f2007-10-11 11:13:35 +020041else
Brian Gerst6175ddf2010-02-05 09:37:07 -050042 obj-y += iomap_copy_64.o
Sam Ravnborg583d0e92008-01-30 13:32:31 +010043 lib-y += csum-partial_64.o csum-copy_64.o csum-wrappers_64.o
Oleg Nesterov212be3b22014-09-21 20:42:32 +020044 lib-y += clear_page_64.o copy_page_64.o
Sam Ravnborg583d0e92008-01-30 13:32:31 +010045 lib-y += memmove_64.o memset_64.o
Borislav Petkovb41e6ec2015-05-13 19:42:24 +020046 lib-y += copy_user_64.o
Christoph Lameterb9ec40af2011-02-28 11:02:24 +010047 lib-y += cmpxchg16b_emu.o
Thomas Gleixner5fde34f2007-10-11 11:13:35 +020048endif