Message ID | 20220401003847.38393-4-sstabellini@kernel.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | dom0less PV drivers | expand |
On 01.04.2022 02:38, Stefano Stabellini wrote: > From: Stefano Stabellini <stefano.stabellini@xilinx.com> > > It will be used during dom0less domains construction. > > Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com> I think this better wouldn't be a patch of its own. Functions should be non-static only when they have a user outside of their defining TU. > --- a/xen/include/xen/event.h > +++ b/xen/include/xen/event.h > @@ -71,6 +71,9 @@ void evtchn_free(struct domain *d, struct evtchn *chn); > /* Allocate a specific event channel port. */ > int evtchn_allocate_port(struct domain *d, unsigned int port); > > +/* Allocate a new event channel */ > +int evtchn_alloc_unbound(evtchn_alloc_unbound_t *alloc); I wonder whether while exposing it the function should also become __must_check. Jan
diff --git a/xen/common/event_channel.c b/xen/common/event_channel.c index ffb042a241..2f6a89f52d 100644 --- a/xen/common/event_channel.c +++ b/xen/common/event_channel.c @@ -289,7 +289,7 @@ void evtchn_free(struct domain *d, struct evtchn *chn) xsm_evtchn_close_post(chn); } -static int evtchn_alloc_unbound(evtchn_alloc_unbound_t *alloc) +int evtchn_alloc_unbound(evtchn_alloc_unbound_t *alloc) { struct evtchn *chn; struct domain *d; diff --git a/xen/include/xen/event.h b/xen/include/xen/event.h index 21c95e14fd..987e88623a 100644 --- a/xen/include/xen/event.h +++ b/xen/include/xen/event.h @@ -71,6 +71,9 @@ void evtchn_free(struct domain *d, struct evtchn *chn); /* Allocate a specific event channel port. */ int evtchn_allocate_port(struct domain *d, unsigned int port); +/* Allocate a new event channel */ +int evtchn_alloc_unbound(evtchn_alloc_unbound_t *alloc); + /* Unmask a local event-channel port. */ int evtchn_unmask(unsigned int port);