Skip to contentSkip to conversation

ARM: MM: use 64bytes of L1 cache on plat S5PC1xx

PATCH New Marek Szyprowski 3 participants 5 messages Nov 17, 2009

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

PATCH 1/1 ARM: MM: use 64bytes of L1 cache on plat S5PC1xx

From: Kyungmin Park <[email protected]>

Samsung S5PC1xx SoCs are Coretex8 based, so use 64 bytes of L1 cache line instead of the default 32 bytes.

---
 arch/arm/mm/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mm/Kconfig +1 -1
index 9264d81..7b7d4c3 100644
@@ -774,5 +774,5 @@ config CACHE_XSC3L2
 
 config ARM_L1_CACHE_SHIFT
 	int
-	default 6 if ARCH_OMAP3
+	default 6 if ARCH_OMAP3 || ARCH_S5PC1XX
 	default 5
Signature · 1 line
1.6.4
#1 lore raw

PATCH 1/1 ARM: MM: use 64bytes of L1 cache on plat S5PC1xx

Quoted 16 lines · On Tue, 17 Nov 2009 08:47:54 +0100 Marek Szyprowski <[email protected]>…

From: Kyungmin Park <[email protected]>

Samsung S5PC1xx SoCs are Coretex8 based, so use 64 bytes of L1 cache line instead of the default 32 bytes.

---
 arch/arm/mm/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mm/Kconfig +0 -0
index 9264d81..7b7d4c3 100644

arch/arm/mm/Kconfig config CACHE_XSC3L2 · line 778

Quoted 6 lines
arch/arm/mm/Kconfig +1 -1
@@ -774,5 +774,5 @@ config CACHE_XSC3L2
 
 config ARM_L1_CACHE_SHIFT
 	int
-	default 6 if ARCH_OMAP3
+	default 6 if ARCH_OMAP3 || ARCH_S5PC1XX
 	default 5

If this feature is related to the S5PC1xx being a CortexA8, why not depend on CPU_V7 rather that adding each and every new CortexA8 implementation to this list?

	M.
Signature · 2 lines
And if you don't know where you're going, any road will take you
there...
#2 lore raw

PATCH 1/1 ARM: MM: use 64bytes of L1 cache on plat S5PC1xx

Hello,

Quoted 20 lines · Marc Zyngier
Quoted 17 lines · On Tue, 17 Nov 2009 08:47:54 +0100 Marek Szyprowski <[email protected]>…

From: Kyungmin Park <[email protected]>

Samsung S5PC1xx SoCs are Coretex8 based, so use 64 bytes of L1 cache line instead of the default 32 bytes.

---
 arch/arm/mm/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mm/Kconfig +0 -0
index 9264d81..7b7d4c3 100644
@@ -774,5 +774,5 @@ config CACHE_XSC3L2
 
Quoted 9 lines

arch/arm/mm/Kconfig config CACHE_XSC3L2 · line 778

Quoted 5 lines
arch/arm/mm/Kconfig +1 -1
 config ARM_L1_CACHE_SHIFT
 	int
-	default 6 if ARCH_OMAP3
+	default 6 if ARCH_OMAP3 || ARCH_S5PC1XX
 	default 5

If this feature is related to the S5PC1xx being a CortexA8, why not depend on CPU_V7 rather that adding each and every new CortexA8 implementation to this list?

There can be ARM v7 CPUs with different size of L1 line cache - Cortex-R4 is an example of such:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0363d/Caccifbd.html
(32 bytes of L1 cache line size).

This config option should depend on particular ARM core implementation, otherwise it will be hard cover all possibilities.

Best regards
--
Marek Szyprowski
Samsung Poland R&D Center

#3 lore raw

PATCH 1/1 ARM: MM: use 64bytes of L1 cache on plat S5PC1xx

On Tue, 17 Nov 2009 10:15:49 +0100
Marek Szyprowski <[email protected]> wrote:

Hi Marek,

Quoted 34 lines

Hello,

Quoted 20 lines · Marc Zyngier
Quoted 17 lines · On Tue, 17 Nov 2009 08:47:54 +0100 Marek Szyprowski <[email protected]>…

From: Kyungmin Park <[email protected]>

Samsung S5PC1xx SoCs are Coretex8 based, so use 64 bytes of L1 cache line instead of the default 32 bytes.

---
 arch/arm/mm/Kconfig |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/mm/Kconfig +0 -0
index 9264d81..7b7d4c3 100644
@@ -774,5 +774,5 @@ config CACHE_XSC3L2
 
Quoted 9 lines

arch/arm/mm/Kconfig config CACHE_XSC3L2 · line 778

Quoted 5 lines
arch/arm/mm/Kconfig +1 -1
 config ARM_L1_CACHE_SHIFT
 	int
-	default 6 if ARCH_OMAP3
+	default 6 if ARCH_OMAP3 || ARCH_S5PC1XX
 	default 5

If this feature is related to the S5PC1xx being a CortexA8, why not depend on CPU_V7 rather that adding each and every new CortexA8 implementation to this list?

Quoted 7 lines

There can be ARM v7 CPUs with different size of L1 line cache - Cortex-R4 is an example of such:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0363d/Caccifbd.html
(32 bytes of L1 cache line size).

This config option should depend on particular ARM core implementation, otherwise it will be hard cover all possibilities.

Then what about introducing a CORTEX_A8 symbol, selected by ARCH_OMAP3, ARCH_S5PC1XX and others to come, and that would select the right cache line value? We really want to avoid those ever growing dependency lines that lead to conflicts when applying patches from multiple sources.

Unless we can have a Cortex-A8 implementation with a cache line that is not 64 bytes?

	M.
Signature · 1 line
Fast. Cheap. Reliable. Pick two.
#4 lore raw

PATCH 1/1 ARM: MM: use 64bytes of L1 cache on plat S5PC1xx

Quoted 7 lines · Marc Zyngier

Then what about introducing a CORTEX_A8 symbol, selected by ARCH_OMAP3, ARCH_S5PC1XX and others to come, and that would select the right cache line value? We really want to avoid those ever growing dependency lines that lead to conflicts when applying patches from multiple sources.

Unless we can have a Cortex-A8 implementation with a cache line that is not 64 bytes?

CPUs of the same family can have different cache line sizes. The only way to be sure is if you read the cache type registers and work it out.

However, L1_CACHE_SHIFT must be a compile time constant - it can't be run-time calculated. So, we chose to set L1_CACHE_SHIFT to be the largest size found for the SoC concerned.

So, setting it to 64 for CPU_V7 makes no sense, since such CPUs can have larger or smaller cache line sizes - and that's about the same as trying to select the cache line size according to a CORTEX_A8 symbol...

The original patch seems to be the only sensible solution to this.