1 /* SPDX-License-Identifier: GPL-2.0+ */
7 #include <linux/linkage.h>
12 .pushsection ._secure.text, "ax"
16 .globl v7_invalidate_l1
19 mcr p15, 2, r0, c0, c0, 0
20 mrc p15, 1, r0, c0, c0, 0
23 and r2, r1, r0, lsr #13
27 and r3, r1, r0, lsr #3 @ NumWays - 1
28 add r2, r2, #1 @ NumSets
31 add r0, r0, #4 @ SetShift
34 add r4, r3, #1 @ NumWays
36 sub r2, r2, #1 @ NumSets--
37 mov r3, r4 @ Temp = NumWays
39 subs r3, r3, #1 @ Temp--
42 orr r5, r5, r6 @ Reg = (Temp<<WayShift)|(NumSets<<SetShift)
43 mcr p15, 0, r5, c7, c6, 2
51 .globl psci_system_resume
55 /* invalidate L1 I-cache first */
57 mcr p15, 0, r6, c7, c5, 0
58 mcr p15, 0, r6, c7, c5, 6
59 /* enable the Icache and branch prediction */
61 mcr p15, 0, r6, c1, c0, 0