From b4b7ff4b08e691656c9d77c758fc355833128ac0 Mon Sep 17 00:00:00 2001 From: André Fabian Silva Delgado Date: Wed, 20 Jan 2016 14:01:31 -0300 Subject: Linux-libre 4.4-gnu --- drivers/staging/unisys/include/channel.h | 19 ++++++++----------- drivers/staging/unisys/include/diagchannel.h | 5 ----- drivers/staging/unisys/include/iochannel.h | 26 +++++++++++++------------- drivers/staging/unisys/include/periodic_work.h | 12 ++++++------ 4 files changed, 27 insertions(+), 35 deletions(-) (limited to 'drivers/staging/unisys/include') diff --git a/drivers/staging/unisys/include/channel.h b/drivers/staging/unisys/include/channel.h index da0b5387f..c6c24423a 100644 --- a/drivers/staging/unisys/include/channel.h +++ b/drivers/staging/unisys/include/channel.h @@ -32,7 +32,7 @@ */ #define __SUPERVISOR_CHANNEL_H__ -#define SIGNATURE_16(A, B) ((A) | (B<<8)) +#define SIGNATURE_16(A, B) ((A) | (B << 8)) #define SIGNATURE_32(A, B, C, D) \ (SIGNATURE_16(A, B) | (SIGNATURE_16(C, D) << 16)) #define SIGNATURE_64(A, B, C, D, E, F, G, H) \ @@ -42,10 +42,10 @@ #define lengthof(TYPE, MEMBER) (sizeof(((TYPE *)0)->MEMBER)) #endif #ifndef COVERQ -#define COVERQ(v, d) (((v)+(d)-1) / (d)) +#define COVERQ(v, d) (((v) + (d) - 1) / (d)) #endif #ifndef COVER -#define COVER(v, d) ((d)*COVERQ(v, d)) +#define COVER(v, d) ((d) * COVERQ(v, d)) #endif #define ULTRA_CHANNEL_PROTOCOL_SIGNATURE SIGNATURE_32('E', 'C', 'N', 'L') @@ -152,7 +152,6 @@ ULTRA_CHANNELCLI_STRING(u32 v) #define ULTRA_IO_DRIVER_DISABLES_INTS (0x1ULL << 5) #define ULTRA_IO_DRIVER_SUPPORTS_ENHANCED_RCVBUF_CHECKING (0x1ULL << 6) -#pragma pack(push, 1) /* both GCC and VC now allow this pragma */ /* Common Channel Header */ struct channel_header { u64 signature; /* Signature */ @@ -192,7 +191,7 @@ struct channel_header { u8 filler[1]; /* Pad out to 128 byte cacheline */ /* Please add all new single-byte values below here */ u8 recover_channel; -}; +} __packed; #define ULTRA_CHANNEL_ENABLE_INTS (0x1ULL << 0) @@ -230,9 +229,7 @@ struct signal_queue_header { * to denote trouble with client's * fields */ u8 filler[12]; /* Pad out to 64 byte cacheline */ -}; - -#pragma pack(pop) +} __packed; #define spar_signal_init(chan, QHDRFLD, QDATAFLD, QDATATYPE, ver, typ) \ do { \ @@ -241,11 +238,11 @@ struct signal_queue_header { chan->QHDRFLD.chtype = typ; \ chan->QHDRFLD.size = sizeof(chan->QDATAFLD); \ chan->QHDRFLD.signal_size = sizeof(QDATATYPE); \ - chan->QHDRFLD.sig_base_offset = (u64)(chan->QDATAFLD)- \ + chan->QHDRFLD.sig_base_offset = (u64)(chan->QDATAFLD) - \ (u64)(&chan->QHDRFLD); \ chan->QHDRFLD.max_slots = \ - sizeof(chan->QDATAFLD)/sizeof(QDATATYPE); \ - chan->QHDRFLD.max_signals = chan->QHDRFLD.max_slots-1; \ + sizeof(chan->QDATAFLD) / sizeof(QDATATYPE); \ + chan->QHDRFLD.max_signals = chan->QHDRFLD.max_slots - 1;\ } while (0) /* Generic function useful for validating any type of channel when it is diff --git a/drivers/staging/unisys/include/diagchannel.h b/drivers/staging/unisys/include/diagchannel.h index d2d35685d..6e813c77b 100644 --- a/drivers/staging/unisys/include/diagchannel.h +++ b/drivers/staging/unisys/include/diagchannel.h @@ -16,11 +16,6 @@ #ifndef _DIAG_CHANNEL_H_ #define _DIAG_CHANNEL_H_ -#define MAX_MODULE_NAME_SIZE 128 /* Maximum length of module name... */ -#define MAX_ADDITIONAL_INFO_SIZE 256 /* Maximum length of any additional - * info accompanying event... - */ - /* Levels of severity for diagnostic events, in order from lowest severity to * highest (i.e. fatal errors are the most severe, and should always be logged, * but info events rarely need to be logged except during debugging). The diff --git a/drivers/staging/unisys/include/iochannel.h b/drivers/staging/unisys/include/iochannel.h index a55981234..14e656ff7 100644 --- a/drivers/staging/unisys/include/iochannel.h +++ b/drivers/staging/unisys/include/iochannel.h @@ -147,6 +147,10 @@ struct phys_info { u16 pi_len; } __packed; +#define MIN_NUMSIGNALS 64 + +/* structs with pragma pack */ + struct guest_phys_info { u64 address; u64 length; @@ -183,7 +187,7 @@ struct vhba_config_max { /* 20 bytes */ } __packed; struct uiscmdrsp_scsi { - void *scsicmd; /* the handle to the cmd that was received - + u64 handle; /* the handle to the cmd that was received - * send it back as is in the rsp packet. */ u8 cmnd[MAX_CMND_SIZE]; /* the cdb for the command */ u32 bufflen; /* length of data to be transferred out or in */ @@ -437,24 +441,22 @@ struct uiscmdrsp_scsitaskmgmt { struct uisscsi_dest vdest; /* the vdisk for which this task mgmt is generated */ - void *scsicmd; + u64 handle; - /* This is some handle that the guest has saved off for its own use. + /* This is a handle that the guest has saved off for its own use. * Its value is preserved by iopart & returned as is in the task * mgmt rsp. */ - void *notify; + u64 notify_handle; /* For linux guests, this is a pointer to wait_queue_head that a * thread is waiting on to see if the taskmgmt command has completed. - * For windows guests, this is a pointer to a location that a waiting - * thread is testing to see if the taskmgmt command has completed. * When the rsp is received by guest, the thread receiving the * response uses this to notify the thread waiting for taskmgmt * command completion. Its value is preserved by iopart & returned * as is in the task mgmt rsp. */ - void *notifyresult; + u64 notifyresult_handle; /* this is a handle to location in guest where the result of the * taskmgmt command (result field) is to saved off when the response @@ -486,24 +488,22 @@ struct uiscmdrsp_vdiskmgmt { struct uisscsi_dest vdest; /* the vdisk for which this task mgmt is generated */ - void *scsicmd; + u64 handle; - /* This is some handle that the guest has saved off for its own use. + /* This is a handle that the guest has saved off for its own use. * Its value is preserved by iopart & returned as is in the task * mgmt rsp. */ - void *notify; + u64 notify_handle; /* For linux guests, this is a pointer to wait_queue_head that a * thread is waiting on to see if the tskmgmt command has completed. - * For win32 guests, this is a pointer to a location that a waiting - * thread is testing to see if the taskmgmt command has completed. * When the rsp is received by guest, the thread receiving the * response uses this to notify the thread waiting for taskmgmt * command completion. Its value is preserved by iopart & returned * as is in the task mgmt rsp. */ - void *notifyresult; + u64 notifyresult_handle; /* this is a handle to location in guest where the result of the * taskmgmt command (result field) is to saved off when the response diff --git a/drivers/staging/unisys/include/periodic_work.h b/drivers/staging/unisys/include/periodic_work.h index 4e19c28dc..0b3335a4b 100644 --- a/drivers/staging/unisys/include/periodic_work.h +++ b/drivers/staging/unisys/include/periodic_work.h @@ -21,17 +21,17 @@ #include #include - /* PERIODIC_WORK an opaque structure to users. * Fields are declared only in the implementation .c files. */ struct periodic_work; -struct periodic_work *visor_periodic_work_create(ulong jiffy_interval, - struct workqueue_struct *workqueue, - void (*workfunc)(void *), - void *workfuncarg, - const char *devnam); +struct periodic_work * +visor_periodic_work_create(ulong jiffy_interval, + struct workqueue_struct *workqueue, + void (*workfunc)(void *), + void *workfuncarg, + const char *devnam); void visor_periodic_work_destroy(struct periodic_work *pw); bool visor_periodic_work_nextperiod(struct periodic_work *pw); bool visor_periodic_work_start(struct periodic_work *pw); -- cgit v1.2.3-54-g00ecf