Commit 90addb02 authored by Benjamin Romer's avatar Benjamin Romer Committed by Greg Kroah-Hartman
Browse files

staging: unisys: Replace GUID with uuid_le



This patch replaces the GUID type with uuid_le. It removes the header file
guidutils.h, updates all uses of the GUID type to uuid_le, and replaces all
function calls that used the GUID type with their uuid_le equivalents.

Signed-off-by: default avatarBenjamin Romer <benjamin.romer@unisys.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 37b7e990
Loading
Loading
Loading
Loading
+8 −19
Original line number Diff line number Diff line
@@ -16,6 +16,8 @@
#ifndef __CHANNEL_H__
#define __CHANNEL_H__

#include <linux/uuid.h>

/*
* Whenever this file is changed a corresponding change must be made in
* the Console/ServicePart/visordiag_early/supervisor_channel.h file
@@ -46,19 +48,6 @@
#define COVER(v, d)   ((d)*COVERQ(v, d))
#endif

#ifndef GUID0
#define GUID0 {0, 0, 0, {0, 0, 0, 0, 0, 0, 0, 0} }
#endif

/*  The C language is inconsistent with respect to where it allows literal
 *  constants, especially literal constant structs.  Literal constant structs
 *  are allowed for initialization only, whereas other types of literal
 *  constants are allowed anywhere.  We get around this inconsistency by
 *  declaring a "static const" variable for each GUID.  This variable can be
 *  used in expressions where the literal constant would not be allowed.
 */
static const GUID Guid0 = GUID0;

#define ULTRA_CHANNEL_PROTOCOL_SIGNATURE  SIGNATURE_32('E', 'C', 'N', 'L')

typedef enum {
@@ -226,13 +215,13 @@ typedef struct _CHANNEL_HEADER {
	U32 HeaderSize;		/* sizeof(CHANNEL_HEADER) */
	U64 Size;		/* Total size of this channel in bytes */
	U64 Features;		/* Flags to modify behavior */
	GUID Type;		/* Channel type: data, bus, control, etc. */
	uuid_le Type;		/* Channel type: data, bus, control, etc. */
	U64 PartitionHandle;	/* ID of guest partition */
	U64 Handle;		/* Device number of this channel in client */
	U64 oChannelSpace;	/* Offset in bytes to channel specific area */
	U32 VersionId;		/* CHANNEL_HEADER Version ID */
	U32 PartitionIndex;	/* Index of guest partition */
	GUID ZoneGuid;		/* Guid of Channel's zone */
	uuid_le ZoneGuid;		/* Guid of Channel's zone */
	U32 oClientString;	/* offset from channel header to
				 * nul-terminated ClientString (0 if
				 * ClientString not present) */
@@ -320,17 +309,17 @@ typedef struct _SIGNAL_QUEUE_HEADER {
 */
static inline int
ULTRA_check_channel_client(void __iomem *pChannel,
			   GUID expectedTypeGuid,
			   uuid_le expectedTypeGuid,
			   char *channelName,
			   U64 expectedMinBytes,
			   U32 expectedVersionId,
			   U64 expectedSignature,
			   char *fileName, int lineNumber, void *logCtx)
{
	if (MEMCMP(&expectedTypeGuid, &Guid0, sizeof(GUID)) != 0)
	if (uuid_le_cmp(expectedTypeGuid, NULL_UUID_LE) != 0)
		/* caller wants us to verify type GUID */
		if (MEMCMP_IO(&(((CHANNEL_HEADER __iomem *) (pChannel))->Type),
			   &expectedTypeGuid, sizeof(GUID)) != 0) {
			   &expectedTypeGuid, sizeof(uuid_le)) != 0) {
			CHANNEL_GUID_MISMATCH(expectedTypeGuid, channelName,
					      "type", expectedTypeGuid,
					      ((CHANNEL_HEADER __iomem *)
@@ -380,7 +369,7 @@ ULTRA_check_channel_client(void __iomem *pChannel,
 * is used to pass the EFI_DIAG_CAPTURE_PROTOCOL needed to log messages.
 */
static inline int
ULTRA_check_channel_server(GUID typeGuid,
ULTRA_check_channel_server(uuid_le typeGuid,
			   char *channelName,
			   U64 expectedMinBytes,
			   U64 actualBytes,
+14 −14
Original line number Diff line number Diff line
@@ -21,44 +21,44 @@
 * {414815ed-c58c-11da-95a9-00e08161165f}
 */
#define ULTRA_VHBA_CHANNEL_PROTOCOL_GUID \
	{ 0x414815ed, 0xc58c, 0x11da, \
		{ 0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f } }
static const GUID UltraVhbaChannelProtocolGuid =
		UUID_LE(0x414815ed, 0xc58c, 0x11da, \
				0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f)
static const uuid_le UltraVhbaChannelProtocolGuid =
	ULTRA_VHBA_CHANNEL_PROTOCOL_GUID;

/* Used in IOChannel
 * {8cd5994d-c58e-11da-95a9-00e08161165f}
 */
#define ULTRA_VNIC_CHANNEL_PROTOCOL_GUID \
	{ 0x8cd5994d, 0xc58e, 0x11da, \
		{ 0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f } }
static const GUID UltraVnicChannelProtocolGuid =
		UUID_LE(0x8cd5994d, 0xc58e, 0x11da, \
				0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f)
static const uuid_le UltraVnicChannelProtocolGuid =
	ULTRA_VNIC_CHANNEL_PROTOCOL_GUID;

/* Used in IOChannel
 * {72120008-4AAB-11DC-8530-444553544200}
 */
#define ULTRA_SIOVM_GUID \
	{ 0x72120008, 0x4AAB, 0x11DC,					\
		{ 0x85, 0x30, 0x44, 0x45, 0x53, 0x54, 0x42, 0x00 } }
static const GUID UltraSIOVMGuid = ULTRA_SIOVM_GUID;
		UUID_LE(0x72120008, 0x4AAB, 0x11DC, \
				0x85, 0x30, 0x44, 0x45, 0x53, 0x54, 0x42, 0x00)
static const uuid_le UltraSIOVMGuid = ULTRA_SIOVM_GUID;


/* Used in visornoop/visornoop_main.c
 * {5b52c5ac-e5f5-4d42-8dff-429eaecd221f}
 */
#define ULTRA_CONTROLDIRECTOR_CHANNEL_PROTOCOL_GUID  \
	{ 0x5b52c5ac, 0xe5f5, 0x4d42, \
		{ 0x8d, 0xff, 0x42, 0x9e, 0xae, 0xcd, 0x22, 0x1f } }
		UUID_LE(0x5b52c5ac, 0xe5f5, 0x4d42, \
				0x8d, 0xff, 0x42, 0x9e, 0xae, 0xcd, 0x22, 0x1f)

static const GUID UltraControlDirectorChannelProtocolGuid =
static const uuid_le UltraControlDirectorChannelProtocolGuid =
	ULTRA_CONTROLDIRECTOR_CHANNEL_PROTOCOL_GUID;

/* Used in visorchipset/visorchipset_main.c
 * {B4E79625-AEDE-4EAA-9E11-D3EDDCD4504C}
 */
#define ULTRA_DIAG_POOL_CHANNEL_PROTOCOL_GUID				\
	{0xb4e79625, 0xaede, 0x4eaa,					\
		{ 0x9e, 0x11, 0xd3, 0xed, 0xdc, 0xd4, 0x50, 0x4c } }
		UUID_LE(0xb4e79625, 0xaede, 0x4eaa, \
				0x9e, 0x11, 0xd3, 0xed, 0xdc, 0xd4, 0x50, 0x4c)

+10 −9
Original line number Diff line number Diff line
@@ -16,6 +16,7 @@
#ifndef __CONTROLVMCHANNEL_H__
#define __CONTROLVMCHANNEL_H__

#include <linux/uuid.h>
#include "commontypes.h"
#include "channel.h"
#include "controlframework.h"
@@ -25,10 +26,10 @@ enum { INVALID_GUEST_FIRMWARE, SAMPLE_GUEST_FIRMWARE,

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

static const GUID UltraControlvmChannelProtocolGuid =
static const uuid_le UltraControlvmChannelProtocolGuid =
	ULTRA_CONTROLVM_CHANNEL_PROTOCOL_GUID;

#define ULTRA_CONTROLVM_CHANNEL_PROTOCOL_SIGNATURE \
@@ -293,8 +294,8 @@ typedef struct _CONTROLVM_PACKET_DEVICE_CREATE {
			*   can be dereferenced by the receiver
			*   of this ControlVm command */
	U64 channelBytes; /**< specifies size of the channel in bytes */
	GUID dataTypeGuid;/**< specifies format of data in channel */
	GUID devInstGuid; /**< instance guid for the device */
	uuid_le dataTypeGuid;/**< specifies format of data in channel */
	uuid_le devInstGuid; /**< instance guid for the device */
	struct InterruptInfo intr; /**< specifies interrupt information */
} CONTROLVM_PACKET_DEVICE_CREATE;	/* for CONTROLVM_DEVICE_CREATE */

@@ -333,9 +334,9 @@ typedef struct _CONTROLVM_MESSAGE_PACKET {
					      *   dereferenced by the receiver
					      *   of this ControlVm command */
			U64 channelBytes;    /*< size of the channel in bytes */
			GUID busDataTypeGuid;/*< indicates format of data in bus
					      * channel */
			GUID busInstGuid;    /*< instance guid for the bus */
			uuid_le busDataTypeGuid;/*< indicates format of data in
						    bus channel */
			uuid_le busInstGuid;    /*< instance guid for the bus */
		} createBus;	/* for CONTROLVM_BUS_CREATE */
		struct  {
			U32 busNo;	      /*< bus # (0..n-1) from the msg
@@ -611,7 +612,7 @@ typedef struct _ULTRA_CONTROLVM_PARAMETERS_HEADER {
	U32 ClientLength;
	U32 NameOffset;
	U32 NameLength;
	GUID Id;
	uuid_le Id;
	U32 Revision;
	U32 Reserved;		/* Natural alignment */
} ULTRA_CONTROLVM_PARAMETERS_HEADER;
+5 −5
Original line number Diff line number Diff line
@@ -38,16 +38,16 @@

/* {EEA7A573-DB82-447c-8716-EFBEAAAE4858} */
#define ULTRA_DIAG_CHANNEL_PROTOCOL_GUID \
	{0xeea7a573, 0xdb82, 0x447c, \
		{0x87, 0x16, 0xef, 0xbe, 0xaa, 0xae, 0x48, 0x58} }
		UUID_LE(0xeea7a573, 0xdb82, 0x447c, \
				0x87, 0x16, 0xef, 0xbe, 0xaa, 0xae, 0x48, 0x58)

static const GUID UltraDiagChannelProtocolGuid =
static const uuid_le UltraDiagChannelProtocolGuid =
	ULTRA_DIAG_CHANNEL_PROTOCOL_GUID;

/* {E850F968-3263-4484-8CA5-2A35D087A5A8} */
#define ULTRA_DIAG_ROOT_CHANNEL_PROTOCOL_GUID \
	{0xe850f968, 0x3263, 0x4484, \
		{0x8c, 0xa5, 0x2a, 0x35, 0xd0, 0x87, 0xa5, 0xa8} }
		UUID_LE(0xe850f968, 0x3263, 0x4484, \
				0x8c, 0xa5, 0x2a, 0x35, 0xd0, 0x87, 0xa5, 0xa8)

#define ULTRA_DIAG_CHANNEL_PROTOCOL_SIGNATURE  ULTRA_CHANNEL_PROTOCOL_SIGNATURE

+6 −4
Original line number Diff line number Diff line
@@ -29,6 +29,8 @@
*        CHANNEL_ATTACHED -> CHANNEL_OPENED (performed only by GuestPart)
*/

#include <linux/uuid.h>

#include "commontypes.h"
#include "vmcallinterface.h"

@@ -696,7 +698,7 @@ typedef struct _ULTRA_IO_CHANNEL_PROTOCOL {
			U8 macaddr[MAX_MACADDR_LEN];	/* 6 bytes */
			U32 num_rcv_bufs;	/* 4 */
			U32 mtu;	/* 4 */
			GUID zoneGuid;	/* 16 */
			uuid_le zoneGuid;	/* 16 */
		} vnic;		/* total     30 */
	};

@@ -807,7 +809,7 @@ static inline int ULTRA_VHBA_init_channel(ULTRA_IO_CHANNEL_PROTOCOL *x,
	x->ChannelHeader.HeaderSize = sizeof(x->ChannelHeader);
	x->ChannelHeader.Size = COVER(bytes, 4096);
	x->ChannelHeader.Type = UltraVhbaChannelProtocolGuid;
	x->ChannelHeader.ZoneGuid = Guid0;
	x->ChannelHeader.ZoneGuid = NULL_UUID_LE;
	x->vhba.wwnn = *wwnn;
	x->vhba.max = *max;
	INIT_CLIENTSTRING(x, ULTRA_IO_CHANNEL_PROTOCOL, clientStr,
@@ -832,7 +834,7 @@ static inline void ULTRA_VHBA_set_max(ULTRA_IO_CHANNEL_PROTOCOL *x,
static inline int ULTRA_VNIC_init_channel(ULTRA_IO_CHANNEL_PROTOCOL *x,
						 unsigned char *macaddr,
						 U32 num_rcv_bufs, U32 mtu,
						 GUID zoneGuid,
						 uuid_le zoneGuid,
						 unsigned char *clientStr,
						 U32 clientStrLen,
						 U64 bytes)  {
@@ -843,7 +845,7 @@ static inline int ULTRA_VNIC_init_channel(ULTRA_IO_CHANNEL_PROTOCOL *x,
	x->ChannelHeader.HeaderSize = sizeof(x->ChannelHeader);
	x->ChannelHeader.Size = COVER(bytes, 4096);
	x->ChannelHeader.Type = UltraVnicChannelProtocolGuid;
	x->ChannelHeader.ZoneGuid = Guid0;
	x->ChannelHeader.ZoneGuid = NULL_UUID_LE;
	MEMCPY(x->vnic.macaddr, macaddr, MAX_MACADDR_LEN);
	x->vnic.num_rcv_bufs = num_rcv_bufs;
	x->vnic.mtu = mtu;
Loading