Commit 545f0913 authored by Sameer Wadgaonkar's avatar Sameer Wadgaonkar Committed by Greg Kroah-Hartman

staging: unisys: visorbus: renamed structures in controlvmchannel.h to match driver namespace

Renamed structures
* spar_segment_state to visor_segment_state
* efi_spar_indication to efi_visor_indication
* spar_controlvm_channel_protocol to visor_controlvm_channel
* spar_controlvm_parameters_header to
		visor_controlvm_parameters_header
Signed-off-by: default avatarSameer Wadgaonkar <sameer.wadgaonkar@unisys.com>
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c5a28902
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
(spar_check_channel(ch, \ (spar_check_channel(ch, \
VISOR_CONTROLVM_CHANNEL_UUID, \ VISOR_CONTROLVM_CHANNEL_UUID, \
"controlvm", \ "controlvm", \
sizeof(struct spar_controlvm_channel_protocol), \ sizeof(struct visor_controlvm_channel), \
VISOR_CONTROLVM_CHANNEL_VERSIONID, \ VISOR_CONTROLVM_CHANNEL_VERSIONID, \
VISOR_CONTROLVM_CHANNEL_SIGNATURE)) VISOR_CONTROLVM_CHANNEL_SIGNATURE))
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
/* Max num of messages stored during IOVM creation to be reused after crash */ /* Max num of messages stored during IOVM creation to be reused after crash */
#define CONTROLVM_CRASHMSG_MAX 2 #define CONTROLVM_CRASHMSG_MAX 2
struct spar_segment_state { struct visor_segment_state {
/* Bit 0: May enter other states */ /* Bit 0: May enter other states */
u16 enabled:1; u16 enabled:1;
/* Bit 1: Assigned to active partition */ /* Bit 1: Assigned to active partition */
...@@ -75,15 +75,15 @@ struct spar_segment_state { ...@@ -75,15 +75,15 @@ struct spar_segment_state {
*/ */
} __packed; } __packed;
static const struct spar_segment_state segment_state_running = { static const struct visor_segment_state segment_state_running = {
1, 1, 1, 0, 1, 1, 1, 1 1, 1, 1, 0, 1, 1, 1, 1
}; };
static const struct spar_segment_state segment_state_paused = { static const struct visor_segment_state segment_state_paused = {
1, 1, 1, 0, 1, 1, 1, 0 1, 1, 1, 0, 1, 1, 1, 0
}; };
static const struct spar_segment_state segment_state_standby = { static const struct visor_segment_state segment_state_standby = {
1, 1, 0, 0, 1, 1, 1, 0 1, 1, 0, 0, 1, 1, 1, 0
}; };
...@@ -148,7 +148,7 @@ struct irq_info { ...@@ -148,7 +148,7 @@ struct irq_info {
u8 reserved[3]; /* Natural alignment purposes */ u8 reserved[3]; /* Natural alignment purposes */
} __packed; } __packed;
struct efi_spar_indication { struct efi_visor_indication {
u64 boot_to_fw_ui:1; /* Bit 0: Stop in uefi ui */ u64 boot_to_fw_ui:1; /* Bit 0: Stop in uefi ui */
u64 clear_nvram:1; /* Bit 1: Clear NVRAM */ u64 clear_nvram:1; /* Bit 1: Clear NVRAM */
u64 clear_cmos:1; /* Bit 2: Clear CMOS */ u64 clear_cmos:1; /* Bit 2: Clear CMOS */
...@@ -297,13 +297,13 @@ struct controlvm_message_packet { ...@@ -297,13 +297,13 @@ struct controlvm_message_packet {
/* for CONTROLVM_DEVICE_RECONFIGURE */ /* for CONTROLVM_DEVICE_RECONFIGURE */
struct { struct {
u32 bus_no; u32 bus_no;
struct spar_segment_state state; struct visor_segment_state state;
u8 reserved[2]; /* Natural alignment purposes */ u8 reserved[2]; /* Natural alignment purposes */
} __packed bus_change_state; /* for CONTROLVM_BUS_CHANGESTATE */ } __packed bus_change_state; /* for CONTROLVM_BUS_CHANGESTATE */
struct { struct {
u32 bus_no; u32 bus_no;
u32 dev_no; u32 dev_no;
struct spar_segment_state state; struct visor_segment_state state;
struct { struct {
/* =1 if message is for a physical device */ /* =1 if message is for a physical device */
u32 phys_device:1; u32 phys_device:1;
...@@ -316,7 +316,7 @@ struct controlvm_message_packet { ...@@ -316,7 +316,7 @@ struct controlvm_message_packet {
struct { struct {
u32 bus_no; u32 bus_no;
u32 dev_no; u32 dev_no;
struct spar_segment_state state; struct visor_segment_state state;
u8 reserved[6]; /* Natural alignment purposes */ u8 reserved[6]; /* Natural alignment purposes */
} __packed device_change_state_event; } __packed device_change_state_event;
/* for CONTROLVM_DEVICE_CHANGESTATE_EVENT */ /* for CONTROLVM_DEVICE_CHANGESTATE_EVENT */
...@@ -348,7 +348,7 @@ struct controlvm_message { ...@@ -348,7 +348,7 @@ struct controlvm_message {
struct controlvm_message_packet cmd; struct controlvm_message_packet cmd;
} __packed; } __packed;
struct spar_controlvm_channel_protocol { struct visor_controlvm_channel {
struct channel_header header; struct channel_header header;
u64 gp_controlvm; /* guest phys addr of this channel */ u64 gp_controlvm; /* guest phys addr of this channel */
u64 gp_partition_tables;/* guest phys addr of partition tables */ u64 gp_partition_tables;/* guest phys addr of partition tables */
...@@ -404,8 +404,7 @@ struct spar_controlvm_channel_protocol { ...@@ -404,8 +404,7 @@ struct spar_controlvm_channel_protocol {
/* VISOR_TOOL_ACTIONS Installation Action field */ /* VISOR_TOOL_ACTIONS Installation Action field */
u8 tool_action; u8 tool_action;
u8 reserved; /* alignment */ u8 reserved; /* alignment */
struct efi_spar_indication efi_spar_ind; struct efi_visor_indication efi_visor_ind;
struct efi_spar_indication efi_spar_ind_supported;
u32 sp_reserved; u32 sp_reserved;
/* Force signals to begin on 128-byte cache line */ /* Force signals to begin on 128-byte cache line */
u8 reserved2[28]; u8 reserved2[28];
...@@ -443,7 +442,7 @@ struct spar_controlvm_channel_protocol { ...@@ -443,7 +442,7 @@ struct spar_controlvm_channel_protocol {
* of total_length should equal PayloadBytes. The format of the strings at * of total_length should equal PayloadBytes. The format of the strings at
* PayloadVmOffset will take different forms depending on the message. * PayloadVmOffset will take different forms depending on the message.
*/ */
struct spar_controlvm_parameters_header { struct visor_controlvm_parameters_header {
u32 total_length; u32 total_length;
u32 header_length; u32 header_length;
u32 connection_offset; u32 connection_offset;
......
...@@ -101,7 +101,7 @@ static ssize_t toolaction_show(struct device *dev, ...@@ -101,7 +101,7 @@ static ssize_t toolaction_show(struct device *dev,
int err; int err;
err = visorchannel_read(chipset_dev->controlvm_channel, err = visorchannel_read(chipset_dev->controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, offsetof(struct visor_controlvm_channel,
tool_action), tool_action),
&tool_action, sizeof(u8)); &tool_action, sizeof(u8));
if (err) if (err)
...@@ -120,11 +120,10 @@ static ssize_t toolaction_store(struct device *dev, ...@@ -120,11 +120,10 @@ static ssize_t toolaction_store(struct device *dev,
if (kstrtou8(buf, 10, &tool_action)) if (kstrtou8(buf, 10, &tool_action))
return -EINVAL; return -EINVAL;
err = visorchannel_write err = visorchannel_write(chipset_dev->controlvm_channel,
(chipset_dev->controlvm_channel, offsetof(struct visor_controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, tool_action),
tool_action), &tool_action, sizeof(u8));
&tool_action, sizeof(u8));
if (err) if (err)
return err; return err;
...@@ -136,18 +135,18 @@ static ssize_t boottotool_show(struct device *dev, ...@@ -136,18 +135,18 @@ static ssize_t boottotool_show(struct device *dev,
struct device_attribute *attr, struct device_attribute *attr,
char *buf) char *buf)
{ {
struct efi_spar_indication efi_spar_indication; struct efi_visor_indication efi_visor_indication;
int err; int err;
err = visorchannel_read(chipset_dev->controlvm_channel, err = visorchannel_read(chipset_dev->controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, offsetof(struct visor_controlvm_channel,
efi_spar_ind), efi_visor_ind),
&efi_spar_indication, &efi_visor_indication,
sizeof(struct efi_spar_indication)); sizeof(struct efi_visor_indication));
if (err) if (err)
return err; return err;
return sprintf(buf, "%u\n", efi_spar_indication.boot_to_tool); return sprintf(buf, "%u\n", efi_visor_indication.boot_to_tool);
} }
static ssize_t boottotool_store(struct device *dev, static ssize_t boottotool_store(struct device *dev,
...@@ -155,17 +154,17 @@ static ssize_t boottotool_store(struct device *dev, ...@@ -155,17 +154,17 @@ static ssize_t boottotool_store(struct device *dev,
const char *buf, size_t count) const char *buf, size_t count)
{ {
int val, err; int val, err;
struct efi_spar_indication efi_spar_indication; struct efi_visor_indication efi_visor_indication;
if (kstrtoint(buf, 10, &val)) if (kstrtoint(buf, 10, &val))
return -EINVAL; return -EINVAL;
efi_spar_indication.boot_to_tool = val; efi_visor_indication.boot_to_tool = val;
err = visorchannel_write err = visorchannel_write(chipset_dev->controlvm_channel,
(chipset_dev->controlvm_channel, offsetof(struct visor_controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, efi_visor_ind),
efi_spar_ind), &(efi_spar_indication), &(efi_visor_indication),
sizeof(struct efi_spar_indication)); sizeof(struct efi_visor_indication));
if (err) if (err)
return err; return err;
...@@ -180,7 +179,7 @@ static ssize_t error_show(struct device *dev, struct device_attribute *attr, ...@@ -180,7 +179,7 @@ static ssize_t error_show(struct device *dev, struct device_attribute *attr,
int err; int err;
err = visorchannel_read(chipset_dev->controlvm_channel, err = visorchannel_read(chipset_dev->controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, offsetof(struct visor_controlvm_channel,
installation_error), installation_error),
&error, sizeof(u32)); &error, sizeof(u32));
if (err) if (err)
...@@ -197,11 +196,10 @@ static ssize_t error_store(struct device *dev, struct device_attribute *attr, ...@@ -197,11 +196,10 @@ static ssize_t error_store(struct device *dev, struct device_attribute *attr,
if (kstrtou32(buf, 10, &error)) if (kstrtou32(buf, 10, &error))
return -EINVAL; return -EINVAL;
err = visorchannel_write err = visorchannel_write(chipset_dev->controlvm_channel,
(chipset_dev->controlvm_channel, offsetof(struct visor_controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, installation_error),
installation_error), &error, sizeof(u32));
&error, sizeof(u32));
if (err) if (err)
return err; return err;
return count; return count;
...@@ -214,11 +212,10 @@ static ssize_t textid_show(struct device *dev, struct device_attribute *attr, ...@@ -214,11 +212,10 @@ static ssize_t textid_show(struct device *dev, struct device_attribute *attr,
u32 text_id = 0; u32 text_id = 0;
int err; int err;
err = visorchannel_read err = visorchannel_read(chipset_dev->controlvm_channel,
(chipset_dev->controlvm_channel, offsetof(struct visor_controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, installation_text_id),
installation_text_id), &text_id, sizeof(u32));
&text_id, sizeof(u32));
if (err) if (err)
return err; return err;
...@@ -234,11 +231,10 @@ static ssize_t textid_store(struct device *dev, struct device_attribute *attr, ...@@ -234,11 +231,10 @@ static ssize_t textid_store(struct device *dev, struct device_attribute *attr,
if (kstrtou32(buf, 10, &text_id)) if (kstrtou32(buf, 10, &text_id))
return -EINVAL; return -EINVAL;
err = visorchannel_write err = visorchannel_write(chipset_dev->controlvm_channel,
(chipset_dev->controlvm_channel, offsetof(struct visor_controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, installation_text_id),
installation_text_id), &text_id, sizeof(u32));
&text_id, sizeof(u32));
if (err) if (err)
return err; return err;
return count; return count;
...@@ -252,7 +248,7 @@ static ssize_t remaining_steps_show(struct device *dev, ...@@ -252,7 +248,7 @@ static ssize_t remaining_steps_show(struct device *dev,
int err; int err;
err = visorchannel_read(chipset_dev->controlvm_channel, err = visorchannel_read(chipset_dev->controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, offsetof(struct visor_controlvm_channel,
installation_remaining_steps), installation_remaining_steps),
&remaining_steps, sizeof(u16)); &remaining_steps, sizeof(u16));
if (err) if (err)
...@@ -271,11 +267,10 @@ static ssize_t remaining_steps_store(struct device *dev, ...@@ -271,11 +267,10 @@ static ssize_t remaining_steps_store(struct device *dev,
if (kstrtou16(buf, 10, &remaining_steps)) if (kstrtou16(buf, 10, &remaining_steps))
return -EINVAL; return -EINVAL;
err = visorchannel_write err = visorchannel_write(chipset_dev->controlvm_channel,
(chipset_dev->controlvm_channel, offsetof(struct visor_controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, installation_remaining_steps),
installation_remaining_steps), &remaining_steps, sizeof(u16));
&remaining_steps, sizeof(u16));
if (err) if (err)
return err; return err;
return count; return count;
...@@ -285,9 +280,9 @@ static DEVICE_ATTR_RW(remaining_steps); ...@@ -285,9 +280,9 @@ static DEVICE_ATTR_RW(remaining_steps);
static uuid_le static uuid_le
parser_id_get(struct parser_context *ctx) parser_id_get(struct parser_context *ctx)
{ {
struct spar_controlvm_parameters_header *phdr = NULL; struct visor_controlvm_parameters_header *phdr = NULL;
phdr = (struct spar_controlvm_parameters_header *)(ctx->data); phdr = (struct visor_controlvm_parameters_header *)(ctx->data);
return phdr->id; return phdr->id;
} }
...@@ -331,9 +326,9 @@ parser_string_get(struct parser_context *ctx) ...@@ -331,9 +326,9 @@ parser_string_get(struct parser_context *ctx)
static void * static void *
parser_name_get(struct parser_context *ctx) parser_name_get(struct parser_context *ctx)
{ {
struct spar_controlvm_parameters_header *phdr = NULL; struct visor_controlvm_parameters_header *phdr = NULL;
phdr = (struct spar_controlvm_parameters_header *)(ctx->data); phdr = (struct visor_controlvm_parameters_header *)(ctx->data);
if (phdr->name_offset + phdr->name_length > ctx->param_bytes) if (phdr->name_offset + phdr->name_length > ctx->param_bytes)
return NULL; return NULL;
...@@ -447,7 +442,7 @@ chipset_init(struct controlvm_message *inmsg) ...@@ -447,7 +442,7 @@ chipset_init(struct controlvm_message *inmsg)
static int static int
controlvm_respond(struct controlvm_message_header *msg_hdr, int response, controlvm_respond(struct controlvm_message_header *msg_hdr, int response,
struct spar_segment_state *state) struct visor_segment_state *state)
{ {
struct controlvm_message outmsg; struct controlvm_message outmsg;
...@@ -477,7 +472,7 @@ save_crash_message(struct controlvm_message *msg, enum crash_obj_type cr_type) ...@@ -477,7 +472,7 @@ save_crash_message(struct controlvm_message *msg, enum crash_obj_type cr_type)
int err; int err;
err = visorchannel_read(chipset_dev->controlvm_channel, err = visorchannel_read(chipset_dev->controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, offsetof(struct visor_controlvm_channel,
saved_crash_message_count), saved_crash_message_count),
&local_crash_msg_count, sizeof(u16)); &local_crash_msg_count, sizeof(u16));
if (err) { if (err) {
...@@ -493,7 +488,7 @@ save_crash_message(struct controlvm_message *msg, enum crash_obj_type cr_type) ...@@ -493,7 +488,7 @@ save_crash_message(struct controlvm_message *msg, enum crash_obj_type cr_type)
} }
err = visorchannel_read(chipset_dev->controlvm_channel, err = visorchannel_read(chipset_dev->controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, offsetof(struct visor_controlvm_channel,
saved_crash_message_offset), saved_crash_message_offset),
&local_crash_msg_offset, sizeof(u32)); &local_crash_msg_offset, sizeof(u32));
if (err) { if (err) {
...@@ -551,7 +546,7 @@ controlvm_responder(enum controlvm_id cmd_id, ...@@ -551,7 +546,7 @@ controlvm_responder(enum controlvm_id cmd_id,
static int static int
device_changestate_responder(enum controlvm_id cmd_id, device_changestate_responder(enum controlvm_id cmd_id,
struct visor_device *p, int response, struct visor_device *p, int response,
struct spar_segment_state response_state) struct visor_segment_state response_state)
{ {
struct controlvm_message outmsg; struct controlvm_message outmsg;
u32 bus_no = p->chipset_bus_no; u32 bus_no = p->chipset_bus_no;
...@@ -850,7 +845,7 @@ visorbus_device_changestate(struct controlvm_message *inmsg) ...@@ -850,7 +845,7 @@ visorbus_device_changestate(struct controlvm_message *inmsg)
struct controlvm_message_header *pmsg_hdr = NULL; struct controlvm_message_header *pmsg_hdr = NULL;
u32 bus_no = cmd->device_change_state.bus_no; u32 bus_no = cmd->device_change_state.bus_no;
u32 dev_no = cmd->device_change_state.dev_no; u32 dev_no = cmd->device_change_state.dev_no;
struct spar_segment_state state = cmd->device_change_state.state; struct visor_segment_state state = cmd->device_change_state.state;
struct visor_device *dev_info; struct visor_device *dev_info;
int err = 0; int err = 0;
...@@ -1387,7 +1382,7 @@ setup_crash_devices_work_queue(struct work_struct *work) ...@@ -1387,7 +1382,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
/* get saved message count */ /* get saved message count */
if (visorchannel_read(chipset_dev->controlvm_channel, if (visorchannel_read(chipset_dev->controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, offsetof(struct visor_controlvm_channel,
saved_crash_message_count), saved_crash_message_count),
&local_crash_msg_count, sizeof(u16)) < 0) { &local_crash_msg_count, sizeof(u16)) < 0) {
dev_err(&chipset_dev->acpi_device->dev, dev_err(&chipset_dev->acpi_device->dev,
...@@ -1403,7 +1398,7 @@ setup_crash_devices_work_queue(struct work_struct *work) ...@@ -1403,7 +1398,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
/* get saved crash message offset */ /* get saved crash message offset */
if (visorchannel_read(chipset_dev->controlvm_channel, if (visorchannel_read(chipset_dev->controlvm_channel,
offsetof(struct spar_controlvm_channel_protocol, offsetof(struct visor_controlvm_channel,
saved_crash_message_offset), saved_crash_message_offset),
&local_crash_msg_offset, sizeof(u32)) < 0) { &local_crash_msg_offset, sizeof(u32)) < 0) {
dev_err(&chipset_dev->acpi_device->dev, dev_err(&chipset_dev->acpi_device->dev,
......
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