[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Minios-devel] [UNIKRAFT PATCH v3 2/4] plat/xen/common: Move event channel functions in events.h
From: Radu Nicolau <radunicolau102@xxxxxxxxx> Move mask_evtchn, unmask_evtchn and clear_evtchn function prototypes from hypervisor.h to events.h. Change parameter type to evtchn_port_t. Remove hypervisor.h inclusion from arm/arch_events.c and arm/arch_time.c Signed-off-by: Radu Nicolau <radunicolau102@xxxxxxxxx> --- plat/xen/arm/arch_events.c | 1 - plat/xen/arm/arch_time.c | 1 - plat/xen/events.c | 8 +++----- plat/xen/include/common/events.h | 16 ++++++++++++++++ plat/xen/include/common/hypervisor.h | 3 --- 5 files changed, 19 insertions(+), 10 deletions(-) diff --git a/plat/xen/arm/arch_events.c b/plat/xen/arm/arch_events.c index 91f0ecb..2037aca 100644 --- a/plat/xen/arm/arch_events.c +++ b/plat/xen/arm/arch_events.c @@ -26,7 +26,6 @@ #include <xen-arm/os.h> #include <common/events.h> -#include <common/hypervisor.h> #include <uk/print.h> #include <uk/assert.h> #include <uk/essentials.h> diff --git a/plat/xen/arm/arch_time.c b/plat/xen/arm/arch_time.c index c5d4551..fec89da 100644 --- a/plat/xen/arm/arch_time.c +++ b/plat/xen/arm/arch_time.c @@ -25,7 +25,6 @@ */ #include <xen-arm/os.h> -#include <common/hypervisor.h> #include <common/events.h> #include <xen-arm/traps.h> #include <uk/print.h> diff --git a/plat/xen/events.c b/plat/xen/events.c index 6df3e4b..3a1d155 100644 --- a/plat/xen/events.c +++ b/plat/xen/events.c @@ -291,16 +291,14 @@ int evtchn_get_peercontext(evtchn_port_t local_port, char *ctx, int size) return rc; } -/* TODO - these were moved from hypervisor.c; integrate into evtchn */ - -inline void mask_evtchn(uint32_t port) +inline void mask_evtchn(evtchn_port_t port) { shared_info_t *s = HYPERVISOR_shared_info; uk_set_bit(port, &s->evtchn_mask[0]); } -inline void unmask_evtchn(uint32_t port) +inline void unmask_evtchn(evtchn_port_t port) { shared_info_t *s = HYPERVISOR_shared_info; vcpu_info_t *vcpu_info = &s->vcpu_info[smp_processor_id()]; @@ -323,7 +321,7 @@ inline void unmask_evtchn(uint32_t port) } } -inline void clear_evtchn(uint32_t port) +inline void clear_evtchn(evtchn_port_t port) { shared_info_t *s = HYPERVISOR_shared_info; diff --git a/plat/xen/include/common/events.h b/plat/xen/include/common/events.h index 971dff9..f5d8661 100644 --- a/plat/xen/include/common/events.h +++ b/plat/xen/include/common/events.h @@ -65,6 +65,22 @@ evtchn_port_t bind_pirq(uint32_t pirq, int will_share, evtchn_port_t bind_evtchn(evtchn_port_t port, evtchn_handler_t handler, void *data); void unbind_evtchn(evtchn_port_t port); + +/* Disable events for <port> by setting the masking bit */ +void mask_evtchn(evtchn_port_t port); + +/* + * Enable events for <port> by unsetting the masking bit. + * If pending events are present, call ukplat_lcpu_irqs_handle_pending + */ +void unmask_evtchn(evtchn_port_t port); + +/* + * Clear pending events from <port> by unsetting the pending + * events bit + */ +void clear_evtchn(evtchn_port_t port); + void init_events(void); int evtchn_alloc_unbound(domid_t pal, evtchn_handler_t handler, void *data, evtchn_port_t *port); diff --git a/plat/xen/include/common/hypervisor.h b/plat/xen/include/common/hypervisor.h index 4587b86..417498e 100644 --- a/plat/xen/include/common/hypervisor.h +++ b/plat/xen/include/common/hypervisor.h @@ -71,9 +71,6 @@ shared_info_t *map_shared_info(void *p); //TODO START from here on we have to cleanup/refactor/move stuff /* hypervisor.c */ void do_hypervisor_callback(struct __regs *regs); -void mask_evtchn(uint32_t port); -void unmask_evtchn(uint32_t port); -void clear_evtchn(uint32_t port); //TODO END extern int in_callback; -- 2.7.4 _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |