blob: 457f681ef37921be836c0e50bf659b07cc534fc5 [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
Ingo Molnarba7e4d12009-06-06 13:58:12 +020027lib-$(CONFIG_INSTRUCTION_DECODER) += insn.o inat.o
Thomas Garnierd899a7d2016-06-21 17:46:58 -070028lib-$(CONFIG_RANDOMIZE_BASE) += kaslr.o
Sam Ravnborg583d0e92008-01-30 13:32:31 +010029
Borislav Petkovf5967102016-05-30 12:56:27 +020030obj-y += msr.o msr-reg.o msr-reg-export.o hweight.o
Linus Torvalds1da177e2005-04-16 15:20:36 -070031
Thomas Gleixner5fde34f2007-10-11 11:13:35 +020032ifeq ($(CONFIG_X86_32),y)
Ingo Molnar1fde9022009-07-03 17:28:57 +020033 obj-y += atomic64_32.o
Luca Barbieria7e926a2010-02-24 10:54:25 +010034 lib-y += atomic64_cx8_32.o
Sam Ravnborg583d0e92008-01-30 13:32:31 +010035 lib-y += checksum_32.o
36 lib-y += strstr_32.o
Jan Beulich4625cd62011-07-19 12:59:51 +010037 lib-y += string_32.o
Eric Dumazet04edbde2009-10-01 07:30:38 +020038ifneq ($(CONFIG_X86_CMPXCHG64),y)
Luca Barbieria7e926a2010-02-24 10:54:25 +010039 lib-y += cmpxchg8b_emu.o atomic64_386_32.o
Eric Dumazet04edbde2009-10-01 07:30:38 +020040endif
Sam Ravnborg583d0e92008-01-30 13:32:31 +010041 lib-$(CONFIG_X86_USE_3DNOW) += mmx_32.o
Thomas Gleixner5fde34f2007-10-11 11:13:35 +020042else
Brian Gerst6175ddf2010-02-05 09:37:07 -050043 obj-y += iomap_copy_64.o
Sam Ravnborg583d0e92008-01-30 13:32:31 +010044 lib-y += csum-partial_64.o csum-copy_64.o csum-wrappers_64.o
Oleg Nesterov212be3b22014-09-21 20:42:32 +020045 lib-y += clear_page_64.o copy_page_64.o
Sam Ravnborg583d0e92008-01-30 13:32:31 +010046 lib-y += memmove_64.o memset_64.o
Borislav Petkovb41e6ec2015-05-13 19:42:24 +020047 lib-y += copy_user_64.o
Christoph Lameterb9ec40af2011-02-28 11:02:24 +010048 lib-y += cmpxchg16b_emu.o
Thomas Gleixner5fde34f2007-10-11 11:13:35 +020049endif