diff options
author | Cornelia Huck <cohuck@de.ibm.com> | 2006-01-06 00:19:21 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-06 08:33:51 -0800 |
commit | a8237fc4108060402d904bea5e1062e22e731969 (patch) | |
tree | fc19e33ea8bbe664c33fba6c78b34e497f2cc478 /drivers/s390/cio/schid.h | |
parent | 8129ee164267dc030b8e1d541ee3643c0b9f2fa1 (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.h | 25 |
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 @@ +#ifndef S390_SCHID_H +#define S390_SCHID_H + +struct subchannel_id { + __u32 reserved:15; + __u32 one:1; + __u32 sch_no:16; +} __attribute__ ((packed,aligned(4))); + + +/* Helper function for sane state of pre-allocated subchannel_id. */ +static inline void +init_subchannel_id(struct subchannel_id *schid) +{ + memset(schid, 0, sizeof(struct subchannel_id)); + schid->one = 1; +} + +static inline int +schid_equal(struct subchannel_id *schid1, struct subchannel_id *schid2) +{ + return !memcmp(schid1, schid2, sizeof(struct subchannel_id)); +} + +#endif /* S390_SCHID_H */ |