Jan Glauber | a755a45 | 2012-11-29 12:55:21 +0100 | [diff] [blame] | 1 | #ifndef _ASM_S390_CLP_H |
| 2 | #define _ASM_S390_CLP_H |
| 3 | |
| 4 | /* CLP common request & response block size */ |
Sebastian Ott | add09d6 | 2013-01-31 19:54:03 +0100 | [diff] [blame] | 5 | #define CLP_BLK_SIZE PAGE_SIZE |
Jan Glauber | a755a45 | 2012-11-29 12:55:21 +0100 | [diff] [blame] | 6 | |
Martin Schwidefsky | 988b86e6 | 2016-01-13 12:54:28 +0100 | [diff] [blame] | 7 | #define CLP_LPS_BASE 0 |
| 8 | #define CLP_LPS_PCI 2 |
| 9 | |
Jan Glauber | a755a45 | 2012-11-29 12:55:21 +0100 | [diff] [blame] | 10 | struct clp_req_hdr { |
| 11 | u16 len; |
| 12 | u16 cmd; |
Martin Schwidefsky | 988b86e6 | 2016-01-13 12:54:28 +0100 | [diff] [blame] | 13 | u32 fmt : 4; |
| 14 | u32 reserved1 : 28; |
| 15 | u64 reserved2; |
Jan Glauber | a755a45 | 2012-11-29 12:55:21 +0100 | [diff] [blame] | 16 | } __packed; |
| 17 | |
| 18 | struct clp_rsp_hdr { |
| 19 | u16 len; |
| 20 | u16 rsp; |
Martin Schwidefsky | 988b86e6 | 2016-01-13 12:54:28 +0100 | [diff] [blame] | 21 | u32 fmt : 4; |
| 22 | u32 reserved1 : 28; |
| 23 | u64 reserved2; |
Jan Glauber | a755a45 | 2012-11-29 12:55:21 +0100 | [diff] [blame] | 24 | } __packed; |
| 25 | |
| 26 | /* CLP Response Codes */ |
| 27 | #define CLP_RC_OK 0x0010 /* Command request successfully */ |
| 28 | #define CLP_RC_CMD 0x0020 /* Command code not recognized */ |
| 29 | #define CLP_RC_PERM 0x0030 /* Command not authorized */ |
| 30 | #define CLP_RC_FMT 0x0040 /* Invalid command request format */ |
| 31 | #define CLP_RC_LEN 0x0050 /* Invalid command request length */ |
| 32 | #define CLP_RC_8K 0x0060 /* Command requires 8K LPCB */ |
| 33 | #define CLP_RC_RESNOT0 0x0070 /* Reserved field not zero */ |
| 34 | #define CLP_RC_NODATA 0x0080 /* No data available */ |
| 35 | #define CLP_RC_FC_UNKNOWN 0x0100 /* Function code not recognized */ |
| 36 | |
Martin Schwidefsky | 988b86e6 | 2016-01-13 12:54:28 +0100 | [diff] [blame] | 37 | /* Store logical-processor characteristics request */ |
| 38 | struct clp_req_slpc { |
| 39 | struct clp_req_hdr hdr; |
| 40 | } __packed; |
| 41 | |
| 42 | struct clp_rsp_slpc { |
| 43 | struct clp_rsp_hdr hdr; |
| 44 | u32 reserved2[4]; |
| 45 | u32 lpif[8]; |
| 46 | u32 reserved3[8]; |
| 47 | u32 lpic[8]; |
| 48 | } __packed; |
| 49 | |
| 50 | struct clp_req_rsp_slpc { |
| 51 | struct clp_req_slpc request; |
| 52 | struct clp_rsp_slpc response; |
| 53 | } __packed; |
| 54 | |
Jan Glauber | a755a45 | 2012-11-29 12:55:21 +0100 | [diff] [blame] | 55 | #endif |