Skip to content

Commit 04edbde

Browse files
Eric DumazetIngo Molnar
authored andcommitted
x86: Don't generate cmpxchg8b_emu if CONFIG_X86_CMPXCHG64=y
Conditionaly compile cmpxchg8b_emu.o and EXPORT_SYMBOL(cmpxchg8b_emu). This reduces the kernel size a bit. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Arjan van de Ven <arjan@infradead.org> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: John Stultz <johnstul@us.ibm.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Linus Torvalds <torvalds@linux-foundation.org> LKML-Reference: <4AC43E7E.1000600@gmail.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
1 parent d1716a6 commit 04edbde

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

‎arch/x86/kernel/i386_ksyms_32.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ EXPORT_SYMBOL(mcount);
1515
* the export, but dont use it from C code, it is used
1616
* by assembly code and is not using C calling convention!
1717
*/
18+
#ifndef CONFIG_X86_CMPXCHG64
1819
extern void cmpxchg8b_emu(void);
1920
EXPORT_SYMBOL(cmpxchg8b_emu);
21+
#endif
2022

2123
/* Networking helper routines. */
2224
EXPORT_SYMBOL(csum_partial_copy_generic);

‎arch/x86/lib/Makefile‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,10 @@ ifeq ($(CONFIG_X86_32),y)
1515
obj-y += atomic64_32.o
1616
lib-y += checksum_32.o
1717
lib-y += strstr_32.o
18-
lib-y += semaphore_32.o string_32.o cmpxchg8b_emu.o
19-
18+
lib-y += semaphore_32.o string_32.o
19+
ifneq ($(CONFIG_X86_CMPXCHG64),y)
20+
lib-y += cmpxchg8b_emu.o
21+
endif
2022
lib-$(CONFIG_X86_USE_3DNOW) += mmx_32.o
2123
else
2224
obj-y += io_64.o iomap_copy_64.o

0 commit comments

Comments
 (0)