1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 * Copyright 2016-17 IBM Corp.
5 #include <asm/ppc-opcode.h>
9 * Copy/paste instructions:
12 * Copy contents of address (RA) + effective_address(RB)
13 * to internal copy-buffer.
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
)
29 static inline int vas_paste(void *paste_address
, int offset
)
34 asm volatile(PPC_PASTE(%1, %2)";"
37 : "b" (offset
), "b" (paste_address
)
40 /* We mask with 0xE to ignore SO */
41 return (cr
>> CR0_SHIFT
) & 0xE;