Lines Matching +full:sync +full:- +full:1

1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * This file contains miscellaneous low-level functions.
4 * Copyright (C) 1995-1996 Gary Thomas (gdt@linuxppc.org)
21 #include <asm/asm-offsets.h>
26 #include <asm/feature-fixups.h>
31 * This returns the high 64 bits of the product of two 64-bit numbers.
38 beq 1f
43 1: beqlr cr1 /* all done if high part of A is 0 */
71 1: mflr r0
72 lis r4,1b@ha
73 addi r4,r4,1b@l
85 * call_setup_cpu - call the setup_cpu function for this cpu
106 /* This gets called by via-pmu.c to switch the PLL selection
108 * other place (as most of the cpufreq code in via-pmu
118 beq 1f
121 sync
124 sync
126 1:
146 bne 1f
149 sync
152 sync
154 1:
167 insrwi r4,r3,1,9 /* insert parameter into bit 9 */
168 sync
170 sync
187 sync
189 sync
192 sync
194 sync
205 sync
207 sync
210 sync
212 sync
236 rlwinm r5, r3, 0, L1_CACHE_BYTES - 1
237 addi r3,r3,-4
242 addi r4,r4,-4
246 #if MAX_COPY_PREFETCH > 1
253 #else /* MAX_COPY_PREFETCH == 1 */
257 li r0,PAGE_SIZE/L1_CACHE_BYTES - MAX_COPY_PREFETCH
261 1:
278 bdnz 1b
290 * -- Gabriel
303 addi r7,r5,32 # could be xori, or addi with -32
304 slw r6,r3,r6 # t1 = count > 31 ? 0 : MSW << (32-count)
306 sraw r7,r3,r7 # t2 = MSW >> (count-32)
317 addi r7,r5,32 # could be xori, or addi with -32
318 srw r6,r4,r6 # t1 = count > 31 ? 0 : LSW >> (32-count)
319 slw r7,r4,r7 # t2 = count < 32 ? 0 : LSW << (count-32)
329 addi r7,r5,32 # could be xori, or addi with -32
330 slw r6,r3,r6 # t1 = count > 31 ? 0 : MSW << (32-count)
331 srw r7,r3,r7 # t2 = count < 32 ? 0 : MSW >> (count-32)
339 * 64-bit comparison: __cmpdi2(s64 a, s64 b)
340 * Returns 0 if a < b, 1 if a == b, 2 if a > b.
344 li r3,1
345 bne 1f
348 1: li r3,0
354 * 64-bit comparison: __ucmpdi2(u64 a, u64 b)
355 * Returns 0 if a < b, 1 if a == b, 2 if a > b.
359 li r3,1
360 bne 1f
363 1: li r3,0
384 rlwinm r1, r1, 0, 0, 31 - THREAD_SHIFT
385 addi r1,r1,THREAD_SIZE-STACK_FRAME_OVERHEAD