Re: [GIT PULL] scheduler fixes

Ingo Molnar
2009-10-01T06:42:38Z

* Eric Dumazet <eric.dumazet@gmail.com> wrote:

> Ingo Molnar a écrit :
> >
> > That's not enough - the inline assembly code in
> > arch/x86/include/asm/cmpxchg_32.h should also not reference
> > cmpxchg8b_emu in that case.
> >
>
> I believe it is OK as is, since cmpxchg8b_emu is referenced only
> once, in a section guarded by :
> #ifndef CONFIG_X86_CMPXCHG64

yeah. But this bit is wrong:

> +++ b/arch/x86/lib/Makefile
> @@ -15,8 +15,10 @@ ifeq ($(CONFIG_X86_32),y)
> obj-y += atomic64_32.o
> lib-y += checksum_32.o
> lib-y += strstr_32.o
> - lib-y += semaphore_32.o string_32.o cmpxchg8b_emu.o
> -
> + lib-y += semaphore_32.o string_32.o
> +ifeq ($(CONFIG_X86_CMPXCHG64),n)
> + lib-y += cmpxchg8b_emu.o
> +endif
> lib-$(CONFIG_X86_USE_3DNOW) += mmx_32.o
> else
> obj-y += io_64.o iomap_copy_64.o

The way to check for a disabled option in a Make rule is:

ifneq ($(CONFIG_X86_CMPXCHG64),y)

As in the disabled case the config variable will be undefined. (and wont
have a value of 'n'). I've done the fix below on your patch.

Ingo

Index: linux2/arch/x86/lib/Makefile
===================================================================
--- linux2.orig/arch/x86/lib/Makefile
+++ linux2/arch/x86/lib/Makefile
@@ -16,7 +16,7 @@ ifeq ($(CONFIG_X86_32),y)
lib-y += checksum_32.o
lib-y += strstr_32.o
lib-y += semaphore_32.o string_32.o
-ifeq ($(CONFIG_X86_CMPXCHG64),n)
+ifneq ($(CONFIG_X86_CMPXCHG64),y)
lib-y += cmpxchg8b_emu.o
endif
lib-$(CONFIG_X86_USE_3DNOW) += mmx_32.o