Re: [PATCH v3 2/4] genirq: Inform handler about line sharing state

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 13 Dec 2010, Jan Kiszka wrote:
> @@ -943,6 +950,9 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id)
>  	/* Make sure it's not being used on another CPU: */
>  	synchronize_irq(irq);
>  
> +	if (single_handler)
> +		desc->irq_data.drv_status &= ~IRQS_SHARED;
> +

What's the reason to clear this flag outside of the desc->lock held
region. I need this status for other purposes as well, where I
definitely need serialization.

> +	mutex_lock(&register_lock);
> +
> +	old_action = desc->action;
> +	if (old_action && (old_action->flags & IRQF_ADAPTIVE) &&
> +	    !(desc->irq_data.drv_status & IRQS_SHARED)) {
> +		/*
> +		 * Signal the old handler that is has to switch to shareable
> +		 * handling mode. Disable the line to avoid any conflict with
> +		 * a real IRQ.
> +		 */
> +		disable_irq(irq);
> +		local_irq_disable();
> +
> +		desc->irq_data.drv_status |= IRQS_SHARED | IRQS_MAKE_SHAREABLE;

Unserialized access as well. Will think about it.

> +		old_action->handler(irq, old_action->dev_id);
> +		desc->irq_data.drv_status &= ~IRQS_MAKE_SHAREABLE;

Thanks,

	tglx
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux