static LIST_HEAD(bus_info_list);
static LIST_HEAD(dev_info_list);
-static struct visorchannel *ControlVm_channel;
+static struct visorchannel *controlvm_channel;
struct controlvm_payload_info {
u8 __iomem *ptr; /* pointer to base address of payload pool */
{
u8 toolAction;
- visorchannel_read(ControlVm_channel,
+ visorchannel_read(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol,
tool_action), &toolAction, sizeof(u8));
return scnprintf(buf, PAGE_SIZE, "%u\n", toolAction);
if (kstrtou8(buf, 10, &toolAction) != 0)
return -EINVAL;
- ret = visorchannel_write(ControlVm_channel,
+ ret = visorchannel_write(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, tool_action),
&toolAction, sizeof(u8));
{
struct efi_spar_indication efiSparIndication;
- visorchannel_read(ControlVm_channel,
+ visorchannel_read(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol,
efi_spar_ind), &efiSparIndication,
sizeof(struct efi_spar_indication));
return -EINVAL;
efiSparIndication.boot_to_tool = val;
- ret = visorchannel_write(ControlVm_channel,
+ ret = visorchannel_write(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol,
efi_spar_ind),
&(efiSparIndication),
{
u32 error;
- visorchannel_read(ControlVm_channel, offsetof(
+ visorchannel_read(controlvm_channel, offsetof(
struct spar_controlvm_channel_protocol, installation_error),
&error, sizeof(u32));
return scnprintf(buf, PAGE_SIZE, "%i\n", error);
if (kstrtou32(buf, 10, &error) != 0)
return -EINVAL;
- ret = visorchannel_write(ControlVm_channel,
+ ret = visorchannel_write(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol,
installation_error),
&error, sizeof(u32));
{
u32 textId;
- visorchannel_read(ControlVm_channel, offsetof(
+ visorchannel_read(controlvm_channel, offsetof(
struct spar_controlvm_channel_protocol, installation_text_id),
&textId, sizeof(u32));
return scnprintf(buf, PAGE_SIZE, "%i\n", textId);
if (kstrtou32(buf, 10, &textId) != 0)
return -EINVAL;
- ret = visorchannel_write(ControlVm_channel,
+ ret = visorchannel_write(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol,
installation_text_id),
&textId, sizeof(u32));
{
u16 remainingSteps;
- visorchannel_read(ControlVm_channel,
+ visorchannel_read(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol,
installation_remaining_steps),
&remainingSteps,
if (kstrtou16(buf, 10, &remainingSteps) != 0)
return -EINVAL;
- ret = visorchannel_write(ControlVm_channel,
+ ret = visorchannel_write(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol,
installation_remaining_steps),
&remainingSteps, sizeof(u16));
if (outmsg.hdr.flags.test_message == 1)
return;
- if (!visorchannel_signalinsert(ControlVm_channel,
+ if (!visorchannel_signalinsert(controlvm_channel,
CONTROLVM_QUEUE_REQUEST, &outmsg)) {
return;
}
controlvm_init_response(&outmsg, msgHdr, response);
outmsg.cmd.init_chipset.features = features;
- if (!visorchannel_signalinsert(ControlVm_channel,
+ if (!visorchannel_signalinsert(controlvm_channel,
CONTROLVM_QUEUE_REQUEST, &outmsg)) {
return;
}
controlvm_init_response(&outmsg, msgHdr, response);
outmsg.cmd.device_change_state.state = state;
outmsg.cmd.device_change_state.flags.phys_device = 1;
- if (!visorchannel_signalinsert(ControlVm_channel,
+ if (!visorchannel_signalinsert(controlvm_channel,
CONTROLVM_QUEUE_REQUEST, &outmsg)) {
return;
}
u16 localSavedCrashMsgCount;
/* get saved message count */
- if (visorchannel_read(ControlVm_channel,
+ if (visorchannel_read(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol,
saved_crash_message_count),
&localSavedCrashMsgCount, sizeof(u16)) < 0) {
}
/* get saved crash message offset */
- if (visorchannel_read(ControlVm_channel,
+ if (visorchannel_read(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol,
saved_crash_message_offset),
&localSavedCrashMsgOffset, sizeof(u32)) < 0) {
}
if (type == CRASH_BUS) {
- if (visorchannel_write(ControlVm_channel,
+ if (visorchannel_write(controlvm_channel,
localSavedCrashMsgOffset,
msg,
sizeof(struct controlvm_message)) < 0) {
return;
}
} else {
- if (visorchannel_write(ControlVm_channel,
+ if (visorchannel_write(controlvm_channel,
localSavedCrashMsgOffset +
sizeof(struct controlvm_message), msg,
sizeof(struct controlvm_message)) < 0) {
outmsg.cmd.device_change_state.dev_no = devNo;
outmsg.cmd.device_change_state.state = responseState;
- if (!visorchannel_signalinsert(ControlVm_channel,
+ if (!visorchannel_signalinsert(controlvm_channel,
CONTROLVM_QUEUE_REQUEST, &outmsg))
return;
static void
initialize_controlvm_payload(void)
{
- HOSTADDRESS phys_addr = visorchannel_get_physaddr(ControlVm_channel);
+ HOSTADDRESS phys_addr = visorchannel_get_physaddr(controlvm_channel);
u64 payloadOffset = 0;
u32 payloadBytes = 0;
- if (visorchannel_read(ControlVm_channel,
+ if (visorchannel_read(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol,
request_payload_offset),
&payloadOffset, sizeof(payloadOffset)) < 0) {
POSTCODE_SEVERITY_ERR);
return;
}
- if (visorchannel_read(ControlVm_channel,
+ if (visorchannel_read(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol,
request_payload_bytes),
&payloadBytes, sizeof(payloadBytes)) < 0) {
static BOOL
read_controlvm_event(struct controlvm_message *msg)
{
- if (visorchannel_signalremove(ControlVm_channel,
+ if (visorchannel_signalremove(controlvm_channel,
CONTROLVM_QUEUE_EVENT, msg)) {
/* got a message */
if (msg->hdr.flags.test_message == 1)
if (!isLocalAddr) {
controlvm_init_response(&ackmsg, &inmsg.hdr,
CONTROLVM_RESP_SUCCESS);
- if (ControlVm_channel)
- visorchannel_signalinsert(ControlVm_channel,
+ if (controlvm_channel)
+ visorchannel_signalinsert(controlvm_channel,
CONTROLVM_QUEUE_ACK,
&ackmsg);
}
}
}
- while (visorchannel_signalremove(ControlVm_channel,
+ while (visorchannel_signalremove(controlvm_channel,
CONTROLVM_QUEUE_RESPONSE,
- &inmsg)) {
- }
+ &inmsg))
+ ;
if (!gotACommand) {
if (ControlVm_Pending_Msg_Valid) {
/* we throttled processing of a prior
most_recent_message_jiffies = jiffies;
if (handle_command(inmsg,
visorchannel_get_physaddr
- (ControlVm_channel)))
+ (controlvm_channel)))
gotACommand = read_controlvm_event(&inmsg);
else {
/* this is a scenario where throttling
chipset_init(&msg);
/* get saved message count */
- if (visorchannel_read(ControlVm_channel,
+ if (visorchannel_read(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol,
saved_crash_message_count),
&localSavedCrashMsgCount, sizeof(u16)) < 0) {
}
/* get saved crash message offset */
- if (visorchannel_read(ControlVm_channel,
+ if (visorchannel_read(controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol,
saved_crash_message_offset),
&localSavedCrashMsgOffset, sizeof(u32)) < 0) {
}
/* read create device message for storage bus offset */
- if (visorchannel_read(ControlVm_channel,
+ if (visorchannel_read(controlvm_channel,
localSavedCrashMsgOffset,
&localCrashCreateBusMsg,
sizeof(struct controlvm_message)) < 0) {
}
/* read create device message for storage device */
- if (visorchannel_read(ControlVm_channel,
+ if (visorchannel_read(controlvm_channel,
localSavedCrashMsgOffset +
sizeof(struct controlvm_message),
&localCrashCreateDevMsg,
addr = controlvm_get_channel_address();
if (addr != 0) {
- ControlVm_channel =
+ controlvm_channel =
visorchannel_create_with_lock
(addr,
sizeof(struct spar_controlvm_channel_protocol),
spar_controlvm_channel_protocol_uuid);
if (SPAR_CONTROLVM_CHANNEL_OK_CLIENT(
- visorchannel_get_header(ControlVm_channel))) {
+ visorchannel_get_header(controlvm_channel))) {
initialize_controlvm_payload();
} else {
- visorchannel_destroy(ControlVm_channel);
- ControlVm_channel = NULL;
+ visorchannel_destroy(controlvm_channel);
+ controlvm_channel = NULL;
return -ENODEV;
}
} else {
}
MajorDev = MKDEV(visorchipset_major, 0);
- rc = visorchipset_file_init(MajorDev, &ControlVm_channel);
+ rc = visorchipset_file_init(MajorDev, &controlvm_channel);
if (rc < 0) {
POSTCODE_LINUX_2(CHIPSET_INIT_FAILURE_PC, DIAG_SEVERITY_ERR);
goto Away;
memset(&g_del_dump_msg_hdr, 0, sizeof(struct controlvm_message_header));
- visorchannel_destroy(ControlVm_channel);
+ visorchannel_destroy(controlvm_channel);
visorchipset_file_cleanup();
POSTCODE_LINUX_2(DRIVER_EXIT_PC, POSTCODE_SEVERITY_INFO);