From mboxrd@z Thu Jan 1 00:00:00 1970 From: Konrad Rzeszutek Wilk Subject: Re: [PATCH 07/13] xen: generalized event channel operations Date: Tue, 5 Feb 2013 12:19:49 -0500 Message-ID: <20130205171938.GI2187@konrad-lan.dumpdata.com> References: <1359643627-29486-1-git-send-email-wei.liu2@citrix.com> <1359643627-29486-8-git-send-email-wei.liu2@citrix.com> <20130205170430.GF2187@konrad-lan.dumpdata.com> <1360084131.7477.156.camel@zion.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1360084131.7477.156.camel@zion.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Wei Liu Cc: David Vrabel , Ian Campbell , "jbeulich@suse.com" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Tue, Feb 05, 2013 at 05:08:51PM +0000, Wei Liu wrote: > On Tue, 2013-02-05 at 17:04 +0000, Konrad Rzeszutek Wilk wrote: > > On Thu, Jan 31, 2013 at 02:47:01PM +0000, Wei Liu wrote: > > > Use global pointers in common operations to allow for better code sharing > > > between N-level event channel. > > > > > > Functions which are not suitable for sharing are also taken care of. > > > > > > Also update drivers/xen/evtchn.c to use exported variable instead of macro. > > > > > > Signed-off-by: Wei Liu > > > --- > > > drivers/xen/events.c | 180 ++++++++++++++++++++++++++++++++------------------ > > > drivers/xen/evtchn.c | 12 ++-- > > > include/xen/events.h | 2 + > > > 3 files changed, 123 insertions(+), 71 deletions(-) > > > > > > diff --git a/drivers/xen/events.c b/drivers/xen/events.c > > > index 0679d27..4820a52 100644 > > > --- a/drivers/xen/events.c > > > +++ b/drivers/xen/events.c > > > @@ -51,6 +51,16 @@ > > > #include > > > #include > > > > > > +/* N-level event channel, starting from 2 */ > > > +unsigned int evtchn_level = 2; > > > > What if the hypervisor does not support that? Shouldn't be by default > > at 1? > > > > the default implementation is 2 level. ;-) I am looking at evtchn_pending and evtchn_mask in the 'struct shared_info' (include/xen/interface/xen.h) and it is not obvious from that. What am I missing? > > > > +EXPORT_SYMBOL_GPL(evtchn_level); > > > > Prefix it please with 'xen' > > > > > +unsigned int nr_event_channels; > > > +EXPORT_SYMBOL_GPL(nr_event_channels); > > > > Ditto here. > > > > NP. > > > Wei. > >