From ca8a593cc7ff51d6360d16fce31f934c3026ded2 Mon Sep 17 00:00:00 2001 From: Alex Zeffertt Date: Thu, 9 Feb 2012 18:33:30 +0000 Subject: mini-os: remove per-fd evtchn limit This changes the minios evtchn implementation to use a list instead of an array which ahis allows it to grow as necessary to support any number of ports, only limited by Xen (NR_EVS is 1024, should be enough for now). Signed-off-by: Diego Ongaro Signed-off-by: Alex Zeffertt Signed-off-by: Daniel De Graaf Acked-by: Ian Campbell Cc: Stefano Stabellini Committed-by: Ian Jackson --- extras/mini-os/include/lib.h | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'extras') diff --git a/extras/mini-os/include/lib.h b/extras/mini-os/include/lib.h index bd3eeafb0e..3d03cf40f8 100644 --- a/extras/mini-os/include/lib.h +++ b/extras/mini-os/include/lib.h @@ -52,6 +52,7 @@ #include #include #include +#include #include "gntmap.h" #ifdef HAVE_LIBC @@ -143,7 +144,14 @@ enum fd_type { FTYPE_SAVEFILE, }; -#define MAX_EVTCHN_PORTS 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; +}; extern struct file { enum fd_type type; @@ -158,13 +166,7 @@ extern struct file { off_t offset; } file; struct { - /* To each event channel FD is associated a series of ports which - * wakes select for this FD. */ - struct { - evtchn_port_t port; - unsigned long pending; - int bound; - } ports[MAX_EVTCHN_PORTS]; + struct evtchn_port_list ports; } evtchn; struct gntmap gntmap; struct { -- cgit v1.2.3