Re: sparc32 compile error: redefinition ofâsmp_call_function_singleâ

From: David Miller
Date: Tue Jan 13 2009 - 21:10:53 EST


From: Robert Reif <reif@xxxxxxxxxxxxx>
Date: Tue, 13 Jan 2009 20:40:04 -0500

> Todays git produces this compile error on sparc32:
>
> kernel/up.c:10: error: redefinition of âsmp_call_function_singleâ
> /usr/src/sparc32/linux-2.6/arch/sparc/include/asm/smp_32.h:78: error: previous definition of âsmp_call_function_singleâ was here

Andrew, are you sure that Makefile condition for compiling
up.o is correct?

ifeq ($(CONFIG_USE_GENERIC_SMP_HELPERS),y)
obj-y += smp.o
else
obj-y += up.o
endif

If an arch doesn't use generic SMP helpers, there is no way
we should compile up.c into the tree when SMP.

This build regression was caused by:

commit 53ce3d9564908794ae7dd32969089b57df5fc098
Author: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Date: Fri Jan 9 12:27:08 2009 -0800

smp_call_function_single(): be slightly less stupid

If you do

smp_call_function_single(expression-with-side-effects, ...)

then expression-with-side-effects never gets evaluated on UP builds.

As always, implementing it in C is the correct thing to do.

While we're there, uninline it for size and possible header dependency
reasons.

And create a new kernel/up.c, as a place in which to put
uniprocessor-specific code and storage. It should mirror kernel/smp.c.

Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Signed-off-by: Ingo Molnar <mingo@xxxxxxx>
N‹§²æìr¸›yúèšØb²X¬¶ÇvØ^–)Þ{.nÇ+‰·¥Š{±‘êçzX§¶›¡Ü}©ž²ÆzÚ&j:+v‰¨¾«‘êçzZ+€Ê+zf£¢·hšˆ§~†­†Ûiÿûàz¹®w¥¢¸?™¨è­Ú&¢)ßf”ù^jÇy§m…á@A«a¶Úÿ 0¶ìh®å’i