Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

s390/sclp: Move declarations for sclp_sdias into separate header file

Reviewed-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Michael Holzheu <holzheu@linux.vnet.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>

authored by

Michael Holzheu and committed by
Martin Schwidefsky
f8049e3e 7d594322

+68 -56
+22 -56
drivers/s390/char/sclp_sdias.c
··· 1 1 /* 2 - * Sclp "store data in absolut storage" 2 + * SCLP "store data in absolute storage" 3 3 * 4 - * Copyright IBM Corp. 2003, 2007 4 + * Copyright IBM Corp. 2003, 2013 5 5 * Author(s): Michael Holzheu 6 6 */ 7 7 ··· 14 14 #include <asm/debug.h> 15 15 #include <asm/ipl.h> 16 16 17 + #include "sclp_sdias.h" 17 18 #include "sclp.h" 18 19 #include "sclp_rw.h" 19 20 ··· 23 22 #define SDIAS_RETRIES 300 24 23 #define SDIAS_SLEEP_TICKS 50 25 24 26 - #define EQ_STORE_DATA 0x0 27 - #define EQ_SIZE 0x1 28 - #define DI_FCP_DUMP 0x0 29 - #define ASA_SIZE_32 0x0 30 - #define ASA_SIZE_64 0x1 31 - #define EVSTATE_ALL_STORED 0x0 32 - #define EVSTATE_NO_DATA 0x3 33 - #define EVSTATE_PART_STORED 0x10 34 - 35 25 static struct debug_info *sdias_dbf; 36 26 37 27 static struct sclp_register sclp_sdias_register = { 38 28 .send_mask = EVTYP_SDIAS_MASK, 39 29 }; 40 - 41 - struct sdias_evbuf { 42 - struct evbuf_header hdr; 43 - u8 event_qual; 44 - u8 data_id; 45 - u64 reserved2; 46 - u32 event_id; 47 - u16 reserved3; 48 - u8 asa_size; 49 - u8 event_status; 50 - u32 reserved4; 51 - u32 blk_cnt; 52 - u64 asa; 53 - u32 reserved5; 54 - u32 fbn; 55 - u32 reserved6; 56 - u32 lbn; 57 - u16 reserved7; 58 - u16 dbs; 59 - } __attribute__((packed)); 60 - 61 - struct sdias_sccb { 62 - struct sccb_header hdr; 63 - struct sdias_evbuf evbuf; 64 - } __attribute__((packed)); 65 30 66 31 static struct sdias_sccb sccb __attribute__((aligned(4096))); 67 32 static struct sdias_evbuf sdias_evbuf; ··· 115 148 sccb.hdr.length = sizeof(sccb); 116 149 sccb.evbuf.hdr.length = sizeof(struct sdias_evbuf); 117 150 sccb.evbuf.hdr.type = EVTYP_SDIAS; 118 - sccb.evbuf.event_qual = EQ_SIZE; 119 - sccb.evbuf.data_id = DI_FCP_DUMP; 151 + sccb.evbuf.event_qual = SDIAS_EQ_SIZE; 152 + sccb.evbuf.data_id = SDIAS_DI_FCP_DUMP; 120 153 sccb.evbuf.event_id = 4712; 121 154 sccb.evbuf.dbs = 1; 122 155 ··· 175 208 sccb.evbuf.hdr.length = sizeof(struct sdias_evbuf); 176 209 sccb.evbuf.hdr.type = EVTYP_SDIAS; 177 210 sccb.evbuf.hdr.flags = 0; 178 - sccb.evbuf.event_qual = EQ_STORE_DATA; 179 - sccb.evbuf.data_id = DI_FCP_DUMP; 211 + sccb.evbuf.event_qual = SDIAS_EQ_STORE_DATA; 212 + sccb.evbuf.data_id = SDIAS_DI_FCP_DUMP; 180 213 sccb.evbuf.event_id = 4712; 181 214 #ifdef CONFIG_64BIT 182 - sccb.evbuf.asa_size = ASA_SIZE_64; 215 + sccb.evbuf.asa_size = SDIAS_ASA_SIZE_64; 183 216 #else 184 - sccb.evbuf.asa_size = ASA_SIZE_32; 217 + sccb.evbuf.asa_size = SDIAS_ASA_SIZE_32; 185 218 #endif 186 219 sccb.evbuf.event_status = 0; 187 220 sccb.evbuf.blk_cnt = nr_blks; ··· 207 240 } 208 241 209 242 switch (sdias_evbuf.event_status) { 210 - case EVSTATE_ALL_STORED: 211 - TRACE("all stored\n"); 212 - break; 213 - case EVSTATE_PART_STORED: 214 - TRACE("part stored: %i\n", sdias_evbuf.blk_cnt); 215 - break; 216 - case EVSTATE_NO_DATA: 217 - TRACE("no data\n"); 218 - /* fall through */ 219 - default: 220 - pr_err("Error from SCLP while copying hsa. " 221 - "Event status = %x\n", 222 - sdias_evbuf.event_status); 223 - rc = -EIO; 243 + case SDIAS_EVSTATE_ALL_STORED: 244 + TRACE("all stored\n"); 245 + break; 246 + case SDIAS_EVSTATE_PART_STORED: 247 + TRACE("part stored: %i\n", sdias_evbuf.blk_cnt); 248 + break; 249 + case SDIAS_EVSTATE_NO_DATA: 250 + TRACE("no data\n"); 251 + /* fall through */ 252 + default: 253 + pr_err("Error from SCLP while copying hsa. Event status = %x\n", 254 + sdias_evbuf.event_status); 255 + rc = -EIO; 224 256 } 225 257 out: 226 258 mutex_unlock(&sdias_mutex);
+46
drivers/s390/char/sclp_sdias.h
··· 1 + /* 2 + * SCLP "store data in absolute storage" 3 + * 4 + * Copyright IBM Corp. 2003, 2013 5 + */ 6 + 7 + #ifndef SCLP_SDIAS_H 8 + #define SCLP_SDIAS_H 9 + 10 + #include "sclp.h" 11 + 12 + #define SDIAS_EQ_STORE_DATA 0x0 13 + #define SDIAS_EQ_SIZE 0x1 14 + #define SDIAS_DI_FCP_DUMP 0x0 15 + #define SDIAS_ASA_SIZE_32 0x0 16 + #define SDIAS_ASA_SIZE_64 0x1 17 + #define SDIAS_EVSTATE_ALL_STORED 0x0 18 + #define SDIAS_EVSTATE_NO_DATA 0x3 19 + #define SDIAS_EVSTATE_PART_STORED 0x10 20 + 21 + struct sdias_evbuf { 22 + struct evbuf_header hdr; 23 + u8 event_qual; 24 + u8 data_id; 25 + u64 reserved2; 26 + u32 event_id; 27 + u16 reserved3; 28 + u8 asa_size; 29 + u8 event_status; 30 + u32 reserved4; 31 + u32 blk_cnt; 32 + u64 asa; 33 + u32 reserved5; 34 + u32 fbn; 35 + u32 reserved6; 36 + u32 lbn; 37 + u16 reserved7; 38 + u16 dbs; 39 + } __packed; 40 + 41 + struct sdias_sccb { 42 + struct sccb_header hdr; 43 + struct sdias_evbuf evbuf; 44 + } __packed; 45 + 46 + #endif /* SCLP_SDIAS_H */