linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT PULL] MSM fix
@ 2011-07-20 20:37 David Brown
  2011-07-20 21:06 ` Arnd Bergmann
  0 siblings, 1 reply; 7+ messages in thread
From: David Brown @ 2011-07-20 20:37 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: Nicolas Pitre, Thomas Gleixner, Russell King, linux-arm-kernel,
	linux-kernel

I seem to have missed this fix when it was sent out in April.

The following changes since commit 620917de59eeb934b9f8cf35cc2d95c1ac8ed0fc:

  Linux 3.0-rc7 (2011-07-11 16:51:52 -0700)

are available in the git repository at:
  git://codeaurora.org/quic/kernel/davidb/linux-msm.git msm-fix

Jeff Ohlstein (1):
      msm: platsmp: actually read core count in get_core_count

 arch/arm/mach-msm/platsmp.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

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

* Re: [GIT PULL] MSM fix
  2011-07-20 20:37 [GIT PULL] MSM fix David Brown
@ 2011-07-20 21:06 ` Arnd Bergmann
  2011-07-20 22:50   ` David Brown
  0 siblings, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2011-07-20 21:06 UTC (permalink / raw)
  To: David Brown
  Cc: Nicolas Pitre, Thomas Gleixner, Russell King, linux-arm-kernel,
	linux-kernel

On Wednesday 20 July 2011 13:37:03 David Brown wrote:
> I seem to have missed this fix when it was sent out in April.
> 
> The following changes since commit 620917de59eeb934b9f8cf35cc2d95c1ac8ed0fc:
> 
>   Linux 3.0-rc7 (2011-07-11 16:51:52 -0700)
> 
> are available in the git repository at:
>   git://codeaurora.org/quic/kernel/davidb/linux-msm.git msm-fix
> 
> Jeff Ohlstein (1):
>       msm: platsmp: actually read core count in get_core_count
> 

Hmm, this one seems like it really applies to older kernels as well, so
we can just as well add a cc:stable@kernel.org tag and put it into the
arm-soc/next/fixes branch, right?

Linus has just pulled the 'last arm-soc fixes for 3.0' branch, and I don't
really want to follow up with 'last fix, this time for real' pull request
unless it's for a serious regression.

On a related topic, what's the deal with the msm-core and msm-move-gpio
branches in the same tree? I have the impression that they should be
in arm-soc.git, but I never received a pull request.

The msm-move-gpio branch looks like it wasn't merged into the gpio
tree either, which would be the other logical place, and the msm-core
branch is currently in linux-next but hasn't been updated since April.

	Arnd

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

* Re: [GIT PULL] MSM fix
  2011-07-20 21:06 ` Arnd Bergmann
@ 2011-07-20 22:50   ` David Brown
  2011-07-20 22:54     ` Russell King - ARM Linux
  0 siblings, 1 reply; 7+ messages in thread
From: David Brown @ 2011-07-20 22:50 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: David Brown, Nicolas Pitre, Thomas Gleixner, Russell King,
	linux-arm-kernel, linux-kernel

On Wed, Jul 20, 2011 at 11:06:15PM +0200, Arnd Bergmann wrote:
> On Wednesday 20 July 2011 13:37:03 David Brown wrote:
> > I seem to have missed this fix when it was sent out in April.
> > 
> > The following changes since commit 620917de59eeb934b9f8cf35cc2d95c1ac8ed0fc:
> > 
> >   Linux 3.0-rc7 (2011-07-11 16:51:52 -0700)
> > 
> > are available in the git repository at:
> >   git://codeaurora.org/quic/kernel/davidb/linux-msm.git msm-fix
> > 
> > Jeff Ohlstein (1):
> >       msm: platsmp: actually read core count in get_core_count
> > 
> 
> Hmm, this one seems like it really applies to older kernels as well, so
> we can just as well add a cc:stable@kernel.org tag and put it into the
> arm-soc/next/fixes branch, right?

It looks like it would apply to 2.6.38 and 39 as well.  I'm not sure
it qualifies under the "It must fix a real bug that bothers people".
It would only apply if someone had set NR_CPUS to more than 2.

> Linus has just pulled the 'last arm-soc fixes for 3.0' branch, and I don't
> really want to follow up with 'last fix, this time for real' pull request
> unless it's for a serious regression.

It's not serious, so 3.1 is fine.

> On a related topic, what's the deal with the msm-core and msm-move-gpio
> branches in the same tree? I have the impression that they should be
> in arm-soc.git, but I never received a pull request.

I had sent a pull request for msm-move-gpio to Grant, but apparently
that didn't happen.  If more appropriate, I can send one to you for
it, or resend to Grant.

The msm-core stuff happened before the snafu about ARM, and I was
holding off on these things.  The authors of these patches say they
are working on cleaned up versions.

I'm not sure we want the dummy clocks code in the kernel.  It's
intended as a placeholder.  Stephen Boyd has a 26-series patch that
adds better clock support.  Given the size (13047 insertions), this
may need some cleanup or even device-tree work to include.

Unfortunately, a lot of the Qualcomm development seems to have moved
back to private trees.

BTW, I am planning on being at the Linaro Connect in August.

David

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

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

* Re: [GIT PULL] MSM fix
  2011-07-20 22:50   ` David Brown
@ 2011-07-20 22:54     ` Russell King - ARM Linux
  2011-07-20 23:44       ` David Brown
  2011-07-21 14:49       ` Arnd Bergmann
  0 siblings, 2 replies; 7+ messages in thread
From: Russell King - ARM Linux @ 2011-07-20 22:54 UTC (permalink / raw)
  To: David Brown
  Cc: Arnd Bergmann, Nicolas Pitre, Thomas Gleixner, linux-arm-kernel,
	linux-kernel

On Wed, Jul 20, 2011 at 03:50:10PM -0700, David Brown wrote:
> On Wed, Jul 20, 2011 at 11:06:15PM +0200, Arnd Bergmann wrote:
> > On Wednesday 20 July 2011 13:37:03 David Brown wrote:
> > > I seem to have missed this fix when it was sent out in April.
> > > 
> > > The following changes since commit 620917de59eeb934b9f8cf35cc2d95c1ac8ed0fc:
> > > 
> > >   Linux 3.0-rc7 (2011-07-11 16:51:52 -0700)
> > > 
> > > are available in the git repository at:
> > >   git://codeaurora.org/quic/kernel/davidb/linux-msm.git msm-fix
> > > 
> > > Jeff Ohlstein (1):
> > >       msm: platsmp: actually read core count in get_core_count
> > > 
> > 
> > Hmm, this one seems like it really applies to older kernels as well, so
> > we can just as well add a cc:stable@kernel.org tag and put it into the
> > arm-soc/next/fixes branch, right?
> 
> It looks like it would apply to 2.6.38 and 39 as well.  I'm not sure
> it qualifies under the "It must fix a real bug that bothers people".
> It would only apply if someone had set NR_CPUS to more than 2.

Err, this makes no sense.  MSM doesn't have a get_core_count function
and as far as I can see never has done in mainline.

And where is the patch?

We shouldn't be pulling git requests into arm-soc without having seen
the patches on LAKML.

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

* Re: [GIT PULL] MSM fix
  2011-07-20 22:54     ` Russell King - ARM Linux
@ 2011-07-20 23:44       ` David Brown
  2011-07-21 14:49       ` Arnd Bergmann
  1 sibling, 0 replies; 7+ messages in thread
From: David Brown @ 2011-07-20 23:44 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: David Brown, Arnd Bergmann, Nicolas Pitre, Thomas Gleixner,
	linux-arm-kernel, linux-kernel

On Wed, Jul 20, 2011 at 11:54:06PM +0100, Russell King - ARM Linux wrote:
> On Wed, Jul 20, 2011 at 03:50:10PM -0700, David Brown wrote:
> > On Wed, Jul 20, 2011 at 11:06:15PM +0200, Arnd Bergmann wrote:
> > > On Wednesday 20 July 2011 13:37:03 David Brown wrote:
> > > > I seem to have missed this fix when it was sent out in April.
> > > > 
> > > > The following changes since commit 620917de59eeb934b9f8cf35cc2d95c1ac8ed0fc:
> > > > 
> > > >   Linux 3.0-rc7 (2011-07-11 16:51:52 -0700)
> > > > 
> > > > are available in the git repository at:
> > > >   git://codeaurora.org/quic/kernel/davidb/linux-msm.git msm-fix
> > > > 
> > > > Jeff Ohlstein (1):
> > > >       msm: platsmp: actually read core count in get_core_count
> > > > 
> > > 
> > > Hmm, this one seems like it really applies to older kernels as well, so
> > > we can just as well add a cc:stable@kernel.org tag and put it into the
> > > arm-soc/next/fixes branch, right?
> > 
> > It looks like it would apply to 2.6.38 and 39 as well.  I'm not sure
> > it qualifies under the "It must fix a real bug that bothers people".
> > It would only apply if someone had set NR_CPUS to more than 2.
> 
> Err, this makes no sense.  MSM doesn't have a get_core_count function
> and as far as I can see never has done in mainline.
> 
> And where is the patch?
> 
> We shouldn't be pulling git requests into arm-soc without having seen
> the patches on LAKML.

It was sent back in April.

https://patchwork.kernel.org/patch/693881/

David

-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

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

* Re: [GIT PULL] MSM fix
  2011-07-20 22:54     ` Russell King - ARM Linux
  2011-07-20 23:44       ` David Brown
@ 2011-07-21 14:49       ` Arnd Bergmann
  2011-07-21 15:41         ` Russell King - ARM Linux
  1 sibling, 1 reply; 7+ messages in thread
From: Arnd Bergmann @ 2011-07-21 14:49 UTC (permalink / raw)
  To: Russell King - ARM Linux
  Cc: David Brown, Nicolas Pitre, Thomas Gleixner, linux-arm-kernel,
	linux-kernel

On Thursday 21 July 2011, Russell King - ARM Linux wrote:
> > It looks like it would apply to 2.6.38 and 39 as well.  I'm not sure
> > it qualifies under the "It must fix a real bug that bothers people".
> > It would only apply if someone had set NR_CPUS to more than 2.
> 
> Err, this makes no sense.  MSM doesn't have a get_core_count function
> and as far as I can see never has done in mainline.

I've committed the version below now, with a clarified title.
The patch looks reasonable to me, but there may be some issue
I'm missing of course. The other platforms that used to have
a get_core_count function no longer have that because you changed
them to use scu_get_core_count, but that doesn't seem to apply
to mach-msm.

I did not add a stable tag though.

	Arnd

8<---
Subject: [PATCH] ARM: msm: platsmp: determine number of CPU cores at boot time

Previously we just assumed there were CONFIG_NR_CPUS cpus present in
the system. Instead, figure out the number of cpus from the MIDR
register.

Signed-off-by: Jeff Ohlstein <johlstei@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
[arnd: clarified patch title]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>

diff --git a/arch/arm/mach-msm/platsmp.c b/arch/arm/mach-msm/platsmp.c
index 2034098..5ba77d0 100644
--- a/arch/arm/mach-msm/platsmp.c
+++ b/arch/arm/mach-msm/platsmp.c
@@ -18,6 +18,7 @@
 
 #include <asm/hardware/gic.h>
 #include <asm/cacheflush.h>
+#include <asm/cputype.h>
 #include <asm/mach-types.h>
 
 #include <mach/msm_iomap.h>
@@ -40,6 +41,12 @@ volatile int pen_release = -1;
 
 static DEFINE_SPINLOCK(boot_lock);
 
+static inline int get_core_count(void)
+{
+	/* 1 + the PART[1:0] field of MIDR */
+	return ((read_cpuid_id() >> 4) & 3) + 1;
+}
+
 void __cpuinit platform_secondary_init(unsigned int cpu)
 {
 	/* Configure edge-triggered PPIs */
@@ -147,9 +154,9 @@ int __cpuinit boot_secondary(unsigned int cpu, struct task_struct *idle)
  */
 void __init smp_init_cpus(void)
 {
-	unsigned int i;
+	unsigned int i, ncores = get_core_count();
 
-	for (i = 0; i < NR_CPUS; i++)
+	for (i = 0; i < ncores; i++)
 		set_cpu_possible(i, true);
 
         set_smp_cross_call(gic_raise_softirq);

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

* Re: [GIT PULL] MSM fix
  2011-07-21 14:49       ` Arnd Bergmann
@ 2011-07-21 15:41         ` Russell King - ARM Linux
  0 siblings, 0 replies; 7+ messages in thread
From: Russell King - ARM Linux @ 2011-07-21 15:41 UTC (permalink / raw)
  To: Arnd Bergmann
  Cc: David Brown, Nicolas Pitre, Thomas Gleixner, linux-arm-kernel,
	linux-kernel

On Thu, Jul 21, 2011 at 04:49:39PM +0200, Arnd Bergmann wrote:
> On Thursday 21 July 2011, Russell King - ARM Linux wrote:
> > > It looks like it would apply to 2.6.38 and 39 as well.  I'm not sure
> > > it qualifies under the "It must fix a real bug that bothers people".
> > > It would only apply if someone had set NR_CPUS to more than 2.
> > 
> > Err, this makes no sense.  MSM doesn't have a get_core_count function
> > and as far as I can see never has done in mainline.
> 
> I've committed the version below now, with a clarified title.
> The patch looks reasonable to me, but there may be some issue
> I'm missing of course. The other platforms that used to have
> a get_core_count function no longer have that because you changed
> them to use scu_get_core_count, but that doesn't seem to apply
> to mach-msm.

That patch description helps a lot to clarify what's going on.

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

end of thread, other threads:[~2011-07-21 15:43 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-20 20:37 [GIT PULL] MSM fix David Brown
2011-07-20 21:06 ` Arnd Bergmann
2011-07-20 22:50   ` David Brown
2011-07-20 22:54     ` Russell King - ARM Linux
2011-07-20 23:44       ` David Brown
2011-07-21 14:49       ` Arnd Bergmann
2011-07-21 15:41         ` Russell King - ARM Linux

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).