~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/powerpc/include/uapi/asm/papr-sysparm.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
  2 #ifndef _UAPI_PAPR_SYSPARM_H_
  3 #define _UAPI_PAPR_SYSPARM_H_
  4 
  5 #include <linux/types.h>
  6 #include <asm/ioctl.h>
  7 #include <asm/papr-miscdev.h>
  8 
  9 enum {
 10         PAPR_SYSPARM_MAX_INPUT  = 1024,
 11         PAPR_SYSPARM_MAX_OUTPUT = 4000,
 12 };
 13 
 14 struct papr_sysparm_io_block {
 15         __u32 parameter;
 16         __u16 length;
 17         __u8 data[PAPR_SYSPARM_MAX_OUTPUT];
 18 };
 19 
 20 /**
 21  * PAPR_SYSPARM_IOC_GET - Retrieve the value of a PAPR system parameter.
 22  *
 23  * Uses _IOWR because of one corner case: Retrieving the value of the
 24  * "OS Service Entitlement Status" parameter (60) requires the caller
 25  * to supply input data (a date string) in the buffer passed to
 26  * firmware. So the @length and @data of the incoming
 27  * papr_sysparm_io_block are always used to initialize the work area
 28  * supplied to ibm,get-system-parameter. No other parameters are known
 29  * to parameterize the result this way, and callers are encouraged
 30  * (but not required) to zero-initialize @length and @data in the
 31  * common case.
 32  *
 33  * On error the contents of the ioblock are indeterminate.
 34  *
 35  * Return:
 36  * 0: Success; @length is the length of valid data in @data, not to exceed @PAPR_SYSPARM_MAX_OUTPUT.
 37  * -EIO: Platform error. (-1)
 38  * -EINVAL: Incorrect data length or format. (-9999)
 39  * -EPERM: The calling partition is not allowed to access this parameter. (-9002)
 40  * -EOPNOTSUPP: Parameter not supported on this platform (-3)
 41  */
 42 #define PAPR_SYSPARM_IOC_GET _IOWR(PAPR_MISCDEV_IOC_ID, 1, struct papr_sysparm_io_block)
 43 
 44 /**
 45  * PAPR_SYSPARM_IOC_SET - Update the value of a PAPR system parameter.
 46  *
 47  * The contents of the ioblock are unchanged regardless of success.
 48  *
 49  * Return:
 50  * 0: Success; the parameter has been updated.
 51  * -EIO: Platform error. (-1)
 52  * -EINVAL: Incorrect data length or format. (-9999)
 53  * -EPERM: The calling partition is not allowed to access this parameter. (-9002)
 54  * -EOPNOTSUPP: Parameter not supported on this platform (-3)
 55  */
 56 #define PAPR_SYSPARM_IOC_SET _IOW(PAPR_MISCDEV_IOC_ID, 2, struct papr_sysparm_io_block)
 57 
 58 #endif /* _UAPI_PAPR_SYSPARM_H_ */
 59 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php