* 1 if the insertion succeeds, 0 if the queue was full.
*/
unsigned char
-visor_signal_insert(CHANNEL_HEADER __iomem *pChannel, U32 Queue, void *pSignal)
+visor_signal_insert(CHANNEL_HEADER __iomem *pChannel, u32 Queue, void *pSignal)
{
void __iomem *psignal;
unsigned int head, tail, nof;
* 1 if the removal succeeds, 0 if the queue was empty.
*/
unsigned char
-visor_signal_remove(CHANNEL_HEADER __iomem *pChannel, U32 Queue, void *pSignal)
+visor_signal_remove(CHANNEL_HEADER __iomem *pChannel, u32 Queue, void *pSignal)
{
void __iomem *psource;
unsigned int head, tail;
* # of signals copied.
*/
unsigned int
-SignalRemoveAll(pCHANNEL_HEADER pChannel, U32 Queue, void *pSignal)
+SignalRemoveAll(pCHANNEL_HEADER pChannel, u32 Queue, void *pSignal)
{
void *psource;
unsigned int head, tail, signalCount = 0;
* 1 if the signal queue is empty, 0 otherwise.
*/
unsigned char
-visor_signalqueue_empty(CHANNEL_HEADER __iomem *pChannel, U32 Queue)
+visor_signalqueue_empty(CHANNEL_HEADER __iomem *pChannel, u32 Queue)
{
SIGNAL_QUEUE_HEADER __iomem *pqhdr =
(SIGNAL_QUEUE_HEADER __iomem *) ((char __iomem *) pChannel +
}
unsigned char
-SignalInsert_withLock(CHANNEL_HEADER __iomem *pChannel, U32 Queue,
+SignalInsert_withLock(CHANNEL_HEADER __iomem *pChannel, u32 Queue,
void *pSignal, spinlock_t *lock)
{
unsigned char result;
}
unsigned char
-SignalRemove_withLock(CHANNEL_HEADER __iomem *pChannel, U32 Queue,
+SignalRemove_withLock(CHANNEL_HEADER __iomem *pChannel, u32 Queue,
void *pSignal, spinlock_t *lock)
{
unsigned char result;
#ifndef __CHANSTUB_H__
#define __CHANSTUB_H__
-unsigned char SignalInsert_withLock(CHANNEL_HEADER __iomem *pChannel, U32 Queue,
+unsigned char SignalInsert_withLock(CHANNEL_HEADER __iomem *pChannel, u32 Queue,
void *pSignal, spinlock_t *lock);
-unsigned char SignalRemove_withLock(CHANNEL_HEADER __iomem *pChannel, U32 Queue,
+unsigned char SignalRemove_withLock(CHANNEL_HEADER __iomem *pChannel, u32 Queue,
void *pSignal, spinlock_t *lock);
#endif
* access channel anytime */
} CHANNEL_CLIENTSTATE;
static inline const u8 *
-ULTRA_CHANNELCLI_STRING(U32 v)
+ULTRA_CHANNELCLI_STRING(u32 v)
{
switch (v) {
case CHANNELCLI_DETACHED:
/* Common Channel Header */
typedef struct _CHANNEL_HEADER {
U64 Signature; /* Signature */
- U32 LegacyState; /* DEPRECATED - being replaced by */
+ u32 LegacyState; /* DEPRECATED - being replaced by */
/* / SrvState, CliStateBoot, and CliStateOS below */
- U32 HeaderSize; /* sizeof(CHANNEL_HEADER) */
+ u32 HeaderSize; /* sizeof(CHANNEL_HEADER) */
U64 Size; /* Total size of this channel in bytes */
U64 Features; /* Flags to modify behavior */
uuid_le Type; /* Channel type: data, bus, control, etc. */
U64 PartitionHandle; /* ID of guest partition */
U64 Handle; /* Device number of this channel in client */
U64 oChannelSpace; /* Offset in bytes to channel specific area */
- U32 VersionId; /* CHANNEL_HEADER Version ID */
- U32 PartitionIndex; /* Index of guest partition */
+ u32 VersionId; /* CHANNEL_HEADER Version ID */
+ u32 PartitionIndex; /* Index of guest partition */
uuid_le ZoneGuid; /* Guid of Channel's zone */
- U32 oClientString; /* offset from channel header to
+ u32 oClientString; /* offset from channel header to
* nul-terminated ClientString (0 if
* ClientString not present) */
- U32 CliStateBoot; /* CHANNEL_CLIENTSTATE of pre-boot
+ u32 CliStateBoot; /* CHANNEL_CLIENTSTATE of pre-boot
* EFI client of this channel */
- U32 CmdStateCli; /* CHANNEL_COMMANDSTATE (overloaded in
+ u32 CmdStateCli; /* CHANNEL_COMMANDSTATE (overloaded in
* Windows drivers, see ServerStateUp,
* ServerStateDown, etc) */
- U32 CliStateOS; /* CHANNEL_CLIENTSTATE of Guest OS
+ u32 CliStateOS; /* CHANNEL_CLIENTSTATE of Guest OS
* client of this channel */
- U32 ChannelCharacteristics; /* CHANNEL_CHARACTERISTIC_<xxx> */
- U32 CmdStateSrv; /* CHANNEL_COMMANDSTATE (overloaded in
+ u32 ChannelCharacteristics; /* CHANNEL_CHARACTERISTIC_<xxx> */
+ u32 CmdStateSrv; /* CHANNEL_COMMANDSTATE (overloaded in
* Windows drivers, see ServerStateUp,
* ServerStateDown, etc) */
- U32 SrvState; /* CHANNEL_SERVERSTATE */
+ u32 SrvState; /* CHANNEL_SERVERSTATE */
u8 CliErrorBoot; /* bits to indicate err states for
* boot clients, so err messages can
* be throttled */
/* Subheader for the Signal Type variation of the Common Channel */
typedef struct _SIGNAL_QUEUE_HEADER {
/* 1st cache line */
- U32 VersionId; /* SIGNAL_QUEUE_HEADER Version ID */
- U32 Type; /* Queue type: storage, network */
+ u32 VersionId; /* SIGNAL_QUEUE_HEADER Version ID */
+ u32 Type; /* Queue type: storage, network */
U64 Size; /* Total size of this queue in bytes */
U64 oSignalBase; /* Offset to signal queue area */
U64 FeatureFlags; /* Flags to modify behavior */
U64 NumSignalsSent; /* Total # of signals placed in this queue */
U64 NumOverflows; /* Total # of inserts failed due to
* full queue */
- U32 SignalSize; /* Total size of a signal for this queue */
- U32 MaxSignalSlots; /* Max # of slots in queue, 1 slot is
+ u32 SignalSize; /* Total size of a signal for this queue */
+ u32 MaxSignalSlots; /* Max # of slots in queue, 1 slot is
* always empty */
- U32 MaxSignals; /* Max # of signals in queue
+ u32 MaxSignals; /* Max # of signals in queue
* (MaxSignalSlots-1) */
- U32 Head; /* Queue head signal # */
+ u32 Head; /* Queue head signal # */
/* 2nd cache line */
U64 NumSignalsReceived; /* Total # of signals removed from this queue */
- U32 Tail; /* Queue tail signal # (on separate
+ u32 Tail; /* Queue tail signal # (on separate
* cache line) */
- U32 Reserved1; /* Reserved field */
+ u32 Reserved1; /* Reserved field */
U64 Reserved2; /* Resrved field */
U64 ClientQueue;
U64 NumInterruptsReceived; /* Total # of Interrupts received. This
U64 NumEmptyCnt; /* Number of times that visor_signal_remove
* is called and returned Empty
* Status. */
- U32 ErrorFlags; /* Error bits set during SignalReinit
+ u32 ErrorFlags; /* Error bits set during SignalReinit
* to denote trouble with client's
* fields */
u8 Filler[12]; /* Pad out to 64 byte cacheline */
uuid_le expectedTypeGuid,
char *channelName,
U64 expectedMinBytes,
- U32 expectedVersionId,
+ u32 expectedVersionId,
U64 expectedSignature,
char *fileName, int lineNumber, void *logCtx)
{
* full.
*/
-unsigned char visor_signal_insert(CHANNEL_HEADER __iomem *pChannel, U32 Queue,
+unsigned char visor_signal_insert(CHANNEL_HEADER __iomem *pChannel, u32 Queue,
void *pSignal);
/*
* empty.
*/
-unsigned char visor_signal_remove(CHANNEL_HEADER __iomem *pChannel, U32 Queue,
+unsigned char visor_signal_remove(CHANNEL_HEADER __iomem *pChannel, u32 Queue,
void *pSignal);
/*
* Return value:
* # of signals copied.
*/
-unsigned int SignalRemoveAll(pCHANNEL_HEADER pChannel, U32 Queue,
+unsigned int SignalRemoveAll(pCHANNEL_HEADER pChannel, u32 Queue,
void *pSignal);
/*
* 1 if the signal queue is empty, 0 otherwise.
*/
unsigned char visor_signalqueue_empty(CHANNEL_HEADER __iomem *pChannel,
- U32 Queue);
+ u32 Queue);
#endif
* increment thereafter */
u8 Minor;
u16 Maintenance;
- U32 Revision; /* Subversion revision */
+ u32 Revision; /* Subversion revision */
} Part;
} ULTRA_COMPONENT_VERSION;
/**< specifies interrupt vector. It, interrupt pin, and shared are
* used to connect to the corresponding interrupt. Used by
* IOPart-GP only. */
- U32 recvInterruptVector;
+ u32 recvInterruptVector;
/**< specifies if the recvInterrupt is shared. It, interrupt pin
* and vector are used to connect to 0 = not shared; 1 = shared.
u16 SubSysVendor;
u16 DeviceId;
u16 SubSysDevice;
- U32 ClassCode;
- U32 Reserved; /* Natural alignment purposes */
+ u32 ClassCode;
+ u32 Reserved; /* Natural alignment purposes */
};
struct ScsiId {
- U32 Bus;
- U32 Target;
- U32 Lun;
- U32 Host; /* Command should ignore this for *
+ u32 Bus;
+ u32 Target;
+ u32 Lun;
+ u32 Host; /* Command should ignore this for *
* DiskArrival/RemovalEvents */
};
struct WWID {
- U32 wwid1;
- U32 wwid2;
+ u32 wwid1;
+ u32 wwid2;
};
struct virtDiskInfo {
- U32 switchNo; /* defined by SWITCH_CREATE */
- U32 externalPortNo; /* 0 for SAS RAID provided (external)
+ u32 switchNo; /* defined by SWITCH_CREATE */
+ u32 externalPortNo; /* 0 for SAS RAID provided (external)
* virtual disks, 1 for virtual disk
* images, 2 for gold disk images */
u16 VirtualDiskIndex; /* Index of disk descriptor in the
* VirtualDisk segment associated with
* externalPortNo */
u16 Reserved1;
- U32 Reserved2;
+ u32 Reserved2;
};
typedef enum {
* looking at the flags.response field.
*/
typedef struct _CONTROLVM_MESSAGE_HEADER {
- U32 Id; /* See CONTROLVM_ID. */
+ u32 Id; /* See CONTROLVM_ID. */
/* For requests, indicates the message type. */
/* For responses, indicates the type of message we are responding to. */
- U32 MessageSize; /* Includes size of this struct + size
+ u32 MessageSize; /* Includes size of this struct + size
* of message */
- U32 SegmentIndex; /* Index of segment containing Vm
+ u32 SegmentIndex; /* Index of segment containing Vm
* message/information */
- U32 CompletionStatus; /* Error status code or result of
+ u32 CompletionStatus; /* Error status code or result of
* message completion */
struct {
- U32 failed:1; /**< =1 in a response to * signify
+ u32 failed:1; /**< =1 in a response to * signify
* failure */
- U32 responseExpected:1; /**< =1 in all messages that expect a
+ u32 responseExpected:1; /**< =1 in all messages that expect a
* response (Control ignores this
* bit) */
- U32 server:1; /**< =1 in all bus & device-related
+ u32 server:1; /**< =1 in all bus & device-related
* messages where the message
* receiver is to act as the bus or
* device server */
- U32 testMessage:1; /**< =1 for testing use only
+ u32 testMessage:1; /**< =1 for testing use only
* (Control and Command ignore this
* bit) */
- U32 partialCompletion:1; /**< =1 if there are forthcoming
+ u32 partialCompletion:1; /**< =1 if there are forthcoming
* responses/acks associated
* with this message */
- U32 preserve:1; /**< =1 this is to let us know to
+ u32 preserve:1; /**< =1 this is to let us know to
* preserve channel contents
* (for running guests)*/
- U32 writerInDiag:1; /**< =1 the DiagWriter is active in the
+ u32 writerInDiag:1; /**< =1 the DiagWriter is active in the
* Diagnostic Partition*/
/* remaining bits in this 32-bit word are available */
} Flags;
- U32 Reserved; /* Natural alignment */
+ u32 Reserved; /* Natural alignment */
U64 MessageHandle; /* Identifies the particular message instance,
* and is used to match particular */
/* request instances with the corresponding response instance. */
U64 PayloadVmOffset; /* Offset of payload area from start of this
* instance of ControlVm segment */
- U32 PayloadMaxBytes; /* Maximum bytes allocated in payload
+ u32 PayloadMaxBytes; /* Maximum bytes allocated in payload
* area of ControlVm segment */
- U32 PayloadBytes; /* Actual number of bytes of payload
+ u32 PayloadBytes; /* Actual number of bytes of payload
* area to copy between IO/Command; */
/* if non-zero, there is a payload to copy. */
} CONTROLVM_MESSAGE_HEADER;
typedef struct _CONTROLVM_PACKET_DEVICE_CREATE {
- U32 busNo; /**< bus # (0..n-1) from the msg receiver's
+ u32 busNo; /**< bus # (0..n-1) from the msg receiver's
* perspective */
/* Control uses header SegmentIndex field to access bus number... */
- U32 devNo; /**< bus-relative (0..n-1) device number */
+ u32 devNo; /**< bus-relative (0..n-1) device number */
U64 channelAddr; /**< Guest physical address of the channel, which
* can be dereferenced by the receiver
* of this ControlVm command */
} CONTROLVM_PACKET_DEVICE_CREATE; /* for CONTROLVM_DEVICE_CREATE */
typedef struct _CONTROLVM_PACKET_DEVICE_CONFIGURE {
- U32 busNo; /**< bus # (0..n-1) from the msg
+ u32 busNo; /**< bus # (0..n-1) from the msg
* receiver's perspective */
/* Control uses header SegmentIndex field to access bus number... */
- U32 devNo; /**< bus-relative (0..n-1) device number */
+ u32 devNo; /**< bus-relative (0..n-1) device number */
} CONTROLVM_PACKET_DEVICE_CONFIGURE; /* for CONTROLVM_DEVICE_CONFIGURE */
typedef struct _CONTROLVM_MESSAGE_DEVICE_CREATE {
/* BEGIN Request messages */
struct {
- U32 busNo; /*< bus # (0..n-1) from the msg
+ u32 busNo; /*< bus # (0..n-1) from the msg
* receiver's perspective */
/* Control uses header SegmentIndex field to access bus number... */
- U32 deviceCount; /*< indicates the max number of
+ u32 deviceCount; /*< indicates the max number of
* devices on this bus */
U64 channelAddr; /*< Guest physical address of the
* channel, which can be
uuid_le busInstGuid; /*< instance guid for the bus */
} createBus; /* for CONTROLVM_BUS_CREATE */
struct {
- U32 busNo; /*< bus # (0..n-1) from the msg
+ u32 busNo; /*< bus # (0..n-1) from the msg
* receiver's perspective */
/* Control uses header SegmentIndex field to access bus number... */
- U32 reserved; /* Natural alignment purposes */
+ u32 reserved; /* Natural alignment purposes */
} destroyBus; /* for CONTROLVM_BUS_DESTROY */
struct {
- U32 busNo; /*< bus # (0..n-1) from the
+ u32 busNo; /*< bus # (0..n-1) from the
* msg receiver's
* perspective */
/* Control uses header SegmentIndex field to access bus number... */
- U32 reserved1; /* for alignment purposes */
+ u32 reserved1; /* for alignment purposes */
U64 guestHandle; /* This is used to convert
* guest physical address to real
* physical address for DMA, for ex. */
/* for CONTROLVM_DEVICE_CREATE */
CONTROLVM_PACKET_DEVICE_CREATE createDevice;
struct {
- U32 busNo; /*< bus # (0..n-1) from the msg
+ u32 busNo; /*< bus # (0..n-1) from the msg
* receiver's perspective */
/* Control uses header SegmentIndex field to access bus number... */
- U32 devNo; /*< bus-relative (0..n-1) device
+ u32 devNo; /*< bus-relative (0..n-1) device
* number */
} destroyDevice; /* for CONTROLVM_DEVICE_DESTROY */
/* for CONTROLVM_DEVICE_CONFIGURE */
CONTROLVM_PACKET_DEVICE_CONFIGURE configureDevice;
struct {
- U32 busNo; /*< bus # (0..n-1) from the msg
+ u32 busNo; /*< bus # (0..n-1) from the msg
* receiver's perspective */
/* Control uses header SegmentIndex field to access bus number... */
- U32 devNo; /*< bus-relative (0..n-1) device
+ u32 devNo; /*< bus-relative (0..n-1) device
* number */
} reconfigureDevice; /* for CONTROLVM_DEVICE_RECONFIGURE */
struct {
- U32 busNo;
+ u32 busNo;
ULTRA_SEGMENT_STATE state;
u8 reserved[2]; /* Natural alignment purposes */
} busChangeState; /* for CONTROLVM_BUS_CHANGESTATE */
struct {
- U32 busNo;
- U32 devNo;
+ u32 busNo;
+ u32 devNo;
ULTRA_SEGMENT_STATE state;
struct {
- U32 physicalDevice:1; /* =1 if message is for
+ u32 physicalDevice:1; /* =1 if message is for
* a physical device */
/* remaining bits in this 32-bit word are available */
} flags;
u8 reserved[2]; /* Natural alignment purposes */
} deviceChangeState; /* for CONTROLVM_DEVICE_CHANGESTATE */
struct {
- U32 busNo;
- U32 devNo;
+ u32 busNo;
+ u32 devNo;
ULTRA_SEGMENT_STATE state;
u8 reserved[6]; /* Natural alignment purposes */
} deviceChangeStateEvent; /* for CONTROLVM_DEVICE_CHANGESTATE_EVENT */
struct {
- U32 busCount; /*< indicates the max number of busses */
- U32 switchCount; /*< indicates the max number of
+ u32 busCount; /*< indicates the max number of busses */
+ u32 switchCount; /*< indicates the max number of
* switches (applicable for service
* partition only) */
ULTRA_CHIPSET_FEATURE features;
- U32 platformNumber; /* Platform Number */
+ u32 platformNumber; /* Platform Number */
} initChipset; /* for CONTROLVM_CHIPSET_INIT */
struct {
- U32 Options; /*< reserved */
- U32 Test; /*< bit 0 set to run embedded selftest */
+ u32 Options; /*< reserved */
+ u32 Test; /*< bit 0 set to run embedded selftest */
} chipsetSelftest; /* for CONTROLVM_CHIPSET_SELFTEST */
/* END Request messages */
typedef struct _DEVICE_MAP {
GUEST_PHYSICAL_ADDRESS DeviceChannelAddress;
U64 DeviceChannelSize;
- U32 CA_Index;
- U32 Reserved; /* natural alignment */
+ u32 CA_Index;
+ u32 Reserved; /* natural alignment */
U64 Reserved2; /* Align structure on 32-byte boundary */
} DEVICE_MAP;
DEVICE_MAP NetworkChannel;
DEVICE_MAP StorageChannel;
DEVICE_MAP ConsoleChannel;
- U32 PartitionIndex;
- U32 Pad;
+ u32 PartitionIndex;
+ u32 Pad;
} GUEST_DEVICES;
typedef struct _ULTRA_CONTROLVM_CHANNEL_PROTOCOL {
* channel */
U64 RequestPayloadOffset; /* Offset to request payload area */
U64 EventPayloadOffset; /* Offset to event payload area */
- U32 RequestPayloadBytes; /* Bytes available in request payload
+ u32 RequestPayloadBytes; /* Bytes available in request payload
* area */
- U32 EventPayloadBytes; /* Bytes available in event payload area */
- U32 ControlChannelBytes;
- U32 NvramChannelBytes; /* Bytes in PartitionNvram segment */
- U32 MessageBytes; /* sizeof(CONTROLVM_MESSAGE) */
- U32 MessageCount; /* CONTROLVM_MESSAGE_MAX */
+ u32 EventPayloadBytes; /* Bytes available in event payload area */
+ u32 ControlChannelBytes;
+ u32 NvramChannelBytes; /* Bytes in PartitionNvram segment */
+ u32 MessageBytes; /* sizeof(CONTROLVM_MESSAGE) */
+ u32 MessageCount; /* CONTROLVM_MESSAGE_MAX */
GUEST_PHYSICAL_ADDRESS gpSmbiosTable; /* guest phys addr of SMBIOS
* tables */
GUEST_PHYSICAL_ADDRESS gpPhysicalSmbiosTable; /* guest phys addr of
* is running in dump mode */
u16 NvramFailCount;
u16 SavedCrashMsgCount; /* = CONTROLVM_CRASHMSG_MAX */
- U32 SavedCrashMsgOffset; /* Offset to request payload area needed
+ u32 SavedCrashMsgOffset; /* Offset to request payload area needed
* for crash dump */
- U32 InstallationError; /* Type of error encountered during
+ u32 InstallationError; /* Type of error encountered during
* installation */
- U32 InstallationTextId; /* Id of string to display */
+ u32 InstallationTextId; /* Id of string to display */
u16 InstallationRemainingSteps; /* Number of remaining installation
* steps (for progress bars) */
u8 ToolAction; /* ULTRA_TOOL_ACTIONS Installation Action
u8 Reserved; /* alignment */
ULTRA_EFI_SPAR_INDICATION EfiSparIndication;
ULTRA_EFI_SPAR_INDICATION EfiSparIndicationSupported;
- U32 SPReserved;
+ u32 SPReserved;
u8 Reserved2[28]; /* Force signals to begin on 128-byte cache
* line */
SIGNAL_QUEUE_HEADER RequestQueue; /* Service or guest partition
* https://ustr-linux-1.na.uis.unisys.com/spar/index.php/ControlVm_Parameters_Area
*/
typedef struct _ULTRA_CONTROLVM_PARAMETERS_HEADER {
- U32 TotalLength;
- U32 HeaderLength;
- U32 ConnectionOffset;
- U32 ConnectionLength;
- U32 InitiatorOffset;
- U32 InitiatorLength;
- U32 TargetOffset;
- U32 TargetLength;
- U32 ClientOffset;
- U32 ClientLength;
- U32 NameOffset;
- U32 NameLength;
+ u32 TotalLength;
+ u32 HeaderLength;
+ u32 ConnectionOffset;
+ u32 ConnectionLength;
+ u32 InitiatorOffset;
+ u32 InitiatorLength;
+ u32 TargetOffset;
+ u32 TargetLength;
+ u32 ClientOffset;
+ u32 ClientLength;
+ u32 NameOffset;
+ u32 NameLength;
uuid_le Id;
- U32 Revision;
- U32 Reserved; /* Natural alignment */
+ u32 Revision;
+ u32 Reserved; /* Natural alignment */
} ULTRA_CONTROLVM_PARAMETERS_HEADER;
#endif /* __CONTROLVMCHANNEL_H__ */
u8 Minute; /* 0 - 59 */
u8 Second; /* 0 - 59 */
u8 Pad1;
- U32 Nanosecond; /* 0 - 999, 999, 999 */
+ u32 Nanosecond; /* 0 - 999, 999, 999 */
S16 TimeZone; /* -1440 to 1440 or 2047 */
u8 Daylight;
u8 Pad2;
* AdditionalInfo: Array of characters for additional event info (may be
* empty). */
typedef struct _DIAG_CHANNEL_EVENT {
- U32 EventId;
- U32 Severity;
+ u32 EventId;
+ u32 Severity;
u8 ModuleName[MAX_MODULE_NAME_SIZE];
- U32 LineNumber;
+ u32 LineNumber;
DIAG_EFI_TIME Timestamp; /* Size = 16 bytes */
- U32 PartitionNumber; /* Filled in by Diag Switch as pool blocks are
+ u32 PartitionNumber; /* Filled in by Diag Switch as pool blocks are
* filled */
u16 VirtualProcessorNumber;
u16 LogicalProcessorNumber;
u8 ComponentType; /* ULTRA_COMPONENT_TYPES */
u8 Subsystem;
u16 Reserved0; /* pad to U64 alignment */
- U32 BlockNumber; /* filled in by DiagSwitch as pool blocks are
+ u32 BlockNumber; /* filled in by DiagSwitch as pool blocks are
* filled */
- U32 BlockNumberHigh;
- U32 EventNumber; /* filled in by DiagSwitch as pool blocks are
+ u32 BlockNumberHigh;
+ u32 EventNumber; /* filled in by DiagSwitch as pool blocks are
* filled */
- U32 EventNumberHigh;
+ u32 EventNumberHigh;
/* The BlockNumber and EventNumber fields are set only by DiagSwitch
* and referenced only by WinDiagDisplay formatting tool as
* particular subsystem below this level will be discarded.
*/
typedef struct _DIAG_CHANNEL_PROTOCOL_HEADER {
- volatile U32 DiagLock;
+ volatile u32 DiagLock;
u8 IsChannelInitialized;
u8 Reserved[3];
u8 SubsystemSeverityFilter[64];
#define GPI_ENTRIES_PER_PAGE (PAGE_SIZE / sizeof(struct guest_phys_info))
struct uisscsi_dest {
- U32 channel; /* channel == bus number */
- U32 id; /* id == target number */
- U32 lun; /* lun == logical unit number */
+ u32 channel; /* channel == bus number */
+ u32 id; /* id == target number */
+ u32 lun; /* lun == logical unit number */
};
struct vhba_wwnn {
- U32 wwnn1;
- U32 wwnn2;
+ u32 wwnn1;
+ u32 wwnn2;
};
/* WARNING: Values stired in this structure must contain maximum counts (not
* maximum values). */
struct vhba_config_max { /* 20 bytes */
- U32 max_channel; /* maximum channel for devices attached to this
+ u32 max_channel; /* maximum channel for devices attached to this
* bus */
- U32 max_id; /* maximum SCSI ID for devices attached to this
+ u32 max_id; /* maximum SCSI ID for devices attached to this
* bus */
- U32 max_lun; /* maximum SCSI LUN for devices attached to this
+ u32 max_lun; /* maximum SCSI LUN for devices attached to this
* bus */
- U32 cmd_per_lun; /* maximum number of outstanding commands per
+ u32 cmd_per_lun; /* maximum number of outstanding commands per
* lun that are allowed at one time */
- U32 max_io_size; /* maximum io size for devices attached to this
+ u32 max_io_size; /* maximum io size for devices attached to this
* bus */
/* max io size is often determined by the resource of the hba. e.g */
/* max scatter gather list length * page size / sector size */
void *scsicmd; /* the handle to the cmd that was received -
* send it back as is in the rsp packet. */
u8 cmnd[MAX_CMND_SIZE]; /* the cdb for the command */
- U32 bufflen; /* length of data to be transferred out or in */
+ u32 bufflen; /* length of data to be transferred out or in */
u16 guest_phys_entries; /* Number of entries in scatter-gather (sg)
* list */
struct guest_phys_info gpi_list[MAX_PHYS_INFO]; /* physical address
u8 hrawoffv; /* 1 = hwrafoff is valid */
u8 nhrawoffv; /* 1 = nhwrafoff is valid */
u16 protocol; /* specifies packet protocol */
- U32 csum; /* value used to set skb->csum at IOPart */
- U32 hrawoff; /* value used to set skb->h.raw at IOPart */
+ u32 csum; /* value used to set skb->csum at IOPart */
+ u32 hrawoff; /* value used to set skb->h.raw at IOPart */
/* hrawoff points to the start of the TRANSPORT LAYER HEADER */
- U32 nhrawoff; /* value used to set skb->nh.raw at IOPart */
+ u32 nhrawoff; /* value used to set skb->nh.raw at IOPart */
/* nhrawoff points to the start of the NETWORK LAYER HEADER */
} lincsum;
};
struct net_pkt_xmtdone {
- U32 xmt_done_result; /* result of NET_XMIT */
+ u32 xmt_done_result; /* result of NET_XMIT */
#define XMIT_SUCCESS 0
#define XMIT_FAILED 1
};
/* the number of receive buffers that can be chained */
/* is based on max mtu and size of each rcv buf */
- U32 rcv_done_len; /* length of received data */
+ u32 rcv_done_len; /* length of received data */
u8 numrcvbufs; /* number of receive buffers that contain the */
/* incoming data; guest end MUST chain these together. */
void *rcvbuf[MAX_NET_RCV_CHAIN]; /* the list of receive buffers
/* each entry is a receive buffer provided by NET_RCV_POST. */
/* NOTE: first rcvbuf in the chain will also be provided in net.buf. */
U64 UniqueNum;
- U32 RcvsDroppedDelta;
+ u32 RcvsDroppedDelta;
};
struct net_pkt_enbdis {
u8 add; /* 0-remove, 1-add */
void *vHba; /* Pointer to vhba_info for channel info to
* route msg */
- U32 channel, id, lun; /* SCSI Path of Disk to added or removed */
+ u32 channel, id, lun; /* SCSI Path of Disk to added or removed */
};
/* The following is used by virthba/vSCSI to send the Acquire/Release commands
} vhba; /* 28 */
struct {
u8 macaddr[MAX_MACADDR_LEN]; /* 6 bytes */
- U32 num_rcv_bufs; /* 4 */
- U32 mtu; /* 4 */
+ u32 num_rcv_bufs; /* 4 */
+ u32 mtu; /* 4 */
uuid_le zoneGuid; /* 16 */
} vnic; /* total 30 */
};
OFFSETOF(type, clientString); \
MEMCPY(chan->clientString, clientStr, \
MINNUM(clientStrLen, \
- (U32) (MAX_CLIENTSTRING_LEN - 1))); \
+ (u32) (MAX_CLIENTSTRING_LEN - 1))); \
chan->clientString[MINNUM(clientStrLen, \
- (U32) (MAX_CLIENTSTRING_LEN \
+ (u32) (MAX_CLIENTSTRING_LEN \
- 1))] \
= '\0'; \
} \
struct vhba_wwnn *wwnn,
struct vhba_config_max *max,
unsigned char *clientStr,
- U32 clientStrLen, U64 bytes) {
+ u32 clientStrLen, U64 bytes) {
MEMSET(x, 0, sizeof(ULTRA_IO_CHANNEL_PROTOCOL));
x->ChannelHeader.VersionId = ULTRA_VHBA_CHANNEL_PROTOCOL_VERSIONID;
x->ChannelHeader.Signature = ULTRA_VHBA_CHANNEL_PROTOCOL_SIGNATURE;
static inline int ULTRA_VNIC_init_channel(ULTRA_IO_CHANNEL_PROTOCOL *x,
unsigned char *macaddr,
- U32 num_rcv_bufs, U32 mtu,
+ u32 num_rcv_bufs, u32 mtu,
uuid_le zoneGuid,
unsigned char *clientStr,
- U32 clientStrLen,
+ u32 clientStrLen,
U64 bytes) {
MEMSET(x, 0, sizeof(ULTRA_IO_CHANNEL_PROTOCOL));
x->ChannelHeader.VersionId = ULTRA_VNIC_CHANNEL_PROTOCOL_VERSIONID;
* room)
*/
static INLINE u16
-add_physinfo_entries(U32 inp_pfn, /* input - specifies the pfn to be used
+add_physinfo_entries(u32 inp_pfn, /* input - specifies the pfn to be used
* to add entries */
u16 inp_off, /* input - specifies the off to be used
* to add entries */
- U32 inp_len, /* input - specifies the len to be used
+ u32 inp_len, /* input - specifies the len to be used
* to add entries */
u16 index, /* input - index in array at which new
* entries are added */
struct phys_info pi_arr[]) /* input & output - array to
* which entries are added */
{
- U32 len;
+ u32 len;
u16 i, firstlen;
firstlen = PI_PAGE_SIZE - inp_off;
else {
pi_arr[index + i].pi_off = 0;
pi_arr[index + i].pi_len =
- (u16) MINNUM(len, (U32) PI_PAGE_SIZE);
+ (u16) MINNUM(len, (u32) PI_PAGE_SIZE);
}
}
#pragma pack(push, 1) /* both GCC and VC now allow this pragma */
typedef struct _ULTRA_VBUS_HEADERINFO {
- U32 structBytes; /* size of this struct in bytes */
- U32 deviceInfoStructBytes; /* sizeof(ULTRA_VBUS_DEVICEINFO) */
- U32 devInfoCount; /* num of items in DevInfo member */
+ u32 structBytes; /* size of this struct in bytes */
+ u32 deviceInfoStructBytes; /* sizeof(ULTRA_VBUS_DEVICEINFO) */
+ u32 devInfoCount; /* num of items in DevInfo member */
/* (this is the allocated size) */
- U32 chpInfoByteOffset; /* byte offset from beginning of this struct */
+ u32 chpInfoByteOffset; /* byte offset from beginning of this struct */
/* to the the ChpInfo struct (below) */
- U32 busInfoByteOffset; /* byte offset from beginning of this struct */
+ u32 busInfoByteOffset; /* byte offset from beginning of this struct */
/* to the the BusInfo struct (below) */
- U32 devInfoByteOffset; /* byte offset from beginning of this struct */
+ u32 devInfoByteOffset; /* byte offset from beginning of this struct */
/* to the the DevInfo array (below) */
u8 reserved[104];
} ULTRA_VBUS_HEADERINFO;
* not used much */
#define ISSUE_IO_VMCALL_POSTCODE_SEVERITY(postcode, severity) \
do { \
- U32 _tempresult = VMCALL_SUCCESS; \
+ u32 _tempresult = VMCALL_SUCCESS; \
ISSUE_IO_EXTENDED_VMCALL(VMCALL_POST_CODE_LOGEVENT, severity, \
MDS_APPOS, postcode, _tempresult); \
} while (0)
U64 ChannelAddress; /* contents provided by this VMCALL (OUT) */
/* the size of the ControlVm channel in bytes This VMCall fills this
* in with the appropriate address. */
- U32 ChannelBytes; /* contents provided by this VMCALL (OUT) */
+ u32 ChannelBytes; /* contents provided by this VMCALL (OUT) */
u8 Unused[4]; /* Unused Bytes in the 64-Bit Aligned Struct */
} VMCALL_IO_CONTROLVM_ADDR_PARAMS;
* (IN) */
u8 ItemName[32]; /* Null terminated string giving name of
* mismatched item (IN) */
- U32 SourceLineNumber; /* line# where invoked. (IN) */
+ u32 SourceLineNumber; /* line# where invoked. (IN) */
u8 SourceFileName[36]; /* source code where invoked - Null terminated
* string (IN) */
} VMCALL_CHANNEL_VERSION_MISMATCH_PARAMS;
#include <syslog.h>
#endif
-#define U32 uint32_t
#define U64 uint64_t
#define S8 int8_t
#define S16 int16_t
#ifdef __KERNEL__
#ifdef CONFIG_X86_32
-#define UINTN U32
+#define UINTN u32
#else
#define UINTN U64
#endif
#include <stdint.h>
#if __WORDSIZE == 32
-#define UINTN U32
+#define UINTN u32
#elif __WORDSIZE == 64
#define UINTN U64
#else
fil, lin); \
} while (0)
-#define CHANNEL_U32_MISMATCH(chType, chName, field, expected, actual, fil, \
+#define CHANNEL_u32_MISMATCH(chType, chName, field, expected, actual, fil, \
lin, logCtx) \
do { \
syslog(LOG_USER | LOG_ERR, \
/* if 1, indicates this extport slot is occupied
* if 0, indicates that extport slot is unoccupied */
- U32 num_devs_using;
+ u32 num_devs_using;
/* When extport is added, this is set to 0. For exports
* located in NETWORK switches:
* Each time a VNIC, i.e., intport, is added to the switch this
char devid[30]; /* "vbus<busno>:dev<devno>" */
u16 polling;
struct semaphore interrupt_callback_lock;
- U32 busNo;
- U32 devNo;
+ u32 busNo;
+ u32 devNo;
int (*interrupt)(void *);
void *interrupt_context;
void *private_data;
} SWITCH_TYPE;
struct bus_info {
- U32 busNo, deviceCount;
+ u32 busNo, deviceCount;
struct device_info **device;
U64 guestHandle, recvBusInterruptHandle;
uuid_le busInstGuid;
};
struct networkPolicy {
- U32 promiscuous:1;
- U32 macassign:1;
- U32 peerforwarding:1;
- U32 nonotify:1;
- U32 standby:1;
- U32 callhome:2;
+ u32 promiscuous:1;
+ u32 macassign:1;
+ u32 peerforwarding:1;
+ u32 nonotify:1;
+ u32 standby:1;
+ u32 callhome:2;
char ip_addr[30];
};
* needs to use G2G copy. */
u8 Filler[7];
- U32 busNo;
- U32 devNo;
+ u32 busNo;
+ u32 devNo;
char *params;
ulong params_bytes;
struct uisscsi_dest vdest; /* scsi bus, target, lun for virt disk */
struct uisscsi_dest pdest; /* scsi bus, target, lun for phys disk */
u8 sernum[MAX_SERIAL_NUM]; /* serial num of physical disk */
- U32 serlen; /* length of serial num */
- U32 busNo;
- U32 devNo;
+ u32 serlen; /* length of serial num */
+ u32 busNo;
+ u32 devNo;
};
struct del_vdisk_iopart {
void *chanptr; /* pointer to data channel */
struct uisscsi_dest vdest; /* scsi bus, target, lun for virt disk */
- U32 busNo;
- U32 devNo;
+ u32 busNo;
+ u32 devNo;
};
struct del_virt_iopart {
void *chanptr; /* pointer to data channel */
- U32 busNo;
- U32 devNo;
+ u32 busNo;
+ u32 devNo;
};
struct det_virt_iopart { /* detach internal port */
struct add_vbus_guestpart {
void __iomem *chanptr; /* pointer to data channel for bus -
* NOT YET USED */
- U32 busNo; /* bus number to be created/deleted */
- U32 deviceCount; /* max num of devices on bus */
+ u32 busNo; /* bus number to be created/deleted */
+ u32 deviceCount; /* max num of devices on bus */
uuid_le busTypeGuid; /* indicates type of bus */
uuid_le busInstGuid; /* instance guid for device */
};
struct del_vbus_guestpart {
- U32 busNo; /* bus number to be deleted */
+ u32 busNo; /* bus number to be deleted */
/* once we start using the bus's channel, add can dump busNo
* into the channel header and then delete will need only one
* parameter, chanptr. */
struct add_virt_guestpart {
void __iomem *chanptr; /* pointer to data channel */
- U32 busNo; /* bus number for the operation */
- U32 deviceNo; /* number of device on the bus */
+ u32 busNo; /* bus number for the operation */
+ u32 deviceNo; /* number of device on the bus */
uuid_le devInstGuid; /* instance guid for device */
struct InterruptInfo intr; /* recv/send interrupt info */
/* recvInterruptHandle contains info needed in order to
};
struct init_chipset_guestpart {
- U32 busCount; /* indicates the max number of busses */
- U32 switchCount; /* indicates the max number of switches */
+ u32 busCount; /* indicates the max number of busses */
+ u32 switchCount; /* indicates the max number of switches */
};
struct guest_msgs {
unsigned long min_channel_bytes;
int (*Server_Channel_Ok)(unsigned long channelBytes);
int (*Server_Channel_Init)
- (void *x, unsigned char *clientStr, U32 clientStrLen, U64 bytes);
+ (void *x, unsigned char *clientStr, u32 clientStrLen, U64 bytes);
char switch_type_name[99];
struct list_head list_link; /* links into ReqHandlerInfo_list */
} ReqHandlerInfo_t;
channelBytes),
int (*Server_Channel_Init)
(void *x, unsigned char *clientStr,
- U32 clientStrLen, U64 bytes));
+ u32 clientStrLen, U64 bytes));
ReqHandlerInfo_t *ReqHandlerFind(uuid_le switchTypeGuid);
int ReqHandlerDel(uuid_le switchTypeGuid);
channelBytes),
int (*Server_Channel_Init)
(void *x, unsigned char *clientStr,
- U32 clientStrLen, U64 bytes),
+ u32 clientStrLen, U64 bytes),
ULTRA_VBUS_DEVICEINFO *chipset_DriverInfo);
int uisctrl_unregister_req_handler_ex(uuid_le switchTypeGuid);
void util_unmap_virt(struct phys_info *sg);
unsigned char *util_map_virt_atomic(struct phys_info *sg);
void util_unmap_virt_atomic(void *buf);
-int uislib_server_inject_add_vnic(U32 switchNo, U32 BusNo, U32 numIntPorts,
- U32 numExtPorts, MACARRAY pmac[],
+int uislib_server_inject_add_vnic(u32 switchNo, u32 BusNo, u32 numIntPorts,
+ u32 numExtPorts, MACARRAY pmac[],
pCHANNEL_HEADER **chan);
-void uislib_server_inject_del_vnic(U32 switchNo, U32 busNo, U32 numIntPorts,
- U32 numExtPorts);
-int uislib_client_inject_add_bus(U32 busNo, uuid_le instGuid,
+void uislib_server_inject_del_vnic(u32 switchNo, u32 busNo, u32 numIntPorts,
+ u32 numExtPorts);
+int uislib_client_inject_add_bus(u32 busNo, uuid_le instGuid,
U64 channelAddr, ulong nChannelBytes);
-int uislib_client_inject_del_bus(U32 busNo);
+int uislib_client_inject_del_bus(u32 busNo);
-int uislib_client_inject_add_vhba(U32 busNo, U32 devNo,
- U64 phys_chan_addr, U32 chan_bytes,
+int uislib_client_inject_add_vhba(u32 busNo, u32 devNo,
+ U64 phys_chan_addr, u32 chan_bytes,
int is_test_addr, uuid_le instGuid,
struct InterruptInfo *intr);
-int uislib_client_inject_pause_vhba(U32 busNo, U32 devNo);
-int uislib_client_inject_resume_vhba(U32 busNo, U32 devNo);
-int uislib_client_inject_del_vhba(U32 busNo, U32 devNo);
-int uislib_client_inject_add_vnic(U32 busNo, U32 devNo,
- U64 phys_chan_addr, U32 chan_bytes,
+int uislib_client_inject_pause_vhba(u32 busNo, u32 devNo);
+int uislib_client_inject_resume_vhba(u32 busNo, u32 devNo);
+int uislib_client_inject_del_vhba(u32 busNo, u32 devNo);
+int uislib_client_inject_add_vnic(u32 busNo, u32 devNo,
+ U64 phys_chan_addr, u32 chan_bytes,
int is_test_addr, uuid_le instGuid,
struct InterruptInfo *intr);
-int uislib_client_inject_pause_vnic(U32 busNo, U32 devNo);
-int uislib_client_inject_resume_vnic(U32 busNo, U32 devNo);
-int uislib_client_inject_del_vnic(U32 busNo, U32 devNo);
+int uislib_client_inject_pause_vnic(u32 busNo, u32 devNo);
+int uislib_client_inject_resume_vnic(u32 busNo, u32 devNo);
+int uislib_client_inject_del_vnic(u32 busNo, u32 devNo);
#ifdef STORAGE_CHANNEL
U64 uislib_storage_channel(int client_id);
#endif
struct phys_info frags[]);
static inline unsigned int
-Issue_VMCALL_IO_CONTROLVM_ADDR(U64 *ControlAddress, U32 *ControlBytes)
+Issue_VMCALL_IO_CONTROLVM_ADDR(U64 *ControlAddress, u32 *ControlBytes)
{
VMCALL_IO_CONTROLVM_ADDR_PARAMS params;
int result = VMCALL_SUCCESS;
static inline unsigned int
Issue_VMCALL_CHANNEL_MISMATCH(const char *ChannelName,
const char *ItemName,
- U32 SourceLineNumber, const char *path_n_fn)
+ u32 SourceLineNumber, const char *path_n_fn)
{
VMCALL_CHANNEL_VERSION_MISMATCH_PARAMS params;
int result = VMCALL_SUCCESS;
#define UISCACHEFREE(cur_pool, p) \
uislib_cache_free(cur_pool, p, __FILE__, __LINE__)
-void uislib_enable_channel_interrupts(U32 busNo, U32 devNo,
+void uislib_enable_channel_interrupts(u32 busNo, u32 devNo,
int (*interrupt)(void *),
void *interrupt_context);
-void uislib_disable_channel_interrupts(U32 busNo, U32 devNo);
-void uislib_force_channel_interrupt(U32 busNo, U32 devNo);
+void uislib_disable_channel_interrupts(u32 busNo, u32 devNo);
+void uislib_force_channel_interrupt(u32 busNo, u32 devNo);
#endif /* __UISUTILS__H__ */
};
static void
-init_msg_header(CONTROLVM_MESSAGE *msg, U32 id, uint rsp, uint svr)
+init_msg_header(CONTROLVM_MESSAGE *msg, u32 id, uint rsp, uint svr)
{
memset(msg, 0, sizeof(CONTROLVM_MESSAGE));
msg->hdr.Id = id;
}
static __iomem void *
-init_vbus_channel(U64 channelAddr, U32 channelBytes)
+init_vbus_channel(U64 channelAddr, u32 channelBytes)
{
void __iomem *rc = NULL;
void __iomem *pChan = uislib_ioremap_cache(channelAddr, channelBytes);
static int
create_bus(CONTROLVM_MESSAGE *msg, char *buf)
{
- U32 busNo, deviceCount;
+ u32 busNo, deviceCount;
struct bus_info *tmp, *bus;
size_t size;
{
int i;
struct bus_info *bus, *prev = NULL;
- U32 busNo;
+ u32 busNo;
busNo = msg->cmd.destroyBus.busNo;
{
struct device_info *dev;
struct bus_info *bus;
- U32 busNo, devNo;
+ u32 busNo, devNo;
int result = CONTROLVM_RESP_SUCCESS;
U64 minSize = MIN_IO_CHANNEL_SIZE;
ReqHandlerInfo_t *pReqHandler;
static int
pause_device(CONTROLVM_MESSAGE *msg)
{
- U32 busNo, devNo;
+ u32 busNo, devNo;
struct bus_info *bus;
struct device_info *dev;
struct guest_msgs cmd;
static int
resume_device(CONTROLVM_MESSAGE *msg)
{
- U32 busNo, devNo;
+ u32 busNo, devNo;
struct bus_info *bus;
struct device_info *dev;
struct guest_msgs cmd;
static int
destroy_device(CONTROLVM_MESSAGE *msg, char *buf)
{
- U32 busNo, devNo;
+ u32 busNo, devNo;
struct bus_info *bus;
struct device_info *dev;
struct guest_msgs cmd;
}
static int
-delete_bus_glue(U32 busNo)
+delete_bus_glue(u32 busNo)
{
CONTROLVM_MESSAGE msg;
}
static int
-delete_device_glue(U32 busNo, U32 devNo)
+delete_device_glue(u32 busNo, u32 devNo)
{
CONTROLVM_MESSAGE msg;
}
int
-uislib_client_inject_add_bus(U32 busNo, uuid_le instGuid,
+uislib_client_inject_add_bus(u32 busNo, uuid_le instGuid,
U64 channelAddr, ulong nChannelBytes)
{
CONTROLVM_MESSAGE msg;
int
-uislib_client_inject_del_bus(U32 busNo)
+uislib_client_inject_del_bus(u32 busNo)
{
return delete_bus_glue(busNo);
}
EXPORT_SYMBOL_GPL(uislib_client_inject_del_bus);
int
-uislib_client_inject_pause_vhba(U32 busNo, U32 devNo)
+uislib_client_inject_pause_vhba(u32 busNo, u32 devNo)
{
CONTROLVM_MESSAGE msg;
int rc;
EXPORT_SYMBOL_GPL(uislib_client_inject_pause_vhba);
int
-uislib_client_inject_resume_vhba(U32 busNo, U32 devNo)
+uislib_client_inject_resume_vhba(u32 busNo, u32 devNo)
{
CONTROLVM_MESSAGE msg;
int rc;
EXPORT_SYMBOL_GPL(uislib_client_inject_resume_vhba);
int
-uislib_client_inject_add_vhba(U32 busNo, U32 devNo,
- U64 phys_chan_addr, U32 chan_bytes,
+uislib_client_inject_add_vhba(u32 busNo, u32 devNo,
+ U64 phys_chan_addr, u32 chan_bytes,
int is_test_addr, uuid_le instGuid,
struct InterruptInfo *intr)
{
EXPORT_SYMBOL_GPL(uislib_client_inject_add_vhba);
int
-uislib_client_inject_del_vhba(U32 busNo, U32 devNo)
+uislib_client_inject_del_vhba(u32 busNo, u32 devNo)
{
return delete_device_glue(busNo, devNo);
}
EXPORT_SYMBOL_GPL(uislib_client_inject_del_vhba);
int
-uislib_client_inject_add_vnic(U32 busNo, U32 devNo,
- U64 phys_chan_addr, U32 chan_bytes,
+uislib_client_inject_add_vnic(u32 busNo, u32 devNo,
+ U64 phys_chan_addr, u32 chan_bytes,
int is_test_addr, uuid_le instGuid,
struct InterruptInfo *intr)
{
EXPORT_SYMBOL_GPL(uislib_client_inject_add_vnic);
int
-uislib_client_inject_pause_vnic(U32 busNo, U32 devNo)
+uislib_client_inject_pause_vnic(u32 busNo, u32 devNo)
{
CONTROLVM_MESSAGE msg;
int rc;
EXPORT_SYMBOL_GPL(uislib_client_inject_pause_vnic);
int
-uislib_client_inject_resume_vnic(U32 busNo, U32 devNo)
+uislib_client_inject_resume_vnic(u32 busNo, u32 devNo)
{
CONTROLVM_MESSAGE msg;
int rc;
EXPORT_SYMBOL_GPL(uislib_client_inject_resume_vnic);
int
-uislib_client_inject_del_vnic(U32 busNo, U32 devNo)
+uislib_client_inject_del_vnic(u32 busNo, u32 devNo)
{
return delete_device_glue(busNo, devNo);
}
EXPORT_SYMBOL_GPL(uislib_client_inject_del_vnic);
static int
-uislib_client_add_vnic(U32 busNo)
+uislib_client_add_vnic(u32 busNo)
{
BOOL busCreated = FALSE;
int devNo = 0; /* Default to 0, since only one device
EXPORT_SYMBOL_GPL(uislib_client_add_vnic);
static int
-uislib_client_delete_vnic(U32 busNo)
+uislib_client_delete_vnic(u32 busNo)
{
int devNo = 0; /* Default to 0, since only one device
* will be created for this bus... */
}
static struct device_info *
-find_dev(U32 busNo, U32 devNo)
+find_dev(u32 busNo, u32 devNo)
{
struct bus_info *bus;
struct device_info *dev = NULL;
* function.
*/
void
-uislib_enable_channel_interrupts(U32 busNo, U32 devNo,
+uislib_enable_channel_interrupts(u32 busNo, u32 devNo,
int (*interrupt)(void *),
void *interrupt_context)
{
* Process_Incoming().
*/
void
-uislib_disable_channel_interrupts(U32 busNo, U32 devNo)
+uislib_disable_channel_interrupts(u32 busNo, u32 devNo)
{
struct device_info *dev;
dev = find_dev(busNo, devNo);
* your device might have more requests.
*/
void
-uislib_force_channel_interrupt(U32 busNo, U32 devNo)
+uislib_force_channel_interrupt(u32 busNo, u32 devNo)
{
if (en_smart_wakeup == 0)
return;
channelBytes),
int (*Server_Channel_Init)
(void *x, unsigned char *clientStr,
- U32 clientStrLen, U64 bytes),
+ u32 clientStrLen, U64 bytes),
ULTRA_VBUS_DEVICEINFO *chipset_DriverInfo)
{
ReqHandlerInfo_t *pReqHandlerInfo;
unsigned long min_channel_bytes,
int (*Server_Channel_Ok)(unsigned long channelBytes),
int (*Server_Channel_Init)
- (void *x, unsigned char *clientStr, U32 clientStrLen, U64 bytes))
+ (void *x, unsigned char *clientStr, u32 clientStrLen, U64 bytes))
{
ReqHandlerInfo_t *rc = NULL;
#define VIRTHBA_ERROR_COUNT 30
#define IOS_ERROR_THRESHOLD 1000
struct virtdisk_info {
- U32 valid;
- U32 channel, id, lun; /* Disk Path */
+ u32 valid;
+ u32 channel, id, lun; /* Disk Path */
atomic_t ios_threshold;
atomic_t error_count;
struct virtdisk_info *next;
struct diskaddremove {
u8 add; /* 0-remove, 1-add */
struct Scsi_Host *shost; /* Scsi Host for this virthba instance */
- U32 channel, id, lun; /* Disk Path */
+ u32 channel, id, lun; /* Disk Path */
struct diskaddremove *next;
};
* this device */
unsigned short vendor; /* vendor id for device */
unsigned short device; /* device id for device */
- U32 busNo; /* number of bus on which device exists */
- U32 deviceNo; /* device's number on the bus */
+ u32 busNo; /* number of bus on which device exists */
+ u32 deviceNo; /* device's number on the bus */
struct InterruptInfo intr; /* interrupt info */
struct device generic_dev; /* generic device */
union {
void *local, ulong nbytes);
int visorchannel_clear(VISORCHANNEL *channel, ulong offset,
u8 ch, ulong nbytes);
-BOOL visorchannel_signalremove(VISORCHANNEL *channel, U32 queue, void *msg);
-BOOL visorchannel_signalinsert(VISORCHANNEL *channel, U32 queue, void *msg);
-int visorchannel_signalqueue_slots_avail(VISORCHANNEL *channel, U32 queue);
-int visorchannel_signalqueue_max_slots(VISORCHANNEL *channel, U32 queue);
+BOOL visorchannel_signalremove(VISORCHANNEL *channel, u32 queue, void *msg);
+BOOL visorchannel_signalinsert(VISORCHANNEL *channel, u32 queue, void *msg);
+int visorchannel_signalqueue_slots_avail(VISORCHANNEL *channel, u32 queue);
+int visorchannel_signalqueue_max_slots(VISORCHANNEL *channel, u32 queue);
HOSTADDRESS visorchannel_get_physaddr(VISORCHANNEL *channel);
ulong visorchannel_get_nbytes(VISORCHANNEL *channel);
MEMREGION *visorchannel_get_memregion(VISORCHANNEL *channel);
char *visorchannel_uuid_id(uuid_le *guid, char *s);
void visorchannel_debug(VISORCHANNEL *channel, int nQueues,
- struct seq_file *seq, U32 off);
+ struct seq_file *seq, u32 off);
void visorchannel_dump_section(VISORCHANNEL *chan, char *s,
int off, int len, struct seq_file *seq);
void __iomem *visorchannel_get_header(VISORCHANNEL *channel);
sizeof((sig_hdr)->FIELD)) >= 0)
static BOOL
-sig_read_header(VISORCHANNEL *channel, U32 queue,
+sig_read_header(VISORCHANNEL *channel, u32 queue,
SIGNAL_QUEUE_HEADER *sig_hdr)
{
BOOL rc = FALSE;
}
static BOOL
-sig_do_data(VISORCHANNEL *channel, U32 queue,
- SIGNAL_QUEUE_HEADER *sig_hdr, U32 slot, void *data, BOOL is_write)
+sig_do_data(VISORCHANNEL *channel, u32 queue,
+ SIGNAL_QUEUE_HEADER *sig_hdr, u32 slot, void *data, BOOL is_write)
{
BOOL rc = FALSE;
int signal_data_offset = SIG_DATA_OFFSET(&channel->chan_hdr, queue,
}
static inline BOOL
-sig_read_data(VISORCHANNEL *channel, U32 queue,
- SIGNAL_QUEUE_HEADER *sig_hdr, U32 slot, void *data)
+sig_read_data(VISORCHANNEL *channel, u32 queue,
+ SIGNAL_QUEUE_HEADER *sig_hdr, u32 slot, void *data)
{
return sig_do_data(channel, queue, sig_hdr, slot, data, FALSE);
}
static inline BOOL
-sig_write_data(VISORCHANNEL *channel, U32 queue,
- SIGNAL_QUEUE_HEADER *sig_hdr, U32 slot, void *data)
+sig_write_data(VISORCHANNEL *channel, u32 queue,
+ SIGNAL_QUEUE_HEADER *sig_hdr, u32 slot, void *data)
{
return sig_do_data(channel, queue, sig_hdr, slot, data, TRUE);
}
static inline unsigned char
safe_sig_queue_validate(pSIGNAL_QUEUE_HEADER psafe_sqh,
pSIGNAL_QUEUE_HEADER punsafe_sqh,
- U32 *phead, U32 *ptail)
+ u32 *phead, u32 *ptail)
{
if ((*phead >= psafe_sqh->MaxSignalSlots)
|| (*ptail >= psafe_sqh->MaxSignalSlots)) {
} /* end safe_sig_queue_validate */
BOOL
-visorchannel_signalremove(VISORCHANNEL *channel, U32 queue, void *msg)
+visorchannel_signalremove(VISORCHANNEL *channel, u32 queue, void *msg)
{
BOOL rc = FALSE;
SIGNAL_QUEUE_HEADER sig_hdr;
EXPORT_SYMBOL_GPL(visorchannel_signalremove);
BOOL
-visorchannel_signalinsert(VISORCHANNEL *channel, U32 queue, void *msg)
+visorchannel_signalinsert(VISORCHANNEL *channel, u32 queue, void *msg)
{
BOOL rc = FALSE;
SIGNAL_QUEUE_HEADER sig_hdr;
int
-visorchannel_signalqueue_slots_avail(VISORCHANNEL *channel, U32 queue)
+visorchannel_signalqueue_slots_avail(VISORCHANNEL *channel, u32 queue)
{
SIGNAL_QUEUE_HEADER sig_hdr;
- U32 slots_avail, slots_used;
- U32 head, tail;
+ u32 slots_avail, slots_used;
+ u32 head, tail;
if (!sig_read_header(channel, queue, &sig_hdr))
return 0;
EXPORT_SYMBOL_GPL(visorchannel_signalqueue_slots_avail);
int
-visorchannel_signalqueue_max_slots(VISORCHANNEL *channel, U32 queue)
+visorchannel_signalqueue_max_slots(VISORCHANNEL *channel, u32 queue)
{
SIGNAL_QUEUE_HEADER sig_hdr;
if (!sig_read_header(channel, queue, &sig_hdr))
void
visorchannel_debug(VISORCHANNEL *channel, int nQueues,
- struct seq_file *seq, U32 off)
+ struct seq_file *seq, u32 off)
{
HOSTADDRESS addr = 0;
ulong nbytes = 0, nbytes_region = 0;
};
static PARSER_CONTEXT *
-parser_init_guts(U64 addr, U32 bytes, BOOL isLocal,
+parser_init_guts(U64 addr, u32 bytes, BOOL isLocal,
BOOL hasStandardPayloadHeader, BOOL *tryAgain)
{
int allocbytes = sizeof(PARSER_CONTEXT) + bytes;
}
PARSER_CONTEXT *
-parser_init(U64 addr, U32 bytes, BOOL isLocal, BOOL *tryAgain)
+parser_init(U64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain)
{
return parser_init_guts(addr, bytes, isLocal, TRUE, tryAgain);
}
* parser_byteStream_get() to obtain the data.
*/
PARSER_CONTEXT *
-parser_init_byteStream(U64 addr, U32 bytes, BOOL isLocal, BOOL *tryAgain)
+parser_init_byteStream(U64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain)
{
return parser_init_guts(addr, bytes, isLocal, FALSE, tryAgain);
}
typedef struct PARSER_CONTEXT_Tag PARSER_CONTEXT;
-PARSER_CONTEXT *parser_init(U64 addr, U32 bytes, BOOL isLocal, BOOL *tryAgain);
-PARSER_CONTEXT *parser_init_byteStream(U64 addr, U32 bytes, BOOL isLocal,
+PARSER_CONTEXT *parser_init(U64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain);
+PARSER_CONTEXT *parser_init_byteStream(U64 addr, u32 bytes, BOOL isLocal,
BOOL *tryAgain);
void parser_param_start(PARSER_CONTEXT *ctx, PARSER_WHICH_STRING which_string);
void *parser_param_get(PARSER_CONTEXT *ctx, char *nam, int namesize);
* been received for a bus or device.
*/
typedef struct {
- U32 created:1;
- U32 attached:1;
- U32 configured:1;
- U32 running:1;
+ u32 created:1;
+ u32 attached:1;
+ u32 configured:1;
+ u32 running:1;
/* Add new fields above. */
/* Remaining bits in this 32-bit word are unused. */
} VISORCHIPSET_STATE;
*/
typedef struct {
struct list_head entry;
- U32 busNo;
- U32 devNo;
+ u32 busNo;
+ u32 devNo;
uuid_le devInstGuid;
VISORCHIPSET_STATE state;
VISORCHIPSET_CHANNEL_INFO chanInfo;
- U32 Reserved1; /* CONTROLVM_ID */
+ u32 Reserved1; /* CONTROLVM_ID */
U64 Reserved2;
- U32 switchNo; /* when devState.attached==1 */
- U32 internalPortNo; /* when devState.attached==1 */
+ u32 switchNo; /* when devState.attached==1 */
+ u32 internalPortNo; /* when devState.attached==1 */
CONTROLVM_MESSAGE_HEADER pendingMsgHdr; /* CONTROLVM_MESSAGE */
/** For private use by the bus driver */
void *bus_driver_context;
} VISORCHIPSET_DEVICE_INFO;
static inline VISORCHIPSET_DEVICE_INFO *
-finddevice(struct list_head *list, U32 busNo, U32 devNo)
+finddevice(struct list_head *list, u32 busNo, u32 devNo)
{
VISORCHIPSET_DEVICE_INFO *p;
return NULL;
}
-static inline void delbusdevices(struct list_head *list, U32 busNo)
+static inline void delbusdevices(struct list_head *list, u32 busNo)
{
VISORCHIPSET_DEVICE_INFO *p, *tmp;
*/
typedef struct {
struct list_head entry;
- U32 busNo;
+ u32 busNo;
VISORCHIPSET_STATE state;
VISORCHIPSET_CHANNEL_INFO chanInfo;
uuid_le partitionGuid;
u8 *name; /* UTF8 */
u8 *description; /* UTF8 */
U64 Reserved1;
- U32 Reserved2;
+ u32 Reserved2;
MYPROCOBJECT *procObject;
struct {
- U32 server:1;
+ u32 server:1;
/* Add new fields above. */
/* Remaining bits in this 32-bit word are unused. */
} flags;
} VISORCHIPSET_BUS_INFO;
static inline VISORCHIPSET_BUS_INFO *
-findbus(struct list_head *list, U32 busNo)
+findbus(struct list_head *list, u32 busNo)
{
VISORCHIPSET_BUS_INFO *p;
/** Attributes for a particular Supervisor switch.
*/
typedef struct {
- U32 switchNo;
+ u32 switchNo;
VISORCHIPSET_STATE state;
uuid_le switchTypeGuid;
u8 *authService1;
u8 *authService3;
u8 *securityContext;
U64 Reserved;
- U32 Reserved2; /* CONTROLVM_ID */
+ u32 Reserved2; /* CONTROLVM_ID */
struct device dev;
BOOL dev_exists;
CONTROLVM_MESSAGE_HEADER pendingMsgHdr;
* to a specific switch.
*/
typedef struct {
- U32 switchNo;
- U32 externalPortNo;
+ u32 switchNo;
+ u32 externalPortNo;
VISORCHIPSET_STATE state;
uuid_le networkZoneGuid;
int pdPort;
u8 *ipGateway;
u8 *ipDNS;
U64 Reserved1;
- U32 Reserved2; /* CONTROLVM_ID */
+ u32 Reserved2; /* CONTROLVM_ID */
struct device dev;
BOOL dev_exists;
CONTROLVM_MESSAGE_HEADER pendingMsgHdr;
* device connects to a particular switch.
*/
typedef struct {
- U32 switchNo;
- U32 internalPortNo;
+ u32 switchNo;
+ u32 internalPortNo;
VISORCHIPSET_STATE state;
- U32 busNo; /* valid only when state.attached == 1 */
- U32 devNo; /* valid only when state.attached == 1 */
+ u32 busNo; /* valid only when state.attached == 1 */
+ u32 devNo; /* valid only when state.attached == 1 */
U64 Reserved1;
- U32 Reserved2; /* CONTROLVM_ID */
+ u32 Reserved2; /* CONTROLVM_ID */
CONTROLVM_MESSAGE_HEADER pendingMsgHdr;
MYPROCOBJECT *procObject;
u8 __iomem *ptr; /* pointer to base address of payload pool */
U64 offset; /* offset from beginning of controlvm
* channel to beginning of payload * pool */
- U32 bytes; /* number of bytes in payload pool */
+ u32 bytes; /* number of bytes in payload pool */
} CONTROLVM_PAYLOAD_INFO;
/* Manages the request payload in the controlvm channel */
msg->hdr.PayloadMaxBytes = 0;
if (response < 0) {
msg->hdr.Flags.failed = 1;
- msg->hdr.CompletionStatus = (U32) (-response);
+ msg->hdr.CompletionStatus = (u32) (-response);
}
}
void
visorchipset_save_message(CONTROLVM_MESSAGE *msg, CRASH_OBJ_TYPE type)
{
- U32 localSavedCrashMsgOffset;
+ u32 localSavedCrashMsgOffset;
u16 localSavedCrashMsgCount;
/* get saved message count */
if (visorchannel_read(ControlVm_channel,
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL,
SavedCrashMsgOffset),
- &localSavedCrashMsgOffset, sizeof(U32)) < 0) {
+ &localSavedCrashMsgOffset, sizeof(u32)) < 0) {
LOGERR("failed to get Saved Message Offset");
POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC,
POSTCODE_SEVERITY_ERR);
LOGERR("bus_responder no pending msg");
return; /* no controlvm response needed */
}
- if (p->pendingMsgHdr.Id != (U32) cmdId) {
+ if (p->pendingMsgHdr.Id != (u32) cmdId) {
LOGERR("expected=%d, found=%d", cmdId, p->pendingMsgHdr.Id);
return;
}
LOGERR("device_responder no pending msg");
return; /* no controlvm response needed */
}
- if (p->pendingMsgHdr.Id != (U32) cmdId) {
+ if (p->pendingMsgHdr.Id != (u32) cmdId) {
LOGERR("expected=%d, found=%d", cmdId, p->pendingMsgHdr.Id);
return;
}
}
static void
-bus_epilog(U32 busNo,
- U32 cmd, CONTROLVM_MESSAGE_HEADER *msgHdr,
+bus_epilog(u32 busNo,
+ u32 cmd, CONTROLVM_MESSAGE_HEADER *msgHdr,
int response, BOOL needResponse)
{
BOOL notified = FALSE;
}
static void
-device_epilog(U32 busNo, U32 devNo, ULTRA_SEGMENT_STATE state, U32 cmd,
+device_epilog(u32 busNo, u32 devNo, ULTRA_SEGMENT_STATE state, u32 cmd,
CONTROLVM_MESSAGE_HEADER *msgHdr, int response,
BOOL needResponse, BOOL for_visorbus)
{
* for failure.
*/
static int
-initialize_controlvm_payload_info(HOSTADDRESS phys_addr, U64 offset, U32 bytes,
+initialize_controlvm_payload_info(HOSTADDRESS phys_addr, U64 offset, u32 bytes,
CONTROLVM_PAYLOAD_INFO *info)
{
u8 __iomem *payload = NULL;
{
HOSTADDRESS phys_addr = visorchannel_get_physaddr(ControlVm_channel);
U64 payloadOffset = 0;
- U32 payloadBytes = 0;
+ u32 payloadBytes = 0;
if (visorchannel_read(ControlVm_channel,
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL,
RequestPayloadOffset),
{
CONTROLVM_MESSAGE_PACKET *cmd = &inmsg.cmd;
U64 parametersAddr = 0;
- U32 parametersBytes = 0;
+ u32 parametersBytes = 0;
PARSER_CONTEXT *parser_ctx = NULL;
BOOL isLocalAddr = FALSE;
CONTROLVM_MESSAGE ackmsg;
HOSTADDRESS controlvm_get_channel_address(void)
{
U64 addr = 0;
- U32 size = 0;
+ u32 size = 0;
if (!VMCALL_SUCCESSFUL(Issue_VMCALL_IO_CONTROLVM_ADDR(&addr, &size))) {
ERRDRV("%s - vmcall to determine controlvm channel addr failed",
CONTROLVM_MESSAGE localCrashCreateBusMsg;
CONTROLVM_MESSAGE localCrashCreateDevMsg;
CONTROLVM_MESSAGE msg;
- U32 localSavedCrashMsgOffset;
+ u32 localSavedCrashMsgOffset;
u16 localSavedCrashMsgCount;
/* make sure visorbus server is registered for controlvm callbacks */
if (visorchannel_read(ControlVm_channel,
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL,
SavedCrashMsgOffset),
- &localSavedCrashMsgOffset, sizeof(U32)) < 0) {
+ &localSavedCrashMsgOffset, sizeof(u32)) < 0) {
LOGERR("failed to get Saved Message Offset");
POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC,
POSTCODE_SEVERITY_ERR);