2 * Copyright 2016-17 IBM Corp.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version
7 * 2 of the License, or (at your option) any later version.
9 #include <asm/ppc-opcode.h>
13 * Copy/paste instructions:
16 * Copy contents of address (RA) + effective_address(RB)
17 * to internal copy-buffer.
20 * Paste contents of internal copy-buffer to the address
21 * (RA) + effective_address(RB)
23 static inline int vas_copy(void *crb, int offset)
25 asm volatile(PPC_COPY(%0, %1)";"
27 : "b" (offset), "b" (crb)
33 static inline int vas_paste(void *paste_address, int offset)
38 asm volatile(PPC_PASTE(%1, %2)";"
41 : "b" (offset), "b" (paste_address)
44 /* We mask with 0xE to ignore SO */
45 return (cr >> CR0_SHIFT) & 0xE;