kernel-ark/drivers/s390/cio/schid.h
Cornelia Huck a8237fc410 [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>
2006-01-06 08:33:51 -08:00

26 lines
550 B
C

#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 */