All of lore.kernel.org
 help / color / mirror / Atom feed
* sparc32 broke
@ 2009-01-09  0:32 Robert Reif
  2009-01-09  0:48 ` David Miller
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: Robert Reif @ 2009-01-09  0:32 UTC (permalink / raw)
  To: sparclinux

A compile of todays mainline produces this compile error:

arch/sparc/kernel/sun4d_smp.c:63: error: expected identifier or ‘(’ 
before ‘{’ token
arch/sparc/kernel/sun4d_smp.c: In function ‘smp4d_callin’:
arch/sparc/kernel/sun4d_smp.c:118: error: lvalue required as left 
operand of assignment
arch/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.



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: sparc32 broke
  2009-01-09  0:32 sparc32 broke Robert Reif
@ 2009-01-09  0:48 ` David Miller
  2009-01-10  4:19 ` Robert Reif
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2009-01-09  0:48 UTC (permalink / raw)
  To: sparclinux

From: Robert Reif <reif@earthlink.net>
Date: Thu, 08 Jan 2009 19:32:21 -0500

> A compile of todays mainline produces this compile error:
> 
> arch/sparc/kernel/sun4d_smp.c:63: error: expected identifier or ‘(’ before ‘{’ token
> arch/sparc/kernel/sun4d_smp.c: In function ‘smp4d_callin’:
> arch/sparc/kernel/sun4d_smp.c:118: error: lvalue required as left operand of assignment
> arch/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

> 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.

Signed-off-by: David S. Miller <davem@davemloft.net>
---
 arch/sparc/kernel/sun4d_smp.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/sparc/kernel/sun4d_smp.c b/arch/sparc/kernel/sun4d_smp.c
index 16ab0cb..50afaed 100644
--- a/arch/sparc/kernel/sun4d_smp.c
+++ b/arch/sparc/kernel/sun4d_smp.c
@@ -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();
 	
-- 
1.6.1.15.g159c88

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¬¥ªÜ–)îÇø§¶\x17›¡Ü¨}©ž²Æ zÚ&j:+v‰¨þø\x1e¯ù\x1e®w¥þŠà2ŠÞ™¨è­Ú&¢)ß¡«a¶Úÿÿûàz¿äz¹Þ—ú+ƒùšŽŠÝ¢jÿŠwèþ^[f

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: sparc32 broke
  2009-01-09  0:32 sparc32 broke Robert Reif
  2009-01-09  0:48 ` David Miller
@ 2009-01-10  4:19 ` Robert Reif
  2009-01-10  6:22 ` David Miller
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Robert Reif @ 2009-01-10  4:19 UTC (permalink / raw)
  To: sparclinux

Robert Reif wrote:
> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: sparc32 broke
  2009-01-09  0:32 sparc32 broke Robert Reif
  2009-01-09  0:48 ` David Miller
  2009-01-10  4:19 ` Robert Reif
@ 2009-01-10  6:22 ` David Miller
  2009-01-10  7:33 ` Sam Ravnborg
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2009-01-10  6:22 UTC (permalink / raw)
  To: sparclinux

From: Robert Reif <reif@earthlink.net>
Date: Fri, 09 Jan 2009 23:19:19 -0500

> I bisected it down to: ece93487c31607558f4b91f378fcee4b43956dbc
> sparc: unify signal.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

Signed-off-by: David S. Miller <davem@davemloft.net>

diff --git a/arch/sparc/include/asm/signal.h b/arch/sparc/include/asm/signal.h
index 41535e7..047fbd0 100644
--- a/arch/sparc/include/asm/signal.h
+++ b/arch/sparc/include/asm/signal.h
@@ -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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: sparc32 broke
  2009-01-09  0:32 sparc32 broke Robert Reif
                   ` (2 preceding siblings ...)
  2009-01-10  6:22 ` David Miller
@ 2009-01-10  7:33 ` Sam Ravnborg
  2009-01-10  7:35 ` David Miller
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: Sam Ravnborg @ 2009-01-10  7:33 UTC (permalink / raw)
  To: sparclinux

On Fri, Jan 09, 2009 at 10:22:04PM -0800, David Miller wrote:
> From: Robert Reif <reif@earthlink.net>
> Date: Fri, 09 Jan 2009 23:19:19 -0500
> 
> > I bisected it down to: ece93487c31607558f4b91f378fcee4b43956dbc
> > sparc: unify signal.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.

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!

> 
> diff --git a/arch/sparc/include/asm/signal.h b/arch/sparc/include/asm/signal.h
> index 41535e7..047fbd0 100644
> --- a/arch/sparc/include/asm/signal.h
> +++ b/arch/sparc/include/asm/signal.h
> @@ -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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: sparc32 broke
  2009-01-09  0:32 sparc32 broke Robert Reif
                   ` (3 preceding siblings ...)
  2009-01-10  7:33 ` Sam Ravnborg
@ 2009-01-10  7:35 ` David Miller
  2009-01-10  8:16 ` Sam Ravnborg
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2009-01-10  7:35 UTC (permalink / raw)
  To: sparclinux

From: Sam Ravnborg <sam@ravnborg.org>
Date: Sat, 10 Jan 2009 08:33:21 +0100

> 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.

I assume you meant to use "32" in the #else branch :-)

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: sparc32 broke
  2009-01-09  0:32 sparc32 broke Robert Reif
                   ` (4 preceding siblings ...)
  2009-01-10  7:35 ` David Miller
@ 2009-01-10  8:16 ` Sam Ravnborg
  2009-01-10 14:56 ` Robert Reif
  2009-01-11  7:44 ` David Miller
  7 siblings, 0 replies; 9+ messages in thread
From: Sam Ravnborg @ 2009-01-10  8:16 UTC (permalink / raw)
  To: sparclinux

On Fri, Jan 09, 2009 at 11:35:24PM -0800, David Miller wrote:
> From: Sam Ravnborg <sam@ravnborg.org>
> Date: Sat, 10 Jan 2009 08:33:21 +0100
> 
> > 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.
> 
> 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

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: sparc32 broke
  2009-01-09  0:32 sparc32 broke Robert Reif
                   ` (5 preceding siblings ...)
  2009-01-10  8:16 ` Sam Ravnborg
@ 2009-01-10 14:56 ` Robert Reif
  2009-01-11  7:44 ` David Miller
  7 siblings, 0 replies; 9+ messages in thread
From: Robert Reif @ 2009-01-10 14:56 UTC (permalink / raw)
  To: sparclinux

David Miller wrote:
> From: Sam Ravnborg <sam@ravnborg.org>
> Date: Sat, 10 Jan 2009 08:33:21 +0100
>
>   
>> 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.
>>     
>
> I assume you meant to use "32" in the #else branch :-)
>
>   
This fixed it (with the 32).

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: sparc32 broke
  2009-01-09  0:32 sparc32 broke Robert Reif
                   ` (6 preceding siblings ...)
  2009-01-10 14:56 ` Robert Reif
@ 2009-01-11  7:44 ` David Miller
  7 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2009-01-11  7:44 UTC (permalink / raw)
  To: sparclinux

From: Robert Reif <reif@earthlink.net>
Date: Sat, 10 Jan 2009 09:56:01 -0500

> David Miller wrote:
> > From: Sam Ravnborg <sam@ravnborg.org>
> > Date: Sat, 10 Jan 2009 08:33:21 +0100
> >
> >   
> >> 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.
> >>     
> >
> > 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

Tested-by: Robert Reif <reif@earthlink.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
---
 arch/sparc/include/asm/signal.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/sparc/include/asm/signal.h b/arch/sparc/include/asm/signal.h
index 41535e7..cba4520 100644
--- a/arch/sparc/include/asm/signal.h
+++ b/arch/sparc/include/asm/signal.h
@@ -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
-- 
1.6.1.15.g159c88


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-01-11  7:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-09  0:32 sparc32 broke Robert Reif
2009-01-09  0:48 ` David Miller
2009-01-10  4:19 ` Robert Reif
2009-01-10  6:22 ` David Miller
2009-01-10  7:33 ` Sam Ravnborg
2009-01-10  7:35 ` David Miller
2009-01-10  8:16 ` Sam Ravnborg
2009-01-10 14:56 ` Robert Reif
2009-01-11  7:44 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.