2008-07-14 14:59:05 +07:00
|
|
|
#ifndef ASM_SCHID_H
|
|
|
|
#define ASM_SCHID_H
|
2006-01-06 15:19:21 +07:00
|
|
|
|
[S390] types: add/fix types.h include in header files
/include/asm/chpid.h:12: include of <linux/types.h> is preferred over <asm/types.h>
/include/asm/chsc.h:15: found __[us]{8,16,32,64} type without #include <linux/types.h>
/include/asm/cmb.h:28: found __[us]{8,16,32,64} type without #include <linux/types.h>
/include/asm/dasd.h:195: found __[us]{8,16,32,64} type without #include <linux/types.h>
/include/asm/kvm.h:16: include of <linux/types.h> is preferred over <asm/types.h>
/include/asm/kvm.h:30: found __[us]{8,16,32,64} type without #include <linux/types.h>
/include/asm/qeth.h:24: found __[us]{8,16,32,64} type without #include <linux/types.h>
/include/asm/schid.h:5: found __[us]{8,16,32,64} type without #include <linux/types.h>
/include/asm/swab.h:12: include of <linux/types.h> is preferred over <asm/types.h>
/include/asm/swab.h:19: found __[us]{8,16,32,64} type without #include <linux/types.h>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
2009-01-09 18:14:52 +07:00
|
|
|
#include <linux/types.h>
|
|
|
|
|
2006-01-06 15:19:21 +07:00
|
|
|
struct subchannel_id {
|
2008-07-14 14:59:05 +07:00
|
|
|
__u32 cssid : 8;
|
|
|
|
__u32 : 4;
|
|
|
|
__u32 m : 1;
|
|
|
|
__u32 ssid : 2;
|
|
|
|
__u32 one : 1;
|
|
|
|
__u32 sch_no : 16;
|
|
|
|
} __attribute__ ((packed, aligned(4)));
|
2006-01-06 15:19:21 +07:00
|
|
|
|
2008-07-17 22:16:42 +07:00
|
|
|
#ifdef __KERNEL__
|
2008-08-01 21:39:21 +07:00
|
|
|
#include <linux/string.h>
|
2006-01-06 15:19:21 +07:00
|
|
|
|
|
|
|
/* 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));
|
|
|
|
}
|
|
|
|
|
2008-07-17 22:16:42 +07:00
|
|
|
#endif /* __KERNEL__ */
|
|
|
|
|
2008-07-14 14:59:05 +07:00
|
|
|
#endif /* ASM_SCHID_H */
|