[S390] zfcpdump support.
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / include / asm-s390 / sclp.h
CommitLineData
ab14de6c
HC
1/*
2 * include/asm-s390/sclp.h
3 *
4 * Copyright IBM Corp. 2007
5 * Author(s): Heiko Carstens <heiko.carstens@de.ibm.com>
6 */
7
8#ifndef _ASM_S390_SCLP_H
9#define _ASM_S390_SCLP_H
10
11#include <linux/types.h>
e5854a58 12#include <asm/chpid.h>
ab14de6c
HC
13
14struct sccb_header {
15 u16 length;
16 u8 function_code;
17 u8 control_mask[3];
18 u16 response_code;
19} __attribute__((packed));
20
21#define LOADPARM_LEN 8
22
23struct sclp_readinfo_sccb {
24 struct sccb_header header; /* 0-7 */
25 u16 rnmax; /* 8-9 */
26 u8 rnsize; /* 10 */
27 u8 _reserved0[24 - 11]; /* 11-23 */
28 u8 loadparm[LOADPARM_LEN]; /* 24-31 */
29 u8 _reserved1[91 - 32]; /* 32-90 */
30 u8 flags; /* 91 */
31 u8 _reserved2[100 - 92]; /* 92-99 */
32 u32 rnsize2; /* 100-103 */
33 u64 rnmax2; /* 104-111 */
34 u8 _reserved3[4096 - 112]; /* 112-4095 */
35} __attribute__((packed, aligned(4096)));
36
e5854a58
PO
37#define SCLP_CHP_INFO_MASK_SIZE 32
38
39struct sclp_chp_info {
40 u8 recognized[SCLP_CHP_INFO_MASK_SIZE];
41 u8 standby[SCLP_CHP_INFO_MASK_SIZE];
42 u8 configured[SCLP_CHP_INFO_MASK_SIZE];
43};
44
ab14de6c
HC
45extern struct sclp_readinfo_sccb s390_readinfo_sccb;
46extern void sclp_readinfo_early(void);
411ed322
MH
47extern int sclp_sdias_blk_count(void);
48extern int sclp_sdias_copy(void *dest, int blk_num, int nr_blks);
e5854a58
PO
49extern int sclp_chp_configure(struct chp_id chpid);
50extern int sclp_chp_deconfigure(struct chp_id chpid);
51extern int sclp_chp_read_info(struct sclp_chp_info *info);
ab14de6c
HC
52
53#endif /* _ASM_S390_SCLP_H */