]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/pseries/vas: sysfs interface to export capabilities
authorHaren Myneni <haren@linux.ibm.com>
Tue, 1 Mar 2022 01:15:36 +0000 (17:15 -0800)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 7 Mar 2022 13:04:56 +0000 (00:04 +1100)
commit8e1a7de4da1a004841b431657d290fc6efd97a72
tree8b5bb7da052b63691585101e2d961d31c29af23d
parent1c31943816f69c37dc4a6a997e3f2216302f13eb
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
arch/powerpc/platforms/pseries/Makefile
arch/powerpc/platforms/pseries/vas-sysfs.c [new file with mode: 0644]
arch/powerpc/platforms/pseries/vas.c
arch/powerpc/platforms/pseries/vas.h