public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* acpi-devel@lists.sourceforge.net, linux-ia64@vger.kernel.orgRe: [PATCH] Updated patches for PCI IRQ resource deallocation support [3/3]
       [not found] <2HRhX-6Ad-21@gated-at.bofh.it>
@ 2004-09-25 11:46 ` Zwane Mwaikambo
  2004-09-25 15:00   ` Zwane Mwaikambo
  0 siblings, 1 reply; 3+ messages in thread
From: Zwane Mwaikambo @ 2004-09-25 11:46 UTC (permalink / raw)
  To: Kenji Kaneshige
  Cc: Linux Kernel, Greg Kroah-Hartmann, Len Brown, tony.luck,
	Andrew Morton, Linux Kernel

Hello Kenji,

On Fri, 24 Sep 2004, Kenji Kaneshige wrote:

> +		/*
> +		 * If interrupt handlers still exists on the irq
> +		 * associated with the gsi, don't unregister the
> +		 * interrupt.
> +		 */
> +		if (unlikely(idesc->action)) {
> +			iosapic_intr_info[vector].refcnt++;
> +			spin_unlock_irqrestore(&idesc->lock, flags);
> +			printk(KERN_WARNING "Cannot unregister GSI. IRQ %u is still in use.\n", irq);
> +			return;
> +		}
> +
> +		/* Clear the interrupt controller descriptor. */
> +		idesc->handler = &no_irq_type;

Hmm, what happens here if that vector was queued just before the local irq 
disable in spin_lock_irqsave(idesc->lock...) ? Then when we unlock we'll 
call do_IRQ to handle the irq associated with that vector. I haven't seen 
the usage but it appears that iosapic_unregister_intr requires some 
serialisation.

Thanks,
	Zwane

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: acpi-devel@lists.sourceforge.net, linux-ia64@vger.kernel.orgRe: [PATCH] Updated patches for PCI IRQ resource deallocation support [3/3]
  2004-09-25 11:46 ` acpi-devel@lists.sourceforge.net, linux-ia64@vger.kernel.orgRe: [PATCH] Updated patches for PCI IRQ resource deallocation support [3/3] Zwane Mwaikambo
@ 2004-09-25 15:00   ` Zwane Mwaikambo
  2004-09-27  6:08     ` Kenji Kaneshige
  0 siblings, 1 reply; 3+ messages in thread
From: Zwane Mwaikambo @ 2004-09-25 15:00 UTC (permalink / raw)
  To: Kenji Kaneshige
  Cc: Linux Kernel, Greg Kroah-Hartmann, Len Brown, tony.luck,
	Andrew Morton, Linux Kernel

On Sat, 25 Sep 2004, Zwane Mwaikambo wrote:

> Hmm, what happens here if that vector was queued just before the local irq 
> disable in spin_lock_irqsave(idesc->lock...) ? Then when we unlock we'll 
> call do_IRQ to handle the irq associated with that vector. I haven't seen 
> the usage but it appears that iosapic_unregister_intr requires some 
> serialisation.

Ignore this, i misread some of the code.

Thanks Kenji,
	Zwane

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: acpi-devel@lists.sourceforge.net, linux-ia64@vger.kernel.orgRe: [PATCH] Updated patches for PCI IRQ resource deallocation support [3/3]
  2004-09-25 15:00   ` Zwane Mwaikambo
@ 2004-09-27  6:08     ` Kenji Kaneshige
  0 siblings, 0 replies; 3+ messages in thread
From: Kenji Kaneshige @ 2004-09-27  6:08 UTC (permalink / raw)
  To: Zwane Mwaikambo
  Cc: Linux Kernel, Greg Kroah-Hartmann, Len Brown, tony.luck,
	Andrew Morton

Zwane Mwaikambo wrote:

> On Sat, 25 Sep 2004, Zwane Mwaikambo wrote:
> 
>> Hmm, what happens here if that vector was queued just before the local irq 
>> disable in spin_lock_irqsave(idesc->lock...) ? Then when we unlock we'll 
>> call do_IRQ to handle the irq associated with that vector. I haven't seen 
>> the usage but it appears that iosapic_unregister_intr requires some 
>> serialisation.
> 
> Ignore this, i misread some of the code.
> 
> Thanks Kenji,
> 	Zwane
> 

OK.
BTW, I was able to find a bug thanks to your comment :-)
The following 'spin_lock(&iosapic_lock)' was missing. I'll update
the patch.

	if (unlikely(idesc->action)) {
		iosapic_intr_info[vector].refcnt++;
MISSING =>	spin_unlock(&iosapic_lock);
		spin_unlock_irqrestore(&idesc->lock, flags);
		printk(KERN_WARNING "Cannot unregister GSI. IRQ %u is still in use.\n", irq);
		return;
	}

Thanks,
Kenji Kaneshige



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-09-27  6:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <2HRhX-6Ad-21@gated-at.bofh.it>
2004-09-25 11:46 ` acpi-devel@lists.sourceforge.net, linux-ia64@vger.kernel.orgRe: [PATCH] Updated patches for PCI IRQ resource deallocation support [3/3] Zwane Mwaikambo
2004-09-25 15:00   ` Zwane Mwaikambo
2004-09-27  6:08     ` Kenji Kaneshige

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox