All of lore.kernel.org
 help / color / mirror / Atom feed
* virt_irq_{alloc,free} inconsistency with no MSI
@ 2007-02-16 10:30 Meelis Roos
  2007-02-19  8:31 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Meelis Roos @ 2007-02-16 10:30 UTC (permalink / raw)
  To: sparclinux

While investigating this (with current -git for sun4u and no 
CONFIG_PCI_MSI)

  CC      arch/sparc64/kernel/irq.o
cc1: warnings being treated as errors
arch/sparc64/kernel/irq.c:113: warning: 'virt_irq_free' defined but not used

I found that virt_irq_free() is used only if CONFIG_PCI_MSI is defined 
(for sun4v - simple to cure with a define), but virt_irq_alloc() is used 
even without MSI enabled. Is this really correct? Do we alloc and not 
free it in this case?

-- 
Meelis Roos (mroos@linux.ee)

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

* Re: virt_irq_{alloc,free} inconsistency with no MSI
  2007-02-16 10:30 virt_irq_{alloc,free} inconsistency with no MSI Meelis Roos
@ 2007-02-19  8:31 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2007-02-19  8:31 UTC (permalink / raw)
  To: sparclinux

From: Meelis Roos <mroos@linux.ee>
Date: Fri, 16 Feb 2007 12:30:56 +0200 (EET)

> While investigating this (with current -git for sun4u and no 
> CONFIG_PCI_MSI)
> 
>   CC      arch/sparc64/kernel/irq.o
> cc1: warnings being treated as errors
> arch/sparc64/kernel/irq.c:113: warning: 'virt_irq_free' defined but not used
> 
> I found that virt_irq_free() is used only if CONFIG_PCI_MSI is defined 
> (for sun4v - simple to cure with a define), but virt_irq_alloc() is used 
> even without MSI enabled. Is this really correct? Do we alloc and not 
> free it in this case?

Yes, it is true :-)  We allocate all the interrupts needed for the
entire system as we probe the busses and devices.

But with MSI, the MSI vectors are allocated and liberated with
pci_enable_msi()/pci_disable_msi() and related calls.

I'll add the necessary ifdefs, thanks for the report.

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

end of thread, other threads:[~2007-02-19  8:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-02-16 10:30 virt_irq_{alloc,free} inconsistency with no MSI Meelis Roos
2007-02-19  8:31 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.