staging: unisys: visorbus: Remove POSTCODE_SEVERITY levels
Use the already defined DIAG_SEVERITY values directly instead of special postcode macro names. Signed-off-by: Bryan Thompson <bryan.thompson@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
a96b44f058
commit
c6bc82f144
|
@ -608,7 +608,7 @@ create_visor_device(struct visor_device *dev)
|
||||||
u32 chipset_dev_no = dev->chipset_dev_no;
|
u32 chipset_dev_no = dev->chipset_dev_no;
|
||||||
|
|
||||||
POSTCODE_LINUX(DEVICE_CREATE_ENTRY_PC, chipset_dev_no, chipset_bus_no,
|
POSTCODE_LINUX(DEVICE_CREATE_ENTRY_PC, chipset_dev_no, chipset_bus_no,
|
||||||
POSTCODE_SEVERITY_INFO);
|
DIAG_SEVERITY_PRINT);
|
||||||
|
|
||||||
mutex_init(&dev->visordriver_callback_lock);
|
mutex_init(&dev->visordriver_callback_lock);
|
||||||
dev->device.bus = &visorbus_type;
|
dev->device.bus = &visorbus_type;
|
||||||
|
@ -966,7 +966,7 @@ create_bus_instance(struct visor_device *dev)
|
||||||
int err;
|
int err;
|
||||||
struct spar_vbus_headerinfo *hdr_info;
|
struct spar_vbus_headerinfo *hdr_info;
|
||||||
|
|
||||||
POSTCODE_LINUX(BUS_CREATE_ENTRY_PC, 0, 0, POSTCODE_SEVERITY_INFO);
|
POSTCODE_LINUX(BUS_CREATE_ENTRY_PC, 0, 0, DIAG_SEVERITY_PRINT);
|
||||||
|
|
||||||
hdr_info = kzalloc(sizeof(*hdr_info), GFP_KERNEL);
|
hdr_info = kzalloc(sizeof(*hdr_info), GFP_KERNEL);
|
||||||
if (!hdr_info)
|
if (!hdr_info)
|
||||||
|
@ -994,7 +994,7 @@ create_bus_instance(struct visor_device *dev)
|
||||||
|
|
||||||
if (device_register(&dev->device) < 0) {
|
if (device_register(&dev->device) < 0) {
|
||||||
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, 0, id,
|
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, 0, id,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
goto err_debugfs_created;
|
goto err_debugfs_created;
|
||||||
}
|
}
|
||||||
|
@ -1092,16 +1092,16 @@ chipset_bus_create(struct visor_device *dev)
|
||||||
int rc;
|
int rc;
|
||||||
u32 bus_no = dev->chipset_bus_no;
|
u32 bus_no = dev->chipset_bus_no;
|
||||||
|
|
||||||
POSTCODE_LINUX(BUS_CREATE_ENTRY_PC, 0, bus_no, POSTCODE_SEVERITY_INFO);
|
POSTCODE_LINUX(BUS_CREATE_ENTRY_PC, 0, bus_no, DIAG_SEVERITY_PRINT);
|
||||||
rc = create_bus_instance(dev);
|
rc = create_bus_instance(dev);
|
||||||
POSTCODE_LINUX(BUS_CREATE_EXIT_PC, 0, bus_no, POSTCODE_SEVERITY_INFO);
|
POSTCODE_LINUX(BUS_CREATE_EXIT_PC, 0, bus_no, DIAG_SEVERITY_PRINT);
|
||||||
|
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
POSTCODE_LINUX(BUS_CREATE_FAILURE_PC, 0, bus_no,
|
POSTCODE_LINUX(BUS_CREATE_FAILURE_PC, 0, bus_no,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
else
|
else
|
||||||
POSTCODE_LINUX(CHIPSET_INIT_SUCCESS_PC, 0, bus_no,
|
POSTCODE_LINUX(CHIPSET_INIT_SUCCESS_PC, 0, bus_no,
|
||||||
POSTCODE_SEVERITY_INFO);
|
DIAG_SEVERITY_PRINT);
|
||||||
|
|
||||||
bus_create_response(dev, rc);
|
bus_create_response(dev, rc);
|
||||||
}
|
}
|
||||||
|
@ -1121,17 +1121,17 @@ chipset_device_create(struct visor_device *dev_info)
|
||||||
u32 dev_no = dev_info->chipset_dev_no;
|
u32 dev_no = dev_info->chipset_dev_no;
|
||||||
|
|
||||||
POSTCODE_LINUX(DEVICE_CREATE_ENTRY_PC, dev_no, bus_no,
|
POSTCODE_LINUX(DEVICE_CREATE_ENTRY_PC, dev_no, bus_no,
|
||||||
POSTCODE_SEVERITY_INFO);
|
DIAG_SEVERITY_PRINT);
|
||||||
|
|
||||||
rc = create_visor_device(dev_info);
|
rc = create_visor_device(dev_info);
|
||||||
device_create_response(dev_info, rc);
|
device_create_response(dev_info, rc);
|
||||||
|
|
||||||
if (rc < 0)
|
if (rc < 0)
|
||||||
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
else
|
else
|
||||||
POSTCODE_LINUX(DEVICE_CREATE_SUCCESS_PC, dev_no, bus_no,
|
POSTCODE_LINUX(DEVICE_CREATE_SUCCESS_PC, dev_no, bus_no,
|
||||||
POSTCODE_SEVERITY_INFO);
|
DIAG_SEVERITY_PRINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -1297,7 +1297,7 @@ visorbus_init(void)
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
POSTCODE_LINUX(DRIVER_ENTRY_PC, 0, 0, POSTCODE_SEVERITY_INFO);
|
POSTCODE_LINUX(DRIVER_ENTRY_PC, 0, 0, DIAG_SEVERITY_PRINT);
|
||||||
|
|
||||||
visorbus_debugfs_dir = debugfs_create_dir("visorbus", NULL);
|
visorbus_debugfs_dir = debugfs_create_dir("visorbus", NULL);
|
||||||
if (!visorbus_debugfs_dir)
|
if (!visorbus_debugfs_dir)
|
||||||
|
@ -1316,7 +1316,7 @@ visorbus_init(void)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
POSTCODE_LINUX(CHIPSET_INIT_FAILURE_PC, 0, err, POSTCODE_SEVERITY_ERR);
|
POSTCODE_LINUX(CHIPSET_INIT_FAILURE_PC, 0, err, DIAG_SEVERITY_ERR);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -519,14 +519,14 @@ chipset_init(struct controlvm_message *inmsg)
|
||||||
int rc = CONTROLVM_RESP_SUCCESS;
|
int rc = CONTROLVM_RESP_SUCCESS;
|
||||||
int res = 0;
|
int res = 0;
|
||||||
|
|
||||||
POSTCODE_LINUX(CHIPSET_INIT_ENTRY_PC, 0, 0, POSTCODE_SEVERITY_INFO);
|
POSTCODE_LINUX(CHIPSET_INIT_ENTRY_PC, 0, 0, DIAG_SEVERITY_PRINT);
|
||||||
if (chipset_inited) {
|
if (chipset_inited) {
|
||||||
rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE;
|
rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE;
|
||||||
res = -EIO;
|
res = -EIO;
|
||||||
goto out_respond;
|
goto out_respond;
|
||||||
}
|
}
|
||||||
chipset_inited = 1;
|
chipset_inited = 1;
|
||||||
POSTCODE_LINUX(CHIPSET_INIT_EXIT_PC, 0, 0, POSTCODE_SEVERITY_INFO);
|
POSTCODE_LINUX(CHIPSET_INIT_EXIT_PC, 0, 0, DIAG_SEVERITY_PRINT);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set features to indicate we support parahotplug (if Command
|
* Set features to indicate we support parahotplug (if Command
|
||||||
|
@ -592,14 +592,14 @@ save_crash_message(struct controlvm_message *msg, enum crash_obj_type typ)
|
||||||
&local_crash_msg_count, sizeof(u16));
|
&local_crash_msg_count, sizeof(u16));
|
||||||
if (err) {
|
if (err) {
|
||||||
POSTCODE_LINUX(CRASH_DEV_CTRL_RD_FAILURE_PC, 0, 0,
|
POSTCODE_LINUX(CRASH_DEV_CTRL_RD_FAILURE_PC, 0, 0,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (local_crash_msg_count != CONTROLVM_CRASHMSG_MAX) {
|
if (local_crash_msg_count != CONTROLVM_CRASHMSG_MAX) {
|
||||||
POSTCODE_LINUX(CRASH_DEV_COUNT_FAILURE_PC, 0,
|
POSTCODE_LINUX(CRASH_DEV_COUNT_FAILURE_PC, 0,
|
||||||
local_crash_msg_count,
|
local_crash_msg_count,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
return -EIO;
|
return -EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -609,7 +609,7 @@ save_crash_message(struct controlvm_message *msg, enum crash_obj_type typ)
|
||||||
&local_crash_msg_offset, sizeof(u32));
|
&local_crash_msg_offset, sizeof(u32));
|
||||||
if (err) {
|
if (err) {
|
||||||
POSTCODE_LINUX(CRASH_DEV_CTRL_RD_FAILURE_PC, 0, 0,
|
POSTCODE_LINUX(CRASH_DEV_CTRL_RD_FAILURE_PC, 0, 0,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -620,7 +620,7 @@ save_crash_message(struct controlvm_message *msg, enum crash_obj_type typ)
|
||||||
sizeof(struct controlvm_message));
|
sizeof(struct controlvm_message));
|
||||||
if (err) {
|
if (err) {
|
||||||
POSTCODE_LINUX(SAVE_MSG_BUS_FAILURE_PC, 0, 0,
|
POSTCODE_LINUX(SAVE_MSG_BUS_FAILURE_PC, 0, 0,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -631,7 +631,7 @@ save_crash_message(struct controlvm_message *msg, enum crash_obj_type typ)
|
||||||
sizeof(struct controlvm_message));
|
sizeof(struct controlvm_message));
|
||||||
if (err) {
|
if (err) {
|
||||||
POSTCODE_LINUX(SAVE_MSG_DEV_FAILURE_PC, 0, 0,
|
POSTCODE_LINUX(SAVE_MSG_DEV_FAILURE_PC, 0, 0,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -703,7 +703,7 @@ bus_create(struct controlvm_message *inmsg)
|
||||||
bus_info = visorbus_get_device_by_id(bus_no, BUS_ROOT_DEVICE, NULL);
|
bus_info = visorbus_get_device_by_id(bus_no, BUS_ROOT_DEVICE, NULL);
|
||||||
if (bus_info && (bus_info->state.created == 1)) {
|
if (bus_info && (bus_info->state.created == 1)) {
|
||||||
POSTCODE_LINUX(BUS_CREATE_FAILURE_PC, 0, bus_no,
|
POSTCODE_LINUX(BUS_CREATE_FAILURE_PC, 0, bus_no,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
err = -EEXIST;
|
err = -EEXIST;
|
||||||
goto err_respond;
|
goto err_respond;
|
||||||
}
|
}
|
||||||
|
@ -711,7 +711,7 @@ bus_create(struct controlvm_message *inmsg)
|
||||||
bus_info = kzalloc(sizeof(*bus_info), GFP_KERNEL);
|
bus_info = kzalloc(sizeof(*bus_info), GFP_KERNEL);
|
||||||
if (!bus_info) {
|
if (!bus_info) {
|
||||||
POSTCODE_LINUX(BUS_CREATE_FAILURE_PC, 0, bus_no,
|
POSTCODE_LINUX(BUS_CREATE_FAILURE_PC, 0, bus_no,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto err_respond;
|
goto err_respond;
|
||||||
}
|
}
|
||||||
|
@ -720,7 +720,7 @@ bus_create(struct controlvm_message *inmsg)
|
||||||
bus_info->chipset_bus_no = bus_no;
|
bus_info->chipset_bus_no = bus_no;
|
||||||
bus_info->chipset_dev_no = BUS_ROOT_DEVICE;
|
bus_info->chipset_dev_no = BUS_ROOT_DEVICE;
|
||||||
|
|
||||||
POSTCODE_LINUX(BUS_CREATE_ENTRY_PC, 0, bus_no, POSTCODE_SEVERITY_INFO);
|
POSTCODE_LINUX(BUS_CREATE_ENTRY_PC, 0, bus_no, DIAG_SEVERITY_PRINT);
|
||||||
|
|
||||||
if (uuid_le_cmp(cmd->create_bus.bus_inst_uuid, spar_siovm_uuid) == 0)
|
if (uuid_le_cmp(cmd->create_bus.bus_inst_uuid, spar_siovm_uuid) == 0)
|
||||||
save_crash_message(inmsg, CRASH_BUS);
|
save_crash_message(inmsg, CRASH_BUS);
|
||||||
|
@ -731,7 +731,7 @@ bus_create(struct controlvm_message *inmsg)
|
||||||
if (!pmsg_hdr) {
|
if (!pmsg_hdr) {
|
||||||
POSTCODE_LINUX(MALLOC_FAILURE_PC, cmd,
|
POSTCODE_LINUX(MALLOC_FAILURE_PC, cmd,
|
||||||
bus_info->chipset_bus_no,
|
bus_info->chipset_bus_no,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto err_free_bus_info;
|
goto err_free_bus_info;
|
||||||
}
|
}
|
||||||
|
@ -748,7 +748,7 @@ bus_create(struct controlvm_message *inmsg)
|
||||||
|
|
||||||
if (!visorchannel) {
|
if (!visorchannel) {
|
||||||
POSTCODE_LINUX(BUS_CREATE_FAILURE_PC, 0, bus_no,
|
POSTCODE_LINUX(BUS_CREATE_FAILURE_PC, 0, bus_no,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto err_free_pending_msg;
|
goto err_free_pending_msg;
|
||||||
}
|
}
|
||||||
|
@ -757,7 +757,7 @@ bus_create(struct controlvm_message *inmsg)
|
||||||
/* Response will be handled by chipset_bus_create */
|
/* Response will be handled by chipset_bus_create */
|
||||||
chipset_bus_create(bus_info);
|
chipset_bus_create(bus_info);
|
||||||
|
|
||||||
POSTCODE_LINUX(BUS_CREATE_EXIT_PC, 0, bus_no, POSTCODE_SEVERITY_INFO);
|
POSTCODE_LINUX(BUS_CREATE_EXIT_PC, 0, bus_no, DIAG_SEVERITY_PRINT);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
err_free_pending_msg:
|
err_free_pending_msg:
|
||||||
|
@ -800,7 +800,7 @@ bus_destroy(struct controlvm_message *inmsg)
|
||||||
if (!pmsg_hdr) {
|
if (!pmsg_hdr) {
|
||||||
POSTCODE_LINUX(MALLOC_FAILURE_PC, cmd,
|
POSTCODE_LINUX(MALLOC_FAILURE_PC, cmd,
|
||||||
bus_info->chipset_bus_no,
|
bus_info->chipset_bus_no,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
err = -ENOMEM;
|
err = -ENOMEM;
|
||||||
goto err_respond;
|
goto err_respond;
|
||||||
}
|
}
|
||||||
|
@ -831,22 +831,22 @@ bus_configure(struct controlvm_message *inmsg,
|
||||||
|
|
||||||
bus_no = cmd->configure_bus.bus_no;
|
bus_no = cmd->configure_bus.bus_no;
|
||||||
POSTCODE_LINUX(BUS_CONFIGURE_ENTRY_PC, 0, bus_no,
|
POSTCODE_LINUX(BUS_CONFIGURE_ENTRY_PC, 0, bus_no,
|
||||||
POSTCODE_SEVERITY_INFO);
|
DIAG_SEVERITY_PRINT);
|
||||||
|
|
||||||
bus_info = visorbus_get_device_by_id(bus_no, BUS_ROOT_DEVICE, NULL);
|
bus_info = visorbus_get_device_by_id(bus_no, BUS_ROOT_DEVICE, NULL);
|
||||||
if (!bus_info) {
|
if (!bus_info) {
|
||||||
POSTCODE_LINUX(BUS_CONFIGURE_FAILURE_PC, 0, bus_no,
|
POSTCODE_LINUX(BUS_CONFIGURE_FAILURE_PC, 0, bus_no,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto err_respond;
|
goto err_respond;
|
||||||
} else if (bus_info->state.created == 0) {
|
} else if (bus_info->state.created == 0) {
|
||||||
POSTCODE_LINUX(BUS_CONFIGURE_FAILURE_PC, 0, bus_no,
|
POSTCODE_LINUX(BUS_CONFIGURE_FAILURE_PC, 0, bus_no,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
err = -EINVAL;
|
err = -EINVAL;
|
||||||
goto err_respond;
|
goto err_respond;
|
||||||
} else if (bus_info->pending_msg_hdr) {
|
} else if (bus_info->pending_msg_hdr) {
|
||||||
POSTCODE_LINUX(BUS_CONFIGURE_FAILURE_PC, 0, bus_no,
|
POSTCODE_LINUX(BUS_CONFIGURE_FAILURE_PC, 0, bus_no,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
err = -EIO;
|
err = -EIO;
|
||||||
goto err_respond;
|
goto err_respond;
|
||||||
}
|
}
|
||||||
|
@ -862,7 +862,7 @@ bus_configure(struct controlvm_message *inmsg,
|
||||||
bus_info->name = parser_string_get(parser_ctx);
|
bus_info->name = parser_string_get(parser_ctx);
|
||||||
|
|
||||||
POSTCODE_LINUX(BUS_CONFIGURE_EXIT_PC, 0, bus_no,
|
POSTCODE_LINUX(BUS_CONFIGURE_EXIT_PC, 0, bus_no,
|
||||||
POSTCODE_SEVERITY_INFO);
|
DIAG_SEVERITY_PRINT);
|
||||||
|
|
||||||
if (inmsg->hdr.flags.response_expected == 1)
|
if (inmsg->hdr.flags.response_expected == 1)
|
||||||
bus_responder(inmsg->hdr.id, &inmsg->hdr, err);
|
bus_responder(inmsg->hdr.id, &inmsg->hdr, err);
|
||||||
|
@ -889,14 +889,14 @@ my_device_create(struct controlvm_message *inmsg)
|
||||||
bus_info = visorbus_get_device_by_id(bus_no, BUS_ROOT_DEVICE, NULL);
|
bus_info = visorbus_get_device_by_id(bus_no, BUS_ROOT_DEVICE, NULL);
|
||||||
if (!bus_info) {
|
if (!bus_info) {
|
||||||
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
rc = -CONTROLVM_RESP_ERROR_BUS_INVALID;
|
rc = -CONTROLVM_RESP_ERROR_BUS_INVALID;
|
||||||
goto out_respond;
|
goto out_respond;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bus_info->state.created == 0) {
|
if (bus_info->state.created == 0) {
|
||||||
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
rc = -CONTROLVM_RESP_ERROR_BUS_INVALID;
|
rc = -CONTROLVM_RESP_ERROR_BUS_INVALID;
|
||||||
goto out_respond;
|
goto out_respond;
|
||||||
}
|
}
|
||||||
|
@ -904,7 +904,7 @@ my_device_create(struct controlvm_message *inmsg)
|
||||||
dev_info = visorbus_get_device_by_id(bus_no, dev_no, NULL);
|
dev_info = visorbus_get_device_by_id(bus_no, dev_no, NULL);
|
||||||
if (dev_info && (dev_info->state.created == 1)) {
|
if (dev_info && (dev_info->state.created == 1)) {
|
||||||
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE;
|
rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE;
|
||||||
goto out_respond;
|
goto out_respond;
|
||||||
}
|
}
|
||||||
|
@ -912,7 +912,7 @@ my_device_create(struct controlvm_message *inmsg)
|
||||||
dev_info = kzalloc(sizeof(*dev_info), GFP_KERNEL);
|
dev_info = kzalloc(sizeof(*dev_info), GFP_KERNEL);
|
||||||
if (!dev_info) {
|
if (!dev_info) {
|
||||||
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
rc = -CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
|
rc = -CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
|
||||||
goto out_respond;
|
goto out_respond;
|
||||||
}
|
}
|
||||||
|
@ -925,7 +925,7 @@ my_device_create(struct controlvm_message *inmsg)
|
||||||
dev_info->device.parent = &bus_info->device;
|
dev_info->device.parent = &bus_info->device;
|
||||||
|
|
||||||
POSTCODE_LINUX(DEVICE_CREATE_ENTRY_PC, dev_no, bus_no,
|
POSTCODE_LINUX(DEVICE_CREATE_ENTRY_PC, dev_no, bus_no,
|
||||||
POSTCODE_SEVERITY_INFO);
|
DIAG_SEVERITY_PRINT);
|
||||||
|
|
||||||
visorchannel =
|
visorchannel =
|
||||||
visorchannel_create_with_lock(cmd->create_device.channel_addr,
|
visorchannel_create_with_lock(cmd->create_device.channel_addr,
|
||||||
|
@ -935,7 +935,7 @@ my_device_create(struct controlvm_message *inmsg)
|
||||||
|
|
||||||
if (!visorchannel) {
|
if (!visorchannel) {
|
||||||
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
rc = -CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
|
rc = -CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
|
||||||
goto out_free_dev_info;
|
goto out_free_dev_info;
|
||||||
}
|
}
|
||||||
|
@ -959,7 +959,7 @@ my_device_create(struct controlvm_message *inmsg)
|
||||||
/* Chipset_device_create will send response */
|
/* Chipset_device_create will send response */
|
||||||
chipset_device_create(dev_info);
|
chipset_device_create(dev_info);
|
||||||
POSTCODE_LINUX(DEVICE_CREATE_EXIT_PC, dev_no, bus_no,
|
POSTCODE_LINUX(DEVICE_CREATE_EXIT_PC, dev_no, bus_no,
|
||||||
POSTCODE_SEVERITY_INFO);
|
DIAG_SEVERITY_PRINT);
|
||||||
return;
|
return;
|
||||||
|
|
||||||
out_free_dev_info:
|
out_free_dev_info:
|
||||||
|
@ -984,13 +984,13 @@ my_device_changestate(struct controlvm_message *inmsg)
|
||||||
dev_info = visorbus_get_device_by_id(bus_no, dev_no, NULL);
|
dev_info = visorbus_get_device_by_id(bus_no, dev_no, NULL);
|
||||||
if (!dev_info) {
|
if (!dev_info) {
|
||||||
POSTCODE_LINUX(DEVICE_CHANGESTATE_FAILURE_PC, dev_no, bus_no,
|
POSTCODE_LINUX(DEVICE_CHANGESTATE_FAILURE_PC, dev_no, bus_no,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
rc = -CONTROLVM_RESP_ERROR_DEVICE_INVALID;
|
rc = -CONTROLVM_RESP_ERROR_DEVICE_INVALID;
|
||||||
goto err_respond;
|
goto err_respond;
|
||||||
}
|
}
|
||||||
if (dev_info->state.created == 0) {
|
if (dev_info->state.created == 0) {
|
||||||
POSTCODE_LINUX(DEVICE_CHANGESTATE_FAILURE_PC, dev_no, bus_no,
|
POSTCODE_LINUX(DEVICE_CHANGESTATE_FAILURE_PC, dev_no, bus_no,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
rc = -CONTROLVM_RESP_ERROR_DEVICE_INVALID;
|
rc = -CONTROLVM_RESP_ERROR_DEVICE_INVALID;
|
||||||
goto err_respond;
|
goto err_respond;
|
||||||
}
|
}
|
||||||
|
@ -1136,7 +1136,7 @@ initialize_controlvm_payload(void)
|
||||||
request_payload_offset),
|
request_payload_offset),
|
||||||
&payload_offset, sizeof(payload_offset)) < 0) {
|
&payload_offset, sizeof(payload_offset)) < 0) {
|
||||||
POSTCODE_LINUX(CONTROLVM_INIT_FAILURE_PC, 0, 0,
|
POSTCODE_LINUX(CONTROLVM_INIT_FAILURE_PC, 0, 0,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (visorchannel_read(controlvm_channel,
|
if (visorchannel_read(controlvm_channel,
|
||||||
|
@ -1144,7 +1144,7 @@ initialize_controlvm_payload(void)
|
||||||
request_payload_bytes),
|
request_payload_bytes),
|
||||||
&payload_bytes, sizeof(payload_bytes)) < 0) {
|
&payload_bytes, sizeof(payload_bytes)) < 0) {
|
||||||
POSTCODE_LINUX(CONTROLVM_INIT_FAILURE_PC, 0, 0,
|
POSTCODE_LINUX(CONTROLVM_INIT_FAILURE_PC, 0, 0,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
initialize_controlvm_payload_info(phys_addr,
|
initialize_controlvm_payload_info(phys_addr,
|
||||||
|
@ -1564,7 +1564,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
|
||||||
u32 local_crash_msg_offset;
|
u32 local_crash_msg_offset;
|
||||||
u16 local_crash_msg_count;
|
u16 local_crash_msg_count;
|
||||||
|
|
||||||
POSTCODE_LINUX(CRASH_DEV_ENTRY_PC, 0, 0, POSTCODE_SEVERITY_INFO);
|
POSTCODE_LINUX(CRASH_DEV_ENTRY_PC, 0, 0, DIAG_SEVERITY_PRINT);
|
||||||
|
|
||||||
/* send init chipset msg */
|
/* send init chipset msg */
|
||||||
msg.hdr.id = CONTROLVM_CHIPSET_INIT;
|
msg.hdr.id = CONTROLVM_CHIPSET_INIT;
|
||||||
|
@ -1579,14 +1579,14 @@ setup_crash_devices_work_queue(struct work_struct *work)
|
||||||
saved_crash_message_count),
|
saved_crash_message_count),
|
||||||
&local_crash_msg_count, sizeof(u16)) < 0) {
|
&local_crash_msg_count, sizeof(u16)) < 0) {
|
||||||
POSTCODE_LINUX(CRASH_DEV_CTRL_RD_FAILURE_PC, 0, 0,
|
POSTCODE_LINUX(CRASH_DEV_CTRL_RD_FAILURE_PC, 0, 0,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (local_crash_msg_count != CONTROLVM_CRASHMSG_MAX) {
|
if (local_crash_msg_count != CONTROLVM_CRASHMSG_MAX) {
|
||||||
POSTCODE_LINUX(CRASH_DEV_COUNT_FAILURE_PC, 0,
|
POSTCODE_LINUX(CRASH_DEV_COUNT_FAILURE_PC, 0,
|
||||||
local_crash_msg_count,
|
local_crash_msg_count,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1596,7 +1596,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
|
||||||
saved_crash_message_offset),
|
saved_crash_message_offset),
|
||||||
&local_crash_msg_offset, sizeof(u32)) < 0) {
|
&local_crash_msg_offset, sizeof(u32)) < 0) {
|
||||||
POSTCODE_LINUX(CRASH_DEV_CTRL_RD_FAILURE_PC, 0, 0,
|
POSTCODE_LINUX(CRASH_DEV_CTRL_RD_FAILURE_PC, 0, 0,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1606,7 +1606,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
|
||||||
&local_crash_bus_msg,
|
&local_crash_bus_msg,
|
||||||
sizeof(struct controlvm_message)) < 0) {
|
sizeof(struct controlvm_message)) < 0) {
|
||||||
POSTCODE_LINUX(CRASH_DEV_RD_BUS_FAILURE_PC, 0, 0,
|
POSTCODE_LINUX(CRASH_DEV_RD_BUS_FAILURE_PC, 0, 0,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1617,7 +1617,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
|
||||||
&local_crash_dev_msg,
|
&local_crash_dev_msg,
|
||||||
sizeof(struct controlvm_message)) < 0) {
|
sizeof(struct controlvm_message)) < 0) {
|
||||||
POSTCODE_LINUX(CRASH_DEV_RD_DEV_FAILURE_PC, 0, 0,
|
POSTCODE_LINUX(CRASH_DEV_RD_DEV_FAILURE_PC, 0, 0,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1626,7 +1626,7 @@ setup_crash_devices_work_queue(struct work_struct *work)
|
||||||
bus_create(&local_crash_bus_msg);
|
bus_create(&local_crash_bus_msg);
|
||||||
} else {
|
} else {
|
||||||
POSTCODE_LINUX(CRASH_DEV_BUS_NULL_FAILURE_PC, 0, 0,
|
POSTCODE_LINUX(CRASH_DEV_BUS_NULL_FAILURE_PC, 0, 0,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1635,10 +1635,10 @@ setup_crash_devices_work_queue(struct work_struct *work)
|
||||||
my_device_create(&local_crash_dev_msg);
|
my_device_create(&local_crash_dev_msg);
|
||||||
} else {
|
} else {
|
||||||
POSTCODE_LINUX(CRASH_DEV_DEV_NULL_FAILURE_PC, 0, 0,
|
POSTCODE_LINUX(CRASH_DEV_DEV_NULL_FAILURE_PC, 0, 0,
|
||||||
POSTCODE_SEVERITY_ERR);
|
DIAG_SEVERITY_ERR);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
POSTCODE_LINUX(CRASH_DEV_EXIT_PC, 0, 0, POSTCODE_SEVERITY_INFO);
|
POSTCODE_LINUX(CRASH_DEV_EXIT_PC, 0, 0, DIAG_SEVERITY_PRINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -2179,7 +2179,7 @@ visorchipset_init(struct acpi_device *acpi_device)
|
||||||
err = -ENODEV;
|
err = -ENODEV;
|
||||||
goto error_cancel_work;
|
goto error_cancel_work;
|
||||||
}
|
}
|
||||||
POSTCODE_LINUX(CHIPSET_INIT_SUCCESS_PC, 0, 0, POSTCODE_SEVERITY_INFO);
|
POSTCODE_LINUX(CHIPSET_INIT_SUCCESS_PC, 0, 0, DIAG_SEVERITY_PRINT);
|
||||||
|
|
||||||
err = visorbus_init();
|
err = visorbus_init();
|
||||||
if (err < 0)
|
if (err < 0)
|
||||||
|
@ -2201,14 +2201,14 @@ error_destroy_channel:
|
||||||
visorchannel_destroy(controlvm_channel);
|
visorchannel_destroy(controlvm_channel);
|
||||||
|
|
||||||
error:
|
error:
|
||||||
POSTCODE_LINUX(CHIPSET_INIT_FAILURE_PC, 0, err, POSTCODE_SEVERITY_ERR);
|
POSTCODE_LINUX(CHIPSET_INIT_FAILURE_PC, 0, err, DIAG_SEVERITY_ERR);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
visorchipset_exit(struct acpi_device *acpi_device)
|
visorchipset_exit(struct acpi_device *acpi_device)
|
||||||
{
|
{
|
||||||
POSTCODE_LINUX(DRIVER_EXIT_PC, 0, 0, POSTCODE_SEVERITY_INFO);
|
POSTCODE_LINUX(DRIVER_EXIT_PC, 0, 0, DIAG_SEVERITY_PRINT);
|
||||||
|
|
||||||
visorbus_exit();
|
visorbus_exit();
|
||||||
|
|
||||||
|
@ -2219,7 +2219,7 @@ visorchipset_exit(struct acpi_device *acpi_device)
|
||||||
|
|
||||||
visorchipset_file_cleanup(visorchipset_platform_device.dev.devt);
|
visorchipset_file_cleanup(visorchipset_platform_device.dev.devt);
|
||||||
platform_device_unregister(&visorchipset_platform_device);
|
platform_device_unregister(&visorchipset_platform_device);
|
||||||
POSTCODE_LINUX(DRIVER_EXIT_PC, 0, 0, POSTCODE_SEVERITY_INFO);
|
POSTCODE_LINUX(DRIVER_EXIT_PC, 0, 0, DIAG_SEVERITY_PRINT);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -157,10 +157,6 @@ enum event_pc { /* POSTCODE event identifier tuples */
|
||||||
SAVE_MSG_DEV_FAILURE_PC = 0x01F,
|
SAVE_MSG_DEV_FAILURE_PC = 0x01F,
|
||||||
};
|
};
|
||||||
|
|
||||||
#define POSTCODE_SEVERITY_ERR DIAG_SEVERITY_ERR
|
|
||||||
/* TODO-> Info currently doesn't show, so we set info=warning */
|
|
||||||
#define POSTCODE_SEVERITY_INFO DIAG_SEVERITY_PRINT
|
|
||||||
|
|
||||||
/* Write a 64-bit value to the hypervisor's log file
|
/* Write a 64-bit value to the hypervisor's log file
|
||||||
* POSTCODE_LINUX generates a value in the form 0xAABBBCCCDDDDEEEE where
|
* POSTCODE_LINUX generates a value in the form 0xAABBBCCCDDDDEEEE where
|
||||||
* A is an identifier for the file logging the postcode
|
* A is an identifier for the file logging the postcode
|
||||||
|
|
Loading…
Reference in New Issue