]> xenbits.xensource.com Git - people/andrewcoop/mini-os.git/commitdiff
remove event channel specific struct file definitions
authorJuergen Gross <jgross@suse.com>
Sun, 16 Jan 2022 08:33:17 +0000 (09:33 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 18 Jan 2022 18:26:43 +0000 (18:26 +0000)
The event channel specific union member in struct file is no longer
needed, so remove it together with the associated structure
definitions.

The event channel file type and its associated handling can be removed,
too, as libxenevtchn is now supplying a struct file_ops via a call of
alloc_file_type().

This removes all contents of CONFIG_LIBXENEVTCHN guarded sections, so
this config option can be removed.

Add an extern declaration for event_queue as it is used by
libxenevtchn.

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Config.mk
arch/x86/testbuild/all-no
arch/x86/testbuild/all-yes
arch/x86/testbuild/newxen-yes
include/lib.h
lib/sys.c

index 03023033ccb1208aa9da37def56edb7d6409a8f2..52eb26d8e9a5d01ce428d95b5ad31b43004fda01 100644 (file)
--- a/Config.mk
+++ b/Config.mk
@@ -200,7 +200,6 @@ CONFIG-n += CONFIG_PARAVIRT
 endif
 # Support legacy CONFIG_XC value
 CONFIG_XC ?= $(libc)
-CONFIG-$(CONFIG_XC) += CONFIG_LIBXENEVTCHN
 CONFIG-$(CONFIG_XC) += CONFIG_LIBXENGNTTAB
 
 CONFIG-$(lwip) += CONFIG_LWIP
index 46f974deb9d21e7ec0a070ef3cf32d310e491793..15c954ff0fbbe125fbc7f62882a219ae6e4bc7be 100644 (file)
@@ -14,7 +14,6 @@ CONFIG_KBDFRONT = n
 CONFIG_CONSFRONT = n
 CONFIG_XENBUS = n
 CONFIG_LIBXS = n
-CONFIG_LIBXENEVTCHN = n
 CONFIG_LIBXENGNTTAB = n
 CONFIG_LWIP = n
 CONFIG_BALLOON = n
index 3ead12f19f1767b599331c26d2dfc05f9c6df29a..9964d42fcc12b92bbdd1fb27a87069e06058d1e7 100644 (file)
@@ -17,6 +17,5 @@ CONFIG_LIBXS = y
 CONFIG_BALLOON = y
 CONFIG_USE_XEN_CONSOLE = y
 # The following are special: they need support from outside
-CONFIG_LIBXENEVTCHN = n
 CONFIG_LIBXENGNTTAB = n
 CONFIG_LWIP = n
index 5c0b3c8008b355af88ae8689781626fd10f07ced..c2519938de1a05870b0622eb3a2b66f7ea27a65b 100644 (file)
@@ -18,6 +18,5 @@ CONFIG_BALLOON = y
 CONFIG_USE_XEN_CONSOLE = y
 XEN_INTERFACE_VERSION=__XEN_LATEST_INTERFACE_VERSION__
 # The following are special: they need support from outside
-CONFIG_LIBXENEVTCHN = n
 CONFIG_LIBXENGNTTAB = n
 CONFIG_LWIP = n
index 44696806b9b2fba935ba32833414e989b7d741a4..5f24be5dadf8d6857ceabd2b11a152aacaadd533 100644 (file)
@@ -155,6 +155,8 @@ do {                                                           \
 void sanity_check(void);
 
 #ifdef HAVE_LIBC
+extern struct wait_queue_head event_queue;
+
 #define FTYPE_NONE       0
 #define FTYPE_CONSOLE    1
 #define FTYPE_FILE       2
@@ -169,19 +171,9 @@ void sanity_check(void);
 #define FTYPE_TPM_TIS   11
 #define FTYPE_XENBUS    12
 #define FTYPE_GNTMAP    13
-#define FTYPE_EVTCHN    14
-#define FTYPE_N         15
+#define FTYPE_N         14
 #define FTYPE_SPARE     16
 
-LIST_HEAD(evtchn_port_list, evtchn_port_info);
-
-struct evtchn_port_info {
-        LIST_ENTRY(evtchn_port_info) list;
-        evtchn_port_t port;
-        unsigned long pending;
-        int bound;
-};
-
 struct file {
     unsigned int type;
     bool read; /* maybe available for read */
@@ -189,9 +181,6 @@ struct file {
     union {
         int fd; /* Any fd from an upper layer. */
         void *dev;
-       struct {
-           struct evtchn_port_list ports;
-       } evtchn;
        struct gntmap gntmap;
     };
 };
index 98a4b888cce1fc0403b3e15573bfec5c5b44eab3..fdd0c4581f80beff5e84e13b9c571f1ad0f8d82d 100644 (file)
--- a/lib/sys.c
+++ b/lib/sys.c
@@ -533,11 +533,6 @@ int close(int fd)
             res = lwip_close(files[fd].fd);
             break;
 #endif
-#ifdef CONFIG_LIBXENEVTCHN
-       case FTYPE_EVTCHN:
-           minios_evtchn_close_fd(fd);
-            break;
-#endif
 #ifdef CONFIG_LIBXENGNTTAB
        case FTYPE_GNTMAP:
            minios_gnttab_close_fd(fd);
@@ -770,7 +765,6 @@ static const char *const file_types[] = {
     [FTYPE_NONE]    = "none",
     [FTYPE_CONSOLE] = "console",
     [FTYPE_XENBUS]  = "xenbus",
-    [FTYPE_EVTCHN]  = "evtchn",
     [FTYPE_SOCKET]  = "socket",
     [FTYPE_TAP]     = "net",
     [FTYPE_BLK]     = "blk",
@@ -970,7 +964,6 @@ static int select_poll(int nfds, fd_set *readfds, fd_set *writefds, fd_set *exce
            FD_CLR(i, exceptfds);
            break;
 #endif
-       case FTYPE_EVTCHN:
        case FTYPE_TAP:
        case FTYPE_BLK:
        case FTYPE_KBD: