u32 chipset_dev_no = dev->chipset_dev_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);
dev->device.bus = &visorbus_type;
int err;
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);
if (!hdr_info)
if (device_register(&dev->device) < 0) {
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, 0, id,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
err = -ENODEV;
goto err_debugfs_created;
}
int rc;
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);
- 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)
POSTCODE_LINUX(BUS_CREATE_FAILURE_PC, 0, bus_no,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
else
POSTCODE_LINUX(CHIPSET_INIT_SUCCESS_PC, 0, bus_no,
- POSTCODE_SEVERITY_INFO);
+ DIAG_SEVERITY_PRINT);
bus_create_response(dev, rc);
}
u32 dev_no = dev_info->chipset_dev_no;
POSTCODE_LINUX(DEVICE_CREATE_ENTRY_PC, dev_no, bus_no,
- POSTCODE_SEVERITY_INFO);
+ DIAG_SEVERITY_PRINT);
rc = create_visor_device(dev_info);
device_create_response(dev_info, rc);
if (rc < 0)
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
else
POSTCODE_LINUX(DEVICE_CREATE_SUCCESS_PC, dev_no, bus_no,
- POSTCODE_SEVERITY_INFO);
+ DIAG_SEVERITY_PRINT);
}
void
{
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);
if (!visorbus_debugfs_dir)
return 0;
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;
}
int rc = CONTROLVM_RESP_SUCCESS;
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) {
rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE;
res = -EIO;
goto out_respond;
}
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
&local_crash_msg_count, sizeof(u16));
if (err) {
POSTCODE_LINUX(CRASH_DEV_CTRL_RD_FAILURE_PC, 0, 0,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
return err;
}
if (local_crash_msg_count != CONTROLVM_CRASHMSG_MAX) {
POSTCODE_LINUX(CRASH_DEV_COUNT_FAILURE_PC, 0,
local_crash_msg_count,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
return -EIO;
}
&local_crash_msg_offset, sizeof(u32));
if (err) {
POSTCODE_LINUX(CRASH_DEV_CTRL_RD_FAILURE_PC, 0, 0,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
return err;
}
sizeof(struct controlvm_message));
if (err) {
POSTCODE_LINUX(SAVE_MSG_BUS_FAILURE_PC, 0, 0,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
return err;
}
} else {
sizeof(struct controlvm_message));
if (err) {
POSTCODE_LINUX(SAVE_MSG_DEV_FAILURE_PC, 0, 0,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
return err;
}
}
bus_info = visorbus_get_device_by_id(bus_no, BUS_ROOT_DEVICE, NULL);
if (bus_info && (bus_info->state.created == 1)) {
POSTCODE_LINUX(BUS_CREATE_FAILURE_PC, 0, bus_no,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
err = -EEXIST;
goto err_respond;
}
bus_info = kzalloc(sizeof(*bus_info), GFP_KERNEL);
if (!bus_info) {
POSTCODE_LINUX(BUS_CREATE_FAILURE_PC, 0, bus_no,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
err = -ENOMEM;
goto err_respond;
}
bus_info->chipset_bus_no = bus_no;
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)
save_crash_message(inmsg, CRASH_BUS);
if (!pmsg_hdr) {
POSTCODE_LINUX(MALLOC_FAILURE_PC, cmd,
bus_info->chipset_bus_no,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
err = -ENOMEM;
goto err_free_bus_info;
}
if (!visorchannel) {
POSTCODE_LINUX(BUS_CREATE_FAILURE_PC, 0, bus_no,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
err = -ENOMEM;
goto err_free_pending_msg;
}
/* Response will be handled by chipset_bus_create */
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;
err_free_pending_msg:
if (!pmsg_hdr) {
POSTCODE_LINUX(MALLOC_FAILURE_PC, cmd,
bus_info->chipset_bus_no,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
err = -ENOMEM;
goto err_respond;
}
bus_no = cmd->configure_bus.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);
if (!bus_info) {
POSTCODE_LINUX(BUS_CONFIGURE_FAILURE_PC, 0, bus_no,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
err = -EINVAL;
goto err_respond;
} else if (bus_info->state.created == 0) {
POSTCODE_LINUX(BUS_CONFIGURE_FAILURE_PC, 0, bus_no,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
err = -EINVAL;
goto err_respond;
} else if (bus_info->pending_msg_hdr) {
POSTCODE_LINUX(BUS_CONFIGURE_FAILURE_PC, 0, bus_no,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
err = -EIO;
goto err_respond;
}
bus_info->name = parser_string_get(parser_ctx);
POSTCODE_LINUX(BUS_CONFIGURE_EXIT_PC, 0, bus_no,
- POSTCODE_SEVERITY_INFO);
+ DIAG_SEVERITY_PRINT);
if (inmsg->hdr.flags.response_expected == 1)
bus_responder(inmsg->hdr.id, &inmsg->hdr, err);
bus_info = visorbus_get_device_by_id(bus_no, BUS_ROOT_DEVICE, NULL);
if (!bus_info) {
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
rc = -CONTROLVM_RESP_ERROR_BUS_INVALID;
goto out_respond;
}
if (bus_info->state.created == 0) {
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
rc = -CONTROLVM_RESP_ERROR_BUS_INVALID;
goto out_respond;
}
dev_info = visorbus_get_device_by_id(bus_no, dev_no, NULL);
if (dev_info && (dev_info->state.created == 1)) {
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
rc = -CONTROLVM_RESP_ERROR_ALREADY_DONE;
goto out_respond;
}
dev_info = kzalloc(sizeof(*dev_info), GFP_KERNEL);
if (!dev_info) {
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
rc = -CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
goto out_respond;
}
dev_info->device.parent = &bus_info->device;
POSTCODE_LINUX(DEVICE_CREATE_ENTRY_PC, dev_no, bus_no,
- POSTCODE_SEVERITY_INFO);
+ DIAG_SEVERITY_PRINT);
visorchannel =
visorchannel_create_with_lock(cmd->create_device.channel_addr,
if (!visorchannel) {
POSTCODE_LINUX(DEVICE_CREATE_FAILURE_PC, dev_no, bus_no,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
rc = -CONTROLVM_RESP_ERROR_KMALLOC_FAILED;
goto out_free_dev_info;
}
/* Chipset_device_create will send response */
chipset_device_create(dev_info);
POSTCODE_LINUX(DEVICE_CREATE_EXIT_PC, dev_no, bus_no,
- POSTCODE_SEVERITY_INFO);
+ DIAG_SEVERITY_PRINT);
return;
out_free_dev_info:
dev_info = visorbus_get_device_by_id(bus_no, dev_no, NULL);
if (!dev_info) {
POSTCODE_LINUX(DEVICE_CHANGESTATE_FAILURE_PC, dev_no, bus_no,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
rc = -CONTROLVM_RESP_ERROR_DEVICE_INVALID;
goto err_respond;
}
if (dev_info->state.created == 0) {
POSTCODE_LINUX(DEVICE_CHANGESTATE_FAILURE_PC, dev_no, bus_no,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
rc = -CONTROLVM_RESP_ERROR_DEVICE_INVALID;
goto err_respond;
}
request_payload_offset),
&payload_offset, sizeof(payload_offset)) < 0) {
POSTCODE_LINUX(CONTROLVM_INIT_FAILURE_PC, 0, 0,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
return;
}
if (visorchannel_read(controlvm_channel,
request_payload_bytes),
&payload_bytes, sizeof(payload_bytes)) < 0) {
POSTCODE_LINUX(CONTROLVM_INIT_FAILURE_PC, 0, 0,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
return;
}
initialize_controlvm_payload_info(phys_addr,
u32 local_crash_msg_offset;
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 */
msg.hdr.id = CONTROLVM_CHIPSET_INIT;
saved_crash_message_count),
&local_crash_msg_count, sizeof(u16)) < 0) {
POSTCODE_LINUX(CRASH_DEV_CTRL_RD_FAILURE_PC, 0, 0,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
return;
}
if (local_crash_msg_count != CONTROLVM_CRASHMSG_MAX) {
POSTCODE_LINUX(CRASH_DEV_COUNT_FAILURE_PC, 0,
local_crash_msg_count,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
return;
}
saved_crash_message_offset),
&local_crash_msg_offset, sizeof(u32)) < 0) {
POSTCODE_LINUX(CRASH_DEV_CTRL_RD_FAILURE_PC, 0, 0,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
return;
}
&local_crash_bus_msg,
sizeof(struct controlvm_message)) < 0) {
POSTCODE_LINUX(CRASH_DEV_RD_BUS_FAILURE_PC, 0, 0,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
return;
}
&local_crash_dev_msg,
sizeof(struct controlvm_message)) < 0) {
POSTCODE_LINUX(CRASH_DEV_RD_DEV_FAILURE_PC, 0, 0,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
return;
}
bus_create(&local_crash_bus_msg);
} else {
POSTCODE_LINUX(CRASH_DEV_BUS_NULL_FAILURE_PC, 0, 0,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
return;
}
my_device_create(&local_crash_dev_msg);
} else {
POSTCODE_LINUX(CRASH_DEV_DEV_NULL_FAILURE_PC, 0, 0,
- POSTCODE_SEVERITY_ERR);
+ DIAG_SEVERITY_ERR);
return;
}
- POSTCODE_LINUX(CRASH_DEV_EXIT_PC, 0, 0, POSTCODE_SEVERITY_INFO);
+ POSTCODE_LINUX(CRASH_DEV_EXIT_PC, 0, 0, DIAG_SEVERITY_PRINT);
}
void
err = -ENODEV;
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();
if (err < 0)
visorchannel_destroy(controlvm_channel);
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;
}
static int
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();
visorchipset_file_cleanup(visorchipset_platform_device.dev.devt);
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;
}