staging: unisys: Replace GUID with uuid_le
PATCH 1/1 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 Benjamin Romer <[email protected]>
--- .../unisys/common-spar/include/channels/channel.h | 27 +-- .../common-spar/include/channels/channel_guid.h | 28 +-- .../include/channels/controlvmchannel.h | 19 +- .../common-spar/include/channels/diagchannel.h | 10 +- .../common-spar/include/channels/iochannel.h | 10 +- .../common-spar/include/channels/vbuschannel.h | 10 +- drivers/staging/unisys/include/commontypes.h | 47 ++--- drivers/staging/unisys/include/guidutils.h | 203 --------------------- drivers/staging/unisys/include/uisqueue.h | 13 +- drivers/staging/unisys/include/uisutils.h | 21 ++- drivers/staging/unisys/uislib/uislib.c | 53 ++---- drivers/staging/unisys/uislib/uisutils.c | 53 +++--- drivers/staging/unisys/virtpci/virtpci.c | 13 +- drivers/staging/unisys/virtpci/virtpci.h | 3 +- drivers/staging/unisys/visorchannel/visorchannel.h | 14 +- .../unisys/visorchannel/visorchannel_funcs.c | 39 ++-- .../unisys/visorchannel/visorchannel_main.c | 2 +- drivers/staging/unisys/visorchipset/parser.c | 5 +- drivers/staging/unisys/visorchipset/parser.h | 4 +- drivers/staging/unisys/visorchipset/testing.h | 5 +- drivers/staging/unisys/visorchipset/visorchipset.h | 16 +- .../unisys/visorchipset/visorchipset_main.c | 15 +- 22 files changed, 182 insertions(+), 428 deletions(-) delete mode 100644 drivers/staging/unisys/include/guidutils.h
drivers/staging/unisys/common-spar/include/channels/channel.h +8 -19
@@ -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,
drivers/staging/unisys/common-spar/include/channels/channel_guid.h +14 -14
@@ -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)
drivers/staging/unisys/common-spar/include/channels/controlvmchannel.h +10 -9
@@ -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 ;
drivers/staging/unisys/common-spar/include/channels/diagchannel.h +5 -5
@@ -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
drivers/staging/unisys/common-spar/include/channels/iochannel.h +6 -4
@@ -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;
drivers/staging/unisys/common-spar/include/channels/vbuschannel.h +5 -5
@@ -23,15 +23,16 @@* We currently use this for the client to provide various information about * the client devices and client drivers for the server end to see. */ +#include <linux/uuid.h> #include "commontypes.h" #include "vbusdeviceinfo.h" #include "channel.h" /* {193b331b-c58f-11da-95a9-00e08161165f} */ #define ULTRA_VBUS_CHANNEL_PROTOCOL_GUID \ - {0x193b331b, 0xc58f, 0x11da, \ - {0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f} } -static const GUID UltraVbusChannelProtocolGuid = + UUID_LE(0x193b331b, 0xc58f, 0x11da, \ + 0x95, 0xa9, 0x0, 0xe0, 0x81, 0x61, 0x16, 0x5f) +static const uuid_le UltraVbusChannelProtocolGuid =ULTRA_VBUS_CHANNEL_PROTOCOL_GUID ;#define ULTRA_VBUS_CHANNEL_PROTOCOL_SIGNATURE ULTRA_CHANNEL_PROTOCOL_SIGNATURE
@@ -112,8 +113,7 @@ ULTRA_VBUS_init_channel(ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *x,writeq (bytesAllocated, &x->ChannelHeader.Size);memcpy_toio (&x->ChannelHeader.Type, &UltraVbusChannelProtocolGuid,sizeof (x->ChannelHeader.Type)); -memcpy_toio (&x->ChannelHeader.ZoneGuid, &Guid0, -sizeof (x->ChannelHeader.ZoneGuid)); +memcpy_toio (&x->ChannelHeader.ZoneGuid, &NULL_UUID_LE ,sizeof (uuid_le));writel (sizeof (ULTRA_VBUS_HEADERINFO ), &x->HdrInfo.structBytes);writel (sizeof (ULTRA_VBUS_HEADERINFO ), &x->HdrInfo.chpInfoByteOffset); writel(readl(&x->HdrInfo.chpInfoByteOffset) +
drivers/staging/unisys/include/commontypes.h +16 -31
100 lines not on this page · raw message
drivers/staging/unisys/include/guidutils.h deleted +0 -203
203 lines not on this page · raw message
drivers/staging/unisys/include/uisqueue.h +7 -6
@@ -28,6 +28,7 @@#include "uniklog.h" #include <linux/atomic.h> #include <linux/semaphore.h> +#include <linux/uuid.h> #include "controlvmchannel.h" #include "controlvmcompletionstatus.h"
@@ -136,8 +137,8 @@ struct device_info {void __iomem *chanptr;U64 channelAddr;U64 channelBytes; -GUID channelTypeGuid; -GUID devInstGuid; +uuid_le channelTypeGuid; +uuid_le devInstGuid;struct InterruptInfo intr;struct switch_info *swtch;char devid[30 ];/* "vbus<busno>:dev<devno>" */
@@ -163,7 +164,7 @@ struct bus_info {U32 busNo, deviceCount;struct device_info **device;U64 guestHandle, recvBusInterruptHandle; -GUID busInstGuid; +uuid_le busInstGuid;ULTRA_VBUS_CHANNEL_PROTOCOL __iomem *pBusChannel;int busChannelBytes;struct proc_dir_entry *proc_dir;/* proc/uislib/vbus/<x> */
@@ -356,8 +357,8 @@ struct add_vbus_guestpart {* NOT YET USED */ U32 busNo;/* bus number to be created/deleted */ U32 deviceCount;/* max num of devices on bus */ -GUID busTypeGuid;/* indicates type of bus */ -GUID busInstGuid;/* instance guid for device */ +uuid_le busTypeGuid;/* indicates type of bus */ +uuid_le busInstGuid;/* instance guid for device */ };struct del_vbus_guestpart {
@@ -371,7 +372,7 @@ struct add_virt_guestpart {void __iomem *chanptr;/* pointer to data channel */ U32 busNo;/* bus number for the operation */ U32 deviceNo;/* number of device on the bus */ -GUID devInstGuid;/* instance guid for device */ +uuid_le devInstGuid;/* instance guid for device */ struct InterruptInfo intr;/* recv/send interrupt info */ /* recvInterruptHandle contains info needed in order to * register to receive interrupts on the data channel.
drivers/staging/unisys/include/uisutils.h +11 -10
@@ -25,6 +25,7 @@#include <linux/io.h> #include <linux/sched.h> #include <linux/gfp.h> +#include <linux/uuid.h> #include "vmcallinterface.h" #include "channel.h"
@@ -54,7 +55,7 @@ extern atomic_t UisUtils_Registered_Services;typedef unsigned int MACARRAY [MAX_MACADDR_LEN ]; typedef struct ReqHandlerInfo_struct { - GUID switchTypeGuid; + uuid_le switchTypeGuid; int (*controlfunc)(struct io_msgs *); unsigned long min_channel_bytes; int (*Server_Channel_Ok)(unsigned long channelBytes);
@@ -64,7 +65,7 @@ typedef struct ReqHandlerInfo_struct {struct list_head list_link;/* links into ReqHandlerInfo_list */ } ReqHandlerInfo_t; -ReqHandlerInfo_t *ReqHandlerAdd(GUID switchTypeGuid, +ReqHandlerInfo_t *ReqHandlerAdd(uuid_le switchTypeGuid, const char *switch_type_name, int (*controlfunc)(struct io_msgs *), unsigned long min_channel_bytes,
@@ -73,8 +74,8 @@ ReqHandlerInfo_t *ReqHandlerAdd(GUID switchTypeGuid,int (*Server_Channel_Init) (void *x,unsigned char *clientStr, U32 clientStrLen, U64 bytes)); -ReqHandlerInfo_t *ReqHandlerFind (GUID switchTypeGuid); -int ReqHandlerDel (GUID switchTypeGuid); +ReqHandlerInfo_t *ReqHandlerFind (uuid_le switchTypeGuid); +int ReqHandlerDel (uuid_le switchTypeGuid);#define uislib_ioremap_cache (addr, size) \ dbg_ioremap_cache(addr, size, __FILE__, __LINE__)
@@ -112,7 +113,7 @@ int uisutil_add_proc_line_ex(int *total, char **buffer, int *buffer_remaining,int uisctrl_register_req_handler (int type,void *fptr,ULTRA_VBUS_DEVICEINFO *chipset_DriverInfo); -int uisctrl_register_req_handler_ex(GUID switchTypeGuid, +int uisctrl_register_req_handler_ex(uuid_le switchTypeGuid, const char *switch_type_name, int (*fptr)(struct io_msgs *), unsigned long min_channel_bytes,
@@ -123,7 +124,7 @@ int uisctrl_register_req_handler_ex(GUID switchTypeGuid, U32 clientStrLen, U64 bytes), ULTRA_VBUS_DEVICEINFO *chipset_DriverInfo); -int uisctrl_unregister_req_handler_ex (GUID switchTypeGuid); +int uisctrl_unregister_req_handler_ex (uuid_le switchTypeGuid);unsigned char *util_map_virt (struct phys_info *sg);void util_unmap_virt (struct phys_info *sg);unsigned char *util_map_virt_atomic (struct phys_info *sg);
@@ -133,20 +134,20 @@ int uislib_server_inject_add_vnic(U32 switchNo, U32 BusNo, U32 numIntPorts, pCHANNEL_HEADER **chan);void uislib_server_inject_del_vnic (U32 switchNo,U32 busNo,U32 numIntPorts,U32 numExtPorts); -int uislib_client_inject_add_bus (U32 busNo,GUID instGuid, +int uislib_client_inject_add_bus (U32 busNo,uuid_le instGuid,U64 channelAddr,ulong nChannelBytes);int uislib_client_inject_del_bus (U32 busNo);int uislib_client_inject_add_vhba (U32 busNo,U32 devNo,U64 phys_chan_addr,U32 chan_bytes, -int is_test_addr,GUID instGuid, +int is_test_addr,uuid_le instGuid,struct InterruptInfo *intr);int uislib_client_inject_pause_vhba (U32 busNo,U32 devNo);int uislib_client_inject_resume_vhba (U32 busNo,U32 devNo);int uislib_client_inject_del_vhba (U32 busNo,U32 devNo);int uislib_client_inject_add_vnic (U32 busNo,U32 devNo,U64 phys_chan_addr,U32 chan_bytes, -int is_test_addr,GUID instGuid, +int is_test_addr,uuid_le instGuid,struct InterruptInfo *intr);int uislib_client_inject_pause_vnic (U32 busNo,U32 devNo);int uislib_client_inject_resume_vnic (U32 busNo,U32 devNo);
@@ -195,7 +196,7 @@ struct chaninfo {*/ #define WAIT_FOR_VALID_GUID (guid) \ do { \ - while (MEMCMP_IO(&guid, &Guid0, sizeof(Guid0)) == 0) { \ + while (uuid_le_cmp(guid, NULL_UUID_LE) == 0) { \ LOGERR("Waiting for non-0 GUID (why???)...\n"); \ UIS_THREAD_WAIT_SEC(5); \ } \
drivers/staging/unisys/uislib/uislib.c +20 -33
122 lines not on this page · raw message
drivers/staging/unisys/uislib/uisutils.c +22 -31
138 lines not on this page · raw message
drivers/staging/unisys/virtpci/virtpci.c +4 -9
@@ -364,7 +364,7 @@ static int add_vhba(struct add_virt_guestpart *addparams)memcpy_fromio (&net.zoneGuid, \ &((ULTRA_IO_CHANNEL_PROTOCOL __iomem *) \ chanptr)->vnic.zoneGuid, \ -sizeof (GUID )); \ +sizeof (uuid_le)); \ }/* adds a vnic
@@ -390,14 +390,10 @@ add_vnic(struct add_virt_guestpart *addparams)GET_BUS_DEV (addparams->busNo); -LOGINF ("Adding vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x rcvbufs:%d mtu:%d chanptr:%p{%-8.8lx-%-4.4x-%-4.4x-%-2.2x%-2.2x%-2.2x%-2.2x%-2.2x%-2.2x%-2.2x%-2.2x}\n" , +LOGINF ("Adding vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x rcvbufs:%d mtu:%d chanptr:%p%pUL\n" , net.mac_addr[0 ], net.mac_addr[1 ], net.mac_addr[2 ], net.mac_addr[3 ], net.mac_addr[4 ], net.mac_addr[5 ], net.num_rcv_bufs, net.mtu, - addparams->chanptr, (ulong ) net.zoneGuid.data1, net.zoneGuid.data2, - net.zoneGuid.data3, net.zoneGuid.data4[0 ], net.zoneGuid.data4[1 ], - net.zoneGuid.data4[2 ], net.zoneGuid.data4[3 ], - net.zoneGuid.data4[4 ], net.zoneGuid.data4[5 ], - net.zoneGuid.data4[6 ], net.zoneGuid.data4[7 ]); + addparams->chanptr, &net.zoneGuid); i =virtpci_device_add (vbus,VIRTNIC_TYPE , addparams,NULL , &net);if (i) { LOGINF("Added vnic macaddr:%02x:%02x:%02x:%02x:%02x:%02x\n",
@@ -1509,7 +1505,6 @@ static ssize_t virt_proc_write(struct file *file, const char __user *buffer,struct add_virt_guestpart addparams;struct del_vbus_guestpart busdelparams;struct del_virt_guestpart delparams; -GUID dummyGuid =GUID0 ;#ifdef STORAGE_CHANNEL U64 storagechannel;#endif
@@ -1560,7 +1555,7 @@ static ssize_t virt_proc_write(struct file *file, const char __user *buffer,__pa (chanptr),MIN_IO_CHANNEL_SIZE , 1, /* test msg */ - dummyGuid,/* inst guid */ +NULL_UUID_LE ,/* inst guid */ NULL)) { /*interrupt info */ LOGERR("FAILED to inject add vnic\n");return -EFAULT ;
drivers/staging/unisys/virtpci/virtpci.h +2 -1
@@ -24,6 +24,7 @@#include "uisqueue.h" #include <linux/version.h> +#include <linux/uuid.h> #define PCI_DEVICE_ID_VIRTHBA 0xAA00#define PCI_DEVICE_ID_VIRTNIC 0xAB00
@@ -41,7 +42,7 @@ struct net_adap_info {u8 mac_addr[MAX_MACADDR_LEN ];int num_rcv_bufs;unsigned mtu; -GUID zoneGuid; +uuid_le zoneGuid; }; typedef enum {
drivers/staging/unisys/visorchannel/visorchannel.h +8 -6
@@ -18,6 +18,8 @@#ifndef __VISORCHANNEL_H__#define __VISORCHANNEL_H__ +#include <linux/uuid.h> +#include "commontypes.h" #include "memregion.h" #include "channel.h"
@@ -38,15 +40,15 @@ typedef struct VISORCHANNEL_Tag VISORCHANNEL;* In this case, the values can simply be read from the channel header. */ VISORCHANNEL *visorchannel_create (HOSTADDRESS physaddr, -ulong channelBytes,GUID guid); +ulong channelBytes,uuid_le guid);VISORCHANNEL *visorchannel_create_overlapped (ulong channelBytes,VISORCHANNEL *parent,ulong off, -GUID guid); +uuid_le guid);VISORCHANNEL *visorchannel_create_with_lock (HOSTADDRESS physaddr, -ulong channelBytes,GUID guid); +ulong channelBytes,uuid_le guid);VISORCHANNEL *visorchannel_create_overlapped_with_lock (ulong channelBytes,VISORCHANNEL *parent, -ulong off,GUID guid); +ulong off,uuid_le guid);void visorchannel_destroy (VISORCHANNEL *channel);int visorchannel_read (VISORCHANNEL *channel,ulong offset,void *local,ulong nbytes);
@@ -64,9 +66,9 @@ ulong visorchannel_get_nbytes(VISORCHANNEL *channel);char *visorchannel_id (VISORCHANNEL *channel,char *s);char *visorchannel_zoneid (VISORCHANNEL *channel,char *s);U64 visorchannel_get_clientpartition (VISORCHANNEL *channel); -GUID visorchannel_get_GUID (VISORCHANNEL *channel); +uuid_le visorchannel_get_uuid (VISORCHANNEL *channel);MEMREGION *visorchannel_get_memregion (VISORCHANNEL *channel); -char *visorchannel_GUID_id (GUID *guid,char *s); +char *visorchannel_uuid_id (uuid_le *guid,char *s);void visorchannel_debug (VISORCHANNEL *channel,int nQueues,struct seq_file *seq,U32 off); void visorchannel_dump_section(VISORCHANNEL *chan, char *s,
drivers/staging/unisys/visorchannel/visorchannel_funcs.c +19 -20
@@ -24,14 +24,14 @@#include "globals.h" #include "visorchannel.h" -#include "guidutils.h" +#include <linux/uuid.h> #define MYDRVNAME "visorchannel"struct VISORCHANNEL_Tag {MEMREGION *memregion;/* from visor_memregion_create() */ CHANNEL_HEADER chan_hdr; -GUID guid; +uuid_le guid;ulong size;BOOL needs_lock;spinlock_t insert_lock;
@@ -50,7 +50,7 @@ struct VISORCHANNEL_Tag {*/ static VISORCHANNEL *visorchannel_create_guts (HOSTADDRESS physaddr,ulong channelBytes, -VISORCHANNEL *parent,ulong off,GUID guid, +VISORCHANNEL *parent,ulong off,uuid_le guid,BOOL needs_lock) {VISORCHANNEL *p =NULL ;
@@ -90,7 +90,7 @@ visorchannel_create_guts(HOSTADDRESS physaddr, ulong channelBytes,if (channelBytes ==0 )/* we had better be a CLIENT of this channel */ channelBytes = (ulong ) p->chan_hdr.Size; -if (STRUCTSEQUAL (guid, Guid0)) +if (uuid_le_cmp (guid,NULL_UUID_LE ) ==0 )/* we had better be a CLIENT of this channel */ guid = p->chan_hdr.Type;if (visor_memregion_resize (p->memregion, channelBytes) <0 ) {
@@ -114,7 +114,7 @@ Away: }VISORCHANNEL * -visorchannel_create (HOSTADDRESS physaddr,ulong channelBytes,GUID guid) +visorchannel_create (HOSTADDRESS physaddr,ulong channelBytes,uuid_le guid) {return visorchannel_create_guts (physaddr, channelBytes,NULL ,0 , guid, FALSE);
@@ -123,7 +123,7 @@ EXPORT_SYMBOL_GPL(visorchannel_create);VISORCHANNEL *visorchannel_create_with_lock (HOSTADDRESS physaddr,ulong channelBytes, -GUID guid) +uuid_le guid) {return visorchannel_create_guts (physaddr, channelBytes,NULL ,0 , guid, TRUE);
@@ -132,7 +132,7 @@ EXPORT_SYMBOL_GPL(visorchannel_create_with_lock);VISORCHANNEL *visorchannel_create_overlapped (ulong channelBytes, -VISORCHANNEL *parent,ulong off,GUID guid) +VISORCHANNEL *parent,ulong off,uuid_le guid) {return visorchannel_create_guts (0 , channelBytes, parent, off, guid, FALSE);
@@ -142,7 +142,7 @@ EXPORT_SYMBOL_GPL(visorchannel_create_overlapped);VISORCHANNEL *visorchannel_create_overlapped_with_lock (ulong channelBytes,VISORCHANNEL *parent,ulong off, -GUID guid) +uuid_le guid) {return visorchannel_create_guts (0 , channelBytes, parent, off, guid, TRUE);
@@ -177,23 +177,24 @@ visorchannel_get_nbytes(VISORCHANNEL *channel)EXPORT_SYMBOL_GPL (visorchannel_get_nbytes);char * -visorchannel_GUID_id (GUID *guid,char *s) +visorchannel_uuid_id (uuid_le *guid,char *s) { -return GUID_format1 (guid, s); +sprintf (s,"%pUL" , guid); +return s; } -EXPORT_SYMBOL_GPL (visorchannel_GUID_id); +EXPORT_SYMBOL_GPL (visorchannel_uuid_id);char *visorchannel_id (VISORCHANNEL *channel,char *s) { -return visorchannel_GUID_id (&channel->guid, s); +return visorchannel_uuid_id (&channel->guid, s); }EXPORT_SYMBOL_GPL (visorchannel_id);char *visorchannel_zoneid (VISORCHANNEL *channel,char *s) { -return visorchannel_GUID_id (&channel->chan_hdr.ZoneGuid, s); +return visorchannel_uuid_id (&channel->chan_hdr.ZoneGuid, s); }EXPORT_SYMBOL_GPL (visorchannel_zoneid);
@@ -204,12 +205,12 @@ visorchannel_get_clientpartition(VISORCHANNEL *channel) }EXPORT_SYMBOL_GPL (visorchannel_get_clientpartition); -GUID -visorchannel_get_GUID (VISORCHANNEL *channel) +uuid_le +visorchannel_get_uuid (VISORCHANNEL *channel) {return channel->guid; } -EXPORT_SYMBOL_GPL (visorchannel_get_GUID); +EXPORT_SYMBOL_GPL (visorchannel_get_uuid);MEMREGION *visorchannel_get_memregion (VISORCHANNEL *channel)
@@ -558,7 +559,6 @@ visorchannel_debug(VISORCHANNEL *channel, int nQueues,MEMREGION *memregion =NULL ;CHANNEL_HEADER hdr;CHANNEL_HEADER *phdr = &hdr; -char s[99 ];int i =0 ;int errcode =0 ;
@@ -588,9 +588,8 @@ visorchannel_debug(VISORCHANNEL *channel, int nQueues, nbytes = (ulong) (phdr->Size);seq_printf (seq,"--- Begin channel @0x%-16.16Lx for 0x%lx bytes (region=0x%lx bytes) ---\n" , addr + off, nbytes, nbytes_region); -seq_printf (seq,"Type = %s\n" ,GUID_format2 (&phdr->Type, s)); -seq_printf (seq,"ZoneGuid = %s\n" , -GUID_format2 (&phdr->ZoneGuid, s)); +seq_printf (seq,"Type = %pUL\n" , &phdr->Type); +seq_printf (seq,"ZoneGuid = %pUL\n" , &phdr->ZoneGuid);seq_printf (seq,"Signature = 0x%-16.16Lx\n" , (long long ) phdr->Signature);seq_printf (seq,"LegacyState = %lu\n" , (ulong ) phdr->LegacyState);
drivers/staging/unisys/visorchannel/visorchannel_main.c +1 -1
@@ -22,7 +22,7 @@#include "globals.h" #include "channel.h" #include "visorchannel.h" -#include "guidutils.h" +#include <linux/uuid.h> #define MYDRVNAME "visorchannel"
drivers/staging/unisys/visorchipset/parser.c +3 -2
@@ -20,6 +20,7 @@#include "controlvmchannel.h" #include <linux/ctype.h> #include <linux/mm.h> +#include <linux/uuid.h> #define MYDRVNAME "visorchipset_parser"#define CURRENT_FILE_PC VISOR_CHIPSET_PC_parser_c
@@ -191,7 +192,7 @@ parser_byteStream_get(PARSER_CONTEXT *ctx, ulong *nbytes)return (void *) ctx->data; } -GUID +uuid_le parser_id_get (PARSER_CONTEXT *ctx) {ULTRA_CONTROLVM_PARAMETERS_HEADER *phdr =NULL ;
@@ -199,7 +200,7 @@ parser_id_get(PARSER_CONTEXT *ctx)if (ctx ==NULL ) {ERRDRV ("%s (%s:%d) - no context" , __func__, __FILE__, __LINE__); -return Guid0; +return NULL_UUID_LE ; } phdr = (ULTRA_CONTROLVM_PARAMETERS_HEADER *) (ctx->data);return phdr->Id;
drivers/staging/unisys/visorchipset/parser.h +3 -1
@@ -18,6 +18,8 @@#ifndef __PARSER_H__#define __PARSER_H__ +#include <linux/uuid.h> +#include "uniklog.h" #include "timskmod.h" #include "channel.h"
@@ -37,7 +39,7 @@ PARSER_CONTEXT *parser_init_byteStream(U64 addr, U32 bytes, BOOL isLocal,void parser_param_start (PARSER_CONTEXT *ctx,PARSER_WHICH_STRING which_string);void *parser_param_get (PARSER_CONTEXT *ctx,char *nam,int namesize);void *parser_string_get (PARSER_CONTEXT *ctx); -GUID parser_id_get (PARSER_CONTEXT *ctx); +uuid_le parser_id_get (PARSER_CONTEXT *ctx);char *parser_simpleString_get (PARSER_CONTEXT *ctx);void *parser_byteStream_get (PARSER_CONTEXT *ctx,ulong *nbytes);void parser_done (PARSER_CONTEXT *ctx);
drivers/staging/unisys/visorchipset/testing.h +3 -2
@@ -19,6 +19,7 @@#define __VISORCHIPSET_TESTING_H__#define VISORCHIPSET_TEST_PROC +#include <linux/uuid.h> #include "globals.h" #include "controlvmchannel.h"
@@ -28,10 +29,10 @@ void test_manufacture_vnic_client_add(void *p);void test_manufacture_vnic_client_add_phys (HOSTADDRESS addr);void test_manufacture_preamble_messages (void );void test_manufacture_device_attach (ulong busNo,ulong devNo); -void test_manufacture_device_add (ulong busNo,ulong devNo,GUID dataTypeGuid, +void test_manufacture_device_add (ulong busNo,ulong devNo,uuid_le dataTypeGuid,void *pChannel);void test_manufacture_add_bus (ulong busNo,ulong maxDevices, -GUID id,u8 *name,BOOL isServer); +uuid_le id,u8 *name,BOOL isServer);void test_manufacture_device_destroy (ulong busNo,ulong devNo);void test_manufacture_bus_destroy (ulong busNo);void test_manufacture_detach_externalPort (ulong switchNo,ulong externalPortNo);
drivers/staging/unisys/visorchipset/visorchipset.h +9 -7
@@ -18,6 +18,8 @@#ifndef __VISORCHIPSET_H__#define __VISORCHIPSET_H__ +#include <linux/uuid.h> +#include "timskmod.h" #include "channel.h" #include "controlvmchannel.h"
@@ -63,8 +65,8 @@ typedef struct {HOSTADDRESS channelAddr;struct InterruptInfo intr;U64 nChannelBytes; -GUID channelTypeGuid; -GUID channelInstGuid; +uuid_le channelTypeGuid; +uuid_le channelInstGuid; }VISORCHIPSET_CHANNEL_INFO ;
@@ -77,7 +79,7 @@ typedef struct {struct list_head entry;U32 busNo;U32 devNo; -GUID devInstGuid; +uuid_le devInstGuid;VISORCHIPSET_STATE state;VISORCHIPSET_CHANNEL_INFO chanInfo;U32 Reserved1;/* CONTROLVM_ID */
@@ -125,7 +127,7 @@ typedef struct {U32 busNo;VISORCHIPSET_STATE state;VISORCHIPSET_CHANNEL_INFO chanInfo; -GUID partitionGuid; +uuid_le partitionGuid;U64 partitionHandle;U8 *name;/* UTF8 */ U8 *description;/* UTF8 */
@@ -161,7 +163,7 @@ findbus(struct list_head *list, U32 busNo) typedef struct { U32 switchNo; VISORCHIPSET_STATE state; - GUID switchTypeGuid; + uuid_le switchTypeGuid; U8 *authService1; U8 *authService2; U8 *authService3;
@@ -181,7 +183,7 @@ typedef struct {U32 switchNo;U32 externalPortNo;VISORCHIPSET_STATE state; -GUID networkZoneGuid; +uuid_le networkZoneGuid;int pdPort;U8 *ip;U8 *ipNetmask;
@@ -224,7 +226,7 @@ typedef struct {void (*device_destroy)(ulong busNo,ulong devNo);void (*device_pause)(ulong busNo,ulong devNo);void (*device_resume)(ulong busNo,ulong devNo); -int (*get_channel_info)(GUID typeGuid,ulong *minSize, +int (*get_channel_info)(uuid_le typeGuid,ulong *minSize,ulong *maxSize); }VISORCHIPSET_BUSDEV_NOTIFIERS ;
drivers/staging/unisys/visorchipset/visorchipset_main.c +6 -9
@@ -26,7 +26,6 @@#include "parser.h" #include "uniklog.h" #include "uisutils.h" -#include "guidutils.h" #include "controlvmcompletionstatus.h" #include "guestlinuxdebug.h" #include "filexfer.h"
@@ -34,6 +33,7 @@#include <linux/nls.h> #include <linux/netdevice.h> #include <linux/platform_device.h> +#include <linux/uuid.h> #define CURRENT_FILE_PC VISOR_CHIPSET_PC_visorchipset_main_c#define TEST_VNIC_PHYSITF "eth0"/* physical network itf for
@@ -82,7 +82,7 @@ typedef struct {static CONTROLVM_MESSAGE_HEADER g_DiagMsgHdr;static CONTROLVM_MESSAGE_HEADER g_ChipSetMsgHdr;static CONTROLVM_MESSAGE_HEADER g_DelDumpMsgHdr; -static const GUID UltraDiagPoolChannelProtocolGuid = +static const uuid_le UltraDiagPoolChannelProtocolGuid =ULTRA_DIAG_POOL_CHANNEL_PROTOCOL_GUID ;/* 0xffffff is an invalid Bus/Device number */ static ulong g_diagpoolBusNo =0xffffff ;
@@ -93,15 +93,12 @@ static CONTROLVM_MESSAGE_PACKET g_DeviceChangeStatePacket;* "visorhackbus") */ #define FOR_VISORHACKBUS (channel_type_guid) \ - ((memcmp(&channel_type_guid, &UltraVnicChannelProtocolGuid, \ - sizeof(GUID)) == 0) || \ - (memcmp(&channel_type_guid, &UltraVhbaChannelProtocolGuid, \ - sizeof(GUID)) == 0)) + (((uuid_le_cmp(channel_type_guid, UltraVnicChannelProtocolGuid) == 0)\ + || (uuid_le_cmp(channel_type_guid, UltraVhbaChannelProtocolGuid) == 0)))#define FOR_VISORBUS (channel_type_guid) (!(FOR_VISORHACKBUS(channel_type_guid)))#define is_diagpool_channel (channel_type_guid) \ - (memcmp(&channel_type_guid, \ - &UltraDiagPoolChannelProtocolGuid, sizeof(GUID)) == 0) + (uuid_le_cmp(channel_type_guid, UltraDiagPoolChannelProtocolGuid) == 0) typedef enum { PARTPROP_invalid,
@@ -1189,7 +1186,7 @@ bus_configure(CONTROLVM_MESSAGE *inmsg, PARSER_CONTEXT *parser_ctx)parser_param_start (parser_ctx,PARSERSTRING_NAME ); pBusInfo->name =parser_string_get (parser_ctx); -visorchannel_GUID_id (&pBusInfo->partitionGuid, s); +visorchannel_uuid_id (&pBusInfo->partitionGuid, s); pBusInfo->procObject =visor_proc_CreateObject (PartitionType, s, (void *) (pBusInfo));if (pBusInfo->procObject ==NULL ) {
Signature · 1 line
1.9.1