mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-30 07:06:45 +07:00
9d92a7e1b0
This patch adds a driver for subchannels of type chsc. A device /dev/chsc is created which may be used to issue ioctls to: - obtain information about the machine's I/O configuration - dynamically change the machine's I/O configuration via asynchronous chsc commands Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
29 lines
593 B
C
29 lines
593 B
C
#ifndef ASM_SCHID_H
|
|
#define ASM_SCHID_H
|
|
|
|
struct subchannel_id {
|
|
__u32 cssid : 8;
|
|
__u32 : 4;
|
|
__u32 m : 1;
|
|
__u32 ssid : 2;
|
|
__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 /* ASM_SCHID_H */
|