Commit 8abd053cf07a1e4264d59c671e05a602fc7a31ad

Authored by Nobuhiro Iwamatsu
Committed by Tom Rini
1 parent 8e2615752e

fs: fat: Fix cache align error message in fatwrite

Use of malloc of do_fat_write() causes cache error on ARM v7 platforms.
Perhaps, the same problem will occur at any other CPUs.
This replaces malloc with memalign to fix cache buffer alignment.

Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: Yoshiyuki Ito <yoshiyuki.ito.ub@renesas.com>
Tested-by: Hector Palacios <hector.palacios@digi.com>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

... ... @@ -952,7 +952,7 @@
952 952 }
953 953  
954 954 mydata->fatbufnum = -1;
955   - mydata->fatbuf = malloc(FATBUFSIZE);
  955 + mydata->fatbuf = memalign(ARCH_DMA_MINALIGN, FATBUFSIZE);
956 956 if (mydata->fatbuf == NULL) {
957 957 debug("Error: allocating memory\n");
958 958 return -1;