summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>2014-04-08 11:12:46 +0900
committerMax Krummenacher <max.krummenacher@toradex.com>2014-07-16 15:57:28 +0200
commitf8616d1d4bed99b0fa6fedd01f20af6f9970e213 (patch)
tree75ec3b5cb9f473172dd85440338808102ee17dc6
parentaa042b463e6582b2f47c21f5f2c669dbbd8632aa (diff)
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> (cherry picked from commit 8abd053cf07a1e4264d59c671e05a602fc7a31ad)
-rw-r--r--fs/fat/fat_write.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c
index 9f5e911852..cef138ec96 100644
--- a/fs/fat/fat_write.c
+++ b/fs/fat/fat_write.c
@@ -952,7 +952,7 @@ static int do_fat_write(const char *filename, void *buffer,
}
mydata->fatbufnum = -1;
- mydata->fatbuf = malloc(FATBUFSIZE);
+ mydata->fatbuf = memalign(ARCH_DMA_MINALIGN, FATBUFSIZE);
if (mydata->fatbuf == NULL) {
debug("Error: allocating memory\n");
return -1;