Patchwork [U-Boot] arm926ejs: remove noop flush_dcache_all function

login
register
mail settings
Submitter Ilya Yanok
Date Dec. 11, 2011, 11:09 p.m.
Message ID <1323644968-5573-1-git-send-email-yanok@emcraft.com>
Download mbox | patch
Permalink /patch/130621/
State Accepted
Delegated to: Tom Rini
Headers show

Comments

Ilya Yanok - Dec. 11, 2011, 11:09 p.m.
Commit 2f3427c added noop cache functions implementation for arm926ejs
to fix compilation of drivers depending on these functions (DaVinci
EMAC in particular).

Unfortunately, the bug was introduced: noop implementation calls
dcache_disable which calls flush_dcache_all which in turn calls
dcache_disable thus creating an infinite loop.

This patch removes noop implementation for flush_dcache_all, we already
have default one in arch/arm/lib/cache.c and it should be used instead.

Signed-off-by: Ilya Yanok <yanok@emcraft.com>
---

Hi Matthias,

thanks for cathing this. Surely my initial patch was totally wrong.
Could you please test this one?

Regards, Ilya.

 arch/arm/cpu/arm926ejs/cache.c |    5 -----
 1 files changed, 0 insertions(+), 5 deletions(-)
Matthias Weisser - Dec. 12, 2011, 9:20 a.m.
Am 12.12.2011 00:09, schrieb Ilya Yanok:
 > Commit 2f3427c added noop cache functions implementation for arm926ejs
 > to fix compilation of drivers depending on these functions (DaVinci
 > EMAC in particular).
 >
 > Unfortunately, the bug was introduced: noop implementation calls
 > dcache_disable which calls flush_dcache_all which in turn calls
 > dcache_disable thus creating an infinite loop.
 >
 > This patch removes noop implementation for flush_dcache_all, we already
 > have default one in arch/arm/lib/cache.c and it should be used instead.
 >
 > Signed-off-by: Ilya Yanok<yanok@emcraft.com>
 > ---
 >
 > Hi Matthias,
 >
 > thanks for cathing this. Surely my initial patch was totally wrong.
 > Could you please test this one?

This patches solves at least my problem. Thanks.

Tested-by: Matthias Weisser <weisserm@arcor.de>

Matthias
Tom Rini - Dec. 13, 2011, 6:43 p.m.
2011/12/12 Matthias Wei├čer <weisserm@arcor.de>:
> Am 12.12.2011 00:09, schrieb Ilya Yanok:
>
>> Commit 2f3427c added noop cache functions implementation for arm926ejs
>> to fix compilation of drivers depending on these functions (DaVinci
>> EMAC in particular).
>>
>> Unfortunately, the bug was introduced: noop implementation calls
>> dcache_disable which calls flush_dcache_all which in turn calls
>> dcache_disable thus creating an infinite loop.
>>
>> This patch removes noop implementation for flush_dcache_all, we already
>> have default one in arch/arm/lib/cache.c and it should be used instead.
>>
>> Signed-off-by: Ilya Yanok<yanok@emcraft.com>
>> ---
>>
>> Hi Matthias,
>>
>> thanks for cathing this. Surely my initial patch was totally wrong.
>> Could you please test this one?
>
> This patches solves at least my problem. Thanks.
>
> Tested-by: Matthias Weisser <weisserm@arcor.de>

Merged to u-boot-ti/master, thanks!

Patch

diff --git a/arch/arm/cpu/arm926ejs/cache.c b/arch/arm/cpu/arm926ejs/cache.c
index 4415642..ee90ab7 100644
--- a/arch/arm/cpu/arm926ejs/cache.c
+++ b/arch/arm/cpu/arm926ejs/cache.c
@@ -38,11 +38,6 @@  void invalidate_dcache_all(void)
 	dcache_noop();
 }
 
-void flush_dcache_all(void)
-{
-	dcache_noop();
-}
-
 void invalidate_dcache_range(unsigned long start, unsigned long stop)
 {
 	dcache_noop();