[U-Boot] [PATCH] FIX for dcache_disable() for ARM926ej-s

Albert ARIBAUD albert.u.boot at aribaud.net
Mon Oct 24 23:49:12 CEST 2011


Hi Bas,

Le 21/10/2011 08:44, Bas van den Berg a écrit :
> the cache also needs to be invalidated, not just flushed, Since re-enabling it,
> can cause inconsistent data without invalidation. See example below.
>
> in c-file:
> static int num = 1;
>
> void test() {
>      num = 1;
>      dcache_enable();
>      printf("Cache on, num=%d\n", num);
>      num = 2;
>      dcache_disable();
>      printf("Cache off, num=%d\n", num);
>      num = 1;
>      dcache_enable();
>      printf("Cache on, num=%d\n", num);  // ->  prints 2 instead of 1!!
>      dcache_disable();
>      printf("Cache off, num=%d\n", num);
> }

This part of the patch is what will stay in the GIT tree as the commit 
message. Here it is too verbose. Remove useless example.

Amicalement,
-- 
Albert.


More information about the U-Boot mailing list