direct-io.hg

changeset 13814:ac465fc7c78f

linux: Zap /proc/interrupts count when a dynamic IRQ is unbound.
Signed-off-by: Keir Fraser <keir@xensource.com>
author Keir Fraser <keir@xensource.com>
date Wed Feb 07 00:39:48 2007 +0000 (2007-02-07)
parents 383ade1b0da4
children f28b144fb5cd
files linux-2.6-xen-sparse/drivers/xen/core/evtchn.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c	Tue Feb 06 23:36:53 2007 +0000
     1.2 +++ b/linux-2.6-xen-sparse/drivers/xen/core/evtchn.c	Wed Feb 07 00:39:48 2007 +0000
     1.3 @@ -424,7 +424,7 @@ static int bind_ipi_to_irq(unsigned int 
     1.4  static void unbind_from_irq(unsigned int irq)
     1.5  {
     1.6  	struct evtchn_close close;
     1.7 -	int evtchn = evtchn_from_irq(irq);
     1.8 +	int cpu, evtchn = evtchn_from_irq(irq);
     1.9  
    1.10  	spin_lock(&irq_mapping_update_lock);
    1.11  
    1.12 @@ -452,6 +452,10 @@ static void unbind_from_irq(unsigned int
    1.13  
    1.14  		evtchn_to_irq[evtchn] = -1;
    1.15  		irq_info[irq] = IRQ_UNBOUND;
    1.16 +
    1.17 +		/* Zap stats across IRQ changes of use. */
    1.18 +		for_each_possible_cpu(cpu)
    1.19 +			kstat_cpu(cpu).irqs[irq] = 0;
    1.20  	}
    1.21  
    1.22  	spin_unlock(&irq_mapping_update_lock);