xref: /openbmc/linux/arch/s390/include/asm/clp.h (revision 56d06fa2)
1 #ifndef _ASM_S390_CLP_H
2 #define _ASM_S390_CLP_H
3 
4 /* CLP common request & response block size */
5 #define CLP_BLK_SIZE			PAGE_SIZE
6 
7 #define CLP_LPS_BASE	0
8 #define CLP_LPS_PCI	2
9 
10 struct clp_req_hdr {
11 	u16 len;
12 	u16 cmd;
13 	u32 fmt		: 4;
14 	u32 reserved1	: 28;
15 	u64 reserved2;
16 } __packed;
17 
18 struct clp_rsp_hdr {
19 	u16 len;
20 	u16 rsp;
21 	u32 fmt		: 4;
22 	u32 reserved1	: 28;
23 	u64 reserved2;
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 
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 
55 #endif
56