Skip to contentSkip to conversation

ARM: EXYNOS: Remove the L2 cache latency setting for EXYNOS5

PATCH New Kukjin Kim 4 participants 4 messages Jun 21, 2012 – Jun 27, 2012

Subsystems (3)
lore
Share & tools
lore

Kukjin Kim

author
#0 lore raw

PATCH 1/1 ARM: EXYNOS: Remove the L2 cache latency setting for EXYNOS5

From: Boojin Kim <[email protected]>

Since SYSRAM set the L2 cache latency on EXYNOS5 SoCs, no longer need that in the kernel. It helps to reduce booting time (no need cache disable and cache enable).

---
 arch/arm/mach-exynos/common.c |   25 -------------------------
 1 files changed, 0 insertions(+), 25 deletions(-)
arch/arm/mach-exynos/common.c +0 -25
index 742edd3..0ec1a91 100644
@@ -712,31 +712,6 @@ static int __init exynos4_l2x0_cache_init(void)
 early_initcall(exynos4_l2x0_cache_init);
 #endif
 
-static int __init exynos5_l2_cache_init(void)
-{
-	unsigned int val;
-
-	if (!soc_is_exynos5250())
-		return 0;
-
-	asm volatile("mrc p15, 0, %0, c1, c0, 0\n"
-		     "bic %0, %0, #(1 << 2)\n"	/* cache disable */
-		     "mcr p15, 0, %0, c1, c0, 0\n"
-		     "mrc p15, 1, %0, c9, c0, 2\n"
-		     : "=r"(val));
-
-	val |= (1 << 9) | (1 << 5) | (2 << 6) | (2 << 0);
-
-	asm volatile("mcr p15, 1, %0, c9, c0, 2\n" : : "r"(val));
-	asm volatile("mrc p15, 0, %0, c1, c0, 0\n"
-		     "orr %0, %0, #(1 << 2)\n"	/* cache enable */
-		     "mcr p15, 0, %0, c1, c0, 0\n"
-		     : : "r"(val));
-
-	return 0;
-}
-early_initcall(exynos5_l2_cache_init);
-
 static int __init exynos_init(void)
 {
 	printk(KERN_INFO "EXYNOS: Initializing architecture\n");
Signature · 1 line
1.7.1
#1 lore raw

PATCH 1/1 ARM: EXYNOS: Remove the L2 cache latency setting for EXYNOS5

Hi,

2012/6/21 Kukjin Kim <[email protected]>:

Quoted 3 lines

From: Boojin Kim <[email protected]>

Since SYSRAM set the L2 cache latency on EXYNOS5 SoCs,

I don't understand this. Do you mean that BL1 codes do it? I also wonder how enable L2 cache at the exynos5.

Quoted 53 lines

no longer need that in the kernel. It helps to reduce booting time (no need cache disable and cache enable).

---
?arch/arm/mach-exynos/common.c | ? 25 ------------------------- ?1 files changed, 0 insertions(+), 25 deletions(-)

arch/arm/mach-exynos/common.c +0 -0
index 742edd3..0ec1a91 100644
@@ -712,31 +712,6 @@ static int __init exynos4_l2x0_cache_init(void)
 ?early_initcall(exynos4_l2x0_cache_init);

?#endif

arch/arm/mach-exynos/common.c +0 -25
-static int __init exynos5_l2_cache_init(void)
-{
- ? ? ? unsigned int val;
-
- ? ? ? if (!soc_is_exynos5250())
- ? ? ? ? ? ? ? return 0;
-
- ? ? ? asm volatile("mrc p15, 0, %0, c1, c0, 0\n"
- ? ? ? ? ? ? ? ? ? ?"bic %0, %0, #(1 << 2)\n" ?/* cache disable */
- ? ? ? ? ? ? ? ? ? ?"mcr p15, 0, %0, c1, c0, 0\n"
- ? ? ? ? ? ? ? ? ? ?"mrc p15, 1, %0, c9, c0, 2\n"
- ? ? ? ? ? ? ? ? ? ?: "=r"(val));
-
- ? ? ? val |= (1 << 9) | (1 << 5) | (2 << 6) | (2 << 0);
-
- ? ? ? asm volatile("mcr p15, 1, %0, c9, c0, 2\n" : : "r"(val));
- ? ? ? asm volatile("mrc p15, 0, %0, c1, c0, 0\n"
- ? ? ? ? ? ? ? ? ? ?"orr %0, %0, #(1 << 2)\n" ?/* cache enable */
- ? ? ? ? ? ? ? ? ? ?"mcr p15, 0, %0, c1, c0, 0\n"
- ? ? ? ? ? ? ? ? ? ?: : "r"(val));
-
- ? ? ? return 0;
-}
-early_initcall(exynos5_l2_cache_init);
-

?static int __init exynos_init(void)
?{
? ? ? ?printk(KERN_INFO "EXYNOS: Initializing architecture\n"); --
1.7.1

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Signature · 1 line
- Joonyoung Shim
#2 lore raw

PATCH 1/1 ARM: EXYNOS: Remove the L2 cache latency setting for EXYNOS5

Quoted 2 lines · Joonyoung Shim

I don't understand this. Do you mean that BL1 codes do it? I also wonder how enable L2 cache at the exynos5.

Yes, the latency configuration of L2 cache is located on IROM or BL1 code. It can remove the overhead about cache reset and cache flush. And, Kernel enables L2 cache.
Thanks.

Quoted 64 lines
Quoted 50 lines

no longer need that in the kernel. It helps to reduce booting time (no need cache disable and cache enable).

---
?arch/arm/mach-exynos/common.c | ? 25 ------------------------- ?1 files changed, 0 insertions(+), 25 deletions(-)

arch/arm/mach-exynos/common.c +0 -0
index 742edd3..0ec1a91 100644
@@ -712,31 +712,6 @@ static int __init exynos4_l2x0_cache_init(void)
 ?early_initcall(exynos4_l2x0_cache_init);

?#endif

arch/arm/mach-exynos/common.c +0 -25
-static int __init exynos5_l2_cache_init(void)
-{
- ? ? ? unsigned int val;
-
- ? ? ? if (!soc_is_exynos5250())
- ? ? ? ? ? ? ? return 0;
-
- ? ? ? asm volatile("mrc p15, 0, %0, c1, c0, 0\n"
- ? ? ? ? ? ? ? ? ? ?"bic %0, %0, #(1 << 2)\n" ?/* cache disable */
- ? ? ? ? ? ? ? ? ? ?"mcr p15, 0, %0, c1, c0, 0\n"
- ? ? ? ? ? ? ? ? ? ?"mrc p15, 1, %0, c9, c0, 2\n"
- ? ? ? ? ? ? ? ? ? ?: "=r"(val));
-
- ? ? ? val |= (1 << 9) | (1 << 5) | (2 << 6) | (2 << 0);
-
- ? ? ? asm volatile("mcr p15, 1, %0, c9, c0, 2\n" : : "r"(val));
- ? ? ? asm volatile("mrc p15, 0, %0, c1, c0, 0\n"
- ? ? ? ? ? ? ? ? ? ?"orr %0, %0, #(1 << 2)\n" ?/* cache enable */
- ? ? ? ? ? ? ? ? ? ?"mcr p15, 0, %0, c1, c0, 0\n"
- ? ? ? ? ? ? ? ? ? ?: : "r"(val));
-
- ? ? ? return 0;
-}
-early_initcall(exynos5_l2_cache_init);
-

?static int __init exynos_init(void)
?{
? ? ? ?printk(KERN_INFO "EXYNOS: Initializing architecture\n"); --
1.7.1

Quoted 4 lines

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

--
- Joonyoung Shim

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#3 lore raw

PATCH 1/1 ARM: EXYNOS: Remove the L2 cache latency setting for EXYNOS5

Hi,

Quoted 5 lines · Boojin Kim
Quoted 2 lines · Joonyoung Shim

I don't understand this. Do you mean that BL1 codes do it? I also wonder how enable L2 cache at the exynos5.

Yes, the latency configuration of L2 cache is located on IROM or BL1 code.

How does kernel know it? Also, IROM and BL1 is blackbox to me

Quoted 2 lines

It can remove the overhead about cache reset and cache flush. And, Kernel enables L2 cache.

I cannot find codes to enable L2 cache for exynos5 in the kernel. Please let me know it.

Thanks.

Quoted 67 lines

Thanks.

Quoted 58 lines
Quoted 49 lines

no longer need that in the kernel. It helps to reduce booting time (no need cache disable and cache enable).

---
?rch/arm/mach-exynos/common.c | 25 -------------------------

  1 files changed, 0 insertions(+), 25 deletions(-)
arch/arm/mach-exynos/common.c +0 -26
index 742edd3..0ec1a91 100644
@@ -712,31 +712,6 @@ static int __init exynos4_l2x0_cache_init(void)
 ?arly_initcall(exynos4_l2x0_cache_init);
  #endif
 
-static int __init exynos5_l2_cache_init(void)
-{
-       unsigned int val;
-
-       if (!soc_is_exynos5250())
-               return 0;
-
-       asm volatile("mrc p15, 0, %0, c1, c0, 0\n"
-                    "bic %0, %0, #(1<<  2)\n"  /* cache disable */
-                    "mcr p15, 0, %0, c1, c0, 0\n"
-                    "mrc p15, 1, %0, c9, c0, 2\n"
-                    : "=r"(val));
-
-       val |= (1<<  9) | (1<<  5) | (2<<  6) | (2<<  0);
-
-       asm volatile("mcr p15, 1, %0, c9, c0, 2\n" : : "r"(val));
-       asm volatile("mrc p15, 0, %0, c1, c0, 0\n"
-                    "orr %0, %0, #(1<<  2)\n"  /* cache enable */
-                    "mcr p15, 0, %0, c1, c0, 0\n"
-                    : : "r"(val));
-
-       return 0;
-}
-early_initcall(exynos5_l2_cache_init);
-
 ?tatic int __init exynos_init(void)
  {
       ?rintk(KERN_INFO "EXYNOS: Initializing architecture\n");
--

1.7.1

Quoted 4 lines

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

--
- Joonyoung Shim

Quoted 4 lines

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Quoted 4 lines

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20120627/66ca79fe/attachment-0001.html>