blob: 5687d62fb0cb313e7562553da0ea320c0f8a0b22 [file] [log] [blame]
Jan Glaubera755a452012-11-29 12:55:21 +01001#ifndef _ASM_S390_CLP_H
2#define _ASM_S390_CLP_H
3
4/* CLP common request & response block size */
Sebastian Ottadd09d62013-01-31 19:54:03 +01005#define CLP_BLK_SIZE PAGE_SIZE
Jan Glaubera755a452012-11-29 12:55:21 +01006
Martin Schwidefsky988b86e62016-01-13 12:54:28 +01007#define CLP_LPS_BASE 0
8#define CLP_LPS_PCI 2
9
Jan Glaubera755a452012-11-29 12:55:21 +010010struct clp_req_hdr {
11 u16 len;
12 u16 cmd;
Martin Schwidefsky988b86e62016-01-13 12:54:28 +010013 u32 fmt : 4;
14 u32 reserved1 : 28;
15 u64 reserved2;
Jan Glaubera755a452012-11-29 12:55:21 +010016} __packed;
17
18struct clp_rsp_hdr {
19 u16 len;
20 u16 rsp;
Martin Schwidefsky988b86e62016-01-13 12:54:28 +010021 u32 fmt : 4;
22 u32 reserved1 : 28;
23 u64 reserved2;
Jan Glaubera755a452012-11-29 12:55:21 +010024} __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 Schwidefsky988b86e62016-01-13 12:54:28 +010037/* Store logical-processor characteristics request */
38struct clp_req_slpc {
39 struct clp_req_hdr hdr;
40} __packed;
41
42struct 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
50struct clp_req_rsp_slpc {
51 struct clp_req_slpc request;
52 struct clp_rsp_slpc response;
53} __packed;
54
Jan Glaubera755a452012-11-29 12:55:21 +010055#endif