]> err.no Git - linux-2.6/commit
[SPARC64]: Inline membar()'s again.
authorDavid S. Miller <davem@davemloft.net>
Thu, 8 Sep 2005 21:37:53 +0000 (14:37 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Sep 2005 21:37:53 +0000 (14:37 -0700)
commit4d803fcdcd97dd346d4b39c3b76e5879cead8a31
treef30c8caa998261fc0983121021184f0f6cc555b4
parent1b11d78cf87a7014f96e5b7fa2e1233cc8081a00
[SPARC64]: Inline membar()'s again.

Since GCC has to emit a call and a delay slot to the
out-of-line "membar" routines in arch/sparc64/lib/mb.S
it is much better to just do the necessary predicted
branch inline instead as:

ba,pt %xcc, 1f
 membar #whatever
1:

instead of the current:

call membar_foo
 dslot

because this way GCC is not required to allocate a stack
frame if the function can be a leaf function.

This also makes this bug fix easier to backport to 2.4.x

Signed-off-by: David S. Miller <davem@davemloft.net>
arch/sparc64/kernel/sparc64_ksyms.c
arch/sparc64/lib/Makefile
arch/sparc64/lib/mb.S [deleted file]
include/asm-sparc64/system.h