Cornelia Huck | a8237fc | 2006-01-06 00:19:21 -0800 | [diff] [blame] | 1 | #ifndef S390_SCHID_H |
| 2 | #define S390_SCHID_H |
| 3 | |
| 4 | struct subchannel_id { |
Cornelia Huck | fb6958a | 2006-01-06 00:19:25 -0800 | [diff] [blame] | 5 | __u32 reserved:13; |
| 6 | __u32 ssid:2; |
Cornelia Huck | a8237fc | 2006-01-06 00:19:21 -0800 | [diff] [blame] | 7 | __u32 one:1; |
| 8 | __u32 sch_no:16; |
| 9 | } __attribute__ ((packed,aligned(4))); |
| 10 | |
| 11 | |
| 12 | /* Helper function for sane state of pre-allocated subchannel_id. */ |
| 13 | static inline void |
| 14 | init_subchannel_id(struct subchannel_id *schid) |
| 15 | { |
| 16 | memset(schid, 0, sizeof(struct subchannel_id)); |
| 17 | schid->one = 1; |
| 18 | } |
| 19 | |
| 20 | static inline int |
| 21 | schid_equal(struct subchannel_id *schid1, struct subchannel_id *schid2) |
| 22 | { |
| 23 | return !memcmp(schid1, schid2, sizeof(struct subchannel_id)); |
| 24 | } |
| 25 | |
| 26 | #endif /* S390_SCHID_H */ |