From: Tom Rini Date: Mon, 11 Apr 2016 22:30:46 -0400 Subject: [U-Boot] [U-Boot, v2, 1/2] arm: Replace v7_maint_dcache_all(ARMV7_DCACHE_CLEAN_INVAL_ALL) with asm code In-Reply-To: <1460202829-27276-1-git-send-email-hdegoede@redhat.com> References: <1460202829-27276-1-git-send-email-hdegoede@redhat.com> Message-ID: <20160412023046.GV13577@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sat, Apr 09, 2016 at 01:53:48PM +0200, Hans de Goede wrote: > v7_maint_dcache_all() does not work reliable when build with gcc6, > see: https://bugzilla.redhat.com/show_bug.cgi?id=1318788 > > While debugging this I learned that v7_maint_dcache_all() is unreliable > when build with gcc5 too when it is marked as noinline. > > This commit fixes the reliability issues by replacing the C-code with > the ready to use asm implementation from the kernel. > > Given that this code when written as C-code clearly is quite fragile > (also see the existing comments about the C-code being the way it is > to get optimal assembly) and that we have a proven asm alternative, > I believe that this is the best solution. > > Note that we actually already had a copy of the kernel's > v7_flush_dcache_all() before this commit in > arch/arm/mach-uniphier/arm32/lowlevel_init.S. > > This commit moves that code arch/arm/cpu/armv7/cache_v7_asm.S, renames > it to __v7_flush_dcache_all(), and adds a v7_flush_dcache_all() wrapper > which saves / restores the clobbered registers for use from C-code. > > Signed-off-by: Hans de Goede > Acked-by: Masahiro Yamada Applied to u-boot/master, thanks! -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: