[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 10/13] xen: introduce xen_event_channel_register_3level
On Mon, 2013-02-04 at 08:56 +0000, Jan Beulich wrote: > >>> On 31.01.13 at 15:47, Wei Liu <wei.liu2@xxxxxxxxxx> wrote: > > @@ -2123,6 +2126,97 @@ void xen_callback_vector(void) > > void xen_callback_vector(void) {} > > #endif > > > > +static int xen_event_channel_register_3level(void) > > +{ > > + evtchn_register_nlevel_t reg; > > + int i, cpu; > > + unsigned long *_evtchn_pending = NULL; > > + unsigned long *_evtchn_mask = NULL; > > + unsigned long *l2sel_mfns = NULL; > > + unsigned long *l2sel_offsets = NULL; > > + int rc; > > + > > + /* If we come from restore path, we don't need to allocate > > + * pages. > > + */ > > + if (!evtchn_pending && !evtchn_mask) { > > + evtchn_pending = > > + (unsigned long *)__get_free_pages(GFP_KERNEL, > > + BITMAP_PG_ORDER); > > + evtchn_mask = > > + (unsigned long *)__get_free_pages(GFP_KERNEL, > > + BITMAP_PG_ORDER); > > + if (!evtchn_pending || !evtchn_mask) { > > + free_pages((unsigned long)evtchn_pending, > > BITMAP_NR_PAGES); > > + free_pages((unsigned long)evtchn_mask, BITMAP_NR_PAGES); > > free_pages() takes an order just like __get_free_pages() does. Good catch, thanks! Wei. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |