2005-04-17 06:20:36 +08:00
|
|
|
#ifndef S390_CHSC_H
|
|
|
|
#define S390_CHSC_H
|
|
|
|
|
2007-04-27 22:01:26 +08:00
|
|
|
#include <linux/types.h>
|
|
|
|
#include <linux/device.h>
|
|
|
|
#include "chpid.h"
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
#define CHSC_SEI_ACC_CHPID 1
|
|
|
|
#define CHSC_SEI_ACC_LINKADDR 2
|
|
|
|
#define CHSC_SEI_ACC_FULLLINKADDR 3
|
|
|
|
|
2006-01-06 16:19:25 +08:00
|
|
|
#define CHSC_SDA_OC_MSS 0x2
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
struct chsc_header {
|
|
|
|
u16 length;
|
|
|
|
u16 code;
|
2007-02-06 04:17:40 +08:00
|
|
|
} __attribute__ ((packed));
|
2005-04-17 06:20:36 +08:00
|
|
|
|
2006-03-24 19:15:14 +08:00
|
|
|
#define NR_MEASUREMENT_CHARS 5
|
|
|
|
struct cmg_chars {
|
|
|
|
u32 values[NR_MEASUREMENT_CHARS];
|
2007-02-06 04:17:40 +08:00
|
|
|
} __attribute__ ((packed));
|
2006-03-24 19:15:14 +08:00
|
|
|
|
|
|
|
#define NR_MEASUREMENT_ENTRIES 8
|
|
|
|
struct cmg_entry {
|
|
|
|
u32 values[NR_MEASUREMENT_ENTRIES];
|
2007-02-06 04:17:40 +08:00
|
|
|
} __attribute__ ((packed));
|
2006-03-24 19:15:14 +08:00
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
struct channel_path_desc {
|
|
|
|
u8 flags;
|
|
|
|
u8 lsn;
|
|
|
|
u8 desc;
|
|
|
|
u8 chpid;
|
|
|
|
u8 swla;
|
|
|
|
u8 zeroes;
|
|
|
|
u8 chla;
|
|
|
|
u8 chpp;
|
2007-02-06 04:17:40 +08:00
|
|
|
} __attribute__ ((packed));
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
struct channel_path {
|
2007-04-27 22:01:26 +08:00
|
|
|
struct chp_id chpid;
|
2005-04-17 06:20:36 +08:00
|
|
|
int state;
|
|
|
|
struct channel_path_desc desc;
|
2006-03-24 19:15:14 +08:00
|
|
|
/* Channel-measurement related stuff: */
|
|
|
|
int cmg;
|
|
|
|
int shared;
|
|
|
|
void *cmg_chars;
|
2005-04-17 06:20:36 +08:00
|
|
|
struct device dev;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern void s390_process_css( void );
|
|
|
|
extern void chsc_validate_chpids(struct subchannel *);
|
2007-04-27 22:01:26 +08:00
|
|
|
extern void chpid_is_actually_online(struct chp_id);
|
2007-02-06 04:16:47 +08:00
|
|
|
extern int css_get_ssd_info(struct subchannel *);
|
|
|
|
extern int chsc_process_crw(void);
|
|
|
|
extern int chp_process_crw(int, int);
|
2005-04-17 06:20:36 +08:00
|
|
|
|
|
|
|
struct css_general_char {
|
|
|
|
u64 : 41;
|
|
|
|
u32 aif : 1; /* bit 41 */
|
|
|
|
u32 : 3;
|
|
|
|
u32 mcss : 1; /* bit 45 */
|
|
|
|
u32 : 2;
|
|
|
|
u32 ext_mb : 1; /* bit 48 */
|
|
|
|
u32 : 7;
|
|
|
|
u32 aif_tdd : 1; /* bit 56 */
|
2006-01-06 16:19:20 +08:00
|
|
|
u32 : 1;
|
|
|
|
u32 qebsm : 1; /* bit 58 */
|
|
|
|
u32 : 8;
|
2005-04-17 06:20:36 +08:00
|
|
|
u32 aif_osa : 1; /* bit 67 */
|
|
|
|
u32 : 28;
|
|
|
|
}__attribute__((packed));
|
|
|
|
|
|
|
|
struct css_chsc_char {
|
|
|
|
u64 res;
|
2006-03-24 19:15:14 +08:00
|
|
|
u64 : 20;
|
|
|
|
u32 secm : 1; /* bit 84 */
|
|
|
|
u32 : 1;
|
|
|
|
u32 scmc : 1; /* bit 86 */
|
|
|
|
u32 : 20;
|
2005-04-17 06:20:36 +08:00
|
|
|
u32 scssc : 1; /* bit 107 */
|
|
|
|
u32 scsscf : 1; /* bit 108 */
|
|
|
|
u32 : 19;
|
|
|
|
}__attribute__((packed));
|
|
|
|
|
|
|
|
extern struct css_general_char css_general_characteristics;
|
|
|
|
extern struct css_chsc_char css_chsc_characteristics;
|
|
|
|
|
|
|
|
extern int chsc_determine_css_characteristics(void);
|
|
|
|
extern int css_characteristics_avail;
|
|
|
|
|
|
|
|
extern void *chsc_get_chp_desc(struct subchannel*, int);
|
2006-01-06 16:19:23 +08:00
|
|
|
|
2006-01-06 16:19:25 +08:00
|
|
|
extern int chsc_enable_facility(int);
|
2006-03-24 19:15:14 +08:00
|
|
|
struct channel_subsystem;
|
|
|
|
extern int chsc_secm(struct channel_subsystem *, int);
|
2006-01-06 16:19:25 +08:00
|
|
|
|
2006-02-03 19:03:52 +08:00
|
|
|
#define to_channelpath(device) container_of(device, struct channel_path, dev)
|
2006-01-06 16:19:23 +08:00
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
#endif
|