Commit b32c5cb8 authored by Andy Shevchenko's avatar Andy Shevchenko Committed by Greg Kroah-Hartman
Browse files

staging: unisys: Switch to use new generic UUID API



There are new types and helpers that are supposed to be used in new code.

As a preparation to get rid of legacy types and API functions do
the conversion here.

While here, re-indent couple of lines to increase readability.

Cc: David Kershner <david.kershner@unisys.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: sparmaintainer@unisys.com
Cc: devel@driverdev.osuosl.org
Signed-off-by: default avatarAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: default avatarDavid Kershner <david.kershner@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ab61097c
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -221,7 +221,7 @@ The following files exist under /sys/devices/visorbus<x>/vbus<x>:dev<y>:

The visorhba driver registers with visorbus as the function driver to
handle virtual scsi disk devices, specified using the
VISOR_VHBA_CHANNEL_UUID type in the visorbus_register_visor_driver()
VISOR_VHBA_CHANNEL_GUID type in the visorbus_register_visor_driver()
call. visorhba uses scsi_add_host() to expose a Linux block device
(e.g., /sys/block/) in the guest environment for each s-Par virtual device.

@@ -240,7 +240,7 @@ When compiled as a module, visorhba can be autoloaded by visorbus in
standard udev/systemd environments, as it includes the modules.alias
definition:

    "visorbus:"+VISOR_VHBA_CHANNEL_UUID_STR
    "visorbus:"+VISOR_VHBA_CHANNEL_GUID_STR

i.e.:

@@ -252,7 +252,7 @@ i.e.:

The visornic driver registers with visorbus as the function driver to
handle virtual network devices, specified using the
VISOR_VNIC_CHANNEL_UUID type in the visorbus_register_visor_driver()
VISOR_VNIC_CHANNEL_GUID type in the visorbus_register_visor_driver()
call. visornic uses register_netdev() to expose a Linux device of class net
(e.g., /sys/class/net/) in the guest environment for each s-Par virtual
device.
@@ -270,7 +270,7 @@ When compiled as a module, visornic can be autoloaded by visorbus in
standard udev/systemd environments, as it includes the modules.alias
definition:

    "visorbus:"+VISOR_VNIC_CHANNEL_UUID_STR
    "visorbus:"+VISOR_VNIC_CHANNEL_GUID_STR

i.e.:

@@ -282,7 +282,7 @@ i.e.:

The visorinput driver registers with visorbus as the function driver to
handle human input devices, specified using the
VISOR_KEYBOARD_CHANNEL_UUID and VISOR_MOUSE_CHANNEL_UUID
VISOR_KEYBOARD_CHANNEL_GUID and VISOR_MOUSE_CHANNEL_GUID
types in the visorbus_register_visor_driver() call. visorinput uses
input_register_device() to expose devices of class input
(e.g., /sys/class/input/) for virtual keyboard and virtual mouse devices.
@@ -307,8 +307,8 @@ When compiled as a module, visorinput can be autoloaded by visorbus in
standard udev/systemd environments, as it includes the modules.alias
definition:

    "visorbus:"+VISOR_MOUSE_CHANNEL_UUID_STR
    "visorbus:"+VISOR_KEYBOARD_CHANNEL_UUID_STR
    "visorbus:"+VISOR_MOUSE_CHANNEL_GUID_STR
    "visorbus:"+VISOR_KEYBOARD_CHANNEL_GUID_STR

i.e.:

+13 −16
Original line number Diff line number Diff line
@@ -128,13 +128,13 @@ struct channel_header {
	u32 header_size;
	u64 size;
	u64 features;
	uuid_le chtype;
	guid_t chtype;
	u64 partition_handle;
	u64 handle;
	u64 ch_space_offset;
	u32 version_id;
	u32 partition_index;
	uuid_le zone_uuid;
	guid_t zone_guid;
	u32 cli_str_offset;
	u32 cli_state_boot;
	u32 cmd_state_cli;
@@ -204,23 +204,20 @@ struct signal_queue_header {

/* CHANNEL Guids */
/* {414815ed-c58c-11da-95a9-00e08161165f} */
#define VISOR_VHBA_CHANNEL_UUID \
	UUID_LE(0x414815ed, 0xc58c, 0x11da, \
#define VISOR_VHBA_CHANNEL_GUID \
	GUID_INIT(0x414815ed, 0xc58c, 0x11da, \
		  0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f)
static const uuid_le visor_vhba_channel_uuid = VISOR_VHBA_CHANNEL_UUID;
#define VISOR_VHBA_CHANNEL_UUID_STR \
#define VISOR_VHBA_CHANNEL_GUID_STR \
	"414815ed-c58c-11da-95a9-00e08161165f"
/* {8cd5994d-c58e-11da-95a9-00e08161165f} */
#define VISOR_VNIC_CHANNEL_UUID \
	UUID_LE(0x8cd5994d, 0xc58e, 0x11da, \
#define VISOR_VNIC_CHANNEL_GUID \
	GUID_INIT(0x8cd5994d, 0xc58e, 0x11da, \
		  0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f)
static const uuid_le visor_vnic_channel_uuid = VISOR_VNIC_CHANNEL_UUID;
#define VISOR_VNIC_CHANNEL_UUID_STR \
#define VISOR_VNIC_CHANNEL_GUID_STR \
	"8cd5994d-c58e-11da-95a9-00e08161165f"
/* {72120008-4AAB-11DC-8530-444553544200} */
#define VISOR_SIOVM_UUID \
	UUID_LE(0x72120008, 0x4AAB, 0x11DC, \
#define VISOR_SIOVM_GUID \
	GUID_INIT(0x72120008, 0x4AAB, 0x11DC, \
		  0x85, 0x30, 0x44, 0x45, 0x53, 0x54, 0x42, 0x00)
static const uuid_le visor_siovm_uuid = VISOR_SIOVM_UUID;

#endif
+1 −1
Original line number Diff line number Diff line
@@ -562,7 +562,7 @@ struct iochannel_vnic {
	/* 4 bytes */
	u32 mtu;
	/* 16 bytes */
	uuid_le zone_uuid;
	guid_t zone_guid;
} __packed;

/*
+7 −7
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ struct visorchipset_state {
 *  GUID, name, and sizes.
 */
struct visor_channeltype_descriptor {
	const uuid_le guid;
	const guid_t guid;
	const char *name;
};

@@ -141,14 +141,14 @@ struct visor_driver {
 *				hypervisor requests.
 * @vbus_hdr_info:		A pointer to header info. Private use by bus
 *				driver.
 * @partition_uuid:		Indicates client partion id. This should be the
 * @partition_guid:		Indicates client partion id. This should be the
 *				same across all visor_devices in the current
 *				guest. Private use by bus driver only.
 */

struct visor_device {
	struct visorchannel *visorchannel;
	uuid_le channel_type_guid;
	guid_t channel_type_guid;
	/* These fields are for private use by the bus driver only. */
	struct device device;
	struct list_head list_all;
@@ -161,18 +161,18 @@ struct visor_device {
	u32 chipset_bus_no;
	u32 chipset_dev_no;
	struct visorchipset_state state;
	uuid_le inst;
	guid_t inst;
	u8 *name;
	struct controlvm_message_header *pending_msg_hdr;
	void *vbus_hdr_info;
	uuid_le partition_uuid;
	guid_t partition_guid;
	struct dentry *debugfs_dir;
	struct dentry *debugfs_client_bus_info;
};

#define to_visor_device(x) container_of(x, struct visor_device, device)

int visor_check_channel(struct channel_header *ch, uuid_le expected_uuid,
int visor_check_channel(struct channel_header *ch, const guid_t *expected_guid,
			char *chname, u64 expected_min_bytes,
			u32 expected_version, u64 expected_signature);

@@ -211,7 +211,7 @@ int visorchannel_signalremove(struct visorchannel *channel, u32 queue,
int visorchannel_signalinsert(struct visorchannel *channel, u32 queue,
			      void *msg);
bool visorchannel_signalempty(struct visorchannel *channel, u32 queue);
uuid_le visorchannel_get_uuid(struct visorchannel *channel);
const guid_t *visorchannel_get_guid(struct visorchannel *channel);

#define BUS_ROOT_DEVICE UINT_MAX
struct visor_device *visorbus_get_device_by_id(u32 bus_no, u32 dev_no,
+8 −8
Original line number Diff line number Diff line
@@ -20,8 +20,8 @@
#include "channel.h"

/* {2B3C2D10-7EF5-4ad8-B966-3448B7386B3D} */
#define VISOR_CONTROLVM_CHANNEL_UUID \
	UUID_LE(0x2b3c2d10, 0x7ef5, 0x4ad8, \
#define VISOR_CONTROLVM_CHANNEL_GUID \
	GUID_INIT(0x2b3c2d10, 0x7ef5, 0x4ad8, \
		  0xb9, 0x66, 0x34, 0x48, 0xb7, 0x38, 0x6b, 0x3d)

#define CONTROLVM_MESSAGE_MAX 64
@@ -261,8 +261,8 @@ struct controlvm_packet_device_create {
	u32 dev_no;
	u64 channel_addr;
	u64 channel_bytes;
	uuid_le data_type_uuid;
	uuid_le dev_inst_uuid;
	guid_t data_type_guid;
	guid_t dev_inst_guid;
	struct irq_info intr;
} __packed;

@@ -372,8 +372,8 @@ struct controlvm_message_packet {
			u32 dev_count;
			u64 channel_addr;
			u64 channel_bytes;
			uuid_le bus_data_type_uuid;
			uuid_le bus_inst_uuid;
			guid_t bus_data_type_guid;
			guid_t bus_inst_guid;
		} __packed create_bus;
		struct  {
			u32 bus_no;
@@ -591,7 +591,7 @@ struct visor_controlvm_parameters_header {
	u32 client_length;
	u32 name_offset;
	u32 name_length;
	uuid_le id;
	guid_t id;
	u32 revision;
	/* Natural alignment */
	u32 reserved;
Loading