Skip to contentSkip to conversation

u-boot 2011.12: fix L2 cache on non-omap4 platforms

PATCH In review Koen Kooi 3 participants 5 messages Jan 20, 2012 – Jan 21, 2012

lore
Share & tools
lore

Koen Kooi

author
#0 lore raw

PATCH 1/1 u-boot 2011.12: fix L2 cache on non-omap4 platforms

---
 ...7-disable-L2-cache-in-cleanup_before_linu.patch |   25 ++++++++++++++++++++
 recipes-bsp/u-boot/u-boot_2011.12.bb               |    7 ++++-
 2 files changed, 31 insertions(+), 1 deletions(-)
 create mode 100644 recipes-bsp/u-boot/u-boot/2011.12/0001-Revert-armv7-disable-L2-cache-in-cleanup_before_linu.patch
recipes-bsp/u-boot/u-boot/2011.12/0001-Revert-armv7-disable-L2-cache-in-cleanup_before_linu.patch new file +25 -0
new file mode 100644
index 0000000..ea94709
@@ -0,0 +1,25 @@
+From 9ac047a112d8c6fe25e71a78946dbe9d707abd98 Mon Sep 17 00:00:00 2001
+From: Philip Balister <[email protected]>
+Date: Mon, 16 Jan 2012 09:45:11 -0500
+Subject: [PATCH] Revert "armv7: disable L2 cache in cleanup_before_linux()"
+
+This reverts commit dc7100f4080952798413fb63bb4134b22c57623a.
+---
+ arch/arm/cpu/armv7/cpu.c |    1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)
+
+diff --git a/arch/arm/cpu/armv7/cpu.c b/arch/arm/cpu/armv7/cpu.c
+index 662c496..091e3e0 100644
+--- a/arch/arm/cpu/armv7/cpu.c
++++ b/arch/arm/cpu/armv7/cpu.c
+@@ -65,7 +65,6 @@ int cleanup_before_linux(void)
+ 	 * dcache_disable() in turn flushes the d-cache and disables MMU
+ 	 */
+ 	dcache_disable();
+-	v7_outer_cache_disable();
+ 
+ 	/*
+ 	 * After D-cache is flushed and before it is disabled there may
+-- 
+1.7.6.5
+
recipes-bsp/u-boot/u-boot_2011.12.bb +6 -1
index 7554bad..4e50edb 100644
@@ -6,11 +6,15 @@ UBOOT_IMAGE = "u-boot-${MACHINE}-${PV}-${PR}.img"
 UBOOT_SYMLINK = "u-boot-${MACHINE}.img"
 
 PV = "2011.12"
-PR = "r2"
+PR = "r3"
 
 # No patches for other machines yet
 COMPATIBLE_MACHINE = "(beagleboard|pandaboard|hawkboard|am3517-evm|am37x-evm|omap3evm)"
 
+# Non-omap4 platforms need outer cache turned on
+CACHEFIX = "file://2011.12/0001-Revert-armv7-disable-L2-cache-in-cleanup_before_linu.patch"
+CACHEFIX_omap4 = ""
+
 SRC_URI = "git://www.denx.de/git/u-boot.git;protocol=git \
            file://2011.12/0001-beagleboard-mount-rootfs-RO-instead-of-RW-at-boot.patch \
            file://2011.12/0002-beagleboard-add-support-for-TCT-Beacon-board.patch \
@@ -19,6 +23,7 @@ SRC_URI = "git://www.denx.de/git/u-boot.git;protocol=git \
            file://2011.12/0005-omap4-common-use-ext4-by-default.patch \
            file://2011.12/U-Boot-OMAP-MMC-Add-delay-before-waiting-for-status.patch \
            file://0001-config-Always-use-GNU-ld.patch \
+           ${CACHEFIX} \
           "
 
 # v2011.12 tag
Signature · 1 line
1.7.2.5
#1 lore raw
Quoted 29 lines · Koen Kooi
---
 ...7-disable-L2-cache-in-cleanup_before_linu.patch |   25
++++++++++++++++++++ recipes-bsp/u-boot/u-boot_2011.12.bb               | 
  7 ++++-
 2 files changed, 31 insertions(+), 1 deletions(-)
 create mode 100644

recipes-bsp/u-boot/u-boot/2011.12/0001-Revert-armv7-disable-L2-cache-in-cl eanup_before_linu.patch

diff --git a/recipes-bsp/u-boot/u-boot/2011.12/0001-Revert-armv7-disable-L2-cache-in- cleanup_before_linu.patch b/recipes-bsp/u-boot/u-boot/2011.12/0001-Revert-armv7-disable-L2-cache-in- cleanup_before_linu.patch new file mode 100644
index 0000000..ea94709
--- /dev/null
+++
b/recipes-bsp/u-boot/u-boot/2011.12/0001-Revert-armv7-disable-L2-cache-in- cleanup_before_linu.patch @@ -0,0 +1,25 @@

recipes-bsp/u-boot/u-boot/2011.12/0001-Revert-armv7-disable-L2-cache-in-cleanup_before_linu.patch new file +4 -0
+From 9ac047a112d8c6fe25e71a78946dbe9d707abd98 Mon Sep 17 00:00:00 2001
+From: Philip Balister <[email protected]>
+Date: Mon, 16 Jan 2012 09:45:11 -0500
+Subject: [PATCH] Revert "armv7: disable L2 cache in

cleanup_before_linux()" +

recipes-bsp/u-boot/u-boot/2011.12/0001-Revert-armv7-disable-L2-cache-in-cleanup_before_linu.patch new file +4 -0
+This reverts commit dc7100f4080952798413fb63bb4134b22c57623a.
+---
+ arch/arm/cpu/armv7/cpu.c |    1 -
+ 1 files changed, 0 insertions(+), 1 deletions(-)

recipes-bsp/u-boot/u-boot/2011.12/0001-Revert-armv7-disable-L2-cache-in-cleanup_before_linu.patch line 19

Quoted 10 lines
recipes-bsp/u-boot/u-boot/2011.12/0001-Revert-armv7-disable-L2-cache-in-cleanup_before_linu.patch new file +10 -0
+
+diff --git a/arch/arm/cpu/armv7/cpu.c b/arch/arm/cpu/armv7/cpu.c
+index 662c496..091e3e0 100644
+--- a/arch/arm/cpu/armv7/cpu.c
++++ b/arch/arm/cpu/armv7/cpu.c
+@@ -65,7 +65,6 @@ int cleanup_before_linux(void)
+ 	 * dcache_disable() in turn flushes the d-cache and disables MMU
+ 	 */
+ 	dcache_disable();
+-	v7_outer_cache_disable();

How about some #ifdef OMAP3 ( or similar - did not check in detail ) here. As far as I understood there was a reason for OMAP4 to disable cache.

Andreas

#3 lore raw
Quoted 7 lines · Tom Rini
Quoted 1 line · Koen Kooi

And to address Andreas' comment, for now the proper solution is still under discussion so an isolated revert is fine here.

I know - but the commit message of original patch said:

| This was breaking the boot for OMAP4 with latest mainline
| kernel. The solution is to disable external caches in
| cleanup_before_linux(). With this fix kernel is booting again.

Just wanted to avoid issues on OMAP4 because my feeling is that discussions on this issue will last a while so that this patch will be more than a temporary workaround and I do not see what's wrong with some #ifdeffing here.

Andreas

author
#4 lore raw

Op 21 jan. 2012, om 00:03 heeft Andreas Müller het volgende geschreven:

Quoted 10 lines · Tom Rini
Quoted 7 lines · Koen Kooi
Quoted 1 line

And to address Andreas' comment, for now the proper solution is still under discussion so an isolated revert is fine here.

I know - but the commit message of original patch said:

Quoted 7 lines
| This was breaking the boot for OMAP4 with latest mainline
| kernel. The solution is to disable external caches in
| cleanup_before_linux(). With this fix kernel is booting again.

Just wanted to avoid issues on OMAP4 because my feeling is that discussions on this issue will last a while so that this patch will be more than a temporary workaround and I do not see what's wrong with some #ifdeffing here.

The ifdef is in the recipe itself:

+# Non-omap4 platforms need outer cache turned on
+CACHEFIX = "file://2011.12/0001-Revert-armv7-disable-L2-cache-in-cleanup_before_linu.patch" +CACHEFIX_omap4 = ""