6b13f685e
김민수
BSP 최초 추가
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
#ifndef S390_CIO_H
#define S390_CIO_H
#include <linux/mutex.h>
#include <linux/device.h>
#include <linux/mod_devicetable.h>
#include <asm/chpid.h>
#include <asm/cio.h>
#include <asm/fcx.h>
#include <asm/schid.h>
#include "chsc.h"
struct pmcw {
u32 intparm;
u32 qf : 1;
u32 w : 1;
u32 isc : 3;
u32 res5 : 3;
u32 ena : 1;
u32 lm : 2;
u32 mme : 2;
u32 mp : 1;
u32 tf : 1;
u32 dnv : 1;
u32 dev : 16;
u8 lpm;
u8 pnom;
u8 lpum;
u8 pim;
u16 mbi;
u8 pom;
u8 pam;
u8 chpid[8];
u32 unused1 : 8;
u32 st : 3;
u32 unused2 : 18;
u32 mbfc : 1;
u32 xmwme : 1;
u32 csense : 1;
} __attribute__ ((packed));
struct schib_config {
u64 mba;
u32 intparm;
u16 mbi;
u32 isc:3;
u32 ena:1;
u32 mme:2;
u32 mp:1;
u32 csense:1;
u32 mbfc:1;
} __attribute__ ((packed));
struct schib {
struct pmcw pmcw;
union scsw scsw;
__u64 mba;
__u8 mda[4];
} __attribute__ ((packed,aligned(4)));
enum sch_todo {
SCH_TODO_NOTHING,
SCH_TODO_EVAL,
SCH_TODO_UNREG,
};
struct subchannel {
struct subchannel_id schid;
spinlock_t *lock;
struct mutex reg_mutex;
enum {
SUBCHANNEL_TYPE_IO = 0,
SUBCHANNEL_TYPE_CHSC = 1,
SUBCHANNEL_TYPE_MSG = 2,
SUBCHANNEL_TYPE_ADM = 3,
} st;
__u8 vpm;
__u8 lpm;
__u8 opm;
struct schib schib;
int isc;
struct chsc_ssd_info ssd_info;
struct device dev;
struct css_driver *driver;
enum sch_todo todo;
struct work_struct todo_work;
struct schib_config config;
} __attribute__ ((aligned(8)));
#define to_subchannel(n) container_of(n, struct subchannel, dev)
extern int cio_validate_subchannel (struct subchannel *, struct subchannel_id);
extern int cio_enable_subchannel(struct subchannel *, u32);
extern int cio_disable_subchannel (struct subchannel *);
extern int cio_cancel (struct subchannel *);
extern int cio_clear (struct subchannel *);
extern int cio_resume (struct subchannel *);
extern int cio_halt (struct subchannel *);
extern int cio_start (struct subchannel *, struct ccw1 *, __u8);
extern int cio_start_key (struct subchannel *, struct ccw1 *, __u8, __u8);
extern int cio_cancel (struct subchannel *);
extern int cio_set_options (struct subchannel *, int);
extern int cio_update_schib(struct subchannel *sch);
extern int cio_commit_config(struct subchannel *sch);
int cio_tm_start_key(struct subchannel *sch, struct tcw *tcw, u8 lpm, u8 key);
int cio_tm_intrg(struct subchannel *sch);
#ifdef CONFIG_CCW_CONSOLE
extern struct subchannel *cio_probe_console(void);
extern int cio_is_console(struct subchannel_id);
extern void cio_register_early_subchannels(void);
extern void cio_tsch(struct subchannel *sch);
#else
#define cio_is_console(schid) 0
static inline void cio_register_early_subchannels(void) {}
#endif
#endif
|