clp.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. #ifndef _ASM_S390_CLP_H
  3. #define _ASM_S390_CLP_H
  4. /* CLP common request & response block size */
  5. #define CLP_BLK_SIZE PAGE_SIZE
  6. #define CLP_LPS_BASE 0
  7. #define CLP_LPS_PCI 2
  8. struct clp_req_hdr {
  9. u16 len;
  10. u16 cmd;
  11. u32 fmt : 4;
  12. u32 reserved1 : 28;
  13. u64 reserved2;
  14. } __packed;
  15. struct clp_rsp_hdr {
  16. u16 len;
  17. u16 rsp;
  18. u32 fmt : 4;
  19. u32 reserved1 : 28;
  20. u64 reserved2;
  21. } __packed;
  22. /* CLP Response Codes */
  23. #define CLP_RC_OK 0x0010 /* Command request successfully */
  24. #define CLP_RC_CMD 0x0020 /* Command code not recognized */
  25. #define CLP_RC_PERM 0x0030 /* Command not authorized */
  26. #define CLP_RC_FMT 0x0040 /* Invalid command request format */
  27. #define CLP_RC_LEN 0x0050 /* Invalid command request length */
  28. #define CLP_RC_8K 0x0060 /* Command requires 8K LPCB */
  29. #define CLP_RC_RESNOT0 0x0070 /* Reserved field not zero */
  30. #define CLP_RC_NODATA 0x0080 /* No data available */
  31. #define CLP_RC_FC_UNKNOWN 0x0100 /* Function code not recognized */
  32. /* Store logical-processor characteristics request */
  33. struct clp_req_slpc {
  34. struct clp_req_hdr hdr;
  35. } __packed;
  36. struct clp_rsp_slpc {
  37. struct clp_rsp_hdr hdr;
  38. u32 reserved2[4];
  39. u32 lpif[8];
  40. u32 reserved3[8];
  41. u32 lpic[8];
  42. } __packed;
  43. struct clp_req_rsp_slpc {
  44. struct clp_req_slpc request;
  45. struct clp_rsp_slpc response;
  46. } __packed;
  47. #endif