diff mbox

[3/3] sparc32: fix build failure on CONFIG_SPARC_LEON

Message ID 1288021958-3130-3-git-send-email-namhyung@gmail.com
State Accepted
Delegated to: David Miller
Headers show

Commit Message

Namhyung Kim Oct. 25, 2010, 3:52 p.m. UTC
CC      arch/sparc/kernel/irq_32.o
arch/sparc/kernel/irq_32.c: In function 'request_fast_irq':
arch/sparc/kernel/irq_32.c:370:25: error: conflicting types for 'trapbase_cpu1'
arch/sparc/include/asm/leon.h:366:22: note: previous declaration of 'trapbase_cpu1' was here
arch/sparc/kernel/irq_32.c:370:40: error: conflicting types for 'trapbase_cpu2'
arch/sparc/include/asm/leon.h:367:22: note: previous declaration of 'trapbase_cpu2' was here
arch/sparc/kernel/irq_32.c:370:55: error: conflicting types for 'trapbase_cpu3'
arch/sparc/include/asm/leon.h:368:22: note: previous declaration of 'trapbase_cpu3' was here
make[3]: *** [arch/sparc/kernel/irq_32.o] Error 1
make[2]: *** [arch/sparc/kernel] Error 2
make[1]: *** [sub-make] Error 2
make: *** [all] Error 2

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
 arch/sparc/kernel/irq_32.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

Comments

David Miller Oct. 25, 2010, 4 p.m. UTC | #1
From: Namhyung Kim <namhyung@gmail.com>
Date: Tue, 26 Oct 2010 00:52:38 +0900

>   CC      arch/sparc/kernel/irq_32.o
> arch/sparc/kernel/irq_32.c: In function 'request_fast_irq':
> arch/sparc/kernel/irq_32.c:370:25: error: conflicting types for 'trapbase_cpu1'

I doubt SMP LEON chips even exist, so better to just anti-dep
this in arch/sparc/Kconfig
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sam Ravnborg Oct. 25, 2010, 4:11 p.m. UTC | #2
On Mon, Oct 25, 2010 at 09:00:43AM -0700, David Miller wrote:
> From: Namhyung Kim <namhyung@gmail.com>
> Date: Tue, 26 Oct 2010 00:52:38 +0900
> 
> >   CC      arch/sparc/kernel/irq_32.o
> > arch/sparc/kernel/irq_32.c: In function 'request_fast_irq':
> > arch/sparc/kernel/irq_32.c:370:25: error: conflicting types for 'trapbase_cpu1'
> 
> I doubt SMP LEON chips even exist, so better to just anti-dep
> this in arch/sparc/Kconfig

I have a nice eval board at my desk with a dual-core LEON4 processor.
I only lack time to play with it...

	Sam
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Oct. 25, 2010, 6:53 p.m. UTC | #3
From: Sam Ravnborg <sam@ravnborg.org>
Date: Mon, 25 Oct 2010 18:11:22 +0200

> On Mon, Oct 25, 2010 at 09:00:43AM -0700, David Miller wrote:
>> From: Namhyung Kim <namhyung@gmail.com>
>> Date: Tue, 26 Oct 2010 00:52:38 +0900
>> 
>> >   CC      arch/sparc/kernel/irq_32.o
>> > arch/sparc/kernel/irq_32.c: In function 'request_fast_irq':
>> > arch/sparc/kernel/irq_32.c:370:25: error: conflicting types for 'trapbase_cpu1'
>> 
>> I doubt SMP LEON chips even exist, so better to just anti-dep
>> this in arch/sparc/Kconfig
> 
> I have a nice eval board at my desk with a dual-core LEON4 processor.
> I only lack time to play with it...

Ok.  But whenever someone gets a time to play with it and
verify it works, we can sort out this build failure by
modifying the code as needed.

But for now I prefer the Kconfig SMP dependency fix.
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sam Ravnborg Oct. 25, 2010, 7:41 p.m. UTC | #4
On Mon, Oct 25, 2010 at 11:53:31AM -0700, David Miller wrote:
> From: Sam Ravnborg <sam@ravnborg.org>
> Date: Mon, 25 Oct 2010 18:11:22 +0200
> 
> > On Mon, Oct 25, 2010 at 09:00:43AM -0700, David Miller wrote:
> >> From: Namhyung Kim <namhyung@gmail.com>
> >> Date: Tue, 26 Oct 2010 00:52:38 +0900
> >> 
> >> >   CC      arch/sparc/kernel/irq_32.o
> >> > arch/sparc/kernel/irq_32.c: In function 'request_fast_irq':
> >> > arch/sparc/kernel/irq_32.c:370:25: error: conflicting types for 'trapbase_cpu1'
> >> 
> >> I doubt SMP LEON chips even exist, so better to just anti-dep
> >> this in arch/sparc/Kconfig
> > 
> > I have a nice eval board at my desk with a dual-core LEON4 processor.
> > I only lack time to play with it...
> 
> Ok.  But whenever someone gets a time to play with it and
> verify it works, we can sort out this build failure by
> modifying the code as needed.
> 
> But for now I prefer the Kconfig SMP dependency fix.

Yup - I agree.
My only intention was to tell that such a processor exists in reality
and not only on paper.

	Sam
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Daniel Hellstrom Oct. 26, 2010, 7:14 a.m. UTC | #5
Sam Ravnborg wrote:

>On Mon, Oct 25, 2010 at 11:53:31AM -0700, David Miller wrote:
>  
>
>>From: Sam Ravnborg <sam@ravnborg.org>
>>Date: Mon, 25 Oct 2010 18:11:22 +0200
>>
>>    
>>
>>>On Mon, Oct 25, 2010 at 09:00:43AM -0700, David Miller wrote:
>>>      
>>>
>>>>From: Namhyung Kim <namhyung@gmail.com>
>>>>Date: Tue, 26 Oct 2010 00:52:38 +0900
>>>>
>>>>        
>>>>
>>>>>  CC      arch/sparc/kernel/irq_32.o
>>>>>arch/sparc/kernel/irq_32.c: In function 'request_fast_irq':
>>>>>arch/sparc/kernel/irq_32.c:370:25: error: conflicting types for 'trapbase_cpu1'
>>>>>          
>>>>>
>>>>I doubt SMP LEON chips even exist, so better to just anti-dep
>>>>this in arch/sparc/Kconfig
>>>>        
>>>>
>>>I have a nice eval board at my desk with a dual-core LEON4 processor.
>>>I only lack time to play with it...
>>>      
>>>
>>Ok.  But whenever someone gets a time to play with it and
>>verify it works, we can sort out this build failure by
>>modifying the code as needed.
>>
>>But for now I prefer the Kconfig SMP dependency fix.
>>    
>>
>
>Yup - I agree.
>My only intention was to tell that such a processor exists in reality
>and not only on paper.
>
I stumbled into the same problem last weeks, enabling "Normal floppy 
disk support" (BLK_DEV_FD) on the LEON makes this error appear. There is 
no hardware for "Normal floppy disk support" on a LEON.

Regards,
Daniel Hellstrom

--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/sparc/kernel/irq_32.c b/arch/sparc/kernel/irq_32.c
index 0116d8d..5ad6e5c 100644
--- a/arch/sparc/kernel/irq_32.c
+++ b/arch/sparc/kernel/irq_32.c
@@ -365,7 +365,7 @@  static int request_fast_irq(unsigned int irq,
 	unsigned long flags;
 	unsigned int cpu_irq;
 	int ret;
-#ifdef CONFIG_SMP
+#if defined CONFIG_SMP && !defined CONFIG_SPARC_LEON
 	struct tt_entry *trap_table;
 	extern struct tt_entry trapbase_cpu1, trapbase_cpu2, trapbase_cpu3;
 #endif
@@ -425,7 +425,7 @@  static int request_fast_irq(unsigned int irq,
 	table[SP_TRAP_IRQ1+(cpu_irq-1)].inst_four = SPARC_NOP;
 
 	INSTANTIATE(sparc_ttable)
-#ifdef CONFIG_SMP
+#if defined CONFIG_SMP && !defined CONFIG_SPARC_LEON
 	trap_table = &trapbase_cpu1; INSTANTIATE(trap_table)
 	trap_table = &trapbase_cpu2; INSTANTIATE(trap_table)
 	trap_table = &trapbase_cpu3; INSTANTIATE(trap_table)