From 76ce27755b87aa5a91ce0f5a02e560ab5c0515e4 Mon Sep 17 00:00:00 2001 From: Jan Beulich Date: Sun, 1 May 2011 13:17:44 +0100 Subject: replace d->nr_pirqs sized arrays with radix tree With this it is questionable whether retaining struct domain's nr_pirqs is actually necessary - the value now only serves for bounds checking, and this boundary could easily be nr_irqs. Another thing to consider is whether it's worth storing the pirq number in struct pirq, to avoid passing the number and a pointer to quite a number of functions. Note that ia64, the build of which is broken currently anyway, is only partially fixed up. Signed-off-by: Jan Beulich --- xen/include/xen/sched.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'xen/include/xen/sched.h') diff --git a/xen/include/xen/sched.h b/xen/include/xen/sched.h index 17fac57dfd..2adb3262af 100644 --- a/xen/include/xen/sched.h +++ b/xen/include/xen/sched.h @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -234,13 +235,11 @@ struct domain struct grant_table *grant_table; /* - * Interrupt to event-channel mappings. Updates should be protected by the - * domain's event-channel spinlock. Read accesses can also synchronise on - * the lock, but races don't usually matter. + * Interrupt to event-channel mappings and other per-guest-pirq data. + * Protected by the domain's event-channel spinlock. */ unsigned int nr_pirqs; - u16 *pirq_to_evtchn; - unsigned long *pirq_mask; + struct radix_tree_root pirq_tree; /* I/O capabilities (access to IRQs and memory-mapped I/O). */ struct rangeset *iomem_caps; -- cgit v1.2.3