Commit d19642f6 authored by Benjamin Romer's avatar Benjamin Romer Committed by Greg Kroah-Hartman

staging: unisys: refactor SPAR_CONTROLVM_CHANNEL_PROTOCOL

Get rid of the typedef for SPAR_CONTROLVM_CHANNEL_PROTOCOL and replace it with
struct spar_controlvm_channel_protocol. Fix CamelCase members of the structure
and update all references to changed names.

Header => header
gpControlVm => gp_control_vm
gpPartitionTables => gp_partition_tables
gpDiagGuest => gp_diag_guest
gpBootRomDisk => gp_boot_romdisk
gpBootRamDisk => gp_boot_ramdisk
gpAcpiTable => gp_acpi_table
gpControlChannel => gp_control_channel
gpdiagRomDisk => gp_diag_romdisk
gpNvram => gp_nvram
RequestPayloadOffset => request_payload_offset
EventPayloadOffset => event_payload_offset
RequestPayloadBytes => request_payload_bytes
EventPayloadBytes => event_payload_bytes
ControlChannelBytes => control_channel_bytes
NvramChannelBytes => nvram_channel_bytes
MessageBytes => message_bytes
MessageCount => message_count
gpSmbiosTable => gp_smbios_table
gpPhysicalSmbiosTable => gp_physical_smbios_table
gpobsoleteGuestDevices => gp_obsolete_guest_devices
VirtualGuestFirmwareImageBase => virtual_guest_firmware_image_base
VirtualGuestFirmwareEntryPoint => virtual_guest_firmware_entry_point
VirtualGuestFirmwareImageSize => virtual_guest_firmware_image_size
VirtualGuestFirmwareBootBase => virtual_guest_firmware_boot_base
VirtualGuestImageBase => virtual_guest_image_base
VirtualGuestImageSize => virtual_guest_image_size
PrototypeControlChannelOffset => prototype_control_channel_offset
VirtualGuestPartitionHandle => virtual_guest_partition_handle
RestoreAction => restore_action
DumpAction => dump_action
NvramFailCount => nvram_fail_count
SavedCrashMsgCount => saved_crash_message_count
SavedCrashMsgOffset => saved_crash_message_offset
InstallationError => installation_error
InstallationTextId => installation_text_id
InstallationRemainingSteps => installation_remaining_steps
ToolAction => tool_action
Reserved => reserved
EfiSparIndication => efi_spar_ind
EfiSparIndicationSupported => efi_spar_ind_supported
SPReserved => sp_reserved
Reserved2 => reserved2
RequestQueue => request_queue
ResponseQueue => response_queue
EventQueue => event_queue
EventAckQueue => event_ack_queue
RequestMsg => request_msg
ResponseMsg => response_msg
EventMsg => event_msg
EventAckMsg => event_ack_msg
SavedCrashMsg => saved_crash_msg
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6f5a5b7b
...@@ -47,11 +47,11 @@ static const uuid_le spar_controlvm_channel_protocol_uuid = ...@@ -47,11 +47,11 @@ static const uuid_le spar_controlvm_channel_protocol_uuid =
#define SPAR_CONTROLVM_CHANNEL_OK_CLIENT(ch) \ #define SPAR_CONTROLVM_CHANNEL_OK_CLIENT(ch) \
spar_check_channel_client(ch, \ spar_check_channel_client(ch, \
spar_controlvm_channel_protocol_uuid, \ spar_controlvm_channel_protocol_uuid, \
"controlvm", \ "controlvm", \
sizeof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL), \ sizeof(struct spar_controlvm_channel_protocol), \
ULTRA_CONTROLVM_CHANNEL_PROTOCOL_VERSIONID, \ ULTRA_CONTROLVM_CHANNEL_PROTOCOL_VERSIONID, \
ULTRA_CONTROLVM_CHANNEL_PROTOCOL_SIGNATURE) ULTRA_CONTROLVM_CHANNEL_PROTOCOL_SIGNATURE)
#define MY_DEVICE_INDEX 0 #define MY_DEVICE_INDEX 0
#define MAX_MACDATA_LEN 8 /* number of bytes for MAC address in config packet */ #define MAX_MACDATA_LEN 8 /* number of bytes for MAC address in config packet */
...@@ -360,127 +360,127 @@ struct guest_devices { ...@@ -360,127 +360,127 @@ struct guest_devices {
u32 pad; u32 pad;
}; };
typedef struct _ULTRA_CONTROLVM_CHANNEL_PROTOCOL { struct spar_controlvm_channel_protocol {
struct channel_header Header; struct channel_header header;
GUEST_PHYSICAL_ADDRESS gpControlVm; /* guest physical address of GUEST_PHYSICAL_ADDRESS gp_controlvm; /* guest physical address of
* this channel */ * this channel */
GUEST_PHYSICAL_ADDRESS gpPartitionTables; /* guest physical address of GUEST_PHYSICAL_ADDRESS gp_partition_tables;/* guest physical address of
* partition tables */ * partition tables */
GUEST_PHYSICAL_ADDRESS gpDiagGuest; /* guest physical address of GUEST_PHYSICAL_ADDRESS gp_diag_guest; /* guest physical address of
* diagnostic channel */ * diagnostic channel */
GUEST_PHYSICAL_ADDRESS gpBootRomDisk; /* guest phys addr of (read GUEST_PHYSICAL_ADDRESS gp_boot_romdisk;/* guest phys addr of (read
* only) Boot ROM disk */ * only) Boot ROM disk */
GUEST_PHYSICAL_ADDRESS gpBootRamDisk; /* guest phys addr of writable GUEST_PHYSICAL_ADDRESS gp_boot_ramdisk;/* guest phys addr of writable
* Boot RAM disk */ * Boot RAM disk */
GUEST_PHYSICAL_ADDRESS gpAcpiTable; /* guest phys addr of acpi GUEST_PHYSICAL_ADDRESS gp_acpi_table; /* guest phys addr of acpi
* table */ * table */
GUEST_PHYSICAL_ADDRESS gpControlChannel; /* guest phys addr of control GUEST_PHYSICAL_ADDRESS gp_control_channel;/* guest phys addr of control
* channel */ * channel */
GUEST_PHYSICAL_ADDRESS gpDiagRomDisk; /* guest phys addr of diagnostic GUEST_PHYSICAL_ADDRESS gp_diag_romdisk;/* guest phys addr of diagnostic
* ROM disk */ * ROM disk */
GUEST_PHYSICAL_ADDRESS gpNvram; /* guest phys addr of NVRAM GUEST_PHYSICAL_ADDRESS gp_nvram; /* guest phys addr of NVRAM
* channel */ * channel */
u64 RequestPayloadOffset; /* Offset to request payload area */ u64 request_payload_offset; /* Offset to request payload area */
u64 EventPayloadOffset; /* Offset to event payload area */ u64 event_payload_offset; /* Offset to event payload area */
u32 RequestPayloadBytes; /* Bytes available in request payload u32 request_payload_bytes; /* Bytes available in request payload
* area */ * area */
u32 EventPayloadBytes; /* Bytes available in event payload area */ u32 event_payload_bytes;/* Bytes available in event payload area */
u32 ControlChannelBytes; u32 control_channel_bytes;
u32 NvramChannelBytes; /* Bytes in PartitionNvram segment */ u32 nvram_channel_bytes; /* Bytes in PartitionNvram segment */
u32 MessageBytes; /* sizeof(CONTROLVM_MESSAGE) */ u32 message_bytes; /* sizeof(CONTROLVM_MESSAGE) */
u32 MessageCount; /* CONTROLVM_MESSAGE_MAX */ u32 message_count; /* CONTROLVM_MESSAGE_MAX */
GUEST_PHYSICAL_ADDRESS gpSmbiosTable; /* guest phys addr of SMBIOS GUEST_PHYSICAL_ADDRESS gp_smbios_table;/* guest phys addr of SMBIOS
* tables */ * tables */
GUEST_PHYSICAL_ADDRESS gpPhysicalSmbiosTable; /* guest phys addr of GUEST_PHYSICAL_ADDRESS gp_physical_smbios_table;/* guest phys addr of
* SMBIOS table */ * SMBIOS table */
/* ULTRA_MAX_GUESTS_PER_SERVICE */ /* ULTRA_MAX_GUESTS_PER_SERVICE */
struct guest_devices gpObsoleteGuestDevices[16]; struct guest_devices gp_obsolete_guest_devices[16];
/* guest physical address of EFI firmware image base */ /* guest physical address of EFI firmware image base */
GUEST_PHYSICAL_ADDRESS VirtualGuestFirmwareImageBase; GUEST_PHYSICAL_ADDRESS virtual_guest_firmware_image_base;
/* guest physical address of EFI firmware entry point */ /* guest physical address of EFI firmware entry point */
GUEST_PHYSICAL_ADDRESS VirtualGuestFirmwareEntryPoint; GUEST_PHYSICAL_ADDRESS virtual_guest_firmware_entry_point;
/* guest EFI firmware image size */ /* guest EFI firmware image size */
u64 VirtualGuestFirmwareImageSize; u64 virtual_guest_firmware_image_size;
/* 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 virtual_guest_firmware_boot_base;
GUEST_PHYSICAL_ADDRESS VirtualGuestImageBase; GUEST_PHYSICAL_ADDRESS virtual_guest_image_base;
GUEST_PHYSICAL_ADDRESS VirtualGuestImageSize; GUEST_PHYSICAL_ADDRESS virtual_guest_image_size;
u64 PrototypeControlChannelOffset; u64 prototype_control_channel_offset;
GUEST_PHYSICAL_ADDRESS VirtualGuestPartitionHandle; GUEST_PHYSICAL_ADDRESS virtual_guest_partition_handle;
u16 RestoreAction; /* Restore Action field to restore the guest u16 restore_action; /* Restore Action field to restore the guest
* partition */ * partition */
u16 DumpAction; /* For Windows guests it shows if the visordisk u16 dump_action; /* For Windows guests it shows if the visordisk
* is running in dump mode */ * is running in dump mode */
u16 NvramFailCount; u16 nvram_fail_count;
u16 SavedCrashMsgCount; /* = CONTROLVM_CRASHMSG_MAX */ u16 saved_crash_message_count; /* = CONTROLVM_CRASHMSG_MAX */
u32 SavedCrashMsgOffset; /* Offset to request payload area needed u32 saved_crash_message_offset; /* Offset to request payload area needed
* for crash dump */ * for crash dump */
u32 InstallationError; /* Type of error encountered during u32 installation_error; /* Type of error encountered during
* installation */ * installation */
u32 InstallationTextId; /* Id of string to display */ u32 installation_text_id; /* Id of string to display */
u16 InstallationRemainingSteps; /* Number of remaining installation u16 installation_remaining_steps;/* Number of remaining installation
* steps (for progress bars) */ * steps (for progress bars) */
u8 ToolAction; /* ULTRA_TOOL_ACTIONS Installation Action u8 tool_action; /* ULTRA_TOOL_ACTIONS Installation Action
* field */ * field */
u8 Reserved; /* alignment */ u8 reserved; /* alignment */
struct efi_spar_indication EfiSparIndication; struct efi_spar_indication efi_spar_ind;
struct efi_spar_indication EfiSparIndicationSupported; struct efi_spar_indication efi_spar_ind_supported;
u32 SPReserved; u32 sp_reserved;
u8 Reserved2[28]; /* Force signals to begin on 128-byte cache u8 reserved2[28]; /* Force signals to begin on 128-byte cache
* line */ * line */
struct signal_queue_header RequestQueue;/* Service or guest partition struct signal_queue_header request_queue;/* Service or guest partition
* uses this queue to send * uses this queue to send
* requests to Control */ * requests to Control */
struct signal_queue_header ResponseQueue;/* Control uses this queue to struct signal_queue_header response_queue;/* Control uses this queue to
* respond to service or guest * respond to service or guest
* partition requests */ * partition requests */
struct signal_queue_header EventQueue; /* Control uses this queue to struct signal_queue_header event_queue; /* Control uses this queue to
* send events to service or * send events to service or
* guest partition */ * guest partition */
struct signal_queue_header EventAckQueue;/* Service or guest partition struct signal_queue_header event_ack_queue;/* Service or guest partition
* uses this queue to ack * uses this queue to ack
* Control events */ * Control events */
/* Request fixed-size message pool - does not include payload */ /* Request fixed-size message pool - does not include payload */
struct controlvm_message RequestMsg[CONTROLVM_MESSAGE_MAX]; struct controlvm_message request_msg[CONTROLVM_MESSAGE_MAX];
/* Response fixed-size message pool - does not include payload */ /* Response fixed-size message pool - does not include payload */
struct controlvm_message ResponseMsg[CONTROLVM_MESSAGE_MAX]; struct controlvm_message response_msg[CONTROLVM_MESSAGE_MAX];
/* Event fixed-size message pool - does not include payload */ /* Event fixed-size message pool - does not include payload */
struct controlvm_message EventMsg[CONTROLVM_MESSAGE_MAX]; struct controlvm_message event_msg[CONTROLVM_MESSAGE_MAX];
/* Ack fixed-size message pool - does not include payload */ /* Ack fixed-size message pool - does not include payload */
struct controlvm_message EventAckMsg[CONTROLVM_MESSAGE_MAX]; struct controlvm_message event_ack_msg[CONTROLVM_MESSAGE_MAX];
/* Message stored during IOVM creation to be reused after crash */ /* Message stored during IOVM creation to be reused after crash */
struct controlvm_message SavedCrashMsg[CONTROLVM_CRASHMSG_MAX]; struct controlvm_message saved_crash_msg[CONTROLVM_CRASHMSG_MAX];
} ULTRA_CONTROLVM_CHANNEL_PROTOCOL; };
/* Offsets for VM channel attributes... */ /* Offsets for VM channel attributes... */
#define VM_CH_REQ_QUEUE_OFFSET \ #define VM_CH_REQ_QUEUE_OFFSET \
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, RequestQueue) offsetof(struct spar_controlvm_channel_protocol, request_queue)
#define VM_CH_RESP_QUEUE_OFFSET \ #define VM_CH_RESP_QUEUE_OFFSET \
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, ResponseQueue) offsetof(struct spar_controlvm_channel_protocol, response_queue)
#define VM_CH_EVENT_QUEUE_OFFSET \ #define VM_CH_EVENT_QUEUE_OFFSET \
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, EventQueue) offsetof(struct spar_controlvm_channel_protocol, event_queue)
#define VM_CH_ACK_QUEUE_OFFSET \ #define VM_CH_ACK_QUEUE_OFFSET \
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, EventAckQueue) offsetof(struct spar_controlvm_channel_protocol, event_ack_queue)
#define VM_CH_REQ_MSG_OFFSET \ #define VM_CH_REQ_MSG_OFFSET \
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, RequestMsg) offsetof(struct spar_controlvm_channel_protocol, request_msg)
#define VM_CH_RESP_MSG_OFFSET \ #define VM_CH_RESP_MSG_OFFSET \
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, ResponseMsg) offsetof(struct spar_controlvm_channel_protocol, response_msg)
#define VM_CH_EVENT_MSG_OFFSET \ #define VM_CH_EVENT_MSG_OFFSET \
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, EventMsg) offsetof(struct spar_controlvm_channel_protocol, event_msg)
#define VM_CH_ACK_MSG_OFFSET \ #define VM_CH_ACK_MSG_OFFSET \
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, EventAckMsg) offsetof(struct spar_controlvm_channel_protocol, event_ack_msg)
#define VM_CH_CRASH_MSG_OFFSET \ #define VM_CH_CRASH_MSG_OFFSET \
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, SavedCrashMsg) offsetof(struct spar_controlvm_channel_protocol, saved_crash_msg)
/* The following header will be located at the beginning of PayloadVmOffset for /* The following header will be located at the beginning of PayloadVmOffset for
* various ControlVm commands. The receiver of a ControlVm command with a * various ControlVm commands. The receiver of a ControlVm command with a
......
...@@ -1564,8 +1564,8 @@ uislib_mod_init(void) ...@@ -1564,8 +1564,8 @@ uislib_mod_init(void)
(ulong) sizeof(struct uiscmdrsp_net)); (ulong) sizeof(struct uiscmdrsp_net));
LOGINF("sizeof(CONTROLVM_MESSAGE):%lu bytes\n", LOGINF("sizeof(CONTROLVM_MESSAGE):%lu bytes\n",
(ulong) sizeof(struct controlvm_message)); (ulong) sizeof(struct controlvm_message));
LOGINF("sizeof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL):%lu bytes\n", LOGINF("sizeof(struct spar_controlvm_channel_protocol):%lu bytes\n",
(ulong) sizeof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL)); (ulong) sizeof(struct spar_controlvm_channel_protocol));
LOGINF("sizeof(CHANNEL_HEADER):%lu bytes\n", LOGINF("sizeof(CHANNEL_HEADER):%lu bytes\n",
(ulong) sizeof(struct channel_header)); (ulong) sizeof(struct channel_header));
LOGINF("sizeof(ULTRA_IO_CHANNEL_PROTOCOL):%lu bytes\n", LOGINF("sizeof(ULTRA_IO_CHANNEL_PROTOCOL):%lu bytes\n",
......
...@@ -155,9 +155,9 @@ visorchipset_mmap(struct file *file, struct vm_area_struct *vma) ...@@ -155,9 +155,9 @@ visorchipset_mmap(struct file *file, struct vm_area_struct *vma)
return -ENXIO; return -ENXIO;
} }
visorchannel_read(*PControlVm_channel, visorchannel_read(*PControlVm_channel,
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, offsetof(struct spar_controlvm_channel_protocol,
gpControlChannel), &addr, gp_control_channel),
sizeof(addr)); &addr, sizeof(addr));
if (addr == 0) { if (addr == 0) {
ERRDRV("%s control channel address is 0", __func__); ERRDRV("%s control channel address is 0", __func__);
return -ENXIO; return -ENXIO;
......
...@@ -360,8 +360,8 @@ static ssize_t toolaction_show(struct device *dev, ...@@ -360,8 +360,8 @@ static ssize_t toolaction_show(struct device *dev,
u8 toolAction; u8 toolAction;
visorchannel_read(ControlVm_channel, visorchannel_read(ControlVm_channel,
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, offsetof(struct spar_controlvm_channel_protocol,
ToolAction), &toolAction, sizeof(u8)); tool_action), &toolAction, sizeof(u8));
return scnprintf(buf, PAGE_SIZE, "%u\n", toolAction); return scnprintf(buf, PAGE_SIZE, "%u\n", toolAction);
} }
...@@ -376,7 +376,7 @@ static ssize_t toolaction_store(struct device *dev, ...@@ -376,7 +376,7 @@ static ssize_t toolaction_store(struct device *dev,
return -EINVAL; return -EINVAL;
ret = visorchannel_write(ControlVm_channel, ret = visorchannel_write(ControlVm_channel,
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, ToolAction), offsetof(struct spar_controlvm_channel_protocol, tool_action),
&toolAction, sizeof(u8)); &toolAction, sizeof(u8));
if (ret) if (ret)
...@@ -391,8 +391,8 @@ static ssize_t boottotool_show(struct device *dev, ...@@ -391,8 +391,8 @@ static ssize_t boottotool_show(struct device *dev,
struct efi_spar_indication efiSparIndication; struct efi_spar_indication efiSparIndication;
visorchannel_read(ControlVm_channel, visorchannel_read(ControlVm_channel,
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, offsetof(struct spar_controlvm_channel_protocol,
EfiSparIndication), &efiSparIndication, efi_spar_ind), &efiSparIndication,
sizeof(struct efi_spar_indication)); sizeof(struct efi_spar_indication));
return scnprintf(buf, PAGE_SIZE, "%u\n", return scnprintf(buf, PAGE_SIZE, "%u\n",
efiSparIndication.boot_to_tool); efiSparIndication.boot_to_tool);
...@@ -410,8 +410,8 @@ static ssize_t boottotool_store(struct device *dev, ...@@ -410,8 +410,8 @@ static ssize_t boottotool_store(struct device *dev,
efiSparIndication.boot_to_tool = val; efiSparIndication.boot_to_tool = val;
ret = visorchannel_write(ControlVm_channel, ret = visorchannel_write(ControlVm_channel,
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, offsetof(struct spar_controlvm_channel_protocol,
EfiSparIndication), efi_spar_ind),
&(efiSparIndication), &(efiSparIndication),
sizeof(struct efi_spar_indication)); sizeof(struct efi_spar_indication));
...@@ -426,7 +426,7 @@ static ssize_t error_show(struct device *dev, struct device_attribute *attr, ...@@ -426,7 +426,7 @@ static ssize_t error_show(struct device *dev, struct device_attribute *attr,
u32 error; u32 error;
visorchannel_read(ControlVm_channel, offsetof( visorchannel_read(ControlVm_channel, offsetof(
ULTRA_CONTROLVM_CHANNEL_PROTOCOL, InstallationError), struct spar_controlvm_channel_protocol, installation_error),
&error, sizeof(u32)); &error, sizeof(u32));
return scnprintf(buf, PAGE_SIZE, "%i\n", error); return scnprintf(buf, PAGE_SIZE, "%i\n", error);
} }
...@@ -441,8 +441,8 @@ static ssize_t error_store(struct device *dev, struct device_attribute *attr, ...@@ -441,8 +441,8 @@ static ssize_t error_store(struct device *dev, struct device_attribute *attr,
return -EINVAL; return -EINVAL;
ret = visorchannel_write(ControlVm_channel, ret = visorchannel_write(ControlVm_channel,
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, offsetof(struct spar_controlvm_channel_protocol,
InstallationError), installation_error),
&error, sizeof(u32)); &error, sizeof(u32));
if (ret) if (ret)
return ret; return ret;
...@@ -455,7 +455,7 @@ static ssize_t textid_show(struct device *dev, struct device_attribute *attr, ...@@ -455,7 +455,7 @@ static ssize_t textid_show(struct device *dev, struct device_attribute *attr,
u32 textId; u32 textId;
visorchannel_read(ControlVm_channel, offsetof( visorchannel_read(ControlVm_channel, offsetof(
ULTRA_CONTROLVM_CHANNEL_PROTOCOL, InstallationTextId), struct spar_controlvm_channel_protocol, installation_text_id),
&textId, sizeof(u32)); &textId, sizeof(u32));
return scnprintf(buf, PAGE_SIZE, "%i\n", textId); return scnprintf(buf, PAGE_SIZE, "%i\n", textId);
} }
...@@ -470,8 +470,8 @@ static ssize_t textid_store(struct device *dev, struct device_attribute *attr, ...@@ -470,8 +470,8 @@ static ssize_t textid_store(struct device *dev, struct device_attribute *attr,
return -EINVAL; return -EINVAL;
ret = visorchannel_write(ControlVm_channel, ret = visorchannel_write(ControlVm_channel,
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, offsetof(struct spar_controlvm_channel_protocol,
InstallationTextId), installation_text_id),
&textId, sizeof(u32)); &textId, sizeof(u32));
if (ret) if (ret)
return ret; return ret;
...@@ -485,8 +485,8 @@ static ssize_t remaining_steps_show(struct device *dev, ...@@ -485,8 +485,8 @@ static ssize_t remaining_steps_show(struct device *dev,
u16 remainingSteps; u16 remainingSteps;
visorchannel_read(ControlVm_channel, visorchannel_read(ControlVm_channel,
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, offsetof(struct spar_controlvm_channel_protocol,
InstallationRemainingSteps), installation_remaining_steps),
&remainingSteps, &remainingSteps,
sizeof(u16)); sizeof(u16));
return scnprintf(buf, PAGE_SIZE, "%hu\n", remainingSteps); return scnprintf(buf, PAGE_SIZE, "%hu\n", remainingSteps);
...@@ -502,8 +502,8 @@ static ssize_t remaining_steps_store(struct device *dev, ...@@ -502,8 +502,8 @@ static ssize_t remaining_steps_store(struct device *dev,
return -EINVAL; return -EINVAL;
ret = visorchannel_write(ControlVm_channel, ret = visorchannel_write(ControlVm_channel,
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, offsetof(struct spar_controlvm_channel_protocol,
InstallationRemainingSteps), installation_remaining_steps),
&remainingSteps, sizeof(u16)); &remainingSteps, sizeof(u16));
if (ret) if (ret)
return ret; return ret;
...@@ -767,8 +767,8 @@ visorchipset_save_message(struct controlvm_message *msg, CRASH_OBJ_TYPE type) ...@@ -767,8 +767,8 @@ visorchipset_save_message(struct controlvm_message *msg, CRASH_OBJ_TYPE type)
/* get saved message count */ /* get saved message count */
if (visorchannel_read(ControlVm_channel, if (visorchannel_read(ControlVm_channel,
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, offsetof(struct spar_controlvm_channel_protocol,
SavedCrashMsgCount), saved_crash_message_count),
&localSavedCrashMsgCount, sizeof(u16)) < 0) { &localSavedCrashMsgCount, sizeof(u16)) < 0) {
LOGERR("failed to get Saved Message Count"); LOGERR("failed to get Saved Message Count");
POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC, POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC,
...@@ -787,8 +787,8 @@ visorchipset_save_message(struct controlvm_message *msg, CRASH_OBJ_TYPE type) ...@@ -787,8 +787,8 @@ visorchipset_save_message(struct controlvm_message *msg, CRASH_OBJ_TYPE type)
/* get saved crash message offset */ /* get saved crash message offset */
if (visorchannel_read(ControlVm_channel, if (visorchannel_read(ControlVm_channel,
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, offsetof(struct spar_controlvm_channel_protocol,
SavedCrashMsgOffset), saved_crash_message_offset),
&localSavedCrashMsgOffset, sizeof(u32)) < 0) { &localSavedCrashMsgOffset, sizeof(u32)) < 0) {
LOGERR("failed to get Saved Message Offset"); LOGERR("failed to get Saved Message Offset");
POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC, POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC,
...@@ -1389,7 +1389,7 @@ initialize_controlvm_payload_info(HOSTADDRESS phys_addr, u64 offset, u32 bytes, ...@@ -1389,7 +1389,7 @@ initialize_controlvm_payload_info(HOSTADDRESS phys_addr, u64 offset, u32 bytes,
} }
memset(info, 0, sizeof(CONTROLVM_PAYLOAD_INFO)); memset(info, 0, sizeof(CONTROLVM_PAYLOAD_INFO));
if ((offset == 0) || (bytes == 0)) { if ((offset == 0) || (bytes == 0)) {
LOGERR("CONTROLVM_PAYLOAD_INIT Failed: RequestPayloadOffset=%llu RequestPayloadBytes=%llu!", LOGERR("CONTROLVM_PAYLOAD_INIT Failed: request_payload_offset=%llu request_payload_bytes=%llu!",
(u64) offset, (u64) bytes); (u64) offset, (u64) bytes);
rc = -CONTROLVM_RESP_ERROR_PAYLOAD_INVALID; rc = -CONTROLVM_RESP_ERROR_PAYLOAD_INVALID;
goto Away; goto Away;
...@@ -1436,8 +1436,8 @@ initialize_controlvm_payload(void) ...@@ -1436,8 +1436,8 @@ initialize_controlvm_payload(void)
u32 payloadBytes = 0; u32 payloadBytes = 0;
if (visorchannel_read(ControlVm_channel, if (visorchannel_read(ControlVm_channel,
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, offsetof(struct spar_controlvm_channel_protocol,
RequestPayloadOffset), request_payload_offset),
&payloadOffset, sizeof(payloadOffset)) < 0) { &payloadOffset, sizeof(payloadOffset)) < 0) {
LOGERR("CONTROLVM_PAYLOAD_INIT Failed to read controlvm channel!"); LOGERR("CONTROLVM_PAYLOAD_INIT Failed to read controlvm channel!");
POSTCODE_LINUX_2(CONTROLVM_INIT_FAILURE_PC, POSTCODE_LINUX_2(CONTROLVM_INIT_FAILURE_PC,
...@@ -1445,8 +1445,8 @@ initialize_controlvm_payload(void) ...@@ -1445,8 +1445,8 @@ initialize_controlvm_payload(void)
return; return;
} }
if (visorchannel_read(ControlVm_channel, if (visorchannel_read(ControlVm_channel,
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, offsetof(struct spar_controlvm_channel_protocol,
RequestPayloadBytes), request_payload_bytes),
&payloadBytes, sizeof(payloadBytes)) < 0) { &payloadBytes, sizeof(payloadBytes)) < 0) {
LOGERR("CONTROLVM_PAYLOAD_INIT Failed to read controlvm channel!"); LOGERR("CONTROLVM_PAYLOAD_INIT Failed to read controlvm channel!");
POSTCODE_LINUX_2(CONTROLVM_INIT_FAILURE_PC, POSTCODE_LINUX_2(CONTROLVM_INIT_FAILURE_PC,
...@@ -2068,8 +2068,8 @@ setup_crash_devices_work_queue(struct work_struct *work) ...@@ -2068,8 +2068,8 @@ setup_crash_devices_work_queue(struct work_struct *work)
/* get saved message count */ /* get saved message count */
if (visorchannel_read(ControlVm_channel, if (visorchannel_read(ControlVm_channel,
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, offsetof(struct spar_controlvm_channel_protocol,
SavedCrashMsgCount), saved_crash_message_count),
&localSavedCrashMsgCount, sizeof(u16)) < 0) { &localSavedCrashMsgCount, sizeof(u16)) < 0) {
LOGERR("failed to get Saved Message Count"); LOGERR("failed to get Saved Message Count");
POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC, POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC,
...@@ -2088,8 +2088,8 @@ setup_crash_devices_work_queue(struct work_struct *work) ...@@ -2088,8 +2088,8 @@ setup_crash_devices_work_queue(struct work_struct *work)
/* get saved crash message offset */ /* get saved crash message offset */
if (visorchannel_read(ControlVm_channel, if (visorchannel_read(ControlVm_channel,
offsetof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL, offsetof(struct spar_controlvm_channel_protocol,
SavedCrashMsgOffset), saved_crash_message_offset),
&localSavedCrashMsgOffset, sizeof(u32)) < 0) { &localSavedCrashMsgOffset, sizeof(u32)) < 0) {
LOGERR("failed to get Saved Message Offset"); LOGERR("failed to get Saved Message Offset");
POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC, POSTCODE_LINUX_2(CRASH_DEV_CTRL_RD_FAILURE_PC,
...@@ -2385,7 +2385,7 @@ visorchipset_init(void) ...@@ -2385,7 +2385,7 @@ visorchipset_init(void)
ControlVm_channel = ControlVm_channel =
visorchannel_create_with_lock visorchannel_create_with_lock
(addr, (addr,
sizeof(ULTRA_CONTROLVM_CHANNEL_PROTOCOL), sizeof(struct spar_controlvm_channel_protocol),
spar_controlvm_channel_protocol_uuid); spar_controlvm_channel_protocol_uuid);
if (SPAR_CONTROLVM_CHANNEL_OK_CLIENT( if (SPAR_CONTROLVM_CHANNEL_OK_CLIENT(
visorchannel_get_header(ControlVm_channel))) { visorchannel_get_header(ControlVm_channel))) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment