ia64/xen-unstable

changeset 18354:1ea9dd2c7331

PV-on-HVM: unmask_evtchn() must always use hypercall.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
author Keir Fraser <keir.fraser@citrix.com>
date Thu Aug 21 09:51:46 2008 +0100 (2008-08-21)
parents 598d92a5ae7a
children 1e99ba540356
files unmodified_drivers/linux-2.6/platform-pci/evtchn.c
line diff
     1.1 --- a/unmodified_drivers/linux-2.6/platform-pci/evtchn.c	Wed Aug 20 14:45:21 2008 +0100
     1.2 +++ b/unmodified_drivers/linux-2.6/platform-pci/evtchn.c	Thu Aug 21 09:51:46 2008 +0100
     1.3 @@ -107,39 +107,8 @@ EXPORT_SYMBOL(mask_evtchn);
     1.4  
     1.5  void unmask_evtchn(int port)
     1.6  {
     1.7 -	unsigned int cpu;
     1.8 -	shared_info_t *s = shared_info_area;
     1.9 -	vcpu_info_t *vcpu_info;
    1.10 -
    1.11 -	cpu = get_cpu();
    1.12 -	vcpu_info = &s->vcpu_info[cpu];
    1.13 -
    1.14 -	/* Slow path (hypercall) if this is a non-local port.  We only
    1.15 -	   ever bind event channels to vcpu 0 in HVM guests. */
    1.16 -	if (unlikely(cpu != 0)) {
    1.17 -		evtchn_unmask_t op = { .port = port };
    1.18 -		VOID(HYPERVISOR_event_channel_op(EVTCHNOP_unmask,
    1.19 -						 &op));
    1.20 -		put_cpu();
    1.21 -		return;
    1.22 -	}
    1.23 -
    1.24 -	synch_clear_bit(port, &s->evtchn_mask[0]);
    1.25 -
    1.26 -	/*
    1.27 -	 * The following is basically the equivalent of
    1.28 -	 * 'hw_resend_irq'. Just like a real IO-APIC we 'lose the
    1.29 -	 * interrupt edge' if the channel is masked.
    1.30 -	 */
    1.31 -	if (synch_test_bit(port, &s->evtchn_pending[0]) &&
    1.32 -	    !synch_test_and_set_bit(port / BITS_PER_LONG,
    1.33 -				    &vcpu_info->evtchn_pending_sel)) {
    1.34 -		vcpu_info->evtchn_upcall_pending = 1;
    1.35 -		if (!vcpu_info->evtchn_upcall_mask)
    1.36 -			force_evtchn_callback();
    1.37 -	}
    1.38 -
    1.39 -	put_cpu();
    1.40 +	evtchn_unmask_t op = { .port = port };
    1.41 +	VOID(HYPERVISOR_event_channel_op(EVTCHNOP_unmask, &op));
    1.42  }
    1.43  EXPORT_SYMBOL(unmask_evtchn);
    1.44  
    1.45 @@ -357,12 +326,6 @@ static irqreturn_t evtchn_interrupt(int 
    1.46  	return IRQ_HANDLED;
    1.47  }
    1.48  
    1.49 -void force_evtchn_callback(void)
    1.50 -{
    1.51 -	VOID(HYPERVISOR_xen_version(0, NULL));
    1.52 -}
    1.53 -EXPORT_SYMBOL(force_evtchn_callback);
    1.54 -
    1.55  void irq_resume(void)
    1.56  {
    1.57  	int evtchn, irq;