aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/mm/book3s64/vphn.h
diff options
context:
space:
mode:
authorNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>2019-07-03 22:33:58 +0530
committerMichael Ellerman <mpe@ellerman.id.au>2019-07-04 22:23:38 +1000
commitef34e0efa22a867f8db16feb79fba9964cfbe253 (patch)
tree8da2d8e0af59be1127348854d04082fdbcd47fb3 /arch/powerpc/mm/book3s64/vphn.h
parentpowerpc/pseries: Introduce rwlock to gatekeep DTLB usage (diff)
downloadlinux-dev-ef34e0efa22a867f8db16feb79fba9964cfbe253.tar.xz
linux-dev-ef34e0efa22a867f8db16feb79fba9964cfbe253.zip
powerpc/pseries: Generalize hcall_vphn()
H_HOME_NODE_ASSOCIATIVITY hcall can take two different flags and return different associativity information in each case. Generalize the existing hcall_vphn() function to take flags as an argument and to return the result. Update the only existing user to pass the proper arguments. Signed-off-by: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Diffstat (limited to 'arch/powerpc/mm/book3s64/vphn.h')
-rw-r--r--arch/powerpc/mm/book3s64/vphn.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/powerpc/mm/book3s64/vphn.h b/arch/powerpc/mm/book3s64/vphn.h
index f0b93c2dd578..f7ff1e0c3801 100644
--- a/arch/powerpc/mm/book3s64/vphn.h
+++ b/arch/powerpc/mm/book3s64/vphn.h
@@ -11,6 +11,14 @@
*/
#define VPHN_ASSOC_BUFSIZE (VPHN_REGISTER_COUNT*sizeof(u64)/sizeof(u16) + 1)
+/*
+ * The H_HOME_NODE_ASSOCIATIVITY hcall takes two values for flags:
+ * 1 for retrieving associativity information for a guest cpu
+ * 2 for retrieving associativity information for a host/hypervisor cpu
+ */
+#define VPHN_FLAG_VCPU 1
+#define VPHN_FLAG_PCPU 2
+
extern int vphn_unpack_associativity(const long *packed, __be32 *unpacked);
#endif