~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/tools/testing/selftests/powerpc/pmu/ebb/busy_loop.S

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-only */
  2 /*
  3  * Copyright 2014, Michael Ellerman, IBM Corp.
  4  */
  5 
  6 #include <ppc-asm.h>
  7 
  8         .text
  9 
 10 FUNC_START(core_busy_loop)
 11         stdu    %r1, -168(%r1)
 12         std     r14, 160(%r1)
 13         std     r15, 152(%r1)
 14         std     r16, 144(%r1)
 15         std     r17, 136(%r1)
 16         std     r18, 128(%r1)
 17         std     r19, 120(%r1)
 18         std     r20, 112(%r1)
 19         std     r21, 104(%r1)
 20         std     r22, 96(%r1)
 21         std     r23, 88(%r1)
 22         std     r24, 80(%r1)
 23         std     r25, 72(%r1)
 24         std     r26, 64(%r1)
 25         std     r27, 56(%r1)
 26         std     r28, 48(%r1)
 27         std     r29, 40(%r1)
 28         std     r30, 32(%r1)
 29         std     r31, 24(%r1)
 30 
 31         li       r3, 0x3030
 32         std      r3, -96(%r1)
 33         li       r4, 0x4040
 34         std      r4, -104(%r1)
 35         li       r5, 0x5050
 36         std      r5, -112(%r1)
 37         li       r6, 0x6060
 38         std      r6, -120(%r1)
 39         li       r7, 0x7070
 40         std      r7, -128(%r1)
 41         li       r8, 0x0808
 42         std      r8, -136(%r1)
 43         li       r9, 0x0909
 44         std      r9, -144(%r1)
 45         li      r10, 0x1010
 46         std     r10, -152(%r1)
 47         li      r11, 0x1111
 48         std     r11, -160(%r1)
 49         li      r14, 0x1414
 50         std     r14, -168(%r1)
 51         li      r15, 0x1515
 52         std     r15, -176(%r1)
 53         li      r16, 0x1616
 54         std     r16, -184(%r1)
 55         li      r17, 0x1717
 56         std     r17, -192(%r1)
 57         li      r18, 0x1818
 58         std     r18, -200(%r1)
 59         li      r19, 0x1919
 60         std     r19, -208(%r1)
 61         li      r20, 0x2020
 62         std     r20, -216(%r1)
 63         li      r21, 0x2121
 64         std     r21, -224(%r1)
 65         li      r22, 0x2222
 66         std     r22, -232(%r1)
 67         li      r23, 0x2323
 68         std     r23, -240(%r1)
 69         li      r24, 0x2424
 70         std     r24, -248(%r1)
 71         li      r25, 0x2525
 72         std     r25, -256(%r1)
 73         li      r26, 0x2626
 74         std     r26, -264(%r1)
 75         li      r27, 0x2727
 76         std     r27, -272(%r1)
 77         li      r28, 0x2828
 78         std     r28, -280(%r1)
 79         li      r29, 0x2929
 80         std     r29, -288(%r1)
 81         li      r30, 0x3030
 82         li      r31, 0x3131
 83 
 84         li      r3, 0
 85 0:      addi    r3, r3, 1
 86         cmpwi   r3, 100
 87         blt     0b
 88 
 89         /* Return 1 (fail) unless we get through all the checks */
 90         li      r3, 1
 91 
 92         /* Check none of our registers have been corrupted */
 93         cmpwi   r4,  0x4040
 94         bne     1f
 95         cmpwi   r5,  0x5050
 96         bne     1f
 97         cmpwi   r6,  0x6060
 98         bne     1f
 99         cmpwi   r7,  0x7070
100         bne     1f
101         cmpwi   r8,  0x0808
102         bne     1f
103         cmpwi   r9,  0x0909
104         bne     1f
105         cmpwi   r10, 0x1010
106         bne     1f
107         cmpwi   r11, 0x1111
108         bne     1f
109         cmpwi   r14, 0x1414
110         bne     1f
111         cmpwi   r15, 0x1515
112         bne     1f
113         cmpwi   r16, 0x1616
114         bne     1f
115         cmpwi   r17, 0x1717
116         bne     1f
117         cmpwi   r18, 0x1818
118         bne     1f
119         cmpwi   r19, 0x1919
120         bne     1f
121         cmpwi   r20, 0x2020
122         bne     1f
123         cmpwi   r21, 0x2121
124         bne     1f
125         cmpwi   r22, 0x2222
126         bne     1f
127         cmpwi   r23, 0x2323
128         bne     1f
129         cmpwi   r24, 0x2424
130         bne     1f
131         cmpwi   r25, 0x2525
132         bne     1f
133         cmpwi   r26, 0x2626
134         bne     1f
135         cmpwi   r27, 0x2727
136         bne     1f
137         cmpwi   r28, 0x2828
138         bne     1f
139         cmpwi   r29, 0x2929
140         bne     1f
141         cmpwi   r30, 0x3030
142         bne     1f
143         cmpwi   r31, 0x3131
144         bne     1f
145 
146         /* Load junk into all our registers before we reload them from the stack. */
147         li      r3,  0xde
148         li      r4,  0xad
149         li      r5,  0xbe
150         li      r6,  0xef
151         li      r7,  0xde
152         li      r8,  0xad
153         li      r9,  0xbe
154         li      r10, 0xef
155         li      r11, 0xde
156         li      r14, 0xad
157         li      r15, 0xbe
158         li      r16, 0xef
159         li      r17, 0xde
160         li      r18, 0xad
161         li      r19, 0xbe
162         li      r20, 0xef
163         li      r21, 0xde
164         li      r22, 0xad
165         li      r23, 0xbe
166         li      r24, 0xef
167         li      r25, 0xde
168         li      r26, 0xad
169         li      r27, 0xbe
170         li      r28, 0xef
171         li      r29, 0xdd
172 
173         ld      r3,     -96(%r1)
174         cmpwi   r3,  0x3030
175         bne     1f
176         ld      r4,     -104(%r1)
177         cmpwi   r4,  0x4040
178         bne     1f
179         ld      r5,     -112(%r1)
180         cmpwi   r5,  0x5050
181         bne     1f
182         ld      r6,     -120(%r1)
183         cmpwi   r6,  0x6060
184         bne     1f
185         ld      r7,     -128(%r1)
186         cmpwi   r7,  0x7070
187         bne     1f
188         ld      r8,     -136(%r1)
189         cmpwi   r8,  0x0808
190         bne     1f
191         ld      r9,     -144(%r1)
192         cmpwi   r9,  0x0909
193         bne     1f
194         ld      r10, -152(%r1)
195         cmpwi   r10, 0x1010
196         bne     1f
197         ld      r11, -160(%r1)
198         cmpwi   r11, 0x1111
199         bne     1f
200         ld      r14, -168(%r1)
201         cmpwi   r14, 0x1414
202         bne     1f
203         ld      r15, -176(%r1)
204         cmpwi   r15, 0x1515
205         bne     1f
206         ld      r16, -184(%r1)
207         cmpwi   r16, 0x1616
208         bne     1f
209         ld      r17, -192(%r1)
210         cmpwi   r17, 0x1717
211         bne     1f
212         ld      r18, -200(%r1)
213         cmpwi   r18, 0x1818
214         bne     1f
215         ld      r19, -208(%r1)
216         cmpwi   r19, 0x1919
217         bne     1f
218         ld      r20, -216(%r1)
219         cmpwi   r20, 0x2020
220         bne     1f
221         ld      r21, -224(%r1)
222         cmpwi   r21, 0x2121
223         bne     1f
224         ld      r22, -232(%r1)
225         cmpwi   r22, 0x2222
226         bne     1f
227         ld      r23, -240(%r1)
228         cmpwi   r23, 0x2323
229         bne     1f
230         ld      r24, -248(%r1)
231         cmpwi   r24, 0x2424
232         bne     1f
233         ld      r25, -256(%r1)
234         cmpwi   r25, 0x2525
235         bne     1f
236         ld      r26, -264(%r1)
237         cmpwi   r26, 0x2626
238         bne     1f
239         ld      r27, -272(%r1)
240         cmpwi   r27, 0x2727
241         bne     1f
242         ld      r28, -280(%r1)
243         cmpwi   r28, 0x2828
244         bne     1f
245         ld      r29, -288(%r1)
246         cmpwi   r29, 0x2929
247         bne     1f
248 
249         /* Load 0 (success) to return */
250         li      r3, 0
251 
252 1:      ld      r14, 160(%r1)
253         ld      r15, 152(%r1)
254         ld      r16, 144(%r1)
255         ld      r17, 136(%r1)
256         ld      r18, 128(%r1)
257         ld      r19, 120(%r1)
258         ld      r20, 112(%r1)
259         ld      r21, 104(%r1)
260         ld      r22, 96(%r1)
261         ld      r23, 88(%r1)
262         ld      r24, 80(%r1)
263         ld      r25, 72(%r1)
264         ld      r26, 64(%r1)
265         ld      r27, 56(%r1)
266         ld      r28, 48(%r1)
267         ld      r29, 40(%r1)
268         ld      r30, 32(%r1)
269         ld      r31, 24(%r1)
270         addi    %r1, %r1, 168
271         blr

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php