staging: unisys: remove U64 type
This patch switches all use of the U64 typedef to use the kernel's u64 type instead. Signed-off-by: Benjamin Romer <benjamin.romer@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Родитель
b3c55b13a1
Коммит
5fc0229ae5
|
@ -36,7 +36,7 @@
|
||||||
#define SIGNATURE_32(A, B, C, D) \
|
#define SIGNATURE_32(A, B, C, D) \
|
||||||
(SIGNATURE_16(A, B) | (SIGNATURE_16(C, D) << 16))
|
(SIGNATURE_16(A, B) | (SIGNATURE_16(C, D) << 16))
|
||||||
#define SIGNATURE_64(A, B, C, D, E, F, G, H) \
|
#define SIGNATURE_64(A, B, C, D, E, F, G, H) \
|
||||||
(SIGNATURE_32(A, B, C, D) | ((U64)(SIGNATURE_32(E, F, G, H)) << 32))
|
(SIGNATURE_32(A, B, C, D) | ((u64)(SIGNATURE_32(E, F, G, H)) << 32))
|
||||||
|
|
||||||
#ifndef lengthof
|
#ifndef lengthof
|
||||||
#define lengthof(TYPE, MEMBER) (sizeof(((TYPE *)0)->MEMBER))
|
#define lengthof(TYPE, MEMBER) (sizeof(((TYPE *)0)->MEMBER))
|
||||||
|
@ -209,16 +209,16 @@ ULTRA_CHANNELCLI_STRING(u32 v)
|
||||||
#pragma pack(push, 1) /* both GCC and VC now allow this pragma */
|
#pragma pack(push, 1) /* both GCC and VC now allow this pragma */
|
||||||
/* Common Channel Header */
|
/* Common Channel Header */
|
||||||
typedef struct _CHANNEL_HEADER {
|
typedef struct _CHANNEL_HEADER {
|
||||||
U64 Signature; /* Signature */
|
u64 Signature; /* Signature */
|
||||||
u32 LegacyState; /* DEPRECATED - being replaced by */
|
u32 LegacyState; /* DEPRECATED - being replaced by */
|
||||||
/* / SrvState, CliStateBoot, and CliStateOS below */
|
/* / 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 Size; /* Total size of this channel in bytes */
|
||||||
U64 Features; /* Flags to modify behavior */
|
u64 Features; /* Flags to modify behavior */
|
||||||
uuid_le Type; /* Channel type: data, bus, control, etc. */
|
uuid_le Type; /* Channel type: data, bus, control, etc. */
|
||||||
U64 PartitionHandle; /* ID of guest partition */
|
u64 PartitionHandle; /* ID of guest partition */
|
||||||
U64 Handle; /* Device number of this channel in client */
|
u64 Handle; /* Device number of this channel in client */
|
||||||
U64 oChannelSpace; /* Offset in bytes to channel specific area */
|
u64 oChannelSpace; /* Offset in bytes to channel specific area */
|
||||||
u32 VersionId; /* CHANNEL_HEADER Version ID */
|
u32 VersionId; /* CHANNEL_HEADER Version ID */
|
||||||
u32 PartitionIndex; /* Index of guest partition */
|
u32 PartitionIndex; /* Index of guest partition */
|
||||||
uuid_le ZoneGuid; /* Guid of Channel's zone */
|
uuid_le ZoneGuid; /* Guid of Channel's zone */
|
||||||
|
@ -255,11 +255,11 @@ typedef struct _SIGNAL_QUEUE_HEADER {
|
||||||
/* 1st cache line */
|
/* 1st cache line */
|
||||||
u32 VersionId; /* SIGNAL_QUEUE_HEADER Version ID */
|
u32 VersionId; /* SIGNAL_QUEUE_HEADER Version ID */
|
||||||
u32 Type; /* Queue type: storage, network */
|
u32 Type; /* Queue type: storage, network */
|
||||||
U64 Size; /* Total size of this queue in bytes */
|
u64 Size; /* Total size of this queue in bytes */
|
||||||
U64 oSignalBase; /* Offset to signal queue area */
|
u64 oSignalBase; /* Offset to signal queue area */
|
||||||
U64 FeatureFlags; /* Flags to modify behavior */
|
u64 FeatureFlags; /* Flags to modify behavior */
|
||||||
U64 NumSignalsSent; /* Total # of signals placed in this queue */
|
u64 NumSignalsSent; /* Total # of signals placed in this queue */
|
||||||
U64 NumOverflows; /* Total # of inserts failed due to
|
u64 NumOverflows; /* Total # of inserts failed due to
|
||||||
* full queue */
|
* full queue */
|
||||||
u32 SignalSize; /* Total size of a signal for this queue */
|
u32 SignalSize; /* Total size of a signal for this queue */
|
||||||
u32 MaxSignalSlots; /* Max # of slots in queue, 1 slot is
|
u32 MaxSignalSlots; /* Max # of slots in queue, 1 slot is
|
||||||
|
@ -268,16 +268,16 @@ typedef struct _SIGNAL_QUEUE_HEADER {
|
||||||
* (MaxSignalSlots-1) */
|
* (MaxSignalSlots-1) */
|
||||||
u32 Head; /* Queue head signal # */
|
u32 Head; /* Queue head signal # */
|
||||||
/* 2nd cache line */
|
/* 2nd cache line */
|
||||||
U64 NumSignalsReceived; /* Total # of signals removed from this queue */
|
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) */
|
* cache line) */
|
||||||
u32 Reserved1; /* Reserved field */
|
u32 Reserved1; /* Reserved field */
|
||||||
U64 Reserved2; /* Resrved field */
|
u64 Reserved2; /* Resrved field */
|
||||||
U64 ClientQueue;
|
u64 ClientQueue;
|
||||||
U64 NumInterruptsReceived; /* Total # of Interrupts received. This
|
u64 NumInterruptsReceived; /* 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 NumEmptyCnt; /* Number of times that visor_signal_remove
|
u64 NumEmptyCnt; /* 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
|
||||||
|
@ -311,9 +311,9 @@ static inline int
|
||||||
ULTRA_check_channel_client(void __iomem *pChannel,
|
ULTRA_check_channel_client(void __iomem *pChannel,
|
||||||
uuid_le expectedTypeGuid,
|
uuid_le expectedTypeGuid,
|
||||||
char *channelName,
|
char *channelName,
|
||||||
U64 expectedMinBytes,
|
u64 expectedMinBytes,
|
||||||
u32 expectedVersionId,
|
u32 expectedVersionId,
|
||||||
U64 expectedSignature,
|
u64 expectedSignature,
|
||||||
char *fileName, int lineNumber, void *logCtx)
|
char *fileName, int lineNumber, void *logCtx)
|
||||||
{
|
{
|
||||||
if (uuid_le_cmp(expectedTypeGuid, NULL_UUID_LE) != 0)
|
if (uuid_le_cmp(expectedTypeGuid, NULL_UUID_LE) != 0)
|
||||||
|
@ -373,8 +373,8 @@ ULTRA_check_channel_client(void __iomem *pChannel,
|
||||||
static inline int
|
static inline int
|
||||||
ULTRA_check_channel_server(uuid_le typeGuid,
|
ULTRA_check_channel_server(uuid_le typeGuid,
|
||||||
char *channelName,
|
char *channelName,
|
||||||
U64 expectedMinBytes,
|
u64 expectedMinBytes,
|
||||||
U64 actualBytes,
|
u64 actualBytes,
|
||||||
char *fileName, int lineNumber, void *logCtx)
|
char *fileName, int lineNumber, void *logCtx)
|
||||||
{
|
{
|
||||||
if (expectedMinBytes > 0) /* caller wants us to verify
|
if (expectedMinBytes > 0) /* caller wants us to verify
|
||||||
|
|
|
@ -64,7 +64,7 @@ static const ULTRA_SEGMENT_STATE SegmentStateStandby = {
|
||||||
1, 1, 0, 0, 1, 1, 1, 0
|
1, 1, 0, 0, 1, 1, 1, 0
|
||||||
};
|
};
|
||||||
typedef union {
|
typedef union {
|
||||||
U64 Full;
|
u64 Full;
|
||||||
struct {
|
struct {
|
||||||
u8 Major; /* will be 1 for the first release and
|
u8 Major; /* will be 1 for the first release and
|
||||||
* increment thereafter */
|
* increment thereafter */
|
||||||
|
|
|
@ -126,13 +126,13 @@ struct InterruptInfo {
|
||||||
* interrupt. Currently this is used by IOPart-SP to wake
|
* interrupt. Currently this is used by IOPart-SP to wake
|
||||||
* up GP when Data Channel transitions from empty to
|
* up GP when Data Channel transitions from empty to
|
||||||
* non-empty.*/
|
* non-empty.*/
|
||||||
U64 sendInterruptHandle;
|
u64 sendInterruptHandle;
|
||||||
|
|
||||||
/**< specifies interrupt handle. It is used to retrieve the
|
/**< specifies interrupt handle. It is used to retrieve the
|
||||||
* corresponding interrupt pin from Monitor; and the
|
* corresponding interrupt pin from Monitor; and the
|
||||||
* interrupt pin is used to connect to the corresponding
|
* interrupt pin is used to connect to the corresponding
|
||||||
* intrrupt. Used by IOPart-GP only. */
|
* intrrupt. Used by IOPart-GP only. */
|
||||||
U64 recvInterruptHandle;
|
u64 recvInterruptHandle;
|
||||||
|
|
||||||
/**< specifies interrupt vector. It, interrupt pin, and shared are
|
/**< specifies interrupt vector. It, interrupt pin, and shared are
|
||||||
* used to connect to the corresponding interrupt. Used by
|
* used to connect to the corresponding interrupt. Used by
|
||||||
|
@ -218,10 +218,10 @@ typedef enum _ULTRA_TOOL_ACTIONS {
|
||||||
} ULTRA_TOOL_ACTIONS;
|
} ULTRA_TOOL_ACTIONS;
|
||||||
|
|
||||||
typedef struct _ULTRA_EFI_SPAR_INDICATION {
|
typedef struct _ULTRA_EFI_SPAR_INDICATION {
|
||||||
U64 BootToFirmwareUI:1; /* Bit 0: Stop in uefi ui */
|
u64 BootToFirmwareUI:1; /* Bit 0: Stop in uefi ui */
|
||||||
U64 ClearNvram:1; /* Bit 1: Clear NVRAM */
|
u64 ClearNvram:1; /* Bit 1: Clear NVRAM */
|
||||||
U64 ClearCmos:1; /* Bit 2: Clear CMOS */
|
u64 ClearCmos:1; /* Bit 2: Clear CMOS */
|
||||||
U64 BootToTool:1; /* Bit 3: Run install tool */
|
u64 BootToTool:1; /* Bit 3: Run install tool */
|
||||||
/* remaining bits are available */
|
/* remaining bits are available */
|
||||||
} ULTRA_EFI_SPAR_INDICATION;
|
} ULTRA_EFI_SPAR_INDICATION;
|
||||||
|
|
||||||
|
@ -272,10 +272,10 @@ typedef struct _CONTROLVM_MESSAGE_HEADER {
|
||||||
/* remaining bits in this 32-bit word are available */
|
/* remaining bits in this 32-bit word are available */
|
||||||
} Flags;
|
} Flags;
|
||||||
u32 Reserved; /* Natural alignment */
|
u32 Reserved; /* Natural alignment */
|
||||||
U64 MessageHandle; /* Identifies the particular message instance,
|
u64 MessageHandle; /* Identifies the particular message instance,
|
||||||
* and is used to match particular */
|
* and is used to match particular */
|
||||||
/* request instances with the corresponding response instance. */
|
/* request instances with the corresponding response instance. */
|
||||||
U64 PayloadVmOffset; /* Offset of payload area from start of this
|
u64 PayloadVmOffset; /* Offset of payload area from start of this
|
||||||
* instance of ControlVm segment */
|
* instance of ControlVm segment */
|
||||||
u32 PayloadMaxBytes; /* Maximum bytes allocated in payload
|
u32 PayloadMaxBytes; /* Maximum bytes allocated in payload
|
||||||
* area of ControlVm segment */
|
* area of ControlVm segment */
|
||||||
|
@ -290,10 +290,10 @@ typedef struct _CONTROLVM_PACKET_DEVICE_CREATE {
|
||||||
|
|
||||||
/* Control uses header SegmentIndex field to access bus number... */
|
/* 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
|
u64 channelAddr; /**< Guest physical address of the channel, which
|
||||||
* can be dereferenced by the receiver
|
* can be dereferenced by the receiver
|
||||||
* of this ControlVm command */
|
* of this ControlVm command */
|
||||||
U64 channelBytes; /**< specifies size of the channel in bytes */
|
u64 channelBytes; /**< specifies size of the channel in bytes */
|
||||||
uuid_le dataTypeGuid;/**< specifies format of data in channel */
|
uuid_le dataTypeGuid;/**< specifies format of data in channel */
|
||||||
uuid_le devInstGuid; /**< instance guid for the device */
|
uuid_le devInstGuid; /**< instance guid for the device */
|
||||||
struct InterruptInfo intr; /**< specifies interrupt information */
|
struct InterruptInfo intr; /**< specifies interrupt information */
|
||||||
|
@ -329,11 +329,11 @@ typedef struct _CONTROLVM_MESSAGE_PACKET {
|
||||||
/* Control uses header SegmentIndex field to access bus number... */
|
/* 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 */
|
* devices on this bus */
|
||||||
U64 channelAddr; /*< Guest physical address of the
|
u64 channelAddr; /*< Guest physical address of the
|
||||||
* channel, which can be
|
* channel, which can be
|
||||||
* dereferenced by the receiver
|
* dereferenced by the receiver
|
||||||
* of this ControlVm command */
|
* of this ControlVm command */
|
||||||
U64 channelBytes; /*< size of the channel in bytes */
|
u64 channelBytes; /*< size of the channel in bytes */
|
||||||
uuid_le busDataTypeGuid;/*< indicates format of data in
|
uuid_le busDataTypeGuid;/*< indicates format of data in
|
||||||
bus channel */
|
bus channel */
|
||||||
uuid_le busInstGuid; /*< instance guid for the bus */
|
uuid_le busInstGuid; /*< instance guid for the bus */
|
||||||
|
@ -352,10 +352,10 @@ typedef struct _CONTROLVM_MESSAGE_PACKET {
|
||||||
|
|
||||||
/* Control uses header SegmentIndex field to access bus number... */
|
/* 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
|
u64 guestHandle; /* This is used to convert
|
||||||
* guest physical address to real
|
* guest physical address to real
|
||||||
* physical address for DMA, for ex. */
|
* physical address for DMA, for ex. */
|
||||||
U64 recvBusInterruptHandle;/*< specifies interrupt
|
u64 recvBusInterruptHandle;/*< specifies interrupt
|
||||||
* info. It is used by SP to register
|
* info. It is used by SP to register
|
||||||
* to receive interrupts from the CP.
|
* to receive interrupts from the CP.
|
||||||
* This interrupt is used for bus
|
* This interrupt is used for bus
|
||||||
|
@ -434,11 +434,11 @@ typedef struct _CONTROLVM_MESSAGE_PACKET {
|
||||||
/* BEGIN Ack messages */
|
/* BEGIN Ack messages */
|
||||||
|
|
||||||
/* END Ack messages */
|
/* END Ack messages */
|
||||||
U64 addr; /*< a physical address of something, that
|
u64 addr; /*< a physical address of something, that
|
||||||
* can be dereferenced by the receiver of
|
* can be dereferenced by the receiver of
|
||||||
* this ControlVm command (depends on
|
* this ControlVm command (depends on
|
||||||
* command id) */
|
* command id) */
|
||||||
U64 handle; /*< a handle of something (depends on
|
u64 handle; /*< a handle of something (depends on
|
||||||
* command id) */
|
* command id) */
|
||||||
};
|
};
|
||||||
} CONTROLVM_MESSAGE_PACKET;
|
} CONTROLVM_MESSAGE_PACKET;
|
||||||
|
@ -451,10 +451,10 @@ typedef struct _CONTROLVM_MESSAGE {
|
||||||
|
|
||||||
typedef struct _DEVICE_MAP {
|
typedef struct _DEVICE_MAP {
|
||||||
GUEST_PHYSICAL_ADDRESS DeviceChannelAddress;
|
GUEST_PHYSICAL_ADDRESS DeviceChannelAddress;
|
||||||
U64 DeviceChannelSize;
|
u64 DeviceChannelSize;
|
||||||
u32 CA_Index;
|
u32 CA_Index;
|
||||||
u32 Reserved; /* natural alignment */
|
u32 Reserved; /* natural alignment */
|
||||||
U64 Reserved2; /* Align structure on 32-byte boundary */
|
u64 Reserved2; /* Align structure on 32-byte boundary */
|
||||||
} DEVICE_MAP;
|
} DEVICE_MAP;
|
||||||
|
|
||||||
typedef struct _GUEST_DEVICES {
|
typedef struct _GUEST_DEVICES {
|
||||||
|
@ -487,8 +487,8 @@ typedef struct _ULTRA_CONTROLVM_CHANNEL_PROTOCOL {
|
||||||
* ROM disk */
|
* ROM disk */
|
||||||
GUEST_PHYSICAL_ADDRESS gpNvram; /* guest phys addr of NVRAM
|
GUEST_PHYSICAL_ADDRESS gpNvram; /* guest phys addr of NVRAM
|
||||||
* channel */
|
* channel */
|
||||||
U64 RequestPayloadOffset; /* Offset to request payload area */
|
u64 RequestPayloadOffset; /* Offset to request payload area */
|
||||||
U64 EventPayloadOffset; /* Offset to event payload area */
|
u64 EventPayloadOffset; /* Offset to event payload area */
|
||||||
u32 RequestPayloadBytes; /* Bytes available in request payload
|
u32 RequestPayloadBytes; /* Bytes available in request payload
|
||||||
* area */
|
* area */
|
||||||
u32 EventPayloadBytes; /* Bytes available in event payload area */
|
u32 EventPayloadBytes; /* Bytes available in event payload area */
|
||||||
|
@ -510,13 +510,13 @@ typedef struct _ULTRA_CONTROLVM_CHANNEL_PROTOCOL {
|
||||||
GUEST_PHYSICAL_ADDRESS VirtualGuestFirmwareEntryPoint;
|
GUEST_PHYSICAL_ADDRESS VirtualGuestFirmwareEntryPoint;
|
||||||
|
|
||||||
/* guest EFI firmware image size */
|
/* guest EFI firmware image size */
|
||||||
U64 VirtualGuestFirmwareImageSize;
|
u64 VirtualGuestFirmwareImageSize;
|
||||||
|
|
||||||
/* GPA = 1MB where EFI firmware image is copied to */
|
/* GPA = 1MB where EFI firmware image is copied to */
|
||||||
GUEST_PHYSICAL_ADDRESS VirtualGuestFirmwareBootBase;
|
GUEST_PHYSICAL_ADDRESS VirtualGuestFirmwareBootBase;
|
||||||
GUEST_PHYSICAL_ADDRESS VirtualGuestImageBase;
|
GUEST_PHYSICAL_ADDRESS VirtualGuestImageBase;
|
||||||
GUEST_PHYSICAL_ADDRESS VirtualGuestImageSize;
|
GUEST_PHYSICAL_ADDRESS VirtualGuestImageSize;
|
||||||
U64 PrototypeControlChannelOffset;
|
u64 PrototypeControlChannelOffset;
|
||||||
GUEST_PHYSICAL_ADDRESS VirtualGuestPartitionHandle;
|
GUEST_PHYSICAL_ADDRESS VirtualGuestPartitionHandle;
|
||||||
|
|
||||||
u16 RestoreAction; /* Restore Action field to restore the guest
|
u16 RestoreAction; /* Restore Action field to restore the guest
|
||||||
|
|
|
@ -167,7 +167,7 @@ typedef struct _DIAG_CHANNEL_EVENT {
|
||||||
u16 LogicalProcessorNumber;
|
u16 LogicalProcessorNumber;
|
||||||
u8 ComponentType; /* ULTRA_COMPONENT_TYPES */
|
u8 ComponentType; /* ULTRA_COMPONENT_TYPES */
|
||||||
u8 Subsystem;
|
u8 Subsystem;
|
||||||
u16 Reserved0; /* pad to U64 alignment */
|
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 */
|
* filled */
|
||||||
u32 BlockNumberHigh;
|
u32 BlockNumberHigh;
|
||||||
|
|
|
@ -250,8 +250,8 @@ typedef enum { VDISK_MGMT_ACQUIRE = 1, VDISK_MGMT_RELEASE,
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
|
|
||||||
struct guest_phys_info {
|
struct guest_phys_info {
|
||||||
U64 address;
|
u64 address;
|
||||||
U64 length;
|
u64 length;
|
||||||
};
|
};
|
||||||
|
|
||||||
#define GPI_ENTRIES_PER_PAGE (PAGE_SIZE / sizeof(struct guest_phys_info))
|
#define GPI_ENTRIES_PER_PAGE (PAGE_SIZE / sizeof(struct guest_phys_info))
|
||||||
|
@ -529,7 +529,7 @@ struct net_pkt_rcvpost {
|
||||||
* to be describable */
|
* to be describable */
|
||||||
struct phys_info frag; /* physical page information for the
|
struct phys_info frag; /* physical page information for the
|
||||||
* single fragment 2K rcv buf */
|
* single fragment 2K rcv buf */
|
||||||
U64 UniqueNum; /* This is used to make sure that
|
u64 UniqueNum; /* This is used to make sure that
|
||||||
* receive posts are returned to */
|
* receive posts are returned to */
|
||||||
/* the Adapter which sent them origonally. */
|
/* the Adapter which sent them origonally. */
|
||||||
};
|
};
|
||||||
|
@ -545,7 +545,7 @@ struct net_pkt_rcv {
|
||||||
* that must be chained; */
|
* that must be chained; */
|
||||||
/* each entry is a receive buffer provided by NET_RCV_POST. */
|
/* each entry is a receive buffer provided by NET_RCV_POST. */
|
||||||
/* NOTE: first rcvbuf in the chain will also be provided in net.buf. */
|
/* NOTE: first rcvbuf in the chain will also be provided in net.buf. */
|
||||||
U64 UniqueNum;
|
u64 UniqueNum;
|
||||||
u32 RcvsDroppedDelta;
|
u32 RcvsDroppedDelta;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -801,7 +801,7 @@ static inline int ULTRA_VHBA_init_channel(ULTRA_IO_CHANNEL_PROTOCOL *x,
|
||||||
struct vhba_wwnn *wwnn,
|
struct vhba_wwnn *wwnn,
|
||||||
struct vhba_config_max *max,
|
struct vhba_config_max *max,
|
||||||
unsigned char *clientStr,
|
unsigned char *clientStr,
|
||||||
u32 clientStrLen, U64 bytes) {
|
u32 clientStrLen, u64 bytes) {
|
||||||
MEMSET(x, 0, sizeof(ULTRA_IO_CHANNEL_PROTOCOL));
|
MEMSET(x, 0, sizeof(ULTRA_IO_CHANNEL_PROTOCOL));
|
||||||
x->ChannelHeader.VersionId = ULTRA_VHBA_CHANNEL_PROTOCOL_VERSIONID;
|
x->ChannelHeader.VersionId = ULTRA_VHBA_CHANNEL_PROTOCOL_VERSIONID;
|
||||||
x->ChannelHeader.Signature = ULTRA_VHBA_CHANNEL_PROTOCOL_SIGNATURE;
|
x->ChannelHeader.Signature = ULTRA_VHBA_CHANNEL_PROTOCOL_SIGNATURE;
|
||||||
|
@ -837,7 +837,7 @@ static inline int ULTRA_VNIC_init_channel(ULTRA_IO_CHANNEL_PROTOCOL *x,
|
||||||
uuid_le zoneGuid,
|
uuid_le zoneGuid,
|
||||||
unsigned char *clientStr,
|
unsigned char *clientStr,
|
||||||
u32 clientStrLen,
|
u32 clientStrLen,
|
||||||
U64 bytes) {
|
u64 bytes) {
|
||||||
MEMSET(x, 0, sizeof(ULTRA_IO_CHANNEL_PROTOCOL));
|
MEMSET(x, 0, sizeof(ULTRA_IO_CHANNEL_PROTOCOL));
|
||||||
x->ChannelHeader.VersionId = ULTRA_VNIC_CHANNEL_PROTOCOL_VERSIONID;
|
x->ChannelHeader.VersionId = ULTRA_VNIC_CHANNEL_PROTOCOL_VERSIONID;
|
||||||
x->ChannelHeader.Signature = ULTRA_VNIC_CHANNEL_PROTOCOL_SIGNATURE;
|
x->ChannelHeader.Signature = ULTRA_VNIC_CHANNEL_PROTOCOL_SIGNATURE;
|
||||||
|
|
|
@ -100,7 +100,7 @@ do { \
|
||||||
/* ///////////// ONLY STRUCT TYPE SHOULD BE BELOW */
|
/* ///////////// ONLY STRUCT TYPE SHOULD BE BELOW */
|
||||||
#pragma pack(push, 1)
|
#pragma pack(push, 1)
|
||||||
struct phys_info {
|
struct phys_info {
|
||||||
U64 pi_pfn;
|
u64 pi_pfn;
|
||||||
u16 pi_off;
|
u16 pi_off;
|
||||||
u16 pi_len;
|
u16 pi_len;
|
||||||
};
|
};
|
||||||
|
@ -116,7 +116,7 @@ typedef struct phys_info IO_DATA_STRUCTURE;
|
||||||
typedef struct _VMCALL_IO_CONTROLVM_ADDR_PARAMS {
|
typedef struct _VMCALL_IO_CONTROLVM_ADDR_PARAMS {
|
||||||
/* The Guest-relative physical address of the ControlVm channel.
|
/* The Guest-relative physical address of the ControlVm channel.
|
||||||
* This VMCall fills this in with the appropriate address. */
|
* This VMCall fills this in with the appropriate address. */
|
||||||
U64 ChannelAddress; /* contents provided by this VMCALL (OUT) */
|
u64 ChannelAddress; /* contents provided by this VMCALL (OUT) */
|
||||||
/* the size of the ControlVm channel in bytes This VMCall fills this
|
/* the size of the ControlVm channel in bytes This VMCall fills this
|
||||||
* in with the appropriate address. */
|
* in with the appropriate address. */
|
||||||
u32 ChannelBytes; /* contents provided by this VMCALL (OUT) */
|
u32 ChannelBytes; /* contents provided by this VMCALL (OUT) */
|
||||||
|
@ -133,7 +133,7 @@ typedef struct _VMCALL_IO_CONTROLVM_ADDR_PARAMS {
|
||||||
typedef struct _VMCALL_IO_DIAG_ADDR_PARAMS {
|
typedef struct _VMCALL_IO_DIAG_ADDR_PARAMS {
|
||||||
/* The Guest-relative physical address of the diagnostic channel.
|
/* The Guest-relative physical address of the diagnostic channel.
|
||||||
* This VMCall fills this in with the appropriate address. */
|
* This VMCall fills this in with the appropriate address. */
|
||||||
U64 ChannelAddress; /* contents provided by this VMCALL (OUT) */
|
u64 ChannelAddress; /* contents provided by this VMCALL (OUT) */
|
||||||
} VMCALL_IO_DIAG_ADDR_PARAMS;
|
} VMCALL_IO_DIAG_ADDR_PARAMS;
|
||||||
|
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
@ -147,7 +147,7 @@ typedef struct _VMCALL_IO_VISORSERIAL_ADDR_PARAMS {
|
||||||
/* The Guest-relative physical address of the serial console
|
/* The Guest-relative physical address of the serial console
|
||||||
* channel. This VMCall fills this in with the appropriate
|
* channel. This VMCall fills this in with the appropriate
|
||||||
* address. */
|
* address. */
|
||||||
U64 ChannelAddress; /* contents provided by this VMCALL (OUT) */
|
u64 ChannelAddress; /* contents provided by this VMCALL (OUT) */
|
||||||
} VMCALL_IO_VISORSERIAL_ADDR_PARAMS;
|
} VMCALL_IO_VISORSERIAL_ADDR_PARAMS;
|
||||||
|
|
||||||
#pragma pack(pop)
|
#pragma pack(pop)
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define U64 uint64_t
|
|
||||||
#define S8 int8_t
|
#define S8 int8_t
|
||||||
#define S16 int16_t
|
#define S16 int16_t
|
||||||
#define S32 int32_t
|
#define S32 int32_t
|
||||||
|
@ -41,7 +40,7 @@
|
||||||
#ifdef CONFIG_X86_32
|
#ifdef CONFIG_X86_32
|
||||||
#define UINTN u32
|
#define UINTN u32
|
||||||
#else
|
#else
|
||||||
#define UINTN U64
|
#define UINTN u64
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
@ -50,14 +49,14 @@
|
||||||
#if __WORDSIZE == 32
|
#if __WORDSIZE == 32
|
||||||
#define UINTN u32
|
#define UINTN u32
|
||||||
#elif __WORDSIZE == 64
|
#elif __WORDSIZE == 64
|
||||||
#define UINTN U64
|
#define UINTN u64
|
||||||
#else
|
#else
|
||||||
#error Unsupported __WORDSIZE
|
#error Unsupported __WORDSIZE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
typedef U64 GUEST_PHYSICAL_ADDRESS;
|
typedef u64 GUEST_PHYSICAL_ADDRESS;
|
||||||
|
|
||||||
#define MEMSET(ptr, val, len) memset(ptr, val, len)
|
#define MEMSET(ptr, val, len) memset(ptr, val, len)
|
||||||
#define MEMCMP(m1, m2, len) memcmp(m1, m2, len)
|
#define MEMCMP(m1, m2, len) memcmp(m1, m2, len)
|
||||||
|
@ -120,7 +119,7 @@ typedef U64 GUEST_PHYSICAL_ADDRESS;
|
||||||
fil, lin); \
|
fil, lin); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define CHANNEL_u32_MISMATCH(chType, chName, field, expected, actual, fil, \
|
#define CHANNEL_U32_MISMATCH(chType, chName, field, expected, actual, fil, \
|
||||||
lin, logCtx) \
|
lin, logCtx) \
|
||||||
do { \
|
do { \
|
||||||
syslog(LOG_USER | LOG_ERR, \
|
syslog(LOG_USER | LOG_ERR, \
|
||||||
|
|
|
@ -150,19 +150,19 @@ typedef enum { /* POSTCODE event identifier tuples */
|
||||||
#define POSTCODE_LINUX_A(DRIVER_PC, EVENT_PC, pc32bit, severity) \
|
#define POSTCODE_LINUX_A(DRIVER_PC, EVENT_PC, pc32bit, severity) \
|
||||||
do { \
|
do { \
|
||||||
unsigned long long post_code_temp; \
|
unsigned long long post_code_temp; \
|
||||||
post_code_temp = (((U64)DRIVER_PC) << 56) | (((U64)EVENT_PC) << 44) | \
|
post_code_temp = (((u64)DRIVER_PC) << 56) | (((u64)EVENT_PC) << 44) | \
|
||||||
((((U64)__LINE__) & 0xFFF) << 32) | \
|
((((u64)__LINE__) & 0xFFF) << 32) | \
|
||||||
(((U64)pc32bit) & 0xFFFFFFFF); \
|
(((u64)pc32bit) & 0xFFFFFFFF); \
|
||||||
ISSUE_IO_VMCALL_POSTCODE_SEVERITY(post_code_temp, severity); \
|
ISSUE_IO_VMCALL_POSTCODE_SEVERITY(post_code_temp, severity); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
#define POSTCODE_LINUX_B(DRIVER_PC, EVENT_PC, pc16bit1, pc16bit2, severity) \
|
#define POSTCODE_LINUX_B(DRIVER_PC, EVENT_PC, pc16bit1, pc16bit2, severity) \
|
||||||
do { \
|
do { \
|
||||||
unsigned long long post_code_temp; \
|
unsigned long long post_code_temp; \
|
||||||
post_code_temp = (((U64)DRIVER_PC) << 56) | (((U64)EVENT_PC) << 44) | \
|
post_code_temp = (((u64)DRIVER_PC) << 56) | (((u64)EVENT_PC) << 44) | \
|
||||||
((((U64)__LINE__) & 0xFFF) << 32) | \
|
((((u64)__LINE__) & 0xFFF) << 32) | \
|
||||||
((((U64)pc16bit1) & 0xFFFF) << 16) | \
|
((((u64)pc16bit1) & 0xFFFF) << 16) | \
|
||||||
(((U64)pc16bit2) & 0xFFFF); \
|
(((u64)pc16bit2) & 0xFFFF); \
|
||||||
ISSUE_IO_VMCALL_POSTCODE_SEVERITY(post_code_temp, severity); \
|
ISSUE_IO_VMCALL_POSTCODE_SEVERITY(post_code_temp, severity); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
|
@ -39,13 +39,13 @@ struct uisqueue_info {
|
||||||
/* channel containing queues in which scsi commands &
|
/* channel containing queues in which scsi commands &
|
||||||
* responses are queued
|
* responses are queued
|
||||||
*/
|
*/
|
||||||
U64 packets_sent;
|
u64 packets_sent;
|
||||||
U64 packets_received;
|
u64 packets_received;
|
||||||
U64 interrupts_sent;
|
u64 interrupts_sent;
|
||||||
U64 interrupts_received;
|
u64 interrupts_received;
|
||||||
U64 max_not_empty_cnt;
|
u64 max_not_empty_cnt;
|
||||||
U64 total_wakeup_cnt;
|
u64 total_wakeup_cnt;
|
||||||
U64 non_empty_wakeup_cnt;
|
u64 non_empty_wakeup_cnt;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
SIGNAL_QUEUE_HEADER Reserved1; /* */
|
SIGNAL_QUEUE_HEADER Reserved1; /* */
|
||||||
|
@ -54,7 +54,7 @@ struct uisqueue_info {
|
||||||
unsigned int (*send_int_if_needed)(struct uisqueue_info *info,
|
unsigned int (*send_int_if_needed)(struct uisqueue_info *info,
|
||||||
unsigned int whichcqueue,
|
unsigned int whichcqueue,
|
||||||
unsigned char issueInterruptIfEmpty,
|
unsigned char issueInterruptIfEmpty,
|
||||||
U64 interruptHandle,
|
u64 interruptHandle,
|
||||||
unsigned char io_termination);
|
unsigned char io_termination);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ unsigned long long uisqueue_InterlockedAnd(unsigned long long __iomem *Target,
|
||||||
unsigned int uisqueue_send_int_if_needed(struct uisqueue_info *pqueueinfo,
|
unsigned int uisqueue_send_int_if_needed(struct uisqueue_info *pqueueinfo,
|
||||||
unsigned int whichqueue,
|
unsigned int whichqueue,
|
||||||
unsigned char issueInterruptIfEmpty,
|
unsigned char issueInterruptIfEmpty,
|
||||||
U64 interruptHandle,
|
u64 interruptHandle,
|
||||||
unsigned char io_termination);
|
unsigned char io_termination);
|
||||||
|
|
||||||
int uisqueue_put_cmdrsp_with_lock_client(struct uisqueue_info *queueinfo,
|
int uisqueue_put_cmdrsp_with_lock_client(struct uisqueue_info *queueinfo,
|
||||||
|
@ -92,7 +92,7 @@ int uisqueue_put_cmdrsp_with_lock_client(struct uisqueue_info *queueinfo,
|
||||||
unsigned int queue,
|
unsigned int queue,
|
||||||
void *insertlock,
|
void *insertlock,
|
||||||
unsigned char issueInterruptIfEmpty,
|
unsigned char issueInterruptIfEmpty,
|
||||||
U64 interruptHandle,
|
u64 interruptHandle,
|
||||||
char oktowait,
|
char oktowait,
|
||||||
u8 *channelId);
|
u8 *channelId);
|
||||||
|
|
||||||
|
@ -135,8 +135,8 @@ struct extport_info {
|
||||||
|
|
||||||
struct device_info {
|
struct device_info {
|
||||||
void __iomem *chanptr;
|
void __iomem *chanptr;
|
||||||
U64 channelAddr;
|
u64 channelAddr;
|
||||||
U64 channelBytes;
|
u64 channelBytes;
|
||||||
uuid_le channelTypeGuid;
|
uuid_le channelTypeGuid;
|
||||||
uuid_le devInstGuid;
|
uuid_le devInstGuid;
|
||||||
struct InterruptInfo intr;
|
struct InterruptInfo intr;
|
||||||
|
@ -163,7 +163,7 @@ typedef enum {
|
||||||
struct bus_info {
|
struct bus_info {
|
||||||
u32 busNo, deviceCount;
|
u32 busNo, deviceCount;
|
||||||
struct device_info **device;
|
struct device_info **device;
|
||||||
U64 guestHandle, recvBusInterruptHandle;
|
u64 guestHandle, recvBusInterruptHandle;
|
||||||
uuid_le busInstGuid;
|
uuid_le busInstGuid;
|
||||||
ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *pBusChannel;
|
ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *pBusChannel;
|
||||||
int busChannelBytes;
|
int busChannelBytes;
|
||||||
|
@ -229,10 +229,10 @@ typedef enum {
|
||||||
|
|
||||||
struct add_virt_iopart {
|
struct add_virt_iopart {
|
||||||
void *chanptr; /* pointer to data channel */
|
void *chanptr; /* pointer to data channel */
|
||||||
U64 guestHandle; /* used to convert guest physical
|
u64 guestHandle; /* used to convert guest physical
|
||||||
* address to real physical address
|
* address to real physical address
|
||||||
* for DMA, for ex. */
|
* for DMA, for ex. */
|
||||||
U64 recvBusInterruptHandle; /* used to register to receive
|
u64 recvBusInterruptHandle; /* used to register to receive
|
||||||
* bus level interrupts. */
|
* bus level interrupts. */
|
||||||
struct InterruptInfo intr; /* contains recv & send
|
struct InterruptInfo intr; /* contains recv & send
|
||||||
* interrupt info */
|
* interrupt info */
|
||||||
|
|
|
@ -60,7 +60,7 @@ typedef struct ReqHandlerInfo_struct {
|
||||||
unsigned long min_channel_bytes;
|
unsigned long min_channel_bytes;
|
||||||
int (*Server_Channel_Ok)(unsigned long channelBytes);
|
int (*Server_Channel_Ok)(unsigned long channelBytes);
|
||||||
int (*Server_Channel_Init)
|
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];
|
char switch_type_name[99];
|
||||||
struct list_head list_link; /* links into ReqHandlerInfo_list */
|
struct list_head list_link; /* links into ReqHandlerInfo_list */
|
||||||
} ReqHandlerInfo_t;
|
} ReqHandlerInfo_t;
|
||||||
|
@ -73,7 +73,7 @@ ReqHandlerInfo_t *ReqHandlerAdd(uuid_le switchTypeGuid,
|
||||||
channelBytes),
|
channelBytes),
|
||||||
int (*Server_Channel_Init)
|
int (*Server_Channel_Init)
|
||||||
(void *x, unsigned char *clientStr,
|
(void *x, unsigned char *clientStr,
|
||||||
u32 clientStrLen, U64 bytes));
|
u32 clientStrLen, u64 bytes));
|
||||||
ReqHandlerInfo_t *ReqHandlerFind(uuid_le switchTypeGuid);
|
ReqHandlerInfo_t *ReqHandlerFind(uuid_le switchTypeGuid);
|
||||||
int ReqHandlerDel(uuid_le switchTypeGuid);
|
int ReqHandlerDel(uuid_le switchTypeGuid);
|
||||||
|
|
||||||
|
@ -81,7 +81,7 @@ int ReqHandlerDel(uuid_le switchTypeGuid);
|
||||||
dbg_ioremap_cache(addr, size, __FILE__, __LINE__)
|
dbg_ioremap_cache(addr, size, __FILE__, __LINE__)
|
||||||
|
|
||||||
static inline void __iomem *
|
static inline void __iomem *
|
||||||
dbg_ioremap_cache(U64 addr, unsigned long size, char *file, int line)
|
dbg_ioremap_cache(u64 addr, unsigned long size, char *file, int line)
|
||||||
{
|
{
|
||||||
void __iomem *new;
|
void __iomem *new;
|
||||||
new = ioremap_cache(addr, size);
|
new = ioremap_cache(addr, size);
|
||||||
|
@ -91,7 +91,7 @@ dbg_ioremap_cache(U64 addr, unsigned long size, char *file, int line)
|
||||||
#define uislib_ioremap(addr, size) dbg_ioremap(addr, size, __FILE__, __LINE__)
|
#define uislib_ioremap(addr, size) dbg_ioremap(addr, size, __FILE__, __LINE__)
|
||||||
|
|
||||||
static inline void *
|
static inline void *
|
||||||
dbg_ioremap(U64 addr, unsigned long size, char *file, int line)
|
dbg_ioremap(u64 addr, unsigned long size, char *file, int line)
|
||||||
{
|
{
|
||||||
void *new;
|
void *new;
|
||||||
new = ioremap(addr, size);
|
new = ioremap(addr, size);
|
||||||
|
@ -121,7 +121,7 @@ int uisctrl_register_req_handler_ex(uuid_le switchTypeGuid,
|
||||||
channelBytes),
|
channelBytes),
|
||||||
int (*Server_Channel_Init)
|
int (*Server_Channel_Init)
|
||||||
(void *x, unsigned char *clientStr,
|
(void *x, unsigned char *clientStr,
|
||||||
u32 clientStrLen, U64 bytes),
|
u32 clientStrLen, u64 bytes),
|
||||||
ULTRA_VBUS_DEVICEINFO *chipset_DriverInfo);
|
ULTRA_VBUS_DEVICEINFO *chipset_DriverInfo);
|
||||||
|
|
||||||
int uisctrl_unregister_req_handler_ex(uuid_le switchTypeGuid);
|
int uisctrl_unregister_req_handler_ex(uuid_le switchTypeGuid);
|
||||||
|
@ -135,25 +135,25 @@ int uislib_server_inject_add_vnic(u32 switchNo, u32 BusNo, u32 numIntPorts,
|
||||||
void uislib_server_inject_del_vnic(u32 switchNo, u32 busNo, u32 numIntPorts,
|
void uislib_server_inject_del_vnic(u32 switchNo, u32 busNo, u32 numIntPorts,
|
||||||
u32 numExtPorts);
|
u32 numExtPorts);
|
||||||
int uislib_client_inject_add_bus(u32 busNo, uuid_le instGuid,
|
int uislib_client_inject_add_bus(u32 busNo, uuid_le instGuid,
|
||||||
U64 channelAddr, ulong nChannelBytes);
|
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,
|
int uislib_client_inject_add_vhba(u32 busNo, u32 devNo,
|
||||||
U64 phys_chan_addr, u32 chan_bytes,
|
u64 phys_chan_addr, u32 chan_bytes,
|
||||||
int is_test_addr, uuid_le instGuid,
|
int is_test_addr, uuid_le instGuid,
|
||||||
struct InterruptInfo *intr);
|
struct InterruptInfo *intr);
|
||||||
int uislib_client_inject_pause_vhba(u32 busNo, u32 devNo);
|
int uislib_client_inject_pause_vhba(u32 busNo, u32 devNo);
|
||||||
int uislib_client_inject_resume_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_del_vhba(u32 busNo, u32 devNo);
|
||||||
int uislib_client_inject_add_vnic(u32 busNo, u32 devNo,
|
int uislib_client_inject_add_vnic(u32 busNo, u32 devNo,
|
||||||
U64 phys_chan_addr, u32 chan_bytes,
|
u64 phys_chan_addr, u32 chan_bytes,
|
||||||
int is_test_addr, uuid_le instGuid,
|
int is_test_addr, uuid_le instGuid,
|
||||||
struct InterruptInfo *intr);
|
struct InterruptInfo *intr);
|
||||||
int uislib_client_inject_pause_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_resume_vnic(u32 busNo, u32 devNo);
|
||||||
int uislib_client_inject_del_vnic(u32 busNo, u32 devNo);
|
int uislib_client_inject_del_vnic(u32 busNo, u32 devNo);
|
||||||
#ifdef STORAGE_CHANNEL
|
#ifdef STORAGE_CHANNEL
|
||||||
U64 uislib_storage_channel(int client_id);
|
u64 uislib_storage_channel(int client_id);
|
||||||
#endif
|
#endif
|
||||||
int uislib_get_owned_pdest(struct uisscsi_dest *pdest);
|
int uislib_get_owned_pdest(struct uisscsi_dest *pdest);
|
||||||
|
|
||||||
|
@ -220,11 +220,11 @@ unsigned int uisutil_copy_fragsinfo_from_skb(unsigned char *calling_ctx,
|
||||||
struct phys_info frags[]);
|
struct phys_info frags[]);
|
||||||
|
|
||||||
static inline unsigned int
|
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;
|
VMCALL_IO_CONTROLVM_ADDR_PARAMS params;
|
||||||
int result = VMCALL_SUCCESS;
|
int result = VMCALL_SUCCESS;
|
||||||
U64 physaddr;
|
u64 physaddr;
|
||||||
|
|
||||||
physaddr = virt_to_phys(¶ms);
|
physaddr = virt_to_phys(¶ms);
|
||||||
ISSUE_IO_VMCALL(VMCALL_IO_CONTROLVM_ADDR, physaddr, result);
|
ISSUE_IO_VMCALL(VMCALL_IO_CONTROLVM_ADDR, physaddr, result);
|
||||||
|
@ -235,11 +235,11 @@ Issue_VMCALL_IO_CONTROLVM_ADDR(U64 *ControlAddress, u32 *ControlBytes)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned int Issue_VMCALL_IO_DIAG_ADDR(U64 *DiagChannelAddress)
|
static inline unsigned int Issue_VMCALL_IO_DIAG_ADDR(u64 *DiagChannelAddress)
|
||||||
{
|
{
|
||||||
VMCALL_IO_DIAG_ADDR_PARAMS params;
|
VMCALL_IO_DIAG_ADDR_PARAMS params;
|
||||||
int result = VMCALL_SUCCESS;
|
int result = VMCALL_SUCCESS;
|
||||||
U64 physaddr;
|
u64 physaddr;
|
||||||
|
|
||||||
physaddr = virt_to_phys(¶ms);
|
physaddr = virt_to_phys(¶ms);
|
||||||
ISSUE_IO_VMCALL(VMCALL_IO_DIAG_ADDR, physaddr, result);
|
ISSUE_IO_VMCALL(VMCALL_IO_DIAG_ADDR, physaddr, result);
|
||||||
|
@ -249,11 +249,11 @@ static inline unsigned int Issue_VMCALL_IO_DIAG_ADDR(U64 *DiagChannelAddress)
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline unsigned int
|
static inline unsigned int
|
||||||
Issue_VMCALL_IO_VISORSERIAL_ADDR(U64 *DiagChannelAddress)
|
Issue_VMCALL_IO_VISORSERIAL_ADDR(u64 *DiagChannelAddress)
|
||||||
{
|
{
|
||||||
VMCALL_IO_VISORSERIAL_ADDR_PARAMS params;
|
VMCALL_IO_VISORSERIAL_ADDR_PARAMS params;
|
||||||
int result = VMCALL_SUCCESS;
|
int result = VMCALL_SUCCESS;
|
||||||
U64 physaddr;
|
u64 physaddr;
|
||||||
|
|
||||||
physaddr = virt_to_phys(¶ms);
|
physaddr = virt_to_phys(¶ms);
|
||||||
ISSUE_IO_VMCALL(VMCALL_IO_VISORSERIAL_ADDR, physaddr, result);
|
ISSUE_IO_VMCALL(VMCALL_IO_VISORSERIAL_ADDR, physaddr, result);
|
||||||
|
@ -264,8 +264,8 @@ Issue_VMCALL_IO_VISORSERIAL_ADDR(U64 *DiagChannelAddress)
|
||||||
|
|
||||||
static inline S64 Issue_VMCALL_QUERY_GUEST_VIRTUAL_TIME_OFFSET(void)
|
static inline S64 Issue_VMCALL_QUERY_GUEST_VIRTUAL_TIME_OFFSET(void)
|
||||||
{
|
{
|
||||||
U64 result = VMCALL_SUCCESS;
|
u64 result = VMCALL_SUCCESS;
|
||||||
U64 physaddr = 0;
|
u64 physaddr = 0;
|
||||||
|
|
||||||
ISSUE_IO_VMCALL(VMCALL_QUERY_GUEST_VIRTUAL_TIME_OFFSET, physaddr,
|
ISSUE_IO_VMCALL(VMCALL_QUERY_GUEST_VIRTUAL_TIME_OFFSET, physaddr,
|
||||||
result);
|
result);
|
||||||
|
@ -274,8 +274,8 @@ static inline S64 Issue_VMCALL_QUERY_GUEST_VIRTUAL_TIME_OFFSET(void)
|
||||||
|
|
||||||
static inline S64 Issue_VMCALL_MEASUREMENT_DO_NOTHING(void)
|
static inline S64 Issue_VMCALL_MEASUREMENT_DO_NOTHING(void)
|
||||||
{
|
{
|
||||||
U64 result = VMCALL_SUCCESS;
|
u64 result = VMCALL_SUCCESS;
|
||||||
U64 physaddr = 0;
|
u64 physaddr = 0;
|
||||||
|
|
||||||
ISSUE_IO_VMCALL(VMCALL_MEASUREMENT_DO_NOTHING, physaddr, result);
|
ISSUE_IO_VMCALL(VMCALL_MEASUREMENT_DO_NOTHING, physaddr, result);
|
||||||
return result;
|
return result;
|
||||||
|
@ -289,7 +289,7 @@ struct log_info_t {
|
||||||
unsigned long long min_delta[64];
|
unsigned long long min_delta[64];
|
||||||
};
|
};
|
||||||
|
|
||||||
static inline int Issue_VMCALL_UPDATE_PHYSICAL_TIME(U64 adjustment)
|
static inline int Issue_VMCALL_UPDATE_PHYSICAL_TIME(u64 adjustment)
|
||||||
{
|
{
|
||||||
int result = VMCALL_SUCCESS;
|
int result = VMCALL_SUCCESS;
|
||||||
|
|
||||||
|
@ -304,7 +304,7 @@ Issue_VMCALL_CHANNEL_MISMATCH(const char *ChannelName,
|
||||||
{
|
{
|
||||||
VMCALL_CHANNEL_VERSION_MISMATCH_PARAMS params;
|
VMCALL_CHANNEL_VERSION_MISMATCH_PARAMS params;
|
||||||
int result = VMCALL_SUCCESS;
|
int result = VMCALL_SUCCESS;
|
||||||
U64 physaddr;
|
u64 physaddr;
|
||||||
char *last_slash = NULL;
|
char *last_slash = NULL;
|
||||||
|
|
||||||
strlcpy(params.ChannelName, ChannelName,
|
strlcpy(params.ChannelName, ChannelName,
|
||||||
|
@ -333,7 +333,7 @@ Issue_VMCALL_CHANNEL_MISMATCH(const char *ChannelName,
|
||||||
static inline unsigned int Issue_VMCALL_FATAL_BYE_BYE(void)
|
static inline unsigned int Issue_VMCALL_FATAL_BYE_BYE(void)
|
||||||
{
|
{
|
||||||
int result = VMCALL_SUCCESS;
|
int result = VMCALL_SUCCESS;
|
||||||
U64 physaddr = 0;
|
u64 physaddr = 0;
|
||||||
|
|
||||||
ISSUE_IO_VMCALL(VMCALL_GENERIC_SURRENDER_QUANTUM_FOREVER, physaddr,
|
ISSUE_IO_VMCALL(VMCALL_GENERIC_SURRENDER_QUANTUM_FOREVER, physaddr,
|
||||||
result);
|
result);
|
||||||
|
|
|
@ -74,7 +74,7 @@ static struct bus_info *BusListHead;
|
||||||
static rwlock_t BusListLock;
|
static rwlock_t BusListLock;
|
||||||
static int BusListCount; /* number of buses in the list */
|
static int BusListCount; /* number of buses in the list */
|
||||||
static int MaxBusCount; /* maximum number of buses expected */
|
static int MaxBusCount; /* maximum number of buses expected */
|
||||||
static U64 PhysicalDataChan;
|
static u64 PhysicalDataChan;
|
||||||
static int PlatformNumber;
|
static int PlatformNumber;
|
||||||
|
|
||||||
static struct uisthread_info Incoming_ThreadInfo;
|
static struct uisthread_info Incoming_ThreadInfo;
|
||||||
|
@ -129,7 +129,7 @@ init_msg_header(CONTROLVM_MESSAGE *msg, u32 id, uint rsp, uint svr)
|
||||||
}
|
}
|
||||||
|
|
||||||
static __iomem void *
|
static __iomem void *
|
||||||
init_vbus_channel(U64 channelAddr, u32 channelBytes)
|
init_vbus_channel(u64 channelAddr, u32 channelBytes)
|
||||||
{
|
{
|
||||||
void __iomem *rc = NULL;
|
void __iomem *rc = NULL;
|
||||||
void __iomem *pChan = uislib_ioremap_cache(channelAddr, channelBytes);
|
void __iomem *pChan = uislib_ioremap_cache(channelAddr, channelBytes);
|
||||||
|
@ -343,7 +343,7 @@ create_device(CONTROLVM_MESSAGE *msg, char *buf)
|
||||||
struct bus_info *bus;
|
struct bus_info *bus;
|
||||||
u32 busNo, devNo;
|
u32 busNo, devNo;
|
||||||
int result = CONTROLVM_RESP_SUCCESS;
|
int result = CONTROLVM_RESP_SUCCESS;
|
||||||
U64 minSize = MIN_IO_CHANNEL_SIZE;
|
u64 minSize = MIN_IO_CHANNEL_SIZE;
|
||||||
ReqHandlerInfo_t *pReqHandler;
|
ReqHandlerInfo_t *pReqHandler;
|
||||||
|
|
||||||
busNo = msg->cmd.createDevice.busNo;
|
busNo = msg->cmd.createDevice.busNo;
|
||||||
|
@ -822,7 +822,7 @@ delete_device_glue(u32 busNo, u32 devNo)
|
||||||
|
|
||||||
int
|
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)
|
u64 channelAddr, ulong nChannelBytes)
|
||||||
{
|
{
|
||||||
CONTROLVM_MESSAGE msg;
|
CONTROLVM_MESSAGE msg;
|
||||||
|
|
||||||
|
@ -921,7 +921,7 @@ EXPORT_SYMBOL_GPL(uislib_client_inject_resume_vhba);
|
||||||
|
|
||||||
int
|
int
|
||||||
uislib_client_inject_add_vhba(u32 busNo, u32 devNo,
|
uislib_client_inject_add_vhba(u32 busNo, u32 devNo,
|
||||||
U64 phys_chan_addr, u32 chan_bytes,
|
u64 phys_chan_addr, u32 chan_bytes,
|
||||||
int is_test_addr, uuid_le instGuid,
|
int is_test_addr, uuid_le instGuid,
|
||||||
struct InterruptInfo *intr)
|
struct InterruptInfo *intr)
|
||||||
{
|
{
|
||||||
|
@ -980,7 +980,7 @@ EXPORT_SYMBOL_GPL(uislib_client_inject_del_vhba);
|
||||||
|
|
||||||
int
|
int
|
||||||
uislib_client_inject_add_vnic(u32 busNo, u32 devNo,
|
uislib_client_inject_add_vnic(u32 busNo, u32 devNo,
|
||||||
U64 phys_chan_addr, u32 chan_bytes,
|
u64 phys_chan_addr, u32 chan_bytes,
|
||||||
int is_test_addr, uuid_le instGuid,
|
int is_test_addr, uuid_le instGuid,
|
||||||
struct InterruptInfo *intr)
|
struct InterruptInfo *intr)
|
||||||
{
|
{
|
||||||
|
|
|
@ -77,7 +77,7 @@ do_locked_client_insert(struct uisqueue_info *queueinfo,
|
||||||
void *pSignal,
|
void *pSignal,
|
||||||
spinlock_t *lock,
|
spinlock_t *lock,
|
||||||
unsigned char issueInterruptIfEmpty,
|
unsigned char issueInterruptIfEmpty,
|
||||||
U64 interruptHandle, u8 *channelId)
|
u64 interruptHandle, u8 *channelId)
|
||||||
{
|
{
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
unsigned char queueWasEmpty;
|
unsigned char queueWasEmpty;
|
||||||
|
@ -124,7 +124,7 @@ uisqueue_put_cmdrsp_with_lock_client(struct uisqueue_info *queueinfo,
|
||||||
unsigned int whichqueue,
|
unsigned int whichqueue,
|
||||||
void *insertlock,
|
void *insertlock,
|
||||||
unsigned char issueInterruptIfEmpty,
|
unsigned char issueInterruptIfEmpty,
|
||||||
U64 interruptHandle,
|
u64 interruptHandle,
|
||||||
char oktowait, u8 *channelId)
|
char oktowait, u8 *channelId)
|
||||||
{
|
{
|
||||||
while (!do_locked_client_insert(queueinfo, whichqueue, cmdrsp,
|
while (!do_locked_client_insert(queueinfo, whichqueue, cmdrsp,
|
||||||
|
|
|
@ -112,7 +112,7 @@ uisctrl_register_req_handler_ex(uuid_le switchTypeGuid,
|
||||||
channelBytes),
|
channelBytes),
|
||||||
int (*Server_Channel_Init)
|
int (*Server_Channel_Init)
|
||||||
(void *x, unsigned char *clientStr,
|
(void *x, unsigned char *clientStr,
|
||||||
u32 clientStrLen, U64 bytes),
|
u32 clientStrLen, u64 bytes),
|
||||||
ULTRA_VBUS_DEVICEINFO *chipset_DriverInfo)
|
ULTRA_VBUS_DEVICEINFO *chipset_DriverInfo)
|
||||||
{
|
{
|
||||||
ReqHandlerInfo_t *pReqHandlerInfo;
|
ReqHandlerInfo_t *pReqHandlerInfo;
|
||||||
|
@ -279,7 +279,7 @@ ReqHandlerAdd(uuid_le switchTypeGuid,
|
||||||
unsigned long min_channel_bytes,
|
unsigned long min_channel_bytes,
|
||||||
int (*Server_Channel_Ok)(unsigned long channelBytes),
|
int (*Server_Channel_Ok)(unsigned long channelBytes),
|
||||||
int (*Server_Channel_Init)
|
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;
|
ReqHandlerInfo_t *rc = NULL;
|
||||||
|
|
||||||
|
|
|
@ -188,7 +188,7 @@ struct virthba_info {
|
||||||
unsigned long long interrupts_notme;
|
unsigned long long interrupts_notme;
|
||||||
unsigned long long interrupts_disabled;
|
unsigned long long interrupts_disabled;
|
||||||
struct work_struct serverdown_completion;
|
struct work_struct serverdown_completion;
|
||||||
U64 __iomem *flags_addr;
|
u64 __iomem *flags_addr;
|
||||||
atomic_t interrupt_rcvd;
|
atomic_t interrupt_rcvd;
|
||||||
wait_queue_head_t rsp_queue;
|
wait_queue_head_t rsp_queue;
|
||||||
struct virtdisk_info head;
|
struct virtdisk_info head;
|
||||||
|
@ -422,7 +422,7 @@ virthba_ISR(int irq, void *dev_id)
|
||||||
struct virthba_info *virthbainfo = (struct virthba_info *) dev_id;
|
struct virthba_info *virthbainfo = (struct virthba_info *) dev_id;
|
||||||
CHANNEL_HEADER __iomem *pChannelHeader;
|
CHANNEL_HEADER __iomem *pChannelHeader;
|
||||||
SIGNAL_QUEUE_HEADER __iomem *pqhdr;
|
SIGNAL_QUEUE_HEADER __iomem *pqhdr;
|
||||||
U64 mask;
|
u64 mask;
|
||||||
unsigned long long rc1;
|
unsigned long long rc1;
|
||||||
|
|
||||||
if (virthbainfo == NULL)
|
if (virthbainfo == NULL)
|
||||||
|
@ -463,7 +463,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
|
||||||
irq_handler_t handler = virthba_ISR;
|
irq_handler_t handler = virthba_ISR;
|
||||||
CHANNEL_HEADER __iomem *pChannelHeader;
|
CHANNEL_HEADER __iomem *pChannelHeader;
|
||||||
SIGNAL_QUEUE_HEADER __iomem *pqhdr;
|
SIGNAL_QUEUE_HEADER __iomem *pqhdr;
|
||||||
U64 mask;
|
u64 mask;
|
||||||
|
|
||||||
LOGVER("entering virthba_probe...\n");
|
LOGVER("entering virthba_probe...\n");
|
||||||
LOGVER("virtpcidev busNo<<%d>>devNo<<%d>>", virtpcidev->busNo,
|
LOGVER("virtpcidev busNo<<%d>>devNo<<%d>>", virtpcidev->busNo,
|
||||||
|
@ -621,7 +621,7 @@ virthba_probe(struct virtpci_dev *virtpcidev, const struct pci_device_id *id)
|
||||||
virthbainfo->interrupt_vector = -1;
|
virthbainfo->interrupt_vector = -1;
|
||||||
POSTCODE_LINUX_2(VHBA_PROBE_FAILURE_PC, POSTCODE_SEVERITY_ERR);
|
POSTCODE_LINUX_2(VHBA_PROBE_FAILURE_PC, POSTCODE_SEVERITY_ERR);
|
||||||
} else {
|
} else {
|
||||||
U64 __iomem *Features_addr =
|
u64 __iomem *Features_addr =
|
||||||
&virthbainfo->chinfo.queueinfo->chan->Features;
|
&virthbainfo->chinfo.queueinfo->chan->Features;
|
||||||
LOGERR("request_irq(%d) uislib_virthba_ISR request succeeded\n",
|
LOGERR("request_irq(%d) uislib_virthba_ISR request succeeded\n",
|
||||||
virthbainfo->interrupt_vector);
|
virthbainfo->interrupt_vector);
|
||||||
|
@ -723,7 +723,7 @@ forward_vdiskmgmt_command(VDISK_MGMT_TYPES vdiskcmdtype,
|
||||||
uisqueue_put_cmdrsp_with_lock_client(virthbainfo->chinfo.queueinfo,
|
uisqueue_put_cmdrsp_with_lock_client(virthbainfo->chinfo.queueinfo,
|
||||||
cmdrsp, IOCHAN_TO_IOPART,
|
cmdrsp, IOCHAN_TO_IOPART,
|
||||||
&virthbainfo->chinfo.insertlock,
|
&virthbainfo->chinfo.insertlock,
|
||||||
DONT_ISSUE_INTERRUPT, (U64) NULL,
|
DONT_ISSUE_INTERRUPT, (u64) NULL,
|
||||||
OK_TO_WAIT, "vhba");
|
OK_TO_WAIT, "vhba");
|
||||||
LOGINF("VdiskMgmt waiting on event notifyevent=0x%p\n",
|
LOGINF("VdiskMgmt waiting on event notifyevent=0x%p\n",
|
||||||
cmdrsp->scsitaskmgmt.notify);
|
cmdrsp->scsitaskmgmt.notify);
|
||||||
|
@ -784,7 +784,7 @@ forward_taskmgmt_command(TASK_MGMT_TYPES tasktype, struct scsi_device *scsidev)
|
||||||
uisqueue_put_cmdrsp_with_lock_client(virthbainfo->chinfo.queueinfo,
|
uisqueue_put_cmdrsp_with_lock_client(virthbainfo->chinfo.queueinfo,
|
||||||
cmdrsp, IOCHAN_TO_IOPART,
|
cmdrsp, IOCHAN_TO_IOPART,
|
||||||
&virthbainfo->chinfo.insertlock,
|
&virthbainfo->chinfo.insertlock,
|
||||||
DONT_ISSUE_INTERRUPT, (U64) NULL,
|
DONT_ISSUE_INTERRUPT, (u64) NULL,
|
||||||
OK_TO_WAIT, "vhba");
|
OK_TO_WAIT, "vhba");
|
||||||
LOGINF("TaskMgmt waiting on event notifyevent=0x%p\n",
|
LOGINF("TaskMgmt waiting on event notifyevent=0x%p\n",
|
||||||
cmdrsp->scsitaskmgmt.notify);
|
cmdrsp->scsitaskmgmt.notify);
|
||||||
|
@ -1022,7 +1022,7 @@ virthba_queue_command_lck(struct scsi_cmnd *scsicmd,
|
||||||
&virthbainfo->chinfo.
|
&virthbainfo->chinfo.
|
||||||
insertlock,
|
insertlock,
|
||||||
DONT_ISSUE_INTERRUPT,
|
DONT_ISSUE_INTERRUPT,
|
||||||
(U64) NULL, DONT_WAIT, "vhba");
|
(u64) NULL, DONT_WAIT, "vhba");
|
||||||
if (i == 0) {
|
if (i == 0) {
|
||||||
/* queue must be full - and we said don't wait - return busy */
|
/* queue must be full - and we said don't wait - return busy */
|
||||||
LOGERR("uisqueue_put_cmdrsp_with_lock ****FAILED\n");
|
LOGERR("uisqueue_put_cmdrsp_with_lock ****FAILED\n");
|
||||||
|
@ -1335,7 +1335,7 @@ process_incoming_rsps(void *v)
|
||||||
struct chaninfo *dc = &virthbainfo->chinfo;
|
struct chaninfo *dc = &virthbainfo->chinfo;
|
||||||
struct uiscmdrsp *cmdrsp = NULL;
|
struct uiscmdrsp *cmdrsp = NULL;
|
||||||
const int SZ = sizeof(struct uiscmdrsp);
|
const int SZ = sizeof(struct uiscmdrsp);
|
||||||
U64 mask;
|
u64 mask;
|
||||||
unsigned long long rc1;
|
unsigned long long rc1;
|
||||||
|
|
||||||
UIS_DAEMONIZE("vhba_incoming");
|
UIS_DAEMONIZE("vhba_incoming");
|
||||||
|
@ -1374,7 +1374,7 @@ static ssize_t info_debugfs_read(struct file *file,
|
||||||
{
|
{
|
||||||
ssize_t bytes_read = 0;
|
ssize_t bytes_read = 0;
|
||||||
int str_pos = 0;
|
int str_pos = 0;
|
||||||
U64 phys_flags_addr;
|
u64 phys_flags_addr;
|
||||||
int i;
|
int i;
|
||||||
struct virthba_info *virthbainfo;
|
struct virthba_info *virthbainfo;
|
||||||
char *vbuf;
|
char *vbuf;
|
||||||
|
@ -1428,8 +1428,8 @@ static ssize_t enable_ints_write(struct file *file,
|
||||||
int i, new_value;
|
int i, new_value;
|
||||||
struct virthba_info *virthbainfo;
|
struct virthba_info *virthbainfo;
|
||||||
|
|
||||||
U64 __iomem *Features_addr;
|
u64 __iomem *Features_addr;
|
||||||
U64 mask;
|
u64 mask;
|
||||||
|
|
||||||
if (count >= ARRAY_SIZE(buf))
|
if (count >= ARRAY_SIZE(buf))
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
#include "memregion.h"
|
#include "memregion.h"
|
||||||
#include "channel.h"
|
#include "channel.h"
|
||||||
#ifndef HOSTADDRESS
|
#ifndef HOSTADDRESS
|
||||||
#define HOSTADDRESS U64
|
#define HOSTADDRESS u64
|
||||||
#endif
|
#endif
|
||||||
#ifndef BOOL
|
#ifndef BOOL
|
||||||
#define BOOL int
|
#define BOOL int
|
||||||
|
@ -65,7 +65,7 @@ HOSTADDRESS visorchannel_get_physaddr(VISORCHANNEL *channel);
|
||||||
ulong visorchannel_get_nbytes(VISORCHANNEL *channel);
|
ulong visorchannel_get_nbytes(VISORCHANNEL *channel);
|
||||||
char *visorchannel_id(VISORCHANNEL *channel, char *s);
|
char *visorchannel_id(VISORCHANNEL *channel, char *s);
|
||||||
char *visorchannel_zoneid(VISORCHANNEL *channel, char *s);
|
char *visorchannel_zoneid(VISORCHANNEL *channel, char *s);
|
||||||
U64 visorchannel_get_clientpartition(VISORCHANNEL *channel);
|
u64 visorchannel_get_clientpartition(VISORCHANNEL *channel);
|
||||||
uuid_le visorchannel_get_uuid(VISORCHANNEL *channel);
|
uuid_le visorchannel_get_uuid(VISORCHANNEL *channel);
|
||||||
MEMREGION *visorchannel_get_memregion(VISORCHANNEL *channel);
|
MEMREGION *visorchannel_get_memregion(VISORCHANNEL *channel);
|
||||||
char *visorchannel_uuid_id(uuid_le *guid, char *s);
|
char *visorchannel_uuid_id(uuid_le *guid, char *s);
|
||||||
|
|
|
@ -41,7 +41,7 @@ struct PARSER_CONTEXT_Tag {
|
||||||
};
|
};
|
||||||
|
|
||||||
static PARSER_CONTEXT *
|
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)
|
BOOL hasStandardPayloadHeader, BOOL *tryAgain)
|
||||||
{
|
{
|
||||||
int allocbytes = sizeof(PARSER_CONTEXT) + bytes;
|
int allocbytes = sizeof(PARSER_CONTEXT) + bytes;
|
||||||
|
@ -152,7 +152,7 @@ Away:
|
||||||
}
|
}
|
||||||
|
|
||||||
PARSER_CONTEXT *
|
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);
|
return parser_init_guts(addr, bytes, isLocal, TRUE, tryAgain);
|
||||||
}
|
}
|
||||||
|
@ -163,7 +163,7 @@ parser_init(U64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain)
|
||||||
* parser_byteStream_get() to obtain the data.
|
* parser_byteStream_get() to obtain the data.
|
||||||
*/
|
*/
|
||||||
PARSER_CONTEXT *
|
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);
|
return parser_init_guts(addr, bytes, isLocal, FALSE, tryAgain);
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,8 +33,8 @@ typedef enum {
|
||||||
|
|
||||||
typedef struct PARSER_CONTEXT_Tag PARSER_CONTEXT;
|
typedef struct PARSER_CONTEXT_Tag PARSER_CONTEXT;
|
||||||
|
|
||||||
PARSER_CONTEXT *parser_init(U64 addr, u32 bytes, BOOL isLocal, BOOL *tryAgain);
|
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_byteStream(u64 addr, u32 bytes, BOOL isLocal,
|
||||||
BOOL *tryAgain);
|
BOOL *tryAgain);
|
||||||
void parser_param_start(PARSER_CONTEXT *ctx, PARSER_WHICH_STRING which_string);
|
void parser_param_start(PARSER_CONTEXT *ctx, PARSER_WHICH_STRING which_string);
|
||||||
void *parser_param_get(PARSER_CONTEXT *ctx, char *nam, int namesize);
|
void *parser_param_get(PARSER_CONTEXT *ctx, char *nam, int namesize);
|
||||||
|
|
|
@ -64,7 +64,7 @@ typedef struct {
|
||||||
VISORCHIPSET_ADDRESSTYPE addrType;
|
VISORCHIPSET_ADDRESSTYPE addrType;
|
||||||
HOSTADDRESS channelAddr;
|
HOSTADDRESS channelAddr;
|
||||||
struct InterruptInfo intr;
|
struct InterruptInfo intr;
|
||||||
U64 nChannelBytes;
|
u64 nChannelBytes;
|
||||||
uuid_le channelTypeGuid;
|
uuid_le channelTypeGuid;
|
||||||
uuid_le channelInstGuid;
|
uuid_le channelInstGuid;
|
||||||
|
|
||||||
|
@ -83,7 +83,7 @@ typedef struct {
|
||||||
VISORCHIPSET_STATE state;
|
VISORCHIPSET_STATE state;
|
||||||
VISORCHIPSET_CHANNEL_INFO chanInfo;
|
VISORCHIPSET_CHANNEL_INFO chanInfo;
|
||||||
u32 Reserved1; /* CONTROLVM_ID */
|
u32 Reserved1; /* CONTROLVM_ID */
|
||||||
U64 Reserved2;
|
u64 Reserved2;
|
||||||
u32 switchNo; /* when devState.attached==1 */
|
u32 switchNo; /* when devState.attached==1 */
|
||||||
u32 internalPortNo; /* when devState.attached==1 */
|
u32 internalPortNo; /* when devState.attached==1 */
|
||||||
CONTROLVM_MESSAGE_HEADER pendingMsgHdr; /* CONTROLVM_MESSAGE */
|
CONTROLVM_MESSAGE_HEADER pendingMsgHdr; /* CONTROLVM_MESSAGE */
|
||||||
|
@ -128,10 +128,10 @@ typedef struct {
|
||||||
VISORCHIPSET_STATE state;
|
VISORCHIPSET_STATE state;
|
||||||
VISORCHIPSET_CHANNEL_INFO chanInfo;
|
VISORCHIPSET_CHANNEL_INFO chanInfo;
|
||||||
uuid_le partitionGuid;
|
uuid_le partitionGuid;
|
||||||
U64 partitionHandle;
|
u64 partitionHandle;
|
||||||
u8 *name; /* UTF8 */
|
u8 *name; /* UTF8 */
|
||||||
u8 *description; /* UTF8 */
|
u8 *description; /* UTF8 */
|
||||||
U64 Reserved1;
|
u64 Reserved1;
|
||||||
u32 Reserved2;
|
u32 Reserved2;
|
||||||
MYPROCOBJECT *procObject;
|
MYPROCOBJECT *procObject;
|
||||||
struct {
|
struct {
|
||||||
|
@ -142,7 +142,7 @@ typedef struct {
|
||||||
CONTROLVM_MESSAGE_HEADER pendingMsgHdr; /* CONTROLVM MsgHdr */
|
CONTROLVM_MESSAGE_HEADER pendingMsgHdr; /* CONTROLVM MsgHdr */
|
||||||
/** For private use by the bus driver */
|
/** For private use by the bus driver */
|
||||||
void *bus_driver_context;
|
void *bus_driver_context;
|
||||||
U64 devNo;
|
u64 devNo;
|
||||||
|
|
||||||
} VISORCHIPSET_BUS_INFO;
|
} VISORCHIPSET_BUS_INFO;
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ typedef struct {
|
||||||
u8 *authService2;
|
u8 *authService2;
|
||||||
u8 *authService3;
|
u8 *authService3;
|
||||||
u8 *securityContext;
|
u8 *securityContext;
|
||||||
U64 Reserved;
|
u64 Reserved;
|
||||||
u32 Reserved2; /* CONTROLVM_ID */
|
u32 Reserved2; /* CONTROLVM_ID */
|
||||||
struct device dev;
|
struct device dev;
|
||||||
BOOL dev_exists;
|
BOOL dev_exists;
|
||||||
|
@ -191,7 +191,7 @@ typedef struct {
|
||||||
u8 *ipNetwork;
|
u8 *ipNetwork;
|
||||||
u8 *ipGateway;
|
u8 *ipGateway;
|
||||||
u8 *ipDNS;
|
u8 *ipDNS;
|
||||||
U64 Reserved1;
|
u64 Reserved1;
|
||||||
u32 Reserved2; /* CONTROLVM_ID */
|
u32 Reserved2; /* CONTROLVM_ID */
|
||||||
struct device dev;
|
struct device dev;
|
||||||
BOOL dev_exists;
|
BOOL dev_exists;
|
||||||
|
@ -208,7 +208,7 @@ typedef struct {
|
||||||
VISORCHIPSET_STATE state;
|
VISORCHIPSET_STATE state;
|
||||||
u32 busNo; /* valid only when state.attached == 1 */
|
u32 busNo; /* valid only when state.attached == 1 */
|
||||||
u32 devNo; /* valid only when state.attached == 1 */
|
u32 devNo; /* valid only when state.attached == 1 */
|
||||||
U64 Reserved1;
|
u64 Reserved1;
|
||||||
u32 Reserved2; /* CONTROLVM_ID */
|
u32 Reserved2; /* CONTROLVM_ID */
|
||||||
CONTROLVM_MESSAGE_HEADER pendingMsgHdr;
|
CONTROLVM_MESSAGE_HEADER pendingMsgHdr;
|
||||||
MYPROCOBJECT *procObject;
|
MYPROCOBJECT *procObject;
|
||||||
|
|
|
@ -105,7 +105,7 @@ static VISORCHANNEL *ControlVm_channel;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
u8 __iomem *ptr; /* pointer to base address of payload pool */
|
u8 __iomem *ptr; /* pointer to base address of payload pool */
|
||||||
U64 offset; /* offset from beginning of controlvm
|
u64 offset; /* offset from beginning of controlvm
|
||||||
* channel to beginning of payload * pool */
|
* 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;
|
} CONTROLVM_PAYLOAD_INFO;
|
||||||
|
@ -1366,7 +1366,7 @@ Away:
|
||||||
* for failure.
|
* for failure.
|
||||||
*/
|
*/
|
||||||
static int
|
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)
|
CONTROLVM_PAYLOAD_INFO *info)
|
||||||
{
|
{
|
||||||
u8 __iomem *payload = NULL;
|
u8 __iomem *payload = NULL;
|
||||||
|
@ -1423,7 +1423,7 @@ static void
|
||||||
initialize_controlvm_payload(void)
|
initialize_controlvm_payload(void)
|
||||||
{
|
{
|
||||||
HOSTADDRESS phys_addr = visorchannel_get_physaddr(ControlVm_channel);
|
HOSTADDRESS phys_addr = visorchannel_get_physaddr(ControlVm_channel);
|
||||||
U64 payloadOffset = 0;
|
u64 payloadOffset = 0;
|
||||||
u32 payloadBytes = 0;
|
u32 payloadBytes = 0;
|
||||||
if (visorchannel_read(ControlVm_channel,
|
if (visorchannel_read(ControlVm_channel,
|
||||||
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL,
|
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL,
|
||||||
|
@ -1763,7 +1763,7 @@ static BOOL
|
||||||
handle_command(CONTROLVM_MESSAGE inmsg, HOSTADDRESS channel_addr)
|
handle_command(CONTROLVM_MESSAGE inmsg, HOSTADDRESS channel_addr)
|
||||||
{
|
{
|
||||||
CONTROLVM_MESSAGE_PACKET *cmd = &inmsg.cmd;
|
CONTROLVM_MESSAGE_PACKET *cmd = &inmsg.cmd;
|
||||||
U64 parametersAddr = 0;
|
u64 parametersAddr = 0;
|
||||||
u32 parametersBytes = 0;
|
u32 parametersBytes = 0;
|
||||||
PARSER_CONTEXT *parser_ctx = NULL;
|
PARSER_CONTEXT *parser_ctx = NULL;
|
||||||
BOOL isLocalAddr = FALSE;
|
BOOL isLocalAddr = FALSE;
|
||||||
|
@ -1899,7 +1899,7 @@ handle_command(CONTROLVM_MESSAGE inmsg, HOSTADDRESS channel_addr)
|
||||||
|
|
||||||
HOSTADDRESS controlvm_get_channel_address(void)
|
HOSTADDRESS controlvm_get_channel_address(void)
|
||||||
{
|
{
|
||||||
U64 addr = 0;
|
u64 addr = 0;
|
||||||
u32 size = 0;
|
u32 size = 0;
|
||||||
|
|
||||||
if (!VMCALL_SUCCESSFUL(Issue_VMCALL_IO_CONTROLVM_ADDR(&addr, &size))) {
|
if (!VMCALL_SUCCESSFUL(Issue_VMCALL_IO_CONTROLVM_ADDR(&addr, &size))) {
|
||||||
|
@ -1918,7 +1918,7 @@ controlvm_periodic_work(struct work_struct *work)
|
||||||
CONTROLVM_MESSAGE inmsg;
|
CONTROLVM_MESSAGE inmsg;
|
||||||
BOOL gotACommand = FALSE;
|
BOOL gotACommand = FALSE;
|
||||||
BOOL handle_command_failed = FALSE;
|
BOOL handle_command_failed = FALSE;
|
||||||
static U64 Poll_Count;
|
static u64 Poll_Count;
|
||||||
|
|
||||||
/* make sure visorbus server is registered for controlvm callbacks */
|
/* make sure visorbus server is registered for controlvm callbacks */
|
||||||
if (visorchipset_serverregwait && !serverregistered)
|
if (visorchipset_serverregwait && !serverregistered)
|
||||||
|
|
Загрузка…
Ссылка в новой задаче