From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dirk Behme Date: Tue, 10 Apr 2012 18:20:06 +0200 Subject: [U-Boot] [PATCH] FAT: Properly align buffers to allow cache operations In-Reply-To: <4F844CAE.1010502@boundarydevices.com> References: <1333953903-26335-1-git-send-email-marex@denx.de> <201204100036.07124.vapier@gentoo.org> <201204100700.48644.marex@denx.de> <4F844CAE.1010502@boundarydevices.com> Message-ID: <4F845DB6.7050002@googlemail.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 10.04.2012 17:07, Eric Nelson wrote: > On 04/09/2012 10:00 PM, Marek Vasut wrote: >> Dear Mike Frysinger, >> >>> On Monday 09 April 2012 02:45:03 Marek Vasut wrote: >>>> @@ -765,9 +767,6 @@ >>>> >>>> -__attribute__ ((__aligned__ (__alignof__ (dir_entry)))) >>>> -__u8 do_fat_read_block[MAX_CLUSTSIZE]; >>>> - >>>> >>>> @@ -788,6 +787,7 @@ do_fat_read (const char *filename, void *buffer, >>>> >>>> int rootdir_size = 0; >>>> int j; >>>> >>>> + uint8_t do_fat_read_block[MAX_CLUSTSIZE] >>>> __attribute__((aligned(32))); >>> >>> what's going on here exactly ? the old code had the advantage of >>> being in >>> the bss and the linker taking care of the alignment. this new code >>> has an >>> incorrectly hard-coded "32", and puts a 64KiB array onto the *stack*. >> >> This will be probably fixed in Eric's patch >> > Yep. I left it in bss space. Sorry guys, but I'm confused now. We have two patches, Eric's [1] and Marek's [2]. Which one should we take? With the discussion here and [3] I'm somehow under the impression that both patches [1] [2] are not complete? Do I miss anything? Or do we need a new version ("best of [1] & [2]")? Best regards Dirk [1] http://lists.denx.de/pipermail/u-boot/2012-March/119311.html [2] http://lists.denx.de/pipermail/u-boot/2012-April/122100.html [3] http://lists.denx.de/pipermail/u-boot/2012-April/122126.html