mirror of
https://github.com/raspberrypi/linux.git
synced 2026-01-02 15:53:42 +00:00
s390/diag324: Retrieve power readings via diag 0x324
Retrieve electrical power readings for resources in a computing environment via diag 0x324. diag 0x324 stores the power readings in the power information block (pib). Provide power readings from pib via diag324 ioctl interface. diag324 ioctl provides new pib to the user only if the threshold time has passed since the last call. Otherwise, cache data is returned. When there are no active readers, cleanup of pib buffer is performed. Reviewed-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Sumanth Korikkar <sumanthk@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
This commit is contained in:
committed by
Alexander Gordeev
parent
2478d43ed6
commit
90e6f191e1
24
arch/s390/include/uapi/asm/diag.h
Normal file
24
arch/s390/include/uapi/asm/diag.h
Normal file
@@ -0,0 +1,24 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
||||
/*
|
||||
* Diag ioctls and its associated structures definitions.
|
||||
*
|
||||
* Copyright IBM Corp. 2024
|
||||
*/
|
||||
|
||||
#ifndef __S390_UAPI_ASM_DIAG_H
|
||||
#define __S390_UAPI_ASM_DIAG_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#define DIAG_MAGIC_STR 'D'
|
||||
|
||||
struct diag324_pib {
|
||||
__u64 address;
|
||||
__u64 sequence;
|
||||
};
|
||||
|
||||
/* Diag ioctl definitions */
|
||||
#define DIAG324_GET_PIBBUF _IOWR(DIAG_MAGIC_STR, 0x77, struct diag324_pib)
|
||||
#define DIAG324_GET_PIBLEN _IOR(DIAG_MAGIC_STR, 0x78, size_t)
|
||||
|
||||
#endif /* __S390_UAPI_ASM_DIAG_H */
|
||||
Reference in New Issue
Block a user