aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/cio/schid.h
diff options
context:
space:
mode:
authorCornelia Huck <cohuck@de.ibm.com>2006-01-06 03:19:21 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 11:33:51 -0500
commita8237fc4108060402d904bea5e1062e22e731969 (patch)
treefc19e33ea8bbe664c33fba6c78b34e497f2cc478 /drivers/s390/cio/schid.h
parent8129ee164267dc030b8e1d541ee3643c0b9f2fa1 (diff)
[PATCH] s390: introduce struct subchannel_id
This patch introduces a struct subchannel_id containing the subchannel number (formerly referred to as "irq") and switches code formerly relying on the subchannel number over to it. While we're touching inline assemblies anyway, make sure they have correct memory constraints. Signed-off-by: Cornelia Huck <cohuck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/s390/cio/schid.h')
-rw-r--r--drivers/s390/cio/schid.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/s390/cio/schid.h b/drivers/s390/cio/schid.h
new file mode 100644
index 000000000000..220d97882341
--- /dev/null
+++ b/drivers/s390/cio/schid.h
@@ -0,0 +1,25 @@
1#ifndef S390_SCHID_H
2#define S390_SCHID_H
3
4struct subchannel_id {
5 __u32 reserved:15;
6 __u32 one:1;
7 __u32 sch_no:16;
8} __attribute__ ((packed,aligned(4)));
9
10
11/* Helper function for sane state of pre-allocated subchannel_id. */
12static inline void
13init_subchannel_id(struct subchannel_id *schid)
14{
15 memset(schid, 0, sizeof(struct subchannel_id));
16 schid->one = 1;
17}
18
19static inline int
20schid_equal(struct subchannel_id *schid1, struct subchannel_id *schid2)
21{
22 return !memcmp(schid1, schid2, sizeof(struct subchannel_id));
23}
24
25#endif /* S390_SCHID_H */