From: Andy Whitcroft <apw@shadowen.org>
To: Andi Kleen <ak@suse.de>
Cc: linux-kernel@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>,
Steve Fox <drfickle@us.ibm.com>
Subject: 2.6.18-rc5-git3: compilation failure on numa-q
Date: Thu, 31 Aug 2006 12:03:32 +0100 [thread overview]
Message-ID: <44F6C204.6040301@shadowen.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1501 bytes --]
It seems that between 2.6.18-rc5-git2 and -git3 some of our test systems
stopped compiling the kernel; the two I have investigated appear to be
Numa-Q systems, x86 smp. They are failing as below:
CC arch/i386/kernel/asm-offsets.s
In file included from include/linux/spinlock.h:86,
from include/linux/capability.h:45,
from include/linux/sched.h:44,
from include/linux/module.h:9,
from include/linux/crypto.h:20,
from arch/i386/kernel/asm-offsets.c:7:
include/asm/spinlock.h: In function `__raw_read_lock':
include/asm/spinlock.h:164: error: parse error before ')' token
make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2
The only change relating to this file appears to be this one:
commit 8c74932779fc6f61b4c30145863a17125c1a296c
Author: Andi Kleen <ak@suse.de>
Date: Wed Aug 30 19:37:14 2006 +0200
[PATCH] i386: Remove alternative_smp
The .fill causes miscompilations with some binutils version.
Instead just patch the lock prefix in the lock constructs. That is the
majority of the cost and should be good enough.
Cc: Gerd Hoffmann <kraxel@suse.de>
Signed-off-by: Andi Kleen <ak@suse.de>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Tried backing this out and the compile failure seems to go away.
Ok, having stared at it for a bit it seems the attached patch fixes it
up. But as its asm could someone cast an eye over it.
-apw
[-- Attachment #2: fix-up-rwlocks-following-alternative_smp-removal --]
[-- Type: text/plain, Size: 2813 bytes --]
commit 2b5087b6ff53558d95b3b5c9a6fb1bd41fabbae6
Author: Andy Whitcroft <apw@shadowen.org>
Date: Thu Aug 31 10:58:44 2006 +0000
fix up rwlocks following alternative_smp removal
We seem to be getting compile errors in reader-write lock support
on x86 SMP following the removal of the alternative_smp in commit
8c74932779fc6f61b4c30145863a17125c1a296c:
CC arch/i386/kernel/asm-offsets.s
In file included from include/linux/spinlock.h:86,
from include/linux/capability.h:45,
from include/linux/sched.h:44,
from include/linux/module.h:9,
from include/linux/crypto.h:20,
from arch/i386/kernel/asm-offsets.c:7:
include/asm/spinlock.h: In function `__raw_read_lock':
include/asm/spinlock.h:164: error: parse error before ')' token
make[1]: *** [arch/i386/kernel/asm-offsets.s] Error 1
make: *** [prepare0] Error 2.
We seem to have lost some ':'s in the conversion, and the UP alternative
has not been removed in some cases. I think we want something like the
below.
Signed-off-by: Andy Whitcroft <apw@shadowen.org>
diff --git a/include/asm-i386/rwlock.h b/include/asm-i386/rwlock.h
index 3ac1ba9..2aebb81 100644
--- a/include/asm-i386/rwlock.h
+++ b/include/asm-i386/rwlock.h
@@ -25,7 +25,7 @@ #define __build_read_lock_ptr(rw, helper
"jns 1f\n" \
"call " helper "\n\t" \
"1:\n" \
- :"a" (rw) : "memory")
+ : : "a" (rw) : "memory")
#define __build_read_lock_const(rw, helper) \
asm volatile(LOCK_PREFIX " ; subl $1,%0\n\t" \
@@ -34,8 +34,8 @@ #define __build_read_lock_const(rw, help
"leal %0,%%eax\n\t" \
"call " helper "\n\t" \
"popl %%eax\n\t" \
- "1:\n" : \
- "+m" (*(volatile int *)rw) : : "memory")
+ "1:\n" \
+ : "+m" (*(volatile int *)rw) : : "memory")
#define __build_read_lock(rw, helper) do { \
if (__builtin_constant_p(rw)) \
@@ -48,9 +48,8 @@ #define __build_write_lock_ptr(rw, helpe
asm volatile(LOCK_PREFIX " ; subl $" RW_LOCK_BIAS_STR ",(%0)\n\t" \
"jz 1f\n" \
"call " helper "\n\t" \
- "1:\n", \
- "subl $" RW_LOCK_BIAS_STR ",(%0)\n\t", \
- :"a" (rw) : "memory")
+ "1:\n" \
+ : : "a" (rw) : "memory")
#define __build_write_lock_const(rw, helper) \
asm volatile(LOCK_PREFIX " ; subl $" RW_LOCK_BIAS_STR ",%0\n\t" \
@@ -59,9 +58,8 @@ #define __build_write_lock_const(rw, hel
"leal %0,%%eax\n\t" \
"call " helper "\n\t" \
"popl %%eax\n\t" \
- "1:\n", \
- "subl $" RW_LOCK_BIAS_STR ",%0\n\t", \
- "+m" (*(volatile int *)rw) : : "memory")
+ "1:\n" \
+ : "+m" (*(volatile int *)rw) : : "memory")
#define __build_write_lock(rw, helper) do { \
if (__builtin_constant_p(rw)) \
reply other threads:[~2006-08-31 11:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44F6C204.6040301@shadowen.org \
--to=apw@shadowen.org \
--cc=ak@suse.de \
--cc=drfickle@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@osdl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox