io_uring: ensure finish_wait() is always called in __io_uring_task_cancel()
[linux/fpc-iii.git] / arch / powerpc / platforms / powernv / copy-paste.h
blobf063807eda9ab7afb2fe237bf851a5791d5d0fce
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 /*
3 * Copyright 2016-17 IBM Corp.
4 */
5 #include <asm/ppc-opcode.h>
6 #include <asm/reg.h>
8 /*
9 * Copy/paste instructions:
11 * copy RA,RB
12 * Copy contents of address (RA) + effective_address(RB)
13 * to internal copy-buffer.
15 * paste RA,RB
16 * Paste contents of internal copy-buffer to the address
17 * (RA) + effective_address(RB)
19 static inline int vas_copy(void *crb, int offset)
21 asm volatile(PPC_COPY(%0, %1)";"
23 : "b" (offset), "b" (crb)
24 : "memory");
26 return 0;
29 static inline int vas_paste(void *paste_address, int offset)
31 u32 cr;
33 cr = 0;
34 asm volatile(PPC_PASTE(%1, %2)";"
35 "mfocrf %0, 0x80;"
36 : "=r" (cr)
37 : "b" (offset), "b" (paste_address)
38 : "memory", "cr0");
40 /* We mask with 0xE to ignore SO */
41 return (cr >> CR0_SHIFT) & 0xE;