[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH 7/7] mini-os: Moved force_evtchn_callback to header
From: Karim Raslan <karim.allah.ahmed@xxxxxxxxx> Signed-off-by: Karim Allah Ahmed <karim.allah.ahmed@xxxxxxxxx> [talex5@xxxxxxxxx: separated from big ARM commit] Signed-off-by: Thomas Leonard <talex5@xxxxxxxxx> --- extras/mini-os/hypervisor.c | 20 +------------------- extras/mini-os/include/hypervisor.h | 1 - extras/mini-os/include/x86/os.h | 17 +++++++++++++++++ 3 files changed, 18 insertions(+), 20 deletions(-) diff --git a/extras/mini-os/hypervisor.c b/extras/mini-os/hypervisor.c index b4688a0..9c79d5d 100644 --- a/extras/mini-os/hypervisor.c +++ b/extras/mini-os/hypervisor.c @@ -71,23 +71,6 @@ void do_hypervisor_callback(struct pt_regs *regs) in_callback = 0; } -void force_evtchn_callback(void) -{ - int save; - vcpu_info_t *vcpu; - vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()]; - save = vcpu->evtchn_upcall_mask; - - while (vcpu->evtchn_upcall_pending) { - vcpu->evtchn_upcall_mask = 1; - barrier(); - do_hypervisor_callback(NULL); - barrier(); - vcpu->evtchn_upcall_mask = save; - barrier(); - }; -} - inline void mask_evtchn(uint32_t port) { shared_info_t *s = HYPERVISOR_shared_info; @@ -110,8 +93,7 @@ inline void unmask_evtchn(uint32_t port) &vcpu_info->evtchn_pending_sel) ) { vcpu_info->evtchn_upcall_pending = 1; - if ( !vcpu_info->evtchn_upcall_mask ) - force_evtchn_callback(); + force_evtchn_callback(); } } diff --git a/extras/mini-os/include/hypervisor.h b/extras/mini-os/include/hypervisor.h index a62cb78..9e9cac8 100644 --- a/extras/mini-os/include/hypervisor.h +++ b/extras/mini-os/include/hypervisor.h @@ -35,7 +35,6 @@ extern union start_info_union start_info_union; #define start_info (start_info_union.start_info) /* hypervisor.c */ -void force_evtchn_callback(void); void do_hypervisor_callback(struct pt_regs *regs); void mask_evtchn(uint32_t port); void unmask_evtchn(uint32_t port); diff --git a/extras/mini-os/include/x86/os.h b/extras/mini-os/include/x86/os.h index 73b8297..8eea1be 100644 --- a/extras/mini-os/include/x86/os.h +++ b/extras/mini-os/include/x86/os.h @@ -160,6 +160,23 @@ do { \ */ typedef struct { volatile int counter; } atomic_t; +static inline void force_evtchn_callback(void) +{ + int save; + vcpu_info_t *vcpu; + vcpu = &HYPERVISOR_shared_info->vcpu_info[smp_processor_id()]; + save = vcpu->evtchn_upcall_mask; + + while (vcpu->evtchn_upcall_pending) { + vcpu->evtchn_upcall_mask = 1; + barrier(); + do_hypervisor_callback(NULL); + barrier(); + vcpu->evtchn_upcall_mask = save; + barrier(); + }; +} + /************************** i386 *******************************/ #ifdef __INSIDE_MINIOS__ -- 2.0.0 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |