mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-24 05:04:00 +08:00
staging: unisys: Fix channel.h Block comments
This patch fixes all the checkpatch.pl block commments that use a trailing */ in channel.h Signed-off-by: Erik Arfvidson <erik.arfvidson@unisys.com> Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
195b57875f
commit
180e2767eb
@ -60,15 +60,19 @@ enum channel_clientstate {
|
|||||||
CHANNELCLI_DISABLED = 1, /* client can see channel but is NOT
|
CHANNELCLI_DISABLED = 1, /* client can see channel but is NOT
|
||||||
* allowed to use it unless given TBD
|
* allowed to use it unless given TBD
|
||||||
* explicit request (should actually be
|
* explicit request (should actually be
|
||||||
* < DETACHED) */
|
* < DETACHED)
|
||||||
|
*/
|
||||||
CHANNELCLI_ATTACHING = 2, /* legacy EFI client request
|
CHANNELCLI_ATTACHING = 2, /* legacy EFI client request
|
||||||
* for EFI server to attach */
|
* for EFI server to attach
|
||||||
|
*/
|
||||||
CHANNELCLI_ATTACHED = 3, /* idle, but client may want
|
CHANNELCLI_ATTACHED = 3, /* idle, but client may want
|
||||||
* to use channel any time */
|
* to use channel any time
|
||||||
|
*/
|
||||||
CHANNELCLI_BUSY = 4, /* client either wants to use or is
|
CHANNELCLI_BUSY = 4, /* client either wants to use or is
|
||||||
* using channel */
|
* using channel
|
||||||
CHANNELCLI_OWNED = 5 /* "no worries" state - client can
|
*/
|
||||||
* access channel anytime */
|
CHANNELCLI_OWNED = 5 /* "no worries" state - client can */
|
||||||
|
/* access channel anytime */
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline const u8 *
|
static inline const u8 *
|
||||||
@ -116,11 +120,13 @@ ULTRA_CHANNELCLI_STRING(u32 v)
|
|||||||
|
|
||||||
/* Values for ULTRA_CHANNEL_PROTOCOL.CliErrorBoot: */
|
/* Values for ULTRA_CHANNEL_PROTOCOL.CliErrorBoot: */
|
||||||
/* throttling invalid boot channel statetransition error due to client
|
/* throttling invalid boot channel statetransition error due to client
|
||||||
* disabled */
|
* disabled
|
||||||
|
*/
|
||||||
#define ULTRA_CLIERRORBOOT_THROTTLEMSG_DISABLED 0x01
|
#define ULTRA_CLIERRORBOOT_THROTTLEMSG_DISABLED 0x01
|
||||||
|
|
||||||
/* throttling invalid boot channel statetransition error due to client
|
/* throttling invalid boot channel statetransition error due to client
|
||||||
* not attached */
|
* not attached
|
||||||
|
*/
|
||||||
#define ULTRA_CLIERRORBOOT_THROTTLEMSG_NOTATTACHED 0x02
|
#define ULTRA_CLIERRORBOOT_THROTTLEMSG_NOTATTACHED 0x02
|
||||||
|
|
||||||
/* throttling invalid boot channel statetransition error due to busy channel */
|
/* throttling invalid boot channel statetransition error due to busy channel */
|
||||||
@ -128,15 +134,18 @@ ULTRA_CHANNELCLI_STRING(u32 v)
|
|||||||
|
|
||||||
/* Values for ULTRA_CHANNEL_PROTOCOL.CliErrorOS: */
|
/* Values for ULTRA_CHANNEL_PROTOCOL.CliErrorOS: */
|
||||||
/* throttling invalid guest OS channel statetransition error due to
|
/* throttling invalid guest OS channel statetransition error due to
|
||||||
* client disabled */
|
* client disabled
|
||||||
|
*/
|
||||||
#define ULTRA_CLIERROROS_THROTTLEMSG_DISABLED 0x01
|
#define ULTRA_CLIERROROS_THROTTLEMSG_DISABLED 0x01
|
||||||
|
|
||||||
/* throttling invalid guest OS channel statetransition error due to
|
/* throttling invalid guest OS channel statetransition error due to
|
||||||
* client not attached */
|
* client not attached
|
||||||
|
*/
|
||||||
#define ULTRA_CLIERROROS_THROTTLEMSG_NOTATTACHED 0x02
|
#define ULTRA_CLIERROROS_THROTTLEMSG_NOTATTACHED 0x02
|
||||||
|
|
||||||
/* throttling invalid guest OS channel statetransition error due to
|
/* throttling invalid guest OS channel statetransition error due to
|
||||||
* busy channel */
|
* busy channel
|
||||||
|
*/
|
||||||
#define ULTRA_CLIERROROS_THROTTLEMSG_BUSY 0x04
|
#define ULTRA_CLIERROROS_THROTTLEMSG_BUSY 0x04
|
||||||
|
|
||||||
/* Values for ULTRA_CHANNEL_PROTOCOL.Features: This define exists so
|
/* Values for ULTRA_CHANNEL_PROTOCOL.Features: This define exists so
|
||||||
@ -145,7 +154,8 @@ ULTRA_CHANNELCLI_STRING(u32 v)
|
|||||||
* this setting. This flag is set in uislib after the
|
* this setting. This flag is set in uislib after the
|
||||||
* ULTRA_VHBA_init_channel is called. All feature bits for all
|
* ULTRA_VHBA_init_channel is called. All feature bits for all
|
||||||
* channels should be defined here. The io channel feature bits are
|
* channels should be defined here. The io channel feature bits are
|
||||||
* defined right here */
|
* defined right here
|
||||||
|
*/
|
||||||
#define ULTRA_IO_DRIVER_ENABLES_INTS (0x1ULL << 1)
|
#define ULTRA_IO_DRIVER_ENABLES_INTS (0x1ULL << 1)
|
||||||
#define ULTRA_IO_CHANNEL_IS_POLLING (0x1ULL << 3)
|
#define ULTRA_IO_CHANNEL_IS_POLLING (0x1ULL << 3)
|
||||||
#define ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS (0x1ULL << 4)
|
#define ULTRA_IO_IOVM_IS_OK_WITH_DRIVER_DISABLING_INTS (0x1ULL << 4)
|
||||||
@ -156,7 +166,7 @@ ULTRA_CHANNELCLI_STRING(u32 v)
|
|||||||
struct channel_header {
|
struct channel_header {
|
||||||
u64 signature; /* Signature */
|
u64 signature; /* Signature */
|
||||||
u32 legacy_state; /* DEPRECATED - being replaced by */
|
u32 legacy_state; /* DEPRECATED - being replaced by */
|
||||||
/* / SrvState, CliStateBoot, and CliStateOS below */
|
/* SrvState, CliStateBoot, and CliStateOS below */
|
||||||
u32 header_size; /* sizeof(struct channel_header) */
|
u32 header_size; /* sizeof(struct channel_header) */
|
||||||
u64 size; /* Total size of this channel in bytes */
|
u64 size; /* Total size of this channel in bytes */
|
||||||
u64 features; /* Flags to modify behavior */
|
u64 features; /* Flags to modify behavior */
|
||||||
@ -169,25 +179,32 @@ struct channel_header {
|
|||||||
uuid_le zone_uuid; /* Guid of Channel's zone */
|
uuid_le zone_uuid; /* Guid of Channel's zone */
|
||||||
u32 cli_str_offset; /* offset from channel header to
|
u32 cli_str_offset; /* offset from channel header to
|
||||||
* nul-terminated ClientString (0 if
|
* nul-terminated ClientString (0 if
|
||||||
* ClientString not present) */
|
* ClientString not present)
|
||||||
|
*/
|
||||||
u32 cli_state_boot; /* CHANNEL_CLIENTSTATE of pre-boot
|
u32 cli_state_boot; /* CHANNEL_CLIENTSTATE of pre-boot
|
||||||
* EFI client of this channel */
|
* EFI client of this channel
|
||||||
|
*/
|
||||||
u32 cmd_state_cli; /* CHANNEL_COMMANDSTATE (overloaded in
|
u32 cmd_state_cli; /* CHANNEL_COMMANDSTATE (overloaded in
|
||||||
* Windows drivers, see ServerStateUp,
|
* Windows drivers, see ServerStateUp,
|
||||||
* ServerStateDown, etc) */
|
* ServerStateDown, etc)
|
||||||
|
*/
|
||||||
u32 cli_state_os; /* CHANNEL_CLIENTSTATE of Guest OS
|
u32 cli_state_os; /* CHANNEL_CLIENTSTATE of Guest OS
|
||||||
* client of this channel */
|
* client of this channel
|
||||||
|
*/
|
||||||
u32 ch_characteristic; /* CHANNEL_CHARACTERISTIC_<xxx> */
|
u32 ch_characteristic; /* CHANNEL_CHARACTERISTIC_<xxx> */
|
||||||
u32 cmd_state_srv; /* CHANNEL_COMMANDSTATE (overloaded in
|
u32 cmd_state_srv; /* CHANNEL_COMMANDSTATE (overloaded in
|
||||||
* Windows drivers, see ServerStateUp,
|
* Windows drivers, see ServerStateUp,
|
||||||
* ServerStateDown, etc) */
|
* ServerStateDown, etc)
|
||||||
|
*/
|
||||||
u32 srv_state; /* CHANNEL_SERVERSTATE */
|
u32 srv_state; /* CHANNEL_SERVERSTATE */
|
||||||
u8 cli_error_boot; /* bits to indicate err states for
|
u8 cli_error_boot; /* bits to indicate err states for
|
||||||
* boot clients, so err messages can
|
* boot clients, so err messages can
|
||||||
* be throttled */
|
* be throttled
|
||||||
|
*/
|
||||||
u8 cli_error_os; /* bits to indicate err states for OS
|
u8 cli_error_os; /* bits to indicate err states for OS
|
||||||
* clients, so err messages can be
|
* clients, so err messages can be
|
||||||
* throttled */
|
* throttled
|
||||||
|
*/
|
||||||
u8 filler[1]; /* Pad out to 128 byte cacheline */
|
u8 filler[1]; /* Pad out to 128 byte cacheline */
|
||||||
/* Please add all new single-byte values below here */
|
/* Please add all new single-byte values below here */
|
||||||
u8 recover_channel;
|
u8 recover_channel;
|
||||||
@ -205,29 +222,33 @@ struct signal_queue_header {
|
|||||||
u64 features; /* Flags to modify behavior */
|
u64 features; /* Flags to modify behavior */
|
||||||
u64 num_sent; /* Total # of signals placed in this queue */
|
u64 num_sent; /* Total # of signals placed in this queue */
|
||||||
u64 num_overflows; /* Total # of inserts failed due to
|
u64 num_overflows; /* Total # of inserts failed due to
|
||||||
* full queue */
|
* full queue
|
||||||
|
*/
|
||||||
u32 signal_size; /* Total size of a signal for this queue */
|
u32 signal_size; /* Total size of a signal for this queue */
|
||||||
u32 max_slots; /* Max # of slots in queue, 1 slot is
|
u32 max_slots; /* Max # of slots in queue, 1 slot is
|
||||||
* always empty */
|
* always empty
|
||||||
|
*/
|
||||||
u32 max_signals; /* Max # of signals in queue
|
u32 max_signals; /* Max # of signals in queue
|
||||||
* (MaxSignalSlots-1) */
|
* (MaxSignalSlots-1)
|
||||||
|
*/
|
||||||
u32 head; /* Queue head signal # */
|
u32 head; /* Queue head signal # */
|
||||||
/* 2nd cache line */
|
/* 2nd cache line */
|
||||||
u64 num_received; /* Total # of signals removed from this queue */
|
u64 num_received; /* Total # of signals removed from this queue */
|
||||||
u32 tail; /* Queue tail signal # (on separate
|
u32 tail; /* Queue tail signal */
|
||||||
* cache line) */
|
|
||||||
u32 reserved1; /* Reserved field */
|
u32 reserved1; /* Reserved field */
|
||||||
u64 reserved2; /* Reserved field */
|
u64 reserved2; /* Reserved field */
|
||||||
u64 client_queue;
|
u64 client_queue;
|
||||||
u64 num_irq_received; /* Total # of Interrupts received. This
|
u64 num_irq_received; /* Total # of Interrupts received. This
|
||||||
* is incremented by the ISR in the
|
* is incremented by the ISR in the
|
||||||
* guest windows driver */
|
* guest windows driver
|
||||||
|
*/
|
||||||
u64 num_empty; /* Number of times that visor_signal_remove
|
u64 num_empty; /* Number of times that visor_signal_remove
|
||||||
* is called and returned Empty
|
* is called and returned Empty Status.
|
||||||
* Status. */
|
*/
|
||||||
u32 errorflags; /* Error bits set during SignalReinit
|
u32 errorflags; /* Error bits set during SignalReinit
|
||||||
* to denote trouble with client's
|
* to denote trouble with client's
|
||||||
* fields */
|
* fields
|
||||||
|
*/
|
||||||
u8 filler[12]; /* Pad out to 64 byte cacheline */
|
u8 filler[12]; /* Pad out to 64 byte cacheline */
|
||||||
} __packed;
|
} __packed;
|
||||||
|
|
||||||
@ -272,8 +293,7 @@ spar_check_channel_client(void __iomem *ch,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (expected_min_bytes > 0) { /* caller wants us to verify
|
if (expected_min_bytes > 0) { /* verify channel size */
|
||||||
* channel size */
|
|
||||||
unsigned long long bytes =
|
unsigned long long bytes =
|
||||||
readq(&((struct channel_header __iomem *)
|
readq(&((struct channel_header __iomem *)
|
||||||
(ch))->size);
|
(ch))->size);
|
||||||
@ -284,8 +304,7 @@ spar_check_channel_client(void __iomem *ch,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (expected_version > 0) { /* caller wants us to verify
|
if (expected_version > 0) { /* verify channel version */
|
||||||
* channel version */
|
|
||||||
unsigned long ver = readl(&((struct channel_header __iomem *)
|
unsigned long ver = readl(&((struct channel_header __iomem *)
|
||||||
(ch))->version_id);
|
(ch))->version_id);
|
||||||
if (ver != expected_version) {
|
if (ver != expected_version) {
|
||||||
@ -295,8 +314,7 @@ spar_check_channel_client(void __iomem *ch,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (expected_signature > 0) { /* caller wants us to verify
|
if (expected_signature > 0) { /* verify channel signature */
|
||||||
* channel signature */
|
|
||||||
unsigned long long sig =
|
unsigned long long sig =
|
||||||
readq(&((struct channel_header __iomem *)
|
readq(&((struct channel_header __iomem *)
|
||||||
(ch))->signature);
|
(ch))->signature);
|
||||||
@ -319,8 +337,7 @@ static inline int spar_check_channel_server(uuid_le typeuuid, char *name,
|
|||||||
u64 expected_min_bytes,
|
u64 expected_min_bytes,
|
||||||
u64 actual_bytes)
|
u64 actual_bytes)
|
||||||
{
|
{
|
||||||
if (expected_min_bytes > 0) /* caller wants us to verify
|
if (expected_min_bytes > 0) /* verify channel size */
|
||||||
* channel size */
|
|
||||||
if (actual_bytes < expected_min_bytes) {
|
if (actual_bytes < expected_min_bytes) {
|
||||||
pr_err("Channel mismatch on channel=%s(%pUL) field=size expected=0x%-8.8llx actual=0x%-8.8llx\n",
|
pr_err("Channel mismatch on channel=%s(%pUL) field=size expected=0x%-8.8llx actual=0x%-8.8llx\n",
|
||||||
name, &typeuuid, expected_min_bytes,
|
name, &typeuuid, expected_min_bytes,
|
||||||
@ -354,7 +371,8 @@ pathname_last_n_nodes(u8 *s, unsigned int n)
|
|||||||
if (p == s)
|
if (p == s)
|
||||||
break; /* should never happen, unless someone
|
break; /* should never happen, unless someone
|
||||||
* is changing the string while we are
|
* is changing the string while we are
|
||||||
* looking at it!! */
|
* looking at it!!
|
||||||
|
*/
|
||||||
if ((*p == '/') || (*p == '\\'))
|
if ((*p == '/') || (*p == '\\'))
|
||||||
n--;
|
n--;
|
||||||
}
|
}
|
||||||
@ -395,7 +413,8 @@ spar_channel_client_acquire_os(void __iomem *ch, u8 *id)
|
|||||||
if (readl(&hdr->cli_state_os) == CHANNELCLI_OWNED) {
|
if (readl(&hdr->cli_state_os) == CHANNELCLI_OWNED) {
|
||||||
if (readb(&hdr->cli_error_os) != 0) {
|
if (readb(&hdr->cli_error_os) != 0) {
|
||||||
/* we are in an error msg throttling state;
|
/* we are in an error msg throttling state;
|
||||||
* come out of it */
|
* come out of it
|
||||||
|
*/
|
||||||
pr_info("%s Channel OS client acquire now successful\n",
|
pr_info("%s Channel OS client acquire now successful\n",
|
||||||
id);
|
id);
|
||||||
writeb(0, &hdr->cli_error_os);
|
writeb(0, &hdr->cli_error_os);
|
||||||
@ -405,7 +424,8 @@ spar_channel_client_acquire_os(void __iomem *ch, u8 *id)
|
|||||||
|
|
||||||
/* We have to do it the "hard way". We transition to BUSY,
|
/* We have to do it the "hard way". We transition to BUSY,
|
||||||
* and can use the channel iff our competitor has not also
|
* and can use the channel iff our competitor has not also
|
||||||
* transitioned to BUSY. */
|
* transitioned to BUSY.
|
||||||
|
*/
|
||||||
if (readl(&hdr->cli_state_os) != CHANNELCLI_ATTACHED) {
|
if (readl(&hdr->cli_state_os) != CHANNELCLI_ATTACHED) {
|
||||||
if ((readb(&hdr->cli_error_os)
|
if ((readb(&hdr->cli_error_os)
|
||||||
& ULTRA_CLIERROROS_THROTTLEMSG_NOTATTACHED) == 0) {
|
& ULTRA_CLIERROROS_THROTTLEMSG_NOTATTACHED) == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user