Re: [PATCH] omap: Fix sev instruction usage for multi-omap

2010-08-09 Thread Tony Lindgren
* Bryan Wu  [100809 09:35]:
> 
> I also did similar thing these days. And yes, with these 2 CONFIG_SMP related
> patches in omap3_defconfig, I can built a single for omap2/3/4 with 
> CONFIG_SMP=y.
> 
> But the kernel still doesn't boot on both omap3 beagle board and omap4 panda
> board on my side.
> 
> I'm very glad to help this out.

Yeah let's try to figure out what needs to be done to boot it. To me it
looks like we should be able to get omap3 & 4 kernel working with CONFIG_SMP
with (hopefully) minor changes.

Then getting omap2 working will require more work as some instructions
require CONFIG_CPU_32v6K extensions, and 24xx does not support that.

Regards,

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


Re: [PATCH] omap: Fix sev instruction usage for multi-omap

2010-08-08 Thread Bryan Wu
On 08/06/2010 03:05 PM, Tony Lindgren wrote:
> * Tony Lindgren  [100806 09:55]:
>> * Kevin Hilman  [100806 01:48]:
>>>
 Also with omap_4430sdp_defconfig, I see these compile errors
 arch/arm/kernel/entry-armv.S: Assembler messages:
 arch/arm/kernel/entry-armv.S:48: Error: bad instruction `test_for_ipi 
 r0,r6,r5,lr'
 arch/arm/kernel/entry-armv.S:48: Error: bad instruction `test_for_ipi 
 r0,r6,r5,lr'
 make[1]: *** [arch/arm/kernel/entry-armv.o] Error 1
 make: *** [arch/arm/kernel] Error 2

 Doing a git log on entry-armv.S shows me a top commit which might
 be an issue if conflicts are'nt resolved well.

 commit 7b70c4275f28702b76b273c8534c38f8313812e9
 Merge: ceb0885... a20df56...
 Author: Russell King 
 Date:   Sat Jul 31 14:20:16 2010 +0100

 Merge branch 'devel-stable' into devel

 Conflicts:
 arch/arm/kernel/entry-armv.S
 arch/arm/kernel/setup.c
 arch/arm/mm/init.c

 Maybe this is an issue in Tony's for-next as well. Haven't tested
 it though.
>>>
>>> Yeah, I'm guessing this an issue in for-next, and probably l-o master
>>> too.
>>
>> Noticed that with omap3_defconfig with CONFIG_SMP enabled. Does the
>> following work for you?
> 
> Here's a related patch that allows CONFIG_SMP to compile with
> omap3_defconfig. Booting still won't work before some arm generic
> code is changed.
> 
> Regards,
> 
> Tony


Tony,

I also did similar thing these days. And yes, with these 2 CONFIG_SMP related
patches in omap3_defconfig, I can built a single for omap2/3/4 with 
CONFIG_SMP=y.

But the kernel still doesn't boot on both omap3 beagle board and omap4 panda
board on my side.

I'm very glad to help this out.

Thanks,
-- 
Bryan Wu 
Kernel Developer+86.138-1617-6545 Mobile
Ubuntu Kernel Team | Hardware Enablement Team
Canonical Ltd.  www.canonical.com
Ubuntu - Linux for human beings | www.ubuntu.com
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


RE: [PATCH] omap: Fix sev instruction usage for multi-omap

2010-08-06 Thread Nayak, Rajendra
 

> -Original Message-
> From: Tony Lindgren [mailto:t...@atomide.com] 
> Sent: Friday, August 06, 2010 12:35 PM
> To: Kevin Hilman
> Cc: Nayak, Rajendra; linux-omap@vger.kernel.org
> Subject: [PATCH] omap: Fix sev instruction usage for multi-omap
> 
> * Tony Lindgren  [100806 09:55]:
> > * Kevin Hilman  [100806 01:48]:
> > > 
> > > > Also with omap_4430sdp_defconfig, I see these compile errors
> > > > arch/arm/kernel/entry-armv.S: Assembler messages:
> > > > arch/arm/kernel/entry-armv.S:48: Error: bad instruction 
> `test_for_ipi r0,r6,r5,lr'
> > > > arch/arm/kernel/entry-armv.S:48: Error: bad instruction 
> `test_for_ipi r0,r6,r5,lr'
> > > > make[1]: *** [arch/arm/kernel/entry-armv.o] Error 1
> > > > make: *** [arch/arm/kernel] Error 2
> > > >
> > > > Doing a git log on entry-armv.S shows me a top commit 
> which might
> > > > be an issue if conflicts are'nt resolved well.
> > > >
> > > > commit 7b70c4275f28702b76b273c8534c38f8313812e9
> > > > Merge: ceb0885... a20df56...
> > > > Author: Russell King 
> > > > Date:   Sat Jul 31 14:20:16 2010 +0100
> > > >
> > > > Merge branch 'devel-stable' into devel
> > > >
> > > > Conflicts:
> > > > arch/arm/kernel/entry-armv.S
> > > > arch/arm/kernel/setup.c
> > > > arch/arm/mm/init.c
> > > >
> > > > Maybe this is an issue in Tony's for-next as well. 
> Haven't tested
> > > > it though.
> > > 
> > > Yeah, I'm guessing this an issue in for-next, and 
> probably l-o master
> > > too.
> > 
> > Noticed that with omap3_defconfig with CONFIG_SMP enabled. Does the
> > following work for you?

With this patch, I went past the previous break but hit this

/tmp/ccUTrImV.s: Assembler messages:
/tmp/ccUTrImV.s:140: Error: selected processor does not support `sev'
make[1]: *** [arch/arm/mach-omap2/omap-smp.o] Error 1
make: *** [arch/arm/mach-omap2] Error 2

> 
> Here's a related patch that allows CONFIG_SMP to compile with
> omap3_defconfig. Booting still won't work before some arm generic
> code is changed.

Now with this, omap4 build using omap_4430sdp_defconfig seems to
go through, but like you said, boot is still an issue.

regards,
Rajendra

> 
> Regards,
> 
> Tony
> --
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[PATCH] omap: Fix sev instruction usage for multi-omap

2010-08-06 Thread Tony Lindgren
* Tony Lindgren  [100806 09:55]:
> * Kevin Hilman  [100806 01:48]:
> > 
> > > Also with omap_4430sdp_defconfig, I see these compile errors
> > > arch/arm/kernel/entry-armv.S: Assembler messages:
> > > arch/arm/kernel/entry-armv.S:48: Error: bad instruction `test_for_ipi 
> > > r0,r6,r5,lr'
> > > arch/arm/kernel/entry-armv.S:48: Error: bad instruction `test_for_ipi 
> > > r0,r6,r5,lr'
> > > make[1]: *** [arch/arm/kernel/entry-armv.o] Error 1
> > > make: *** [arch/arm/kernel] Error 2
> > >
> > > Doing a git log on entry-armv.S shows me a top commit which might
> > > be an issue if conflicts are'nt resolved well.
> > >
> > > commit 7b70c4275f28702b76b273c8534c38f8313812e9
> > > Merge: ceb0885... a20df56...
> > > Author: Russell King 
> > > Date:   Sat Jul 31 14:20:16 2010 +0100
> > >
> > > Merge branch 'devel-stable' into devel
> > >
> > > Conflicts:
> > > arch/arm/kernel/entry-armv.S
> > > arch/arm/kernel/setup.c
> > > arch/arm/mm/init.c
> > >
> > > Maybe this is an issue in Tony's for-next as well. Haven't tested
> > > it though.
> > 
> > Yeah, I'm guessing this an issue in for-next, and probably l-o master
> > too.
> 
> Noticed that with omap3_defconfig with CONFIG_SMP enabled. Does the
> following work for you?

Here's a related patch that allows CONFIG_SMP to compile with
omap3_defconfig. Booting still won't work before some arm generic
code is changed.

Regards,

Tony
>From f931fb147f2a3cf4c4b7646e5f270c241ab4aad1 Mon Sep 17 00:00:00 2001
From: Tony Lindgren 
Date: Thu, 5 Aug 2010 13:28:42 +0300
Subject: [PATCH] omap: Fix sev instruction usage for multi-omap

Otherwise we get the following error with omap3_defconfig and CONFIG_SMP:

Error: selected processor does not support `sev'

Signed-off-by: Tony Lindgren 

diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 63b2d88..88d3a1e 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -25,6 +25,7 @@ obj-$(CONFIG_LOCAL_TIMERS)+= timer-mpu.o
 obj-$(CONFIG_HOTPLUG_CPU)  += omap-hotplug.o
 obj-$(CONFIG_ARCH_OMAP4)   += omap44xx-smc.o omap4-common.o
 
+AFLAGS_omap-headsmp.o  :=-Wa,-march=armv7-a
 AFLAGS_omap44xx-smc.o  :=-Wa,-march=armv7-a
 
 # Functions loaded to SRAM
diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index af3c20c..9e9f70e 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -102,8 +102,7 @@ static void __init wakeup_secondary(void)
 * Send a 'sev' to wake the secondary core from WFE.
 * Drain the outstanding writes to memory
 */
-   dsb();
-   set_event();
+   dsb_sev();
mb();
 }
 
diff --git a/arch/arm/plat-omap/include/plat/smp.h 
b/arch/arm/plat-omap/include/plat/smp.h
index 6a3ff65..5177a9c 100644
--- a/arch/arm/plat-omap/include/plat/smp.h
+++ b/arch/arm/plat-omap/include/plat/smp.h
@@ -19,13 +19,6 @@
 
 #include 
 
-/*
- * set_event() is used to wake up secondary core from wfe using sev. ROM
- * code puts the second core into wfe(standby).
- *
- */
-#define set_event()__asm__ __volatile__ ("sev" : : : "memory")
-
 /* Needed for secondary core boot */
 extern void omap_secondary_startup(void);
 extern u32 omap_modify_auxcoreboot0(u32 set_mask, u32 clear_mask);