[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [RFC PATCH 1/3] Xen: generalized event channel operations.
On 31/12/12 18:38, Wei Liu wrote: > Changeset description is too brief. Why is this change needed? > Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx> > --- > drivers/xen/events.c | 110 > ++++++++++++++++++++++++++++++++++---------------- > 1 file changed, 76 insertions(+), 34 deletions(-) > > diff --git a/drivers/xen/events.c b/drivers/xen/events.c > index 7595581..835101f 100644 > --- a/drivers/xen/events.c > +++ b/drivers/xen/events.c > @@ -51,6 +51,23 @@ > #include <xen/interface/hvm/hvm_op.h> > #include <xen/interface/hvm/params.h> > > +/* N-level event channel, starting from 2 */ > +static unsigned int evtchn_level = 2; > + > +struct evtchn_ops { > + unsigned long (*active_evtchns)(unsigned int, > + struct shared_info*, unsigned int); > + void (*clear_evtchn)(int); > + void (*set_evtchn)(int); > + int (*test_evtchn)(int); > + void (*mask_evtchn)(int); > + void (*unmask_evtchn)(int); > + int (*is_masked)(int); > + void (*xen_evtchn_do_upcall)(void); > + irqreturn_t (*xen_debug_interrupt)(int, void*); > +}; > +static struct evtchn_ops *eops; Suggest not using a pointer here to avoid the indirection. > + > /* > * This lock protects updates to the following mapping and reference-count > * arrays. The lock does not need to be acquired to read the mapping tables. > @@ -285,9 +302,9 @@ static bool pirq_needs_eoi_flag(unsigned irq) [...] > @@ -1783,12 +1809,28 @@ void xen_callback_vector(void) > void xen_callback_vector(void) {} > #endif > > +static struct evtchn_ops evtchn_ops_l2 __read_mostly = { const > + .active_evtchns = __active_evtchns_l2, > + .clear_evtchn = __clear_evtchn_l2, > + .set_evtchn = __set_evtchn_l2, > + .test_evtchn = __test_evtchn_l2, > + .mask_evtchn = __mask_evtchn_l2, > + .unmask_evtchn = __unmask_evtchn_l2, > + .is_masked = __is_masked_l2, > + .xen_evtchn_do_upcall = __xen_evtchn_do_upcall_l2, > + .xen_debug_interrupt = __xen_debug_interrupt_l2, > +}; David _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |