All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
@ 2010-08-17 10:33 Tony Lindgren
  0 siblings, 0 replies; 15+ messages in thread
From: Tony Lindgren @ 2010-08-17 10:33 UTC (permalink / raw)
  To: linux-arm-kernel

Fix SMP on UP interrupt handling for multi-omap

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/omap-smp.c |   13 +++++++++----
 arch/arm/mach-omap2/timer-gp.c |    7 +++++--
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index 9e9f70e..a8bb49c 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -22,6 +22,7 @@
 
 #include <asm/cacheflush.h>
 #include <asm/localtimer.h>
+#include <asm/smp_plat.h>
 #include <asm/smp_scu.h>
 #include <mach/hardware.h>
 #include <mach/omap4-common.h>
@@ -114,11 +115,15 @@ void __init smp_init_cpus(void)
 {
 	unsigned int i, ncores;
 
-	/* Never released */
-	scu_base = ioremap(OMAP44XX_SCU_BASE, SZ_256);
-	BUG_ON(!scu_base);
+	if (smp_on_up()) {
+		ncores = 1;
+	} else {
+		/* Never released */
+		scu_base = ioremap(OMAP44XX_SCU_BASE, SZ_256);
+		BUG_ON(!scu_base);
 
-	ncores = get_core_count();
+		ncores = get_core_count();
+	}
 
 	for (i = 0; i < ncores; i++)
 		set_cpu_possible(i, true);
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
index 74fbed8..badf5f2 100644
--- a/arch/arm/mach-omap2/timer-gp.c
+++ b/arch/arm/mach-omap2/timer-gp.c
@@ -37,6 +37,7 @@
 #include <linux/clockchips.h>
 
 #include <asm/mach/time.h>
+#include <asm/smp_plat.h>
 #include <plat/dmtimer.h>
 #include <asm/localtimer.h>
 
@@ -228,8 +229,10 @@ static void __init omap2_gp_clocksource_init(void)
 static void __init omap2_gp_timer_init(void)
 {
 #ifdef CONFIG_LOCAL_TIMERS
-	twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
-	BUG_ON(!twd_base);
+	if (smp_on_up()) {
+		twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
+		BUG_ON(!twd_base);
+	}
 #endif
 	omap_dm_timer_init();
 
-- 
1.7.1

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

* Re: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
  2010-09-03 12:15                         ` Shilimkar, Santosh
@ 2010-09-08  3:30                           ` Tony Lindgren
  -1 siblings, 0 replies; 15+ messages in thread
From: Tony Lindgren @ 2010-09-08  3:30 UTC (permalink / raw)
  To: Shilimkar, Santosh
  Cc: Russell King - ARM Linux, linux-omap, linux-arm-kernel, Bryan Wu,
	Will Deacon

* Shilimkar, Santosh <santosh.shilimkar@ti.com> [100903 05:07]:
> 
> 
> > -----Original Message-----
> > From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> > owner@vger.kernel.org] On Behalf Of Tony Lindgren
> > Sent: Friday, September 03, 2010 1:00 AM
> > To: Russell King - ARM Linux
> > Cc: linux-omap@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> > Bryan Wu; Will Deacon
> > Subject: Re: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-
> > omap
> > 
> > * Tony Lindgren <tony@atomide.com> [100902 09:16]:
> > > From c04a57fc3b41d886f56ccdc27cf9758de0c95202 Mon Sep 17 00:00:00 2001
> > > From: Tony Lindgren <tony@atomide.com>
> > > Date: Tue, 17 Aug 2010 13:33:23 +0300
> > > Subject: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-
> > omap
> > >
> > > Fix SMP on UP interrupt handling for multi-omap
> > 
> > Here's this one updated to use !smp_cpu() instead of smp_on_up().
> > Looks like the description and subject needed some refreshing too.
> > 
> As I commented on other patch we should just avoid doing anything
> When the CPU is not OMAP4. 

Looks like the only fix needed now is the localtimer fix. Posted
a patch that uses cpu_is_omap44xx() to test for that.

Tony

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

* [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
@ 2010-09-08  3:30                           ` Tony Lindgren
  0 siblings, 0 replies; 15+ messages in thread
From: Tony Lindgren @ 2010-09-08  3:30 UTC (permalink / raw)
  To: linux-arm-kernel

* Shilimkar, Santosh <santosh.shilimkar@ti.com> [100903 05:07]:
> 
> 
> > -----Original Message-----
> > From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-
> > owner at vger.kernel.org] On Behalf Of Tony Lindgren
> > Sent: Friday, September 03, 2010 1:00 AM
> > To: Russell King - ARM Linux
> > Cc: linux-omap at vger.kernel.org; linux-arm-kernel at lists.infradead.org;
> > Bryan Wu; Will Deacon
> > Subject: Re: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-
> > omap
> > 
> > * Tony Lindgren <tony@atomide.com> [100902 09:16]:
> > > From c04a57fc3b41d886f56ccdc27cf9758de0c95202 Mon Sep 17 00:00:00 2001
> > > From: Tony Lindgren <tony@atomide.com>
> > > Date: Tue, 17 Aug 2010 13:33:23 +0300
> > > Subject: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-
> > omap
> > >
> > > Fix SMP on UP interrupt handling for multi-omap
> > 
> > Here's this one updated to use !smp_cpu() instead of smp_on_up().
> > Looks like the description and subject needed some refreshing too.
> > 
> As I commented on other patch we should just avoid doing anything
> When the CPU is not OMAP4. 

Looks like the only fix needed now is the localtimer fix. Posted
a patch that uses cpu_is_omap44xx() to test for that.

Tony

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

* RE: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
  2010-09-04 11:05                         ` Russell King - ARM Linux
@ 2010-09-04 11:22                           ` Shilimkar, Santosh
  -1 siblings, 0 replies; 15+ messages in thread
From: Shilimkar, Santosh @ 2010-09-04 11:22 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: Tony Lindgren, linux-omap, linux-arm-kernel, Bryan Wu, Will Deacon

> -----Original Message-----
> From: Russell King - ARM Linux [mailto:linux@arm.linux.org.uk]
> Sent: Saturday, September 04, 2010 4:35 PM
> To: Shilimkar, Santosh
> Cc: Tony Lindgren; linux-omap@vger.kernel.org; linux-arm-
> kernel@lists.infradead.org; Bryan Wu; Will Deacon
> Subject: Re: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-
> omap
> 
> On Fri, Sep 03, 2010 at 05:36:27PM +0530, Shilimkar, Santosh wrote:
> > > -----Original Message-----
> > > From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> > > owner@vger.kernel.org] On Behalf Of Tony Lindgren
> > > Sent: Thursday, September 02, 2010 9:54 PM
> > > To: Russell King - ARM Linux
> > > Cc: linux-omap@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> > > Bryan Wu; Will Deacon
> > > Subject: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-
> omap
> > >
> > > From c04a57fc3b41d886f56ccdc27cf9758de0c95202 Mon Sep 17 00:00:00 2001
> > > From: Tony Lindgren <tony@atomide.com>
> > > Date: Tue, 17 Aug 2010 13:33:23 +0300
> > > Subject: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-
> omap
> > >
> > > Fix SMP on UP interrupt handling for multi-omap
> > >
> > > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > > ---
> > >  arch/arm/mach-omap2/omap-smp.c |   13 +++++++++----
> > >  arch/arm/mach-omap2/timer-gp.c |    7 +++++--
> > >  2 files changed, 14 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-
> omap2/omap-
> > > smp.c
> > > index 9e9f70e..a8bb49c 100644
> > > --- a/arch/arm/mach-omap2/omap-smp.c
> > > +++ b/arch/arm/mach-omap2/omap-smp.c
> > > @@ -22,6 +22,7 @@
> > >
> > >  #include <asm/cacheflush.h>
> > >  #include <asm/localtimer.h>
> > > +#include <asm/smp_plat.h>
> > >  #include <asm/smp_scu.h>
> > >  #include <mach/hardware.h>
> > >  #include <mach/omap4-common.h>
> > > @@ -114,11 +115,15 @@ void __init smp_init_cpus(void)
> > >  {
> > >  	unsigned int i, ncores;
> > >
> > > -	/* Never released */
> > > -	scu_base = ioremap(OMAP44XX_SCU_BASE, SZ_256);
> > > -	BUG_ON(!scu_base);
> > > +	if (smp_on_up()) {
> > > +		ncores = 1;
> > I am not sure if this is the correct approach. The SCU
> > hardware is not present other than OMAP4. So we should
> > just return here when the silicon is not omap4.
> > 	if (!cpu_is_omap44xx())
> > 		return -ENODEV;
> 
> void function returning a value?  Just a simple return statement will do.
Oh yes.

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

* [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
@ 2010-09-04 11:22                           ` Shilimkar, Santosh
  0 siblings, 0 replies; 15+ messages in thread
From: Shilimkar, Santosh @ 2010-09-04 11:22 UTC (permalink / raw)
  To: linux-arm-kernel

> -----Original Message-----
> From: Russell King - ARM Linux [mailto:linux at arm.linux.org.uk]
> Sent: Saturday, September 04, 2010 4:35 PM
> To: Shilimkar, Santosh
> Cc: Tony Lindgren; linux-omap at vger.kernel.org; linux-arm-
> kernel at lists.infradead.org; Bryan Wu; Will Deacon
> Subject: Re: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-
> omap
> 
> On Fri, Sep 03, 2010 at 05:36:27PM +0530, Shilimkar, Santosh wrote:
> > > -----Original Message-----
> > > From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-
> > > owner at vger.kernel.org] On Behalf Of Tony Lindgren
> > > Sent: Thursday, September 02, 2010 9:54 PM
> > > To: Russell King - ARM Linux
> > > Cc: linux-omap at vger.kernel.org; linux-arm-kernel at lists.infradead.org;
> > > Bryan Wu; Will Deacon
> > > Subject: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-
> omap
> > >
> > > From c04a57fc3b41d886f56ccdc27cf9758de0c95202 Mon Sep 17 00:00:00 2001
> > > From: Tony Lindgren <tony@atomide.com>
> > > Date: Tue, 17 Aug 2010 13:33:23 +0300
> > > Subject: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-
> omap
> > >
> > > Fix SMP on UP interrupt handling for multi-omap
> > >
> > > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > > ---
> > >  arch/arm/mach-omap2/omap-smp.c |   13 +++++++++----
> > >  arch/arm/mach-omap2/timer-gp.c |    7 +++++--
> > >  2 files changed, 14 insertions(+), 6 deletions(-)
> > >
> > > diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-
> omap2/omap-
> > > smp.c
> > > index 9e9f70e..a8bb49c 100644
> > > --- a/arch/arm/mach-omap2/omap-smp.c
> > > +++ b/arch/arm/mach-omap2/omap-smp.c
> > > @@ -22,6 +22,7 @@
> > >
> > >  #include <asm/cacheflush.h>
> > >  #include <asm/localtimer.h>
> > > +#include <asm/smp_plat.h>
> > >  #include <asm/smp_scu.h>
> > >  #include <mach/hardware.h>
> > >  #include <mach/omap4-common.h>
> > > @@ -114,11 +115,15 @@ void __init smp_init_cpus(void)
> > >  {
> > >  	unsigned int i, ncores;
> > >
> > > -	/* Never released */
> > > -	scu_base = ioremap(OMAP44XX_SCU_BASE, SZ_256);
> > > -	BUG_ON(!scu_base);
> > > +	if (smp_on_up()) {
> > > +		ncores = 1;
> > I am not sure if this is the correct approach. The SCU
> > hardware is not present other than OMAP4. So we should
> > just return here when the silicon is not omap4.
> > 	if (!cpu_is_omap44xx())
> > 		return -ENODEV;
> 
> void function returning a value?  Just a simple return statement will do.
Oh yes.

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

* Re: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
  2010-09-03 12:06                       ` Shilimkar, Santosh
@ 2010-09-04 11:05                         ` Russell King - ARM Linux
  -1 siblings, 0 replies; 15+ messages in thread
From: Russell King - ARM Linux @ 2010-09-04 11:05 UTC (permalink / raw)
  To: Shilimkar, Santosh
  Cc: Tony Lindgren, linux-omap, linux-arm-kernel, Bryan Wu, Will Deacon

On Fri, Sep 03, 2010 at 05:36:27PM +0530, Shilimkar, Santosh wrote:
> > -----Original Message-----
> > From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> > owner@vger.kernel.org] On Behalf Of Tony Lindgren
> > Sent: Thursday, September 02, 2010 9:54 PM
> > To: Russell King - ARM Linux
> > Cc: linux-omap@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> > Bryan Wu; Will Deacon
> > Subject: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
> > 
> > From c04a57fc3b41d886f56ccdc27cf9758de0c95202 Mon Sep 17 00:00:00 2001
> > From: Tony Lindgren <tony@atomide.com>
> > Date: Tue, 17 Aug 2010 13:33:23 +0300
> > Subject: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
> > 
> > Fix SMP on UP interrupt handling for multi-omap
> > 
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > ---
> >  arch/arm/mach-omap2/omap-smp.c |   13 +++++++++----
> >  arch/arm/mach-omap2/timer-gp.c |    7 +++++--
> >  2 files changed, 14 insertions(+), 6 deletions(-)
> > 
> > diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-
> > smp.c
> > index 9e9f70e..a8bb49c 100644
> > --- a/arch/arm/mach-omap2/omap-smp.c
> > +++ b/arch/arm/mach-omap2/omap-smp.c
> > @@ -22,6 +22,7 @@
> > 
> >  #include <asm/cacheflush.h>
> >  #include <asm/localtimer.h>
> > +#include <asm/smp_plat.h>
> >  #include <asm/smp_scu.h>
> >  #include <mach/hardware.h>
> >  #include <mach/omap4-common.h>
> > @@ -114,11 +115,15 @@ void __init smp_init_cpus(void)
> >  {
> >  	unsigned int i, ncores;
> > 
> > -	/* Never released */
> > -	scu_base = ioremap(OMAP44XX_SCU_BASE, SZ_256);
> > -	BUG_ON(!scu_base);
> > +	if (smp_on_up()) {
> > +		ncores = 1;
> I am not sure if this is the correct approach. The SCU 
> hardware is not present other than OMAP4. So we should
> just return here when the silicon is not omap4.
> 	if (!cpu_is_omap44xx())
> 		return -ENODEV;

void function returning a value?  Just a simple return statement will do.

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

* [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
@ 2010-09-04 11:05                         ` Russell King - ARM Linux
  0 siblings, 0 replies; 15+ messages in thread
From: Russell King - ARM Linux @ 2010-09-04 11:05 UTC (permalink / raw)
  To: linux-arm-kernel

On Fri, Sep 03, 2010 at 05:36:27PM +0530, Shilimkar, Santosh wrote:
> > -----Original Message-----
> > From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-
> > owner at vger.kernel.org] On Behalf Of Tony Lindgren
> > Sent: Thursday, September 02, 2010 9:54 PM
> > To: Russell King - ARM Linux
> > Cc: linux-omap at vger.kernel.org; linux-arm-kernel at lists.infradead.org;
> > Bryan Wu; Will Deacon
> > Subject: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
> > 
> > From c04a57fc3b41d886f56ccdc27cf9758de0c95202 Mon Sep 17 00:00:00 2001
> > From: Tony Lindgren <tony@atomide.com>
> > Date: Tue, 17 Aug 2010 13:33:23 +0300
> > Subject: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
> > 
> > Fix SMP on UP interrupt handling for multi-omap
> > 
> > Signed-off-by: Tony Lindgren <tony@atomide.com>
> > ---
> >  arch/arm/mach-omap2/omap-smp.c |   13 +++++++++----
> >  arch/arm/mach-omap2/timer-gp.c |    7 +++++--
> >  2 files changed, 14 insertions(+), 6 deletions(-)
> > 
> > diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-
> > smp.c
> > index 9e9f70e..a8bb49c 100644
> > --- a/arch/arm/mach-omap2/omap-smp.c
> > +++ b/arch/arm/mach-omap2/omap-smp.c
> > @@ -22,6 +22,7 @@
> > 
> >  #include <asm/cacheflush.h>
> >  #include <asm/localtimer.h>
> > +#include <asm/smp_plat.h>
> >  #include <asm/smp_scu.h>
> >  #include <mach/hardware.h>
> >  #include <mach/omap4-common.h>
> > @@ -114,11 +115,15 @@ void __init smp_init_cpus(void)
> >  {
> >  	unsigned int i, ncores;
> > 
> > -	/* Never released */
> > -	scu_base = ioremap(OMAP44XX_SCU_BASE, SZ_256);
> > -	BUG_ON(!scu_base);
> > +	if (smp_on_up()) {
> > +		ncores = 1;
> I am not sure if this is the correct approach. The SCU 
> hardware is not present other than OMAP4. So we should
> just return here when the silicon is not omap4.
> 	if (!cpu_is_omap44xx())
> 		return -ENODEV;

void function returning a value?  Just a simple return statement will do.

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

* RE: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
  2010-09-02 19:30                       ` Tony Lindgren
@ 2010-09-03 12:15                         ` Shilimkar, Santosh
  -1 siblings, 0 replies; 15+ messages in thread
From: Shilimkar, Santosh @ 2010-09-03 12:15 UTC (permalink / raw)
  To: Tony Lindgren, Russell King - ARM Linux
  Cc: linux-omap, linux-arm-kernel, Bryan Wu, Will Deacon



> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> owner@vger.kernel.org] On Behalf Of Tony Lindgren
> Sent: Friday, September 03, 2010 1:00 AM
> To: Russell King - ARM Linux
> Cc: linux-omap@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> Bryan Wu; Will Deacon
> Subject: Re: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-
> omap
> 
> * Tony Lindgren <tony@atomide.com> [100902 09:16]:
> > From c04a57fc3b41d886f56ccdc27cf9758de0c95202 Mon Sep 17 00:00:00 2001
> > From: Tony Lindgren <tony@atomide.com>
> > Date: Tue, 17 Aug 2010 13:33:23 +0300
> > Subject: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-
> omap
> >
> > Fix SMP on UP interrupt handling for multi-omap
> 
> Here's this one updated to use !smp_cpu() instead of smp_on_up().
> Looks like the description and subject needed some refreshing too.
> 
As I commented on other patch we should just avoid doing anything
When the CPU is not OMAP4. 

Regards,
Santosh

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

* [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
@ 2010-09-03 12:15                         ` Shilimkar, Santosh
  0 siblings, 0 replies; 15+ messages in thread
From: Shilimkar, Santosh @ 2010-09-03 12:15 UTC (permalink / raw)
  To: linux-arm-kernel



> -----Original Message-----
> From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-
> owner at vger.kernel.org] On Behalf Of Tony Lindgren
> Sent: Friday, September 03, 2010 1:00 AM
> To: Russell King - ARM Linux
> Cc: linux-omap at vger.kernel.org; linux-arm-kernel at lists.infradead.org;
> Bryan Wu; Will Deacon
> Subject: Re: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-
> omap
> 
> * Tony Lindgren <tony@atomide.com> [100902 09:16]:
> > From c04a57fc3b41d886f56ccdc27cf9758de0c95202 Mon Sep 17 00:00:00 2001
> > From: Tony Lindgren <tony@atomide.com>
> > Date: Tue, 17 Aug 2010 13:33:23 +0300
> > Subject: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-
> omap
> >
> > Fix SMP on UP interrupt handling for multi-omap
> 
> Here's this one updated to use !smp_cpu() instead of smp_on_up().
> Looks like the description and subject needed some refreshing too.
> 
As I commented on other patch we should just avoid doing anything
When the CPU is not OMAP4. 

Regards,
Santosh

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

* RE: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
  2010-09-02 16:23                     ` Tony Lindgren
@ 2010-09-03 12:06                       ` Shilimkar, Santosh
  -1 siblings, 0 replies; 15+ messages in thread
From: Shilimkar, Santosh @ 2010-09-03 12:06 UTC (permalink / raw)
  To: Tony Lindgren, Russell King - ARM Linux
  Cc: linux-omap, linux-arm-kernel, Bryan Wu, Will Deacon

> -----Original Message-----
> From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-
> owner@vger.kernel.org] On Behalf Of Tony Lindgren
> Sent: Thursday, September 02, 2010 9:54 PM
> To: Russell King - ARM Linux
> Cc: linux-omap@vger.kernel.org; linux-arm-kernel@lists.infradead.org;
> Bryan Wu; Will Deacon
> Subject: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
> 
> From c04a57fc3b41d886f56ccdc27cf9758de0c95202 Mon Sep 17 00:00:00 2001
> From: Tony Lindgren <tony@atomide.com>
> Date: Tue, 17 Aug 2010 13:33:23 +0300
> Subject: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
> 
> Fix SMP on UP interrupt handling for multi-omap
> 
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  arch/arm/mach-omap2/omap-smp.c |   13 +++++++++----
>  arch/arm/mach-omap2/timer-gp.c |    7 +++++--
>  2 files changed, 14 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-
> smp.c
> index 9e9f70e..a8bb49c 100644
> --- a/arch/arm/mach-omap2/omap-smp.c
> +++ b/arch/arm/mach-omap2/omap-smp.c
> @@ -22,6 +22,7 @@
> 
>  #include <asm/cacheflush.h>
>  #include <asm/localtimer.h>
> +#include <asm/smp_plat.h>
>  #include <asm/smp_scu.h>
>  #include <mach/hardware.h>
>  #include <mach/omap4-common.h>
> @@ -114,11 +115,15 @@ void __init smp_init_cpus(void)
>  {
>  	unsigned int i, ncores;
> 
> -	/* Never released */
> -	scu_base = ioremap(OMAP44XX_SCU_BASE, SZ_256);
> -	BUG_ON(!scu_base);
> +	if (smp_on_up()) {
> +		ncores = 1;
I am not sure if this is the correct approach. The SCU 
hardware is not present other than OMAP4. So we should
just return here when the silicon is not omap4.
	if (!cpu_is_omap44xx())
		return -ENODEV;
> +	} else {
> +		/* Never released */
> +		scu_base = ioremap(OMAP44XX_SCU_BASE, SZ_256);
> +		BUG_ON(!scu_base);
> 
> -	ncores = get_core_count();
> +		ncores = get_core_count();
> +	}
> 
>  	for (i = 0; i < ncores; i++)
>  		set_cpu_possible(i, true);
> diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-
> gp.c
> index 74fbed8..badf5f2 100644
> --- a/arch/arm/mach-omap2/timer-gp.c
> +++ b/arch/arm/mach-omap2/timer-gp.c
> @@ -37,6 +37,7 @@
>  #include <linux/clockchips.h>
> 
>  #include <asm/mach/time.h>
> +#include <asm/smp_plat.h>
>  #include <plat/dmtimer.h>
>  #include <asm/localtimer.h>
> 
> @@ -228,8 +229,10 @@ static void __init omap2_gp_clocksource_init(void)
>  static void __init omap2_gp_timer_init(void)
>  {
>  #ifdef CONFIG_LOCAL_TIMERS
> -	twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
> -	BUG_ON(!twd_base);
> +	if (smp_on_up()) {
> +		twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
> +		BUG_ON(!twd_base);
> +	}
>  #endif
>  	omap_dm_timer_init();
> 
> --
> 1.7.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
@ 2010-09-03 12:06                       ` Shilimkar, Santosh
  0 siblings, 0 replies; 15+ messages in thread
From: Shilimkar, Santosh @ 2010-09-03 12:06 UTC (permalink / raw)
  To: linux-arm-kernel

> -----Original Message-----
> From: linux-omap-owner at vger.kernel.org [mailto:linux-omap-
> owner at vger.kernel.org] On Behalf Of Tony Lindgren
> Sent: Thursday, September 02, 2010 9:54 PM
> To: Russell King - ARM Linux
> Cc: linux-omap at vger.kernel.org; linux-arm-kernel at lists.infradead.org;
> Bryan Wu; Will Deacon
> Subject: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
> 
> From c04a57fc3b41d886f56ccdc27cf9758de0c95202 Mon Sep 17 00:00:00 2001
> From: Tony Lindgren <tony@atomide.com>
> Date: Tue, 17 Aug 2010 13:33:23 +0300
> Subject: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
> 
> Fix SMP on UP interrupt handling for multi-omap
> 
> Signed-off-by: Tony Lindgren <tony@atomide.com>
> ---
>  arch/arm/mach-omap2/omap-smp.c |   13 +++++++++----
>  arch/arm/mach-omap2/timer-gp.c |    7 +++++--
>  2 files changed, 14 insertions(+), 6 deletions(-)
> 
> diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-
> smp.c
> index 9e9f70e..a8bb49c 100644
> --- a/arch/arm/mach-omap2/omap-smp.c
> +++ b/arch/arm/mach-omap2/omap-smp.c
> @@ -22,6 +22,7 @@
> 
>  #include <asm/cacheflush.h>
>  #include <asm/localtimer.h>
> +#include <asm/smp_plat.h>
>  #include <asm/smp_scu.h>
>  #include <mach/hardware.h>
>  #include <mach/omap4-common.h>
> @@ -114,11 +115,15 @@ void __init smp_init_cpus(void)
>  {
>  	unsigned int i, ncores;
> 
> -	/* Never released */
> -	scu_base = ioremap(OMAP44XX_SCU_BASE, SZ_256);
> -	BUG_ON(!scu_base);
> +	if (smp_on_up()) {
> +		ncores = 1;
I am not sure if this is the correct approach. The SCU 
hardware is not present other than OMAP4. So we should
just return here when the silicon is not omap4.
	if (!cpu_is_omap44xx())
		return -ENODEV;
> +	} else {
> +		/* Never released */
> +		scu_base = ioremap(OMAP44XX_SCU_BASE, SZ_256);
> +		BUG_ON(!scu_base);
> 
> -	ncores = get_core_count();
> +		ncores = get_core_count();
> +	}
> 
>  	for (i = 0; i < ncores; i++)
>  		set_cpu_possible(i, true);
> diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-
> gp.c
> index 74fbed8..badf5f2 100644
> --- a/arch/arm/mach-omap2/timer-gp.c
> +++ b/arch/arm/mach-omap2/timer-gp.c
> @@ -37,6 +37,7 @@
>  #include <linux/clockchips.h>
> 
>  #include <asm/mach/time.h>
> +#include <asm/smp_plat.h>
>  #include <plat/dmtimer.h>
>  #include <asm/localtimer.h>
> 
> @@ -228,8 +229,10 @@ static void __init omap2_gp_clocksource_init(void)
>  static void __init omap2_gp_timer_init(void)
>  {
>  #ifdef CONFIG_LOCAL_TIMERS
> -	twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
> -	BUG_ON(!twd_base);
> +	if (smp_on_up()) {
> +		twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
> +		BUG_ON(!twd_base);
> +	}
>  #endif
>  	omap_dm_timer_init();
> 
> --
> 1.7.1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

* Re: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
  2010-09-02 16:23                     ` Tony Lindgren
@ 2010-09-02 19:30                       ` Tony Lindgren
  -1 siblings, 0 replies; 15+ messages in thread
From: Tony Lindgren @ 2010-09-02 19:30 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: linux-omap, linux-arm-kernel, Bryan Wu, Will Deacon

[-- Attachment #1: Type: text/plain, Size: 475 bytes --]

* Tony Lindgren <tony@atomide.com> [100902 09:16]:
> From c04a57fc3b41d886f56ccdc27cf9758de0c95202 Mon Sep 17 00:00:00 2001
> From: Tony Lindgren <tony@atomide.com>
> Date: Tue, 17 Aug 2010 13:33:23 +0300
> Subject: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
> 
> Fix SMP on UP interrupt handling for multi-omap

Here's this one updated to use !smp_cpu() instead of smp_on_up().
Looks like the description and subject needed some refreshing too.

Tony

[-- Attachment #2: smp-on-up-omap.patch --]
[-- Type: text/x-diff, Size: 1838 bytes --]

>From e791c682fe2e3989e76f0bce7e0c9d97e65c2137 Mon Sep 17 00:00:00 2001
From: Tony Lindgren <tony@atomide.com>
Date: Tue, 17 Aug 2010 13:33:23 +0300
Subject: [PATCH] omap: Fix SMP on UP initialization for multi-omap

Fix SMP on UP initialization for multi-omap.

Signed-off-by: Tony Lindgren <tony@atomide.com>

diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index 9e9f70e..3695232 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -22,6 +22,7 @@
 
 #include <asm/cacheflush.h>
 #include <asm/localtimer.h>
+#include <asm/smp_plat.h>
 #include <asm/smp_scu.h>
 #include <mach/hardware.h>
 #include <mach/omap4-common.h>
@@ -114,11 +115,15 @@ void __init smp_init_cpus(void)
 {
 	unsigned int i, ncores;
 
-	/* Never released */
-	scu_base = ioremap(OMAP44XX_SCU_BASE, SZ_256);
-	BUG_ON(!scu_base);
+	if (!smp_cpu()) {
+		ncores = 1;
+	} else {
+		/* Never released */
+		scu_base = ioremap(OMAP44XX_SCU_BASE, SZ_256);
+		BUG_ON(!scu_base);
 
-	ncores = get_core_count();
+		ncores = get_core_count();
+	}
 
 	for (i = 0; i < ncores; i++)
 		set_cpu_possible(i, true);
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
index 74fbed8..a21b4a4 100644
--- a/arch/arm/mach-omap2/timer-gp.c
+++ b/arch/arm/mach-omap2/timer-gp.c
@@ -37,6 +37,7 @@
 #include <linux/clockchips.h>
 
 #include <asm/mach/time.h>
+#include <asm/smp_plat.h>
 #include <plat/dmtimer.h>
 #include <asm/localtimer.h>
 
@@ -228,8 +229,10 @@ static void __init omap2_gp_clocksource_init(void)
 static void __init omap2_gp_timer_init(void)
 {
 #ifdef CONFIG_LOCAL_TIMERS
-	twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
-	BUG_ON(!twd_base);
+	if (!smp_cpu()) {
+		twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
+		BUG_ON(!twd_base);
+	}
 #endif
 	omap_dm_timer_init();
 

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

* [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
@ 2010-09-02 19:30                       ` Tony Lindgren
  0 siblings, 0 replies; 15+ messages in thread
From: Tony Lindgren @ 2010-09-02 19:30 UTC (permalink / raw)
  To: linux-arm-kernel

* Tony Lindgren <tony@atomide.com> [100902 09:16]:
> From c04a57fc3b41d886f56ccdc27cf9758de0c95202 Mon Sep 17 00:00:00 2001
> From: Tony Lindgren <tony@atomide.com>
> Date: Tue, 17 Aug 2010 13:33:23 +0300
> Subject: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
> 
> Fix SMP on UP interrupt handling for multi-omap

Here's this one updated to use !smp_cpu() instead of smp_on_up().
Looks like the description and subject needed some refreshing too.

Tony

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

* [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
  2010-09-02 16:16                 ` Tony Lindgren
@ 2010-09-02 16:23                     ` Tony Lindgren
  0 siblings, 0 replies; 15+ messages in thread
From: Tony Lindgren @ 2010-09-02 16:23 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: linux-omap, linux-arm-kernel, Bryan Wu, Will Deacon

>From c04a57fc3b41d886f56ccdc27cf9758de0c95202 Mon Sep 17 00:00:00 2001
From: Tony Lindgren <tony@atomide.com>
Date: Tue, 17 Aug 2010 13:33:23 +0300
Subject: [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap

Fix SMP on UP interrupt handling for multi-omap

Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/omap-smp.c |   13 +++++++++----
 arch/arm/mach-omap2/timer-gp.c |    7 +++++--
 2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/arch/arm/mach-omap2/omap-smp.c b/arch/arm/mach-omap2/omap-smp.c
index 9e9f70e..a8bb49c 100644
--- a/arch/arm/mach-omap2/omap-smp.c
+++ b/arch/arm/mach-omap2/omap-smp.c
@@ -22,6 +22,7 @@
 
 #include <asm/cacheflush.h>
 #include <asm/localtimer.h>
+#include <asm/smp_plat.h>
 #include <asm/smp_scu.h>
 #include <mach/hardware.h>
 #include <mach/omap4-common.h>
@@ -114,11 +115,15 @@ void __init smp_init_cpus(void)
 {
 	unsigned int i, ncores;
 
-	/* Never released */
-	scu_base = ioremap(OMAP44XX_SCU_BASE, SZ_256);
-	BUG_ON(!scu_base);
+	if (smp_on_up()) {
+		ncores = 1;
+	} else {
+		/* Never released */
+		scu_base = ioremap(OMAP44XX_SCU_BASE, SZ_256);
+		BUG_ON(!scu_base);
 
-	ncores = get_core_count();
+		ncores = get_core_count();
+	}
 
 	for (i = 0; i < ncores; i++)
 		set_cpu_possible(i, true);
diff --git a/arch/arm/mach-omap2/timer-gp.c b/arch/arm/mach-omap2/timer-gp.c
index 74fbed8..badf5f2 100644
--- a/arch/arm/mach-omap2/timer-gp.c
+++ b/arch/arm/mach-omap2/timer-gp.c
@@ -37,6 +37,7 @@
 #include <linux/clockchips.h>
 
 #include <asm/mach/time.h>
+#include <asm/smp_plat.h>
 #include <plat/dmtimer.h>
 #include <asm/localtimer.h>
 
@@ -228,8 +229,10 @@ static void __init omap2_gp_clocksource_init(void)
 static void __init omap2_gp_timer_init(void)
 {
 #ifdef CONFIG_LOCAL_TIMERS
-	twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
-	BUG_ON(!twd_base);
+	if (smp_on_up()) {
+		twd_base = ioremap(OMAP44XX_LOCAL_TWD_BASE, SZ_256);
+		BUG_ON(!twd_base);
+	}
 #endif
 	omap_dm_timer_init();
 
-- 
1.7.1


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

* [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap
@ 2010-09-02 16:23                     ` Tony Lindgren
  0 siblings, 0 replies; 15+ messages in thread
From: Tony Lindgren @ 2010-09-02 16:23 UTC (permalink / raw)
  To: linux-arm-kernel



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

end of thread, other threads:[~2010-09-08  3:30 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-17 10:33 [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap Tony Lindgren
2010-08-17 14:12 [PATCH 0/4] Hacks to allow booting ARM SMP kernel on UP ARMv7 Tony Lindgren
2010-08-17 15:40 ` Russell King - ARM Linux
2010-08-19  7:38   ` Tony Lindgren
2010-08-19  9:38     ` Bryan Wu
2010-08-19  9:57       ` Tony Lindgren
2010-08-19 10:20         ` Russell King - ARM Linux
2010-08-20 12:06           ` Tony Lindgren
2010-08-30 22:55             ` Tony Lindgren
2010-09-02 13:36               ` Russell King - ARM Linux
2010-09-02 16:16                 ` Tony Lindgren
2010-09-02 16:23                   ` [PATCH 6/6] omap: Fix SMP on UP interrupt handling for multi-omap Tony Lindgren
2010-09-02 16:23                     ` Tony Lindgren
2010-09-02 19:30                     ` Tony Lindgren
2010-09-02 19:30                       ` Tony Lindgren
2010-09-03 12:15                       ` Shilimkar, Santosh
2010-09-03 12:15                         ` Shilimkar, Santosh
2010-09-08  3:30                         ` Tony Lindgren
2010-09-08  3:30                           ` Tony Lindgren
2010-09-03 12:06                     ` Shilimkar, Santosh
2010-09-03 12:06                       ` Shilimkar, Santosh
2010-09-04 11:05                       ` Russell King - ARM Linux
2010-09-04 11:05                         ` Russell King - ARM Linux
2010-09-04 11:22                         ` Shilimkar, Santosh
2010-09-04 11:22                           ` Shilimkar, Santosh

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.