s390/cio: export measurement data for all CMGs

A channel-path's channel-measurement-group value (CMG) determines the
format of associated measurement data and characteristics blocks. Both
blocks are of fixed size and contain a generic and CMG-dependent part.

Currently CIO exports these data blocks via sysfs only for a specific
list of CMGs even though the kernel itself does not interpret
CMG-dependent data.

Change CIO to export measurement data and characteristics for all CMGs.
This enables supporting new CMG data formats in userspace without the
need for kernel changes.

Reviewed-by: Vineeth Vijayan <vneethv@linux.ibm.com>
Acked-by: Heiko Carstens <hca@linux.ibm.com>
Signed-off-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
This commit is contained in:
Peter Oberparleiter 2024-03-26 17:03:23 +01:00 committed by Alexander Gordeev
parent 2dc8903af7
commit 5e6bb10ee5

View File

@ -1126,10 +1126,6 @@ int chsc_get_channel_measurement_chars(struct channel_path *chp)
chp->cmg = scmc_area->cmg;
chp->shared = scmc_area->shared;
chp->extended = scmc_area->extended;
if (chp->cmg != 2 && chp->cmg != 3) {
/* No cmg-dependent data. */
goto out;
}
chsc_initialize_cmg_chars(chp, scmc_area->cmcv,
(struct cmg_chars *) &scmc_area->data);
out: