summaryrefslogtreecommitdiff
path: root/arch/powerpc/platforms/pseries/vas.h
diff options
context:
space:
mode:
authorHaren Myneni <haren@linux.ibm.com>2022-02-28 17:15:36 -0800
committerMichael Ellerman <mpe@ellerman.id.au>2022-03-08 00:04:56 +1100
commitb903737bc522e0ef3f45a2a60c364ff547572c9b (patch)
tree8b5bb7da052b63691585101e2d961d31c29af23d /arch/powerpc/platforms/pseries/vas.h
parentc656cfe571a9b8b882e31177f554bd79141fc015 (diff)
powerpc/pseries/vas: sysfs interface to export capabilities
The hypervisor provides the available VAS GZIP capabilities such as default or QoS window type and the target available credits in each type. This patch creates sysfs entries and exports the target, used and the available credits for each feature. This interface can be used by the user space to determine the credits usage or to set the target credits in the case of QoS type (for DLPAR). /sys/devices/vas/vas0/gzip/default_capabilities (default GZIP capabilities) nr_total_credits /* Total credits available. Can be /* changed with DLPAR operation */ nr_used_credits /* Used credits */ /sys/devices/vas/vas0/gzip/qos_capabilities (QoS GZIP capabilities) nr_total_credits nr_used_credits Signed-off-by: Haren Myneni <haren@linux.ibm.com> Reviewed-by: Nicholas Piggin <npiggin@gmail.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/702d8b626ebfac2b52f4995eebeafe1c9a6fcb75.camel@linux.ibm.com
Diffstat (limited to 'arch/powerpc/platforms/pseries/vas.h')
-rw-r--r--arch/powerpc/platforms/pseries/vas.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/pseries/vas.h b/arch/powerpc/platforms/pseries/vas.h
index 701363cfd7c1..f1bdb776021e 100644
--- a/arch/powerpc/platforms/pseries/vas.h
+++ b/arch/powerpc/platforms/pseries/vas.h
@@ -30,6 +30,9 @@
#define VAS_COPY_PASTE_USER_MODE 0x00000001
#define VAS_COP_OP_USER_MODE 0x00000010
+#define VAS_GZIP_QOS_CAPABILITIES 0x56516F73477A6970
+#define VAS_GZIP_DEFAULT_CAPABILITIES 0x56446566477A6970
+
/*
* Co-processor feature - GZIP QoS windows or GZIP default windows
*/
@@ -125,4 +128,7 @@ struct pseries_vas_window {
char *name;
int fault_virq;
};
+
+int sysfs_add_vas_caps(struct vas_cop_feat_caps *caps);
+int __init sysfs_pseries_vas_init(struct vas_all_caps *vas_caps);
#endif /* _VAS_H */