[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [win-pv-devel] [PATCH v2 1/2] Remove interface versions no longer exposed through PDO revisions
XENBUS_EVTCHN_INTERFACE versions prior to 4 and XENBUS_SHARED_INFO_INTERFACE version 1 are no longer available for external query and nothing internal to the XENBUS package uses them, so the code can be removed. Signed-off-by: Paul Durrant <paul.durrant@xxxxxxxxxx> --- include/evtchn_interface.h | 66 +----------------------------- include/shared_info_interface.h | 24 +---------- src/xenbus/evtchn.c | 89 ----------------------------------------- src/xenbus/shared_info.c | 48 ---------------------- 4 files changed, 2 insertions(+), 225 deletions(-) diff --git a/include/evtchn_interface.h b/include/evtchn_interface.h index 4de4590..4e696c8 100644 --- a/include/evtchn_interface.h +++ b/include/evtchn_interface.h @@ -112,13 +112,6 @@ typedef PXENBUS_EVTCHN_CHANNEL ... ); -typedef NTSTATUS -(*XENBUS_EVTCHN_BIND_V2)( - IN PINTERFACE Interface, - IN PXENBUS_EVTCHN_CHANNEL Channel, - IN ULONG Cpu - ); - /*! \typedef XENBUS_EVTCHN_BIND \brief Bind an event channel to a specific CPU @@ -135,13 +128,6 @@ typedef NTSTATUS IN UCHAR Number ); -typedef BOOLEAN -(*XENBUS_EVTCHN_UNMASK_V1)( - IN PINTERFACE Interface, - IN PXENBUS_EVTCHN_CHANNEL Channel, - IN BOOLEAN InCallback - ); - /*! \typedef XENBUS_EVTCHN_UNMASK \brief Unmask an event channel @@ -232,56 +218,6 @@ typedef VOID DEFINE_GUID(GUID_XENBUS_EVTCHN_INTERFACE, 0xbe2440ac, 0x1098, 0x4150, 0xaf, 0x4d, 0x45, 0x2f, 0xad, 0xce, 0xf9, 0x23); -/*! \struct _XENBUS_EVTCHN_INTERFACE_V1 - \brief EVTCHN interface version 1 - \ingroup interfaces -*/ -struct _XENBUS_EVTCHN_INTERFACE_V1 { - INTERFACE Interface; - XENBUS_EVTCHN_ACQUIRE EvtchnAcquire; - XENBUS_EVTCHN_RELEASE EvtchnRelease; - XENBUS_EVTCHN_OPEN EvtchnOpen; - XENBUS_EVTCHN_UNMASK_V1 EvtchnUnmaskVersion1; - XENBUS_EVTCHN_SEND_V1 EvtchnSendVersion1; - XENBUS_EVTCHN_TRIGGER EvtchnTrigger; - XENBUS_EVTCHN_GET_PORT EvtchnGetPort; - XENBUS_EVTCHN_CLOSE EvtchnClose; -}; - -/*! \struct _XENBUS_EVTCHN_INTERFACE_V2 - \brief EVTCHN interface version 2 - \ingroup interfaces -*/ -struct _XENBUS_EVTCHN_INTERFACE_V2 { - INTERFACE Interface; - XENBUS_EVTCHN_ACQUIRE EvtchnAcquire; - XENBUS_EVTCHN_RELEASE EvtchnRelease; - XENBUS_EVTCHN_OPEN EvtchnOpen; - XENBUS_EVTCHN_BIND_V2 EvtchnBindVersion2; - XENBUS_EVTCHN_UNMASK_V1 EvtchnUnmaskVersion1; - XENBUS_EVTCHN_SEND_V1 EvtchnSendVersion1; - XENBUS_EVTCHN_TRIGGER EvtchnTrigger; - XENBUS_EVTCHN_GET_PORT EvtchnGetPort; - XENBUS_EVTCHN_CLOSE EvtchnClose; -}; - -/*! \struct _XENBUS_EVTCHN_INTERFACE_V3 - \brief EVTCHN interface version 3 - \ingroup interfaces -*/ -struct _XENBUS_EVTCHN_INTERFACE_V3 { - INTERFACE Interface; - XENBUS_EVTCHN_ACQUIRE EvtchnAcquire; - XENBUS_EVTCHN_RELEASE EvtchnRelease; - XENBUS_EVTCHN_OPEN EvtchnOpen; - XENBUS_EVTCHN_BIND_V2 EvtchnBindVersion2; - XENBUS_EVTCHN_UNMASK EvtchnUnmask; - XENBUS_EVTCHN_SEND_V1 EvtchnSendVersion1; - XENBUS_EVTCHN_TRIGGER EvtchnTrigger; - XENBUS_EVTCHN_GET_PORT EvtchnGetPort; - XENBUS_EVTCHN_CLOSE EvtchnClose; -}; - /*! \struct _XENBUS_EVTCHN_INTERFACE_V4 \brief EVTCHN interface version 4 \ingroup interfaces @@ -345,7 +281,7 @@ typedef struct _XENBUS_EVTCHN_INTERFACE_V6 XENBUS_EVTCHN_INTERFACE, *PXENBUS_EVT #endif // _WINDLL -#define XENBUS_EVTCHN_INTERFACE_VERSION_MIN 1 +#define XENBUS_EVTCHN_INTERFACE_VERSION_MIN 4 #define XENBUS_EVTCHN_INTERFACE_VERSION_MAX 6 #endif // _XENBUS_EVTCHN_INTERFACE_H diff --git a/include/shared_info_interface.h b/include/shared_info_interface.h index 287feab..a0613ce 100644 --- a/include/shared_info_interface.h +++ b/include/shared_info_interface.h @@ -86,13 +86,6 @@ typedef BOOLEAN IN PVOID Argument ); -typedef BOOLEAN -(*XENBUS_SHARED_INFO_EVTCHN_POLL_V1)( - IN PINTERFACE Interface, - IN BOOLEAN (*Function)(PVOID, ULONG), - IN PVOID Argument - ); - /*! \typedef XENBUS_SHARED_INFO_EVTCHN_ACK \brief Private method for EVTCHN inerface */ @@ -135,21 +128,6 @@ typedef LARGE_INTEGER DEFINE_GUID(GUID_XENBUS_SHARED_INFO_INTERFACE, 0x7e73c34f, 0x1640, 0x4649, 0xa8, 0xf3, 0x26, 0x3b, 0xc9, 0x30, 0xa0, 0x4); -/*! \struct _XENBUS_SHARED_INFO_INTERFACE_V1 - \brief SHARED_INFO interface version 1 - \ingroup interfaces -*/ -struct _XENBUS_SHARED_INFO_INTERFACE_V1 { - INTERFACE Interface; - XENBUS_SHARED_INFO_ACQUIRE SharedInfoAcquire; - XENBUS_SHARED_INFO_RELEASE SharedInfoRelease; - XENBUS_SHARED_INFO_EVTCHN_POLL_V1 SharedInfoEvtchnPollVersion1; - XENBUS_SHARED_INFO_EVTCHN_ACK SharedInfoEvtchnAck; - XENBUS_SHARED_INFO_EVTCHN_MASK SharedInfoEvtchnMask; - XENBUS_SHARED_INFO_EVTCHN_UNMASK SharedInfoEvtchnUnmask; - XENBUS_SHARED_INFO_GET_TIME SharedInfoGetTime; -}; - /*! \struct _XENBUS_SHARED_INFO_INTERFACE_V2 \brief SHARED_INFO interface version 2 \ingroup interfaces @@ -176,7 +154,7 @@ typedef struct _XENBUS_SHARED_INFO_INTERFACE_V2 XENBUS_SHARED_INFO_INTERFACE, *P #endif // _WINDLL -#define XENBUS_SHARED_INFO_INTERFACE_VERSION_MIN 1 +#define XENBUS_SHARED_INFO_INTERFACE_VERSION_MIN 2 #define XENBUS_SHARED_INFO_INTERFACE_VERSION_MAX 2 #endif // _XENBUS_SHARED_INFO_H diff --git a/src/xenbus/evtchn.c b/src/xenbus/evtchn.c index f965f5b..7546f19 100644 --- a/src/xenbus/evtchn.c +++ b/src/xenbus/evtchn.c @@ -1633,44 +1633,6 @@ done: KeReleaseSpinLock(&Context->Lock, Irql); } -static struct _XENBUS_EVTCHN_INTERFACE_V1 EvtchnInterfaceVersion1 = { - { sizeof (struct _XENBUS_EVTCHN_INTERFACE_V1), 1, NULL, NULL, NULL }, - EvtchnAcquire, - EvtchnRelease, - EvtchnOpen, - EvtchnUnmaskVersion1, - EvtchnSendVersion1, - EvtchnTrigger, - EvtchnGetPort, - EvtchnClose -}; - -static struct _XENBUS_EVTCHN_INTERFACE_V2 EvtchnInterfaceVersion2 = { - { sizeof (struct _XENBUS_EVTCHN_INTERFACE_V2), 2, NULL, NULL, NULL }, - EvtchnAcquire, - EvtchnRelease, - EvtchnOpen, - EvtchnBindVersion2, - EvtchnUnmaskVersion1, - EvtchnSendVersion1, - EvtchnTrigger, - EvtchnGetPort, - EvtchnClose -}; - -static struct _XENBUS_EVTCHN_INTERFACE_V3 EvtchnInterfaceVersion3 = { - { sizeof (struct _XENBUS_EVTCHN_INTERFACE_V3), 3, NULL, NULL, NULL }, - EvtchnAcquire, - EvtchnRelease, - EvtchnOpen, - EvtchnBindVersion2, - EvtchnUnmask, - EvtchnSendVersion1, - EvtchnTrigger, - EvtchnGetPort, - EvtchnClose -}; - static struct _XENBUS_EVTCHN_INTERFACE_V4 EvtchnInterfaceVersion4 = { { sizeof (struct _XENBUS_EVTCHN_INTERFACE_V4), 4, NULL, NULL, NULL }, EvtchnAcquire, @@ -1820,57 +1782,6 @@ EvtchnGetInterface( ASSERT(Context != NULL); switch (Version) { - case 1: { - struct _XENBUS_EVTCHN_INTERFACE_V1 *EvtchnInterface; - - EvtchnInterface = (struct _XENBUS_EVTCHN_INTERFACE_V1 *)Interface; - - status = STATUS_BUFFER_OVERFLOW; - if (Size < sizeof (struct _XENBUS_EVTCHN_INTERFACE_V1)) - break; - - *EvtchnInterface = EvtchnInterfaceVersion1; - - ASSERT3U(Interface->Version, ==, Version); - Interface->Context = Context; - - status = STATUS_SUCCESS; - break; - } - case 2: { - struct _XENBUS_EVTCHN_INTERFACE_V2 *EvtchnInterface; - - EvtchnInterface = (struct _XENBUS_EVTCHN_INTERFACE_V2 *)Interface; - - status = STATUS_BUFFER_OVERFLOW; - if (Size < sizeof (struct _XENBUS_EVTCHN_INTERFACE_V2)) - break; - - *EvtchnInterface = EvtchnInterfaceVersion2; - - ASSERT3U(Interface->Version, ==, Version); - Interface->Context = Context; - - status = STATUS_SUCCESS; - break; - } - case 3: { - struct _XENBUS_EVTCHN_INTERFACE_V3 *EvtchnInterface; - - EvtchnInterface = (struct _XENBUS_EVTCHN_INTERFACE_V3 *)Interface; - - status = STATUS_BUFFER_OVERFLOW; - if (Size < sizeof (struct _XENBUS_EVTCHN_INTERFACE_V3)) - break; - - *EvtchnInterface = EvtchnInterfaceVersion3; - - ASSERT3U(Interface->Version, ==, Version); - Interface->Context = Context; - - status = STATUS_SUCCESS; - break; - } case 4: { struct _XENBUS_EVTCHN_INTERFACE_V4 *EvtchnInterface; diff --git a/src/xenbus/shared_info.c b/src/xenbus/shared_info.c index d6babcf..8aec39d 100644 --- a/src/xenbus/shared_info.c +++ b/src/xenbus/shared_info.c @@ -247,26 +247,6 @@ done: return DoneSomething; } -static BOOLEAN -SharedInfoEvtchnPollVersion1( - IN PINTERFACE Interface, - IN BOOLEAN (*Function)(PVOID, ULONG), - IN PVOID Argument OPTIONAL - ) -{ - BOOLEAN DoneSomething; - - DoneSomething = FALSE; - - while (SharedInfoUpcallPending(Interface, 0)) - DoneSomething |= SharedInfoEvtchnPoll(Interface, - 0, - Function, - Argument); - - return DoneSomething; -} - static VOID SharedInfoEvtchnAck( IN PINTERFACE Interface, @@ -685,17 +665,6 @@ done: KeReleaseSpinLock(&Context->Lock, Irql); } -static struct _XENBUS_SHARED_INFO_INTERFACE_V1 SharedInfoInterfaceVersion1 = { - { sizeof (struct _XENBUS_SHARED_INFO_INTERFACE_V1), 1, NULL, NULL, NULL }, - SharedInfoAcquire, - SharedInfoRelease, - SharedInfoEvtchnPollVersion1, - SharedInfoEvtchnAck, - SharedInfoEvtchnMask, - SharedInfoEvtchnUnmask, - SharedInfoGetTime -}; - static struct _XENBUS_SHARED_INFO_INTERFACE_V2 SharedInfoInterfaceVersion2 = { { sizeof (struct _XENBUS_SHARED_INFO_INTERFACE_V2), 2, NULL, NULL, NULL }, SharedInfoAcquire, @@ -765,23 +734,6 @@ SharedInfoGetInterface( ASSERT(Context != NULL); switch (Version) { - case 1: { - struct _XENBUS_SHARED_INFO_INTERFACE_V1 *SharedInfoInterface; - - SharedInfoInterface = (struct _XENBUS_SHARED_INFO_INTERFACE_V1 *)Interface; - - status = STATUS_BUFFER_OVERFLOW; - if (Size < sizeof (struct _XENBUS_SHARED_INFO_INTERFACE_V1)) - break; - - *SharedInfoInterface = SharedInfoInterfaceVersion1; - - ASSERT3U(Interface->Version, ==, Version); - Interface->Context = Context; - - status = STATUS_SUCCESS; - break; - } case 2: { struct _XENBUS_SHARED_INFO_INTERFACE_V2 *SharedInfoInterface; -- 2.5.3 _______________________________________________ win-pv-devel mailing list win-pv-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/cgi-bin/mailman/listinfo/win-pv-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |