[U-Boot] armv7: psci: cpu_off: flush D-Cache before disable D-Cache

Tom Rini trini at konsulko.com
Tue Nov 29 19:02:39 CET 2016


On Tue, Nov 22, 2016 at 07:41:09PM +0800, Peng Fan wrote:

> Before disable cache, need to first flush cache.
> 
> There maybe dirty data in D-Cache before disable D-Cache.
> After disable D-Cache, the first store instructions in
> psci_v7_flush_dcache_all will directly store registers
> {r4-r5, r7, r9-r11, lr} to memory.
> If there is dirty data before disable D-Cache,
> psci_v7_flush_dcache_all will flush data to memory,
> and may overwrite the memory that hold the registers
> {r4-r5, r7, r9-r11, lr}.
> 
> So before disable cache, first flush D-Cache.
> 
> Signed-off-by: Peng Fan <peng.fan at nxp.com>
> Cc: Albert Aribaud <albert.u.boot at aribaud.net>
> Cc: Chen-Yu Tsai <wens at csie.org>
> Cc: Hans de Goede <hdegoede at redhat.com>
> Cc: Hongbo Zhang <hongbo.zhang at nxp.com>
> Cc: York Sun <york.sun at nxp.com>
> Cc: Marc Zyngier <marc.zyngier at arm.com>
> Cc: Tom Rini <trini at konsulko.com>

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: <http://lists.denx.de/pipermail/u-boot/attachments/20161129/0443e22a/attachment.sig>


More information about the U-Boot mailing list