]> git.sur5r.net Git - u-boot/commitdiff
ARM: PSCI: save and restore clobbered registers in v7_flush_dcache_all
authorChen-Yu Tsai <wens@csie.org>
Tue, 7 Jun 2016 02:54:25 +0000 (10:54 +0800)
committerHans de Goede <hdegoede@redhat.com>
Mon, 20 Jun 2016 20:43:59 +0000 (22:43 +0200)
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
arch/arm/cpu/armv7/psci.S

index cdd001fe3fb0b14d38589a05cfaeb9146081dcfa..ab408378fcae329592d03b590dc0205cb2272b2b 100644 (file)
@@ -110,6 +110,7 @@ ENDPROC(psci_get_cpu_id)
 
 /* Imported from Linux kernel */
 LENTRY(v7_flush_dcache_all)
+       stmfd   sp!, {r4-r5, r7, r9-r11, lr}
        dmb                                     @ ensure ordering with previous memory accesses
        mrc     p15, 1, r0, c0, c0, 1           @ read clidr
        ands    r3, r0, #0x7000000              @ extract loc from clidr
@@ -153,6 +154,7 @@ finished:
        mcr     p15, 2, r10, c0, c0, 0          @ select current cache level in cssr
        dsb     st
        isb
+       ldmfd   sp!, {r4-r5, r7, r9-r11, lr}
        bx      lr
 ENDPROC(v7_flush_dcache_all)