fs: fat: Fix cache align error message in fatwrite
PATCH v2 1/1 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 <[email protected]>
Signed-off-by Yoshiyuki Ito <[email protected]>
Tested-by Hector Palacios <[email protected]>
---
v2: Fix commit message.
fs/fat/fat_write.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/fat/fat_write.c +1 -1
@@ -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 ;
Signature · 1 line
1.8.5
PATCH v2 1/1 fs: fat: Fix cache align error message in fatwrite
Quoted 7 lines · Nobuhiro Iwamatsu
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 <[email protected]>Signed-off-by Yoshiyuki Ito <[email protected]>Tested-by Hector Palacios <[email protected]>
Applied to u-boot/master, thanks!
Signature · 8 lines
Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: <http://lists.denx.de/pipermail/u-boot/attachments/20140512/4740db0e/attachment.pgp>