提交 8abd053c 编写于 作者: N Nobuhiro Iwamatsu 提交者: Tom Rini

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: NNobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
Signed-off-by: NYoshiyuki Ito <yoshiyuki.ito.ub@renesas.com>
Tested-by: NHector Palacios <hector.palacios@digi.com>
上级 8e261575
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册