sparc32 broke
A compile of todays mainline produces this compile error:
arch/sparc/kernel/sun4d_smp.c:63: error: expected identifier or ‘(’ before ‘{’ tokenarch/sparc/kernel/sun4d_smp.c: In function ‘smp4d_callin’:arch/sparc/kernel/sun4d_smp.c:118: error: lvalue required as left operand of assignmentarch/sparc/kernel/sun4d_smp.c:118: error: lvalue required as left operand of assignment
Prior to today, sparc32 has also failed to boot completely for the last few days.
It boots but fails in the init scripts when it can't find the boot partition.
Ill try to bisect the boot problem but it will take a while.
David Miller
maintainerFrom: Robert Reif <[email protected]>
Date: Thu, 08 Jan 2009 19:32:21 -0500
Quoted 6 lines
A compile of todays mainline produces this compile error:
arch/sparc/kernel/sun4d_smp.c:63: error: expected identifier or ‘(’ before ‘{’ tokenarch/sparc/kernel/sun4d_smp.c: In function ‘smp4d_callin’:arch/sparc/kernel/sun4d_smp.c:118: error: lvalue required as left operand of assignmentarch/sparc/kernel/sun4d_smp.c:118: error: lvalue required as left operand of assignment
Thanks for the report, I've committed the fix below to sparc-2.6
Quoted 4 lines
Prior to today, sparc32 has also failed to boot completely for the last few days. It boots but fails in the init scripts when it can't find the boot partition.
Ill try to bisect the boot problem but it will take a while.
Thanks, let us know if you need any help figuring something out.
sparc: Fix sun4d_irq.c build.
Reported by Robert Reif.
Fallout from 'swap' changes.
--- arch/sparc/kernel/sun4d_smp.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
arch/sparc/kernel/sun4d_smp.c +2 -2
@@ -60,7 +60,7 @@ extern int __smp4d_processor_id(void);#define SMP_PRINTK (x)#endif -static inline unsigned long swap (volatile unsigned long *ptr,unsigned long val) +static inline unsigned long sun4d_swap (volatile unsigned long *ptr,unsigned long val) { __asm__ __volatile__("swap [%1], %0\n\t" : "=&r" (val), "=&r" (ptr) :
@@ -115,7 +115,7 @@ void __cpuinit smp4d_callin(void)local_flush_tlb_all ();/* Allow master to continue. */ -swap ((unsigned long *)&cpu_callin_map[cpuid],1 ); +sun4d_swap ((unsigned long *)&cpu_callin_map[cpuid],1 );local_flush_cache_all ();local_flush_tlb_all ();
Signature · 3 lines
1.6.1.15.g159c88
ÿôèº{.nÇ+‰·Ÿ®‰†+%ŠËÿ±éݶ¥Šwÿº{.nÇ+‰·¬¥ªÜ–)îÇø§¶›¡Ü¨}©ž²Æ zÚ&j:+v‰¨þø¯ù®w¥þŠà2ŠÞ™¨èÚ&¢)ß¡«a¶Úÿÿûàz¿äz¹Þ—ú+ƒùšŽŠÝ¢jÿŠwèþfQuoted 6 lines · Robert Reif
Prior to today, sparc32 has also failed to boot completely for the last few days.
It boots but fails in the init scripts when it can't find the boot partition.Ill try to bisect the boot problem but it will take a while.
I bisected it down to: ece93487c31607558f4b91f378fcee4b43956dbc sparc:
unify signal.h
David Miller
maintainerFrom: Robert Reif <[email protected]>
Date: Fri, 09 Jan 2009 23:19:19 -0500
Quoted 2 lines
I bisected it down to:
ece93487c31607558f4b91f378fcee4b43956dbc
sparc: unifysignal.h
Sam, the first thing I notice is that _NSIG_BPW changed.
It's supposed to be 32 for sparc32 and 64 for sparc64. But now it's unconditionally 64 in the unified header. This also makes _NSIG_WORDS et al. wrong.
Robert, does this fix the bug for you?
sparc: Fix asm/signal.h for 32-bit.
Fix a 32-bit sparc regression reported by Robert Reif.
_NSIG_BPW needs to be 32 for 32-bit and 64 for 64-bit
arch/sparc/include/asm/signal.h +1 -1
@@ -84,7 +84,7 @@#define __OLD_NSIG 32#define __NEW_NSIG 64 -#define _NSIG_BPW 64 +#define _NSIG_BPW CONFIG_BITS#define _NSIG_WORDS (__NEW_NSIG / _NSIG_BPW)#define SIGRTMIN 32
Quoted 11 lines · David Miller
From: Robert Reif <[email protected]>
Date: Fri, 09 Jan 2009 23:19:19 -0500Quoted 2 lines
I bisected it down to:
ece93487c31607558f4b91f378fcee4b43956dbc
sparc: unifysignal.hSam, the first thing I notice is that
_NSIG_BPWchanged.It's supposed to be 32 for sparc32 and 64 for sparc64. But now it's unconditionally 64 in the unified header. This also makes
_NSIG_WORDSet al. wrong.
I cannot explain why this happened - it is obviously buggy.
Sorry!
I will re-review the commit later today after I get some coffee.
Thanks for testing & bisect Robert!
arch/sparc/include/asm/signal.h line 87
Quoted 11 lines
arch/sparc/include/asm/signal.h +1
-1@@ -84,7 +84,7 @@#define __OLD_NSIG 32#define __NEW_NSIG 64 -#define _NSIG_BPW 64 +#define _NSIG_BPW CONFIG_BITS
The real fix should look like this:
#ifdef __arch64__
#define _NSIG_BPW 64
#else
#define _NSIG_BPW 64
#endif
This is required because this header is exported to userspace where we do not have access to CONFIG_* symbols.
Sam
David Miller
maintainerFrom: Sam Ravnborg <[email protected]>
Date: Sat, 10 Jan 2009 08:33:21 +0100
Quoted 10 lines
The real fix should look like this:
#ifdef
__arch64__
#define_NSIG_BPW64
#else
#define_NSIG_BPW64
#endifThis is required because this header is exported to userspace where we do not have access to CONFIG_* symbols.
I assume you meant to use "32" in the #else branch :-)
Quoted 11 lines · David Miller
From: Sam Ravnborg <[email protected]>
Date: Sat, 10 Jan 2009 08:33:21 +0100Quoted 8 lines
The real fix should look like this:
#ifdef
__arch64__
#define_NSIG_BPW64
#else
#define_NSIG_BPW64
#endif
Quoted 4 lines
Quoted 2 lines
This is required because this header is exported to userspace where we do not have access to CONFIG_* symbols.
I assume you meant to use "32" in the #else branch :-)
Freudian attempt or similar...
I now did a re-review of the unified signal.h. And I could not spot any other subtle differences.
Sam
Quoted 12 lines · David Miller
From: Sam Ravnborg <[email protected]>
Date: Sat, 10 Jan 2009 08:33:21 +0100Quoted 8 lines
The real fix should look like this:
#ifdef
__arch64__
#define_NSIG_BPW64
#else
#define_NSIG_BPW64
#endif
Quoted 7 lines
Quoted 3 lines
This is required because this header is exported to userspace where we do not have access to CONFIG_* symbols.
I assume you meant to use "32" in the #else branch :-)
This fixed it (with the 32).
From: Robert Reif <[email protected]>
Date: Sat, 10 Jan 2009 09:56:01 -0500
Quoted 13 lines
Quoted 12 lines · David Miller
From: Sam Ravnborg <[email protected]>
Date: Sat, 10 Jan 2009 08:33:21 +0100Quoted 8 lines
The real fix should look like this:
#ifdef
__arch64__
#define_NSIG_BPW64
#else
#define_NSIG_BPW64
#endif
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
This is required because this header is exported to userspace where we do not have access to CONFIG_* symbols.
I assume you meant to use "32" in the #else branch :-)
This fixed it (with the 32).
Thanks for testing Robert, I've just commited the following:
sparc: Fix asm/signal.h for 32-bit.
Fix a 32-bit sparc regression reported by Robert Reif.
_NSIG_BPW needs to be 32 for 32-bit and 64 for 64-bit
--- arch/sparc/include/asm/signal.h | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
arch/sparc/include/asm/signal.h +4 -0
@@ -84,7 +84,11 @@#define __OLD_NSIG 32#define __NEW_NSIG 64 +#ifdef __arch64__#define _NSIG_BPW 64 +#else +#define _NSIG_BPW 32 +#endif #define _NSIG_WORDS (__NEW_NSIG / _NSIG_BPW)#define SIGRTMIN 32
Signature · 1 line
1.6.1.15.g159c88