From: Nobuhiro Iwamatsu Date: Tue, 8 Apr 2014 02:12:46 +0000 (+0900) Subject: fs: fat: Fix cache align error message in fatwrite X-Git-Tag: submit/tizen/20160318.071304~57 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=05c96313153b7b5866448cc8bbb3e7b941bf9d03;p=profile%2Fcommon%2Fplatform%2Fkernel%2Fu-boot-artik.git 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 Signed-off-by: Yoshiyuki Ito Tested-by: Hector Palacios --- diff --git a/fs/fat/fat_write.c b/fs/fat/fat_write.c index a05327c6a..c4ef13857 100644 --- a/fs/fat/fat_write.c +++ b/fs/fat/fat_write.c @@ -968,7 +968,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;