powerpc/pseries: Define papr_indices_io_block for papr-indices ioctls
authorHaren Myneni <haren@linux.ibm.com>
Wed, 16 Apr 2025 22:57:37 +0000 (15:57 -0700)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Thu, 17 Apr 2025 06:12:29 +0000 (11:42 +0530)
commit43d869ac25f17923473a03dcf001af073b7c0a56
tree44c98f66c3ef4320f603c9ffc71dbe3a6a64f6df
parentecc45d4f8ce8e1953f703b4d13d882f2e8ce689d
powerpc/pseries: Define papr_indices_io_block for papr-indices ioctls

To issue ibm,get-indices, ibm,set-dynamic-indicator and
ibm,get-dynamic-sensor-state in the user space, the RMO buffer is
allocated for the work area which is restricted under system
lockdown. So instead of user space execution, the kernel will
provide /dev/papr-indices interface to execute these RTAS calls.

The user space assigns data in papr_indices_io_block struct
depends on the specific HCALL and passes to the following ioctls:

PAPR_INDICES_IOC_GET: Use for ibm,get-indices. Returns a
get-indices handle fd to read data.
PAPR_DYNAMIC_SENSOR_IOC_GET: Use for  ibm,get-dynamic-sensor-state.
Updates the sensor state in
papr_indices_io_block.dynamic_param.state

PAPR_DYNAMIC_INDICATOR_IOC_SET: Use for ibm,set-dynamic-indicator.
Sets the new state for the input
indicator.

Signed-off-by: Haren Myneni <haren@linux.ibm.com>
Tested-by: Sathvika Vasireddy <sv@linux.ibm.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20250416225743.596462-3-haren@linux.ibm.com
Documentation/userspace-api/ioctl/ioctl-number.rst
arch/powerpc/include/uapi/asm/papr-indices.h [new file with mode: 0644]