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

staging: unisys: refactor VISORCHIPSET_CHANNEL_INFO

Remove the typedef from this type and use struct visorchipset_channel_info
instead. Fix CamelCase member names:

addrType => addr_type
channelAddr => channel_addr
nChannelBytes => n_channel_bytes
channelTypeGuid => channel_type_uuid
channelInstGuid => channel_inst_uuid
Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2c683cde
...@@ -60,15 +60,15 @@ enum crash_obj_type { ...@@ -60,15 +60,15 @@ enum crash_obj_type {
/** Attributes for a particular Supervisor channel. /** Attributes for a particular Supervisor channel.
*/ */
typedef struct { struct visorchipset_channel_info {
enum visorchipset_addresstype addrType; enum visorchipset_addresstype addr_type;
HOSTADDRESS channelAddr; HOSTADDRESS channel_addr;
struct irq_info intr; struct irq_info intr;
u64 nChannelBytes; u64 n_channel_bytes;
uuid_le channelTypeGuid; uuid_le channel_type_uuid;
uuid_le channelInstGuid; uuid_le channel_inst_uuid;
} VISORCHIPSET_CHANNEL_INFO; };
/** Attributes for a particular Supervisor device. /** Attributes for a particular Supervisor device.
* Any visorchipset client can query these attributes using * Any visorchipset client can query these attributes using
...@@ -81,7 +81,7 @@ typedef struct { ...@@ -81,7 +81,7 @@ typedef struct {
u32 devNo; u32 devNo;
uuid_le devInstGuid; uuid_le devInstGuid;
struct visorchipset_state state; struct visorchipset_state state;
VISORCHIPSET_CHANNEL_INFO chanInfo; struct visorchipset_channel_info chanInfo;
u32 Reserved1; /* control_vm_id */ u32 Reserved1; /* control_vm_id */
u64 Reserved2; u64 Reserved2;
u32 switchNo; /* when devState.attached==1 */ u32 switchNo; /* when devState.attached==1 */
...@@ -126,7 +126,7 @@ typedef struct { ...@@ -126,7 +126,7 @@ typedef struct {
struct list_head entry; struct list_head entry;
u32 busNo; u32 busNo;
struct visorchipset_state state; struct visorchipset_state state;
VISORCHIPSET_CHANNEL_INFO chanInfo; struct visorchipset_channel_info chanInfo;
uuid_le partitionGuid; uuid_le partitionGuid;
u64 partitionHandle; u64 partitionHandle;
u8 *name; /* UTF8 */ u8 *name; /* UTF8 */
......
...@@ -1131,15 +1131,16 @@ bus_create(struct controlvm_message *inmsg) ...@@ -1131,15 +1131,16 @@ bus_create(struct controlvm_message *inmsg)
POSTCODE_LINUX_3(BUS_CREATE_ENTRY_PC, busNo, POSTCODE_SEVERITY_INFO); POSTCODE_LINUX_3(BUS_CREATE_ENTRY_PC, busNo, POSTCODE_SEVERITY_INFO);
if (inmsg->hdr.flags.test_message == 1) if (inmsg->hdr.flags.test_message == 1)
pBusInfo->chanInfo.addrType = ADDRTYPE_LOCALTEST; pBusInfo->chanInfo.addr_type = ADDRTYPE_LOCALTEST;
else else
pBusInfo->chanInfo.addrType = ADDRTYPE_LOCALPHYSICAL; pBusInfo->chanInfo.addr_type = ADDRTYPE_LOCALPHYSICAL;
pBusInfo->flags.server = inmsg->hdr.flags.server; pBusInfo->flags.server = inmsg->hdr.flags.server;
pBusInfo->chanInfo.channelAddr = cmd->create_bus.channel_addr; pBusInfo->chanInfo.channel_addr = cmd->create_bus.channel_addr;
pBusInfo->chanInfo.nChannelBytes = cmd->create_bus.channel_bytes; pBusInfo->chanInfo.n_channel_bytes = cmd->create_bus.channel_bytes;
pBusInfo->chanInfo.channelTypeGuid = cmd->create_bus.bus_data_type_uuid; pBusInfo->chanInfo.channel_type_uuid =
pBusInfo->chanInfo.channelInstGuid = cmd->create_bus.bus_inst_uuid; cmd->create_bus.bus_data_type_uuid;
pBusInfo->chanInfo.channel_inst_uuid = cmd->create_bus.bus_inst_uuid;
list_add(&pBusInfo->entry, &BusInfoList); list_add(&pBusInfo->entry, &BusInfoList);
...@@ -1281,19 +1282,20 @@ my_device_create(struct controlvm_message *inmsg) ...@@ -1281,19 +1282,20 @@ my_device_create(struct controlvm_message *inmsg)
POSTCODE_SEVERITY_INFO); POSTCODE_SEVERITY_INFO);
if (inmsg->hdr.flags.test_message == 1) if (inmsg->hdr.flags.test_message == 1)
pDevInfo->chanInfo.addrType = ADDRTYPE_LOCALTEST; pDevInfo->chanInfo.addr_type = ADDRTYPE_LOCALTEST;
else else
pDevInfo->chanInfo.addrType = ADDRTYPE_LOCALPHYSICAL; pDevInfo->chanInfo.addr_type = ADDRTYPE_LOCALPHYSICAL;
pDevInfo->chanInfo.channelAddr = cmd->create_device.channel_addr; pDevInfo->chanInfo.channel_addr = cmd->create_device.channel_addr;
pDevInfo->chanInfo.nChannelBytes = cmd->create_device.channel_bytes; pDevInfo->chanInfo.n_channel_bytes = cmd->create_device.channel_bytes;
pDevInfo->chanInfo.channelTypeGuid = cmd->create_device.data_type_uuid; pDevInfo->chanInfo.channel_type_uuid =
cmd->create_device.data_type_uuid;
pDevInfo->chanInfo.intr = cmd->create_device.intr; pDevInfo->chanInfo.intr = cmd->create_device.intr;
list_add(&pDevInfo->entry, &DevInfoList); list_add(&pDevInfo->entry, &DevInfoList);
POSTCODE_LINUX_4(DEVICE_CREATE_EXIT_PC, devNo, busNo, POSTCODE_LINUX_4(DEVICE_CREATE_EXIT_PC, devNo, busNo,
POSTCODE_SEVERITY_INFO); POSTCODE_SEVERITY_INFO);
Away: Away:
/* get the bus and devNo for DiagPool channel */ /* get the bus and devNo for DiagPool channel */
if (is_diagpool_channel(pDevInfo->chanInfo.channelTypeGuid)) { if (is_diagpool_channel(pDevInfo->chanInfo.channel_type_uuid)) {
g_diagpoolBusNo = busNo; g_diagpoolBusNo = busNo;
g_diagpoolDevNo = devNo; g_diagpoolDevNo = devNo;
LOGINF("CONTROLVM_DEVICE_CREATE for DiagPool channel: busNo=%lu, devNo=%lu", LOGINF("CONTROLVM_DEVICE_CREATE for DiagPool channel: busNo=%lu, devNo=%lu",
...@@ -1302,7 +1304,7 @@ my_device_create(struct controlvm_message *inmsg) ...@@ -1302,7 +1304,7 @@ my_device_create(struct controlvm_message *inmsg)
device_epilog(busNo, devNo, segment_state_running, device_epilog(busNo, devNo, segment_state_running,
CONTROLVM_DEVICE_CREATE, &inmsg->hdr, rc, CONTROLVM_DEVICE_CREATE, &inmsg->hdr, rc,
inmsg->hdr.flags.response_expected == 1, inmsg->hdr.flags.response_expected == 1,
FOR_VISORBUS(pDevInfo->chanInfo.channelTypeGuid)); FOR_VISORBUS(pDevInfo->chanInfo.channel_type_uuid));
} }
static void static void
...@@ -1336,7 +1338,8 @@ my_device_changestate(struct controlvm_message *inmsg) ...@@ -1336,7 +1338,8 @@ my_device_changestate(struct controlvm_message *inmsg)
device_epilog(busNo, devNo, state, CONTROLVM_DEVICE_CHANGESTATE, device_epilog(busNo, devNo, state, CONTROLVM_DEVICE_CHANGESTATE,
&inmsg->hdr, rc, &inmsg->hdr, rc,
inmsg->hdr.flags.response_expected == 1, inmsg->hdr.flags.response_expected == 1,
FOR_VISORBUS(pDevInfo->chanInfo.channelTypeGuid)); FOR_VISORBUS(
pDevInfo->chanInfo.channel_type_uuid));
} }
static void static void
...@@ -1366,7 +1369,8 @@ my_device_destroy(struct controlvm_message *inmsg) ...@@ -1366,7 +1369,8 @@ my_device_destroy(struct controlvm_message *inmsg)
device_epilog(busNo, devNo, segment_state_running, device_epilog(busNo, devNo, segment_state_running,
CONTROLVM_DEVICE_DESTROY, &inmsg->hdr, rc, CONTROLVM_DEVICE_DESTROY, &inmsg->hdr, rc,
inmsg->hdr.flags.response_expected == 1, inmsg->hdr.flags.response_expected == 1,
FOR_VISORBUS(pDevInfo->chanInfo.channelTypeGuid)); FOR_VISORBUS(
pDevInfo->chanInfo.channel_type_uuid));
} }
/* When provided with the physical address of the controlvm channel /* When provided with the physical address of the controlvm channel
...@@ -1932,7 +1936,7 @@ static HOSTADDRESS controlvm_get_channel_address(void) ...@@ -1932,7 +1936,7 @@ static HOSTADDRESS controlvm_get_channel_address(void)
static void static void
controlvm_periodic_work(struct work_struct *work) controlvm_periodic_work(struct work_struct *work)
{ {
VISORCHIPSET_CHANNEL_INFO chanInfo; struct visorchipset_channel_info chanInfo;
struct controlvm_message inmsg; struct controlvm_message inmsg;
BOOL gotACommand = FALSE; BOOL gotACommand = FALSE;
BOOL handle_command_failed = FALSE; BOOL handle_command_failed = FALSE;
...@@ -1947,7 +1951,7 @@ controlvm_periodic_work(struct work_struct *work) ...@@ -1947,7 +1951,7 @@ controlvm_periodic_work(struct work_struct *work)
if (visorchipset_clientregwait && !clientregistered) if (visorchipset_clientregwait && !clientregistered)
goto Away; goto Away;
memset(&chanInfo, 0, sizeof(VISORCHIPSET_CHANNEL_INFO)); memset(&chanInfo, 0, sizeof(struct visorchipset_channel_info));
Poll_Count++; Poll_Count++;
if (Poll_Count >= 250) if (Poll_Count >= 250)
......
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