Patchwork [v3,2/2] ARM: tegra: Skip scu_enable(scu_base) if not Cortex A9

login
register
mail settings
Submitter Hiroshi Doyu
Date Jan. 22, 2013, 5:52 a.m.
Message ID <1358833924-24535-2-git-send-email-hdoyu@nvidia.com>
Download mbox | patch
Permalink /patch/214343/
State Accepted, archived
Headers show

Comments

Hiroshi Doyu - Jan. 22, 2013, 5:52 a.m.
Skip scu_enable(scu_base) if CPU is not Cortex A9 with SCU.

Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
---
 arch/arm/mach-tegra/platsmp.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Santosh Shilimkar - Jan. 22, 2013, 6:07 a.m.
On Tuesday 22 January 2013 11:22 AM, Hiroshi Doyu wrote:
> Skip scu_enable(scu_base) if CPU is not Cortex A9 with SCU.
>
> Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
> ---
Looks fine. I will also update OMAP code with the new
interface. Thanks.

For the patch,
Acked-by: Santosh Shilimkar<santosh.shilimkar@ti.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stephen Warren - Jan. 22, 2013, 4:57 p.m.
On 01/21/2013 11:07 PM, Santosh Shilimkar wrote:
> On Tuesday 22 January 2013 11:22 AM, Hiroshi Doyu wrote:
>> Skip scu_enable(scu_base) if CPU is not Cortex A9 with SCU.
>>
>> Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
>> ---
> Looks fine. I will also update OMAP code with the new
> interface. Thanks.

OK, so patch 1/2 at least needs to get into a stable arm-soc branch
then. Unless there are violent objections, I'll forward patch 1/2 to
arm-soc and request it be added into a branch so that Tegra and OMAP can
both merge it into their branches as a dependency. I guess patch 2/2
could also be included; I don't think it has any complex dependencies
that'd prevent that, and would help to show how patch 1/2 gets used.

Hiroshi, is this series the only dependency you need for your Tegra114
series? So, I could merge your Tegra114 series once this series is applied?

> For the patch,
> Acked-by: Santosh Shilimkar<santosh.shilimkar@ti.com>

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Olof Johansson - Jan. 22, 2013, 5:04 p.m.
On Tue, Jan 22, 2013 at 8:57 AM, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 01/21/2013 11:07 PM, Santosh Shilimkar wrote:
>> On Tuesday 22 January 2013 11:22 AM, Hiroshi Doyu wrote:
>>> Skip scu_enable(scu_base) if CPU is not Cortex A9 with SCU.
>>>
>>> Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com>
>>> ---
>> Looks fine. I will also update OMAP code with the new
>> interface. Thanks.
>
> OK, so patch 1/2 at least needs to get into a stable arm-soc branch
> then. Unless there are violent objections, I'll forward patch 1/2 to
> arm-soc and request it be added into a branch so that Tegra and OMAP can
> both merge it into their branches as a dependency. I guess patch 2/2
> could also be included; I don't think it has any complex dependencies
> that'd prevent that, and would help to show how patch 1/2 gets used.
>
> Hiroshi, is this series the only dependency you need for your Tegra114
> series? So, I could merge your Tegra114 series once this series is applied?

For something like this, it might make more sense for us to just apply
the patches for OMAP on top, i.e. we'll pull the short branch from
you, and then we can just apply patches (with maintainer acks) on top,
instead of doing a bunch of single-patch pulls.

Since Russell had comments on it earlier, I'd like him to give a nod
that he's happy with it too.


-Olof
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stephen Warren - Jan. 22, 2013, 6:35 p.m.
On 01/21/2013 10:52 PM, Hiroshi Doyu wrote:
> Skip scu_enable(scu_base) if CPU is not Cortex A9 with SCU.

Will, is your for-next/perf branch stable; can I pull it into a branch
destined for arm-soc? Background below:

Uggh.

This patch (2/2) depends on "ARM: tegra: Use DT /cpu node to detect
number of CPU core" from your Tegra114 series, since that patch removes
the other use of scu_base, thus allowing this patch to remove that variable.

Then, that patch depends on "ARM: Define CPU part numbers and
implementors" from Will Deacon's ARM perf tree at:

git://git.kernel.org/pub/scm/linux/kernel/git/will/linux.git for-next/perf

That means that in order to put this series into arm-soc, we would have
to pull in Will's perf branch first, then the following Tegra patches,
the latter two of which are already in Tegra's for-next, so I'd have to
pull them out:

0bb7bd9 ARM: tegra: Use DT /cpu node to detect number of CPU core
a8f5f25 ARM: tegra: Add CPU nodes to Tegra30 device tree
9975516 ARM: tegra: Add CPU nodes to Tegra20 device tree

Hiroshi, it would be extremely useful if you could explicitly specify
the dependencies of your series when posting them; it took me a long
time and a lot of searching to track all the dependencies down. :-(
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Will Deacon - Jan. 22, 2013, 6:46 p.m.
Hi Stephan,

On Tue, Jan 22, 2013 at 06:35:55PM +0000, Stephen Warren wrote:
> On 01/21/2013 10:52 PM, Hiroshi Doyu wrote:
> > Skip scu_enable(scu_base) if CPU is not Cortex A9 with SCU.
> 
> Will, is your for-next/perf branch stable; can I pull it into a branch
> destined for arm-soc? Background below:

I'm going to send a pull request to Russell tomorrow using my for-rmk/perf
branch, so *that* is stable. You might, however, want to wait for Russell to
push that out because it's also needed for kvm and, as such, will need to
be published anyway.

Sound ok?

Will
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stephen Warren - Jan. 22, 2013, 6:49 p.m.
On 01/22/2013 11:46 AM, Will Deacon wrote:
> Hi Stephan,
> 
> On Tue, Jan 22, 2013 at 06:35:55PM +0000, Stephen Warren wrote:
>> On 01/21/2013 10:52 PM, Hiroshi Doyu wrote:
>>> Skip scu_enable(scu_base) if CPU is not Cortex A9 with SCU.
>>
>> Will, is your for-next/perf branch stable; can I pull it into a branch
>> destined for arm-soc? Background below:
> 
> I'm going to send a pull request to Russell tomorrow using my for-rmk/perf
> branch, so *that* is stable. You might, however, want to wait for Russell to
> push that out because it's also needed for kvm and, as such, will need to
> be published anyway.
> 
> Sound ok?

I'm assuming rmk's branch will be a stable base, so that sounds great,
thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hiroshi Doyu - Jan. 23, 2013, 6:04 a.m.
Stephen Warren <swarren@wwwdotorg.org> wrote @ Tue, 22 Jan 2013 17:57:39 +0100:

> Hiroshi, is this series the only dependency you need for your
> Tegra114

Basically yes.

> series? So, I could merge your Tegra114 series once this series is applied?

But now "CCF" seems to be in. Then, the HACK(*1) needs to be replaced
with "Tegra114 CCF". But "Tegra114 CCF" doesn't seem ready yet. I'll check
if this Tegra114 series would work without "Tegra114 CCF".

*1: http://patchwork.ozlabs.org/patch/212010/
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hiroshi Doyu - Jan. 23, 2013, 9:27 a.m.
Hiroshi Doyu <hdoyu@nvidia.com> wrote @ Wed, 23 Jan 2013 08:04:57 +0200 (EET):

> Stephen Warren <swarren@wwwdotorg.org> wrote @ Tue, 22 Jan 2013 17:57:39 +0100:
> 
> > Hiroshi, is this series the only dependency you need for your
> > Tegra114
> 
> Basically yes.
> 
> > series? So, I could merge your Tegra114 series once this series is applied?
> 
> But now "CCF" seems to be in. Then, the HACK(*1) needs to be replaced
> with "Tegra114 CCF". But "Tegra114 CCF" doesn't seem ready yet. I'll check
> if this Tegra114 series would work without "Tegra114 CCF".
> 
> *1: http://patchwork.ozlabs.org/patch/212010/

Stephen,

Verified "Tegra114 series" worked with "for-3.9/soc" branch(inc CCF)
with a little tweak.

I can post Tegra114 series again. If you want them rebased onto
another branch, let me know.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Stephen Warren - Jan. 23, 2013, 4:37 p.m.
On 01/23/2013 02:27 AM, Hiroshi Doyu wrote:
> Hiroshi Doyu <hdoyu@nvidia.com> wrote @ Wed, 23 Jan 2013 08:04:57 +0200 (EET):
> 
>> Stephen Warren <swarren@wwwdotorg.org> wrote @ Tue, 22 Jan 2013 17:57:39 +0100:
>>
>>> Hiroshi, is this series the only dependency you need for your
>>> Tegra114
>>
>> Basically yes.
>>
>>> series? So, I could merge your Tegra114 series once this series is applied?
>>
>> But now "CCF" seems to be in. Then, the HACK(*1) needs to be replaced
>> with "Tegra114 CCF". But "Tegra114 CCF" doesn't seem ready yet. I'll check
>> if this Tegra114 series would work without "Tegra114 CCF".
>>
>> *1: http://patchwork.ozlabs.org/patch/212010/
> 
> Stephen,
> 
> Verified "Tegra114 series" worked with "for-3.9/soc" branch(inc CCF)
> with a little tweak.

Good news.

> I can post Tegra114 series again. If you want them rebased onto
> another branch, let me know.

Yes please. I will apply them to for-3.9/soc. Please assume that
for-3.9/soc will already contain "ARM: Define CPU part numbers and
implementors", and your two SCU-related patches. Include your "ARM:
tegra: Use DT /cpu node to detect number of CPU core" as the first patch
in the series. I assume that is all of the dependencies; if I've
forgotten anything, please point it out. Thanks.
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hiroshi Doyu - Jan. 28, 2013, 7:18 a.m.
Hi Russell,

On Tue, 22 Jan 2013 18:04:46 +0100
Olof Johansson <olof@lixom.net> wrote:

> Since Russell had comments on it earlier, I'd like him to give a nod
> that he's happy with it too.

Is this ok for you?

The original patch is:
http://lists.infradead.org/pipermail/linux-arm-kernel/2013-January/143552.html
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Russell King - ARM Linux - Jan. 28, 2013, 2:47 p.m.
On Mon, Jan 28, 2013 at 09:18:55AM +0200, Hiroshi Doyu wrote:
> Hi Russell,
> 
> On Tue, 22 Jan 2013 18:04:46 +0100
> Olof Johansson <olof@lixom.net> wrote:
> 
> > Since Russell had comments on it earlier, I'd like him to give a nod
> > that he's happy with it too.
> 
> Is this ok for you?
> 
> The original patch is:
> http://lists.infradead.org/pipermail/linux-arm-kernel/2013-January/143552.html

Yes, this version is much better, thanks.

Acked-by: Russell King <rmk+kernel@arm.linux.org.uk>
--
To unsubscribe from this list: send the line "unsubscribe linux-tegra" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch

diff --git a/arch/arm/mach-tegra/platsmp.c b/arch/arm/mach-tegra/platsmp.c
index 689ee4b..8853bd2 100644
--- a/arch/arm/mach-tegra/platsmp.c
+++ b/arch/arm/mach-tegra/platsmp.c
@@ -38,7 +38,6 @@ 
 extern void tegra_secondary_startup(void);
 
 static cpumask_t tegra_cpu_init_mask;
-static void __iomem *scu_base = IO_ADDRESS(TEGRA_ARM_PERIF_BASE);
 
 #define EVP_CPU_RESET_VECTOR \
 	(IO_ADDRESS(TEGRA_EXCEPTION_VECTORS_BASE) + 0x100)
@@ -187,7 +186,8 @@  static void __init tegra_smp_prepare_cpus(unsigned int max_cpus)
 	/* Always mark the boot CPU (CPU0) as initialized. */
 	cpumask_set_cpu(0, &tegra_cpu_init_mask);
 
-	scu_enable(scu_base);
+	if (scu_a9_has_base())
+		scu_enable(IO_ADDRESS(scu_a9_get_base()));
 }
 
 struct smp_operations tegra_smp_ops __initdata = {