Skip to contentSkip to conversation

Please backport a56a5cf1f2ec "ARM: highbank: avoid L2 cache smc calls when PL310 is not present"

stable 3.10.y New Ian Campbell 3 participants 7 messages Mar 9, 2014 – Mar 21, 2014

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

[trying again with the correct stable@, sorry for the noise]

Hi stable@,

Please could you backport the changeset in $SUBJECT (and below) to 3.10.y. It went into v3.12-rc1 so I suppose you might also consider it for other stable branches before then which are still live.

I thought it might require 0b53c11d533a "ARM: move outer_cache declaration out of ifdef" but Kconfig seems to be such that it isn't needed in practice.

Cheers,
Ian.

commit a56a5cf1f2ec895599eace0ac6eba1e4a489e4bf

Author: Rob Herring <[email protected]>
Date:   Sat Aug 17 20:10:28 2013 -0500

ARM: highbank: avoid L2 cache smc calls when PL310 is not present

While Midway firmware handles L2 smc calls as nops, the custom smc calls present a problem when running virtualized Midway guest. They aren't needed so just avoid calling them.

In the process, cleanup the L2X0 ifdefs and use IS_ENABLED instead.

#1 lore raw
Quoted 8 lines · Ian Campbell

[trying again with the correct stable@, sorry for the noise]

Hi stable@,

Please could you backport the changeset in $SUBJECT (and below) to 3.10.y. It went into v3.12-rc1 so I suppose you might also consider it for other stable branches before then which are still live.

Quoted 7 lines

I thought it might require 0b53c11d533a "ARM: move outer_cache declaration out of ifdef" but Kconfig seems to be such that it isn't needed in practice.

Cheers,
Ian.

Thank you Ian, I'll queue this commit for the 3.11 kernel as well.

Cheers,
--
Lu?s

Quoted 20 lines

commit a56a5cf1f2ec895599eace0ac6eba1e4a489e4bf

Author: Rob Herring <[email protected]>
Date:   Sat Aug 17 20:10:28 2013 -0500

ARM: highbank: avoid L2 cache smc calls when PL310 is not present

While Midway firmware handles L2 smc calls as nops, the custom smc calls present a problem when running virtualized Midway guest. They aren't needed so just avoid calling them.

In the process, cleanup the L2X0 ifdefs and use IS_ENABLED instead.

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

#2 lore raw
In reply to Ian Campbell
Quoted 22 lines · Ian Campbell

[trying again with the correct stable@, sorry for the noise]

Hi stable@,

Please could you backport the changeset in $SUBJECT (and below) to 3.10.y. It went into v3.12-rc1 so I suppose you might also consider it for other stable branches before then which are still live.

I thought it might require 0b53c11d533a "ARM: move outer_cache declaration out of ifdef" but Kconfig seems to be such that it isn't needed in practice.

Cheers,
Ian.

commit a56a5cf1f2ec895599eace0ac6eba1e4a489e4bf

Author: Rob Herring <[email protected]>
Date:   Sat Aug 17 20:10:28 2013 -0500

ARM: highbank: avoid L2 cache smc calls when PL310 is not present

Quoted 7 lines

While Midway firmware handles L2 smc calls as nops, the custom smc calls present a problem when running virtualized Midway guest. They aren't needed so just avoid calling them.

In the process, cleanup the L2X0 ifdefs and use IS_ENABLED instead.

This doesn't apply to the 3.10 stable tree, so if you want it there, can you provide a backported version?

thanks,

greg k-h

#3 lore raw
Quoted 1 line · Greg KH

On Sun, Mar 09, 2014 at 02:35:48AM +0000, Ian Campbell wrote:

[...]

Quoted 6 lines
Quoted 1 line

I thought it might require 0b53c11d533a "ARM: move outer_cache

[...]

Quoted 1 line

commit a56a5cf1f2ec895599eace0ac6eba1e4a489e4bf

This doesn't apply to the 3.10 stable tree, so if you want it there, can you provide a backported version?

Strange, they both cherry-picked cleanly onto v3.10.33 for me. I've pushed the resulting tree.

The following changes since commit 6969595f011b46b49c3f1b9e0bd7da27768c1fd9:

Linux 3.10.33 (2014-03-06 21:58:45 -0800)

are available in the git repository at:

git://xenbits.xen.org/people/ianc/linux.git for-greg/3.10.y-arm-smc-backport

for you to fetch changes up to ac416026f5abb1da41b19ea725f5c1a114702756:

ARM: highbank: avoid L2 cache smc calls when PL310 is not present (2014-03-20 10:07:22 +0000)

----------------------------------------------------------------
Rob Herring (2):
ARM: move outer_cache declaration out of ifdef
ARM: highbank: avoid L2 cache smc calls when PL310 is not present

 arch/arm/include/asm/outercache.h |    4 ++--
 arch/arm/mach-highbank/highbank.c |   13 ++++++-------
 2 files changed, 8 insertions(+), 9 deletions(-)
#4 lore raw
Quoted 25 lines · Ian Campbell
Quoted 1 line · Greg KH

On Sun, Mar 09, 2014 at 02:35:48AM +0000, Ian Campbell wrote:

[...]

Quoted 6 lines
Quoted 1 line

I thought it might require 0b53c11d533a "ARM: move outer_cache

[...]

Quoted 1 line

commit a56a5cf1f2ec895599eace0ac6eba1e4a489e4bf

This doesn't apply to the 3.10 stable tree, so if you want it there, can you provide a backported version?

Strange, they both cherry-picked cleanly onto v3.10.33 for me. I've pushed the resulting tree.

The following changes since commit 6969595f011b46b49c3f1b9e0bd7da27768c1fd9:

Linux 3.10.33 (2014-03-06 21:58:45 -0800)

are available in the git repository at:

git://xenbits.xen.org/people/ianc/linux.git for-greg/3.10.y-arm-smc-backport

for you to fetch changes up to ac416026f5abb1da41b19ea725f5c1a114702756:

ARM: highbank: avoid L2 cache smc calls when PL310 is not present (2014-03-20 10:07:22 +0000)

Quoted 8 lines

----------------------------------------------------------------
Rob Herring (2):
ARM: move outer_cache declaration out of ifdef
ARM: highbank: avoid L2 cache smc calls when PL310 is not present

 arch/arm/include/asm/outercache.h |    4 ++--
 arch/arm/mach-highbank/highbank.c |   13 ++++++-------
 2 files changed, 8 insertions(+), 9 deletions(-)

Can you just email these to me, I can't easily take git pulls for stable patches, sorry.

greg k-h

#5 lore raw

PATCH 1/2 ARM: move outer_cache declaration out of ifdef

From: Rob Herring <[email protected]>

commit 0b53c11d533a8f6688d73fad0baf67dd08ec1b90 upstream.

Move the outer_cache declaration of the CONFIG_OUTER_CACHE ifdef so that outer_cache can be used inside IS_ENABLED condition.

---
 arch/arm/include/asm/outercache.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/include/asm/outercache.h +2 -2
index 12f71a1..f94784f 100644
@@ -37,10 +37,10 @@ struct outer_cache_fns {
 	void (*resume)(void);
 };
 
-#ifdef CONFIG_OUTER_CACHE
-
 extern struct outer_cache_fns outer_cache;
 
+#ifdef CONFIG_OUTER_CACHE
+
 static inline void outer_inv_range(phys_addr_t start, phys_addr_t end)
 {
 	if (outer_cache.inv_range)
Signature · 1 line
1.7.10.4
#6 lore raw

PATCH 2/2 ARM: highbank: avoid L2 cache smc calls when PL310 is not present

In reply to Greg KH

From: Rob Herring <[email protected]>

commit a56a5cf1f2ec895599eace0ac6eba1e4a489e4bf upstream.

While Midway firmware handles L2 smc calls as nops, the custom smc calls present a problem when running virtualized Midway guest. They aren't needed so just avoid calling them.

In the process, cleanup the L2X0 ifdefs and use IS_ENABLED instead.

---
 arch/arm/mach-highbank/highbank.c |   13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)
arch/arm/mach-highbank/highbank.c +6 -7
index 5ed19e8..35d1029 100644
@@ -65,14 +65,12 @@ void highbank_set_cpu_jump(int cpu, void *jump_addr)
 			  HB_JUMP_TABLE_PHYS(cpu) + 15);
 }
 
-#ifdef CONFIG_CACHE_L2X0
 static void highbank_l2x0_disable(void)
 {
 	outer_flush_all();
 	/* Disable PL310 L2 Cache controller */
 	highbank_smc1(0x102, 0x0);
 }
-#endif
 
 static void __init highbank_init_irq(void)
 {
@@ -81,12 +79,13 @@ static void __init highbank_init_irq(void)
 	if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9"))
 		highbank_scu_map_io();
 
-#ifdef CONFIG_CACHE_L2X0
 	/* Enable PL310 L2 Cache controller */
-	highbank_smc1(0x102, 0x1);
-	l2x0_of_init(0, ~0UL);
-	outer_cache.disable = highbank_l2x0_disable;
-#endif
+	if (IS_ENABLED(CONFIG_CACHE_L2X0) &&
+	    of_find_compatible_node(NULL, NULL, "arm,pl310-cache")) {
+		highbank_smc1(0x102, 0x1);
+		l2x0_of_init(0, ~0UL);
+		outer_cache.disable = highbank_l2x0_disable;
+	}
 }
 
 static void __init highbank_timer_init(void)
Signature · 1 line
1.7.10.4