* [PATCH] x86 PCI: Do not use interrupt links for devices using MSI-X
@ 2009-01-04 22:08 Rafael J. Wysocki
2009-01-05 13:04 ` Ingo Molnar
2009-01-06 17:19 ` Bjorn Helgaas
0 siblings, 2 replies; 11+ messages in thread
From: Rafael J. Wysocki @ 2009-01-04 22:08 UTC (permalink / raw)
To: Ingo Molnar, Jesse Barnes; +Cc: LKML, Linux PCI
From: Rafael J. Wysocki <rjw@sisk.pl>
pcibios_enable_device() and pcibios_disable_device() don't handle
IRQs for devices that have MSI enabled and it should tread the
devices with MSI-X enabled in the same way.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
arch/x86/pci/common.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Index: linux-2.6/arch/x86/pci/common.c
===================================================================
--- linux-2.6.orig/arch/x86/pci/common.c
+++ linux-2.6/arch/x86/pci/common.c
@@ -551,14 +551,14 @@ int pcibios_enable_device(struct pci_dev
if ((err = pci_enable_resources(dev, mask)) < 0)
return err;
- if (!dev->msi_enabled)
+ if (!dev->msi_enabled && !dev->msix_enabled)
return pcibios_enable_irq(dev);
return 0;
}
void pcibios_disable_device (struct pci_dev *dev)
{
- if (!dev->msi_enabled && pcibios_disable_irq)
+ if (!dev->msi_enabled && !dev->msix_enabled && pcibios_disable_irq)
pcibios_disable_irq(dev);
}
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86 PCI: Do not use interrupt links for devices using MSI-X
2009-01-04 22:08 [PATCH] x86 PCI: Do not use interrupt links for devices using MSI-X Rafael J. Wysocki
@ 2009-01-05 13:04 ` Ingo Molnar
2009-01-05 13:50 ` Rafael J. Wysocki
2009-01-05 19:53 ` Jesse Barnes
2009-01-06 17:19 ` Bjorn Helgaas
1 sibling, 2 replies; 11+ messages in thread
From: Ingo Molnar @ 2009-01-05 13:04 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Jesse Barnes, LKML, Linux PCI, H. Peter Anvin, Thomas Gleixner
* Rafael J. Wysocki <rjw@sisk.pl> wrote:
> From: Rafael J. Wysocki <rjw@sisk.pl>
>
> pcibios_enable_device() and pcibios_disable_device() don't handle
> IRQs for devices that have MSI enabled and it should tread the
s/tread/treat
> devices with MSI-X enabled in the same way.
>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> ---
> arch/x86/pci/common.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
looks good - Jesse, what do you think?
Rafael, i'm curious is this in response to some regression/bug? Did some
box or driver get confused by us enabling/disabling the GSI? Some IRQ
flood perhaps?
btw., there's a small observation:
> + if (!dev->msi_enabled && !dev->msix_enabled)
maybe a "pci_has_gsi_irq()" wrapper would make these checks cleaner and
would make things more robust, should there be any new IRQ delivery method
be introduced in the future?
Ingo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86 PCI: Do not use interrupt links for devices using MSI-X
2009-01-05 13:04 ` Ingo Molnar
@ 2009-01-05 13:50 ` Rafael J. Wysocki
2009-01-05 19:55 ` Jesse Barnes
2009-01-05 19:53 ` Jesse Barnes
1 sibling, 1 reply; 11+ messages in thread
From: Rafael J. Wysocki @ 2009-01-05 13:50 UTC (permalink / raw)
To: Ingo Molnar
Cc: Jesse Barnes, LKML, Linux PCI, H. Peter Anvin, Thomas Gleixner
On Monday 05 January 2009, Ingo Molnar wrote:
>
> * Rafael J. Wysocki <rjw@sisk.pl> wrote:
>
> > From: Rafael J. Wysocki <rjw@sisk.pl>
> >
> > pcibios_enable_device() and pcibios_disable_device() don't handle
> > IRQs for devices that have MSI enabled and it should tread the
>
> s/tread/treat
Ah, thanks.
> > devices with MSI-X enabled in the same way.
> >
> > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> > ---
> > arch/x86/pci/common.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
>
> looks good - Jesse, what do you think?
>
> Rafael, i'm curious is this in response to some regression/bug? Did some
> box or driver get confused by us enabling/disabling the GSI? Some IRQ
> flood perhaps?
Well, I don't have any MSI-X capable boxes around. :-)
I was just reviewing the code and spotted this.
> btw., there's a small observation:
>
> > + if (!dev->msi_enabled && !dev->msix_enabled)
>
> maybe a "pci_has_gsi_irq()" wrapper would make these checks cleaner and
> would make things more robust, should there be any new IRQ delivery method
> be introduced in the future?
Well, perhaps something like the patch below?
Thanks,
Rafael
---
Subject: x86 PCI: Do not use interrupt links for devices using MSI-X (rev. 2)
From: Rafael J. Wysocki <rjw@sisk.pl>
pcibios_enable_device() and pcibios_disable_device() don't handle
IRQs for devices that have MSI enabled and it should treat the
devices with MSI-X enabled in the same way.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
arch/x86/pci/common.c | 4 ++--
include/linux/pci.h | 9 +++++++++
2 files changed, 11 insertions(+), 2 deletions(-)
Index: linux-2.6/arch/x86/pci/common.c
===================================================================
--- linux-2.6.orig/arch/x86/pci/common.c
+++ linux-2.6/arch/x86/pci/common.c
@@ -551,14 +551,14 @@ int pcibios_enable_device(struct pci_dev
if ((err = pci_enable_resources(dev, mask)) < 0)
return err;
- if (!dev->msi_enabled)
+ if (!pci_msi_enabled(dev))
return pcibios_enable_irq(dev);
return 0;
}
void pcibios_disable_device (struct pci_dev *dev)
{
- if (!dev->msi_enabled && pcibios_disable_irq)
+ if (!pci_msi_enabled(dev) && pcibios_disable_irq)
pcibios_disable_irq(dev);
}
Index: linux-2.6/include/linux/pci.h
===================================================================
--- linux-2.6.orig/include/linux/pci.h
+++ linux-2.6/include/linux/pci.h
@@ -274,6 +274,15 @@ static inline void pci_add_saved_cap(str
hlist_add_head(&new_cap->next, &pci_dev->saved_cap_space);
}
+#ifdef CONFIG_PCI_MSI
+static inline bool pci_msi_enabled(struct pci_dev *pci_dev)
+{
+ return dev->msi_enabled || dev->msix_enabled;
+}
+#else
+static inline bool pci_msi_enabled(struct pci_dev *pci_dev) { return false; }
+#endif
+
/*
* For PCI devices, the region numbers are assigned this way:
*
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86 PCI: Do not use interrupt links for devices using MSI-X
2009-01-05 13:04 ` Ingo Molnar
2009-01-05 13:50 ` Rafael J. Wysocki
@ 2009-01-05 19:53 ` Jesse Barnes
2009-01-07 13:13 ` Ingo Molnar
1 sibling, 1 reply; 11+ messages in thread
From: Jesse Barnes @ 2009-01-05 19:53 UTC (permalink / raw)
To: Ingo Molnar
Cc: Rafael J. Wysocki, LKML, Linux PCI, H. Peter Anvin,
Thomas Gleixner
On Monday, January 5, 2009 5:04 am Ingo Molnar wrote:
> * Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > From: Rafael J. Wysocki <rjw@sisk.pl>
> >
> > pcibios_enable_device() and pcibios_disable_device() don't handle
> > IRQs for devices that have MSI enabled and it should tread the
>
> s/tread/treat
>
> > devices with MSI-X enabled in the same way.
> >
> > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> > ---
> > arch/x86/pci/common.c | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
>
> looks good - Jesse, what do you think?
Yeah, seems obviously correct, I'll queue it up.
> Rafael, i'm curious is this in response to some regression/bug? Did some
> box or driver get confused by us enabling/disabling the GSI? Some IRQ
> flood perhaps?
>
> btw., there's a small observation:
> > + if (!dev->msi_enabled && !dev->msix_enabled)
>
> maybe a "pci_has_gsi_irq()" wrapper would make these checks cleaner and
> would make things more robust, should there be any new IRQ delivery method
> be introduced in the future?
pci_has_msi_irq surely? Otherwise we'll catch pretty much everything? Or did
you mean !pci_has_gsi_irq() here instead?
Thanks,
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86 PCI: Do not use interrupt links for devices using MSI-X
2009-01-05 13:50 ` Rafael J. Wysocki
@ 2009-01-05 19:55 ` Jesse Barnes
0 siblings, 0 replies; 11+ messages in thread
From: Jesse Barnes @ 2009-01-05 19:55 UTC (permalink / raw)
To: Rafael J. Wysocki
Cc: Ingo Molnar, LKML, Linux PCI, H. Peter Anvin, Thomas Gleixner
On Monday, January 5, 2009 5:50 am Rafael J. Wysocki wrote:
> On Monday 05 January 2009, Ingo Molnar wrote:
> > * Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > > From: Rafael J. Wysocki <rjw@sisk.pl>
> > >
> > > pcibios_enable_device() and pcibios_disable_device() don't handle
> > > IRQs for devices that have MSI enabled and it should tread the
> >
> > s/tread/treat
>
> Ah, thanks.
>
> > > devices with MSI-X enabled in the same way.
> > >
> > > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> > > ---
> > > arch/x86/pci/common.c | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > looks good - Jesse, what do you think?
> >
> > Rafael, i'm curious is this in response to some regression/bug? Did some
> > box or driver get confused by us enabling/disabling the GSI? Some IRQ
> > flood perhaps?
>
> Well, I don't have any MSI-X capable boxes around. :-)
>
> I was just reviewing the code and spotted this.
>
> > btw., there's a small observation:
> > > + if (!dev->msi_enabled && !dev->msix_enabled)
> >
> > maybe a "pci_has_gsi_irq()" wrapper would make these checks cleaner and
> > would make things more robust, should there be any new IRQ delivery
> > method be introduced in the future?
>
> Well, perhaps something like the patch below?
>
> Thanks,
> Rafael
>
> ---
> Subject: x86 PCI: Do not use interrupt links for devices using MSI-X (rev.
> 2) From: Rafael J. Wysocki <rjw@sisk.pl>
>
> pcibios_enable_device() and pcibios_disable_device() don't handle
> IRQs for devices that have MSI enabled and it should treat the
> devices with MSI-X enabled in the same way.
>
> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Looks good, applied this one.
Thanks,
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86 PCI: Do not use interrupt links for devices using MSI-X
2009-01-04 22:08 [PATCH] x86 PCI: Do not use interrupt links for devices using MSI-X Rafael J. Wysocki
2009-01-05 13:04 ` Ingo Molnar
@ 2009-01-06 17:19 ` Bjorn Helgaas
2009-01-06 19:45 ` Rafael J. Wysocki
1 sibling, 1 reply; 11+ messages in thread
From: Bjorn Helgaas @ 2009-01-06 17:19 UTC (permalink / raw)
To: Rafael J. Wysocki; +Cc: Ingo Molnar, Jesse Barnes, LKML, Linux PCI
On Sunday 04 January 2009 03:08:42 pm Rafael J. Wysocki wrote:
> pcibios_enable_device() and pcibios_disable_device() don't handle
> IRQs for devices that have MSI enabled and it should tread the
> devices with MSI-X enabled in the same way.
There are other places that need similar fixes, too, aren't there?
I see cris, frv, ia64, and a driver or two testing dev->msi_enabled.
> --- linux-2.6.orig/arch/x86/pci/common.c
> +++ linux-2.6/arch/x86/pci/common.c
> @@ -551,14 +551,14 @@ int pcibios_enable_device(struct pci_dev
> if ((err = pci_enable_resources(dev, mask)) < 0)
> return err;
>
> - if (!dev->msi_enabled)
> + if (!dev->msi_enabled && !dev->msix_enabled)
> return pcibios_enable_irq(dev);
> return 0;
> }
>
> void pcibios_disable_device (struct pci_dev *dev)
> {
> - if (!dev->msi_enabled && pcibios_disable_irq)
> + if (!dev->msi_enabled && !dev->msix_enabled && pcibios_disable_irq)
> pcibios_disable_irq(dev);
> }
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86 PCI: Do not use interrupt links for devices using MSI-X
2009-01-06 17:19 ` Bjorn Helgaas
@ 2009-01-06 19:45 ` Rafael J. Wysocki
0 siblings, 0 replies; 11+ messages in thread
From: Rafael J. Wysocki @ 2009-01-06 19:45 UTC (permalink / raw)
To: Bjorn Helgaas; +Cc: Ingo Molnar, Jesse Barnes, LKML, Linux PCI
On Tuesday 06 January 2009, Bjorn Helgaas wrote:
> On Sunday 04 January 2009 03:08:42 pm Rafael J. Wysocki wrote:
> > pcibios_enable_device() and pcibios_disable_device() don't handle
> > IRQs for devices that have MSI enabled and it should tread the
> > devices with MSI-X enabled in the same way.
>
> There are other places that need similar fixes, too, aren't there?
> I see cris, frv, ia64, and a driver or two testing dev->msi_enabled.
Well, I didn't look at the other places, just found this one while reviewing
the code.
I'll check them later this week.
> > --- linux-2.6.orig/arch/x86/pci/common.c
> > +++ linux-2.6/arch/x86/pci/common.c
> > @@ -551,14 +551,14 @@ int pcibios_enable_device(struct pci_dev
> > if ((err = pci_enable_resources(dev, mask)) < 0)
> > return err;
> >
> > - if (!dev->msi_enabled)
> > + if (!dev->msi_enabled && !dev->msix_enabled)
> > return pcibios_enable_irq(dev);
> > return 0;
> > }
> >
> > void pcibios_disable_device (struct pci_dev *dev)
> > {
> > - if (!dev->msi_enabled && pcibios_disable_irq)
> > + if (!dev->msi_enabled && !dev->msix_enabled && pcibios_disable_irq)
> > pcibios_disable_irq(dev);
> > }
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86 PCI: Do not use interrupt links for devices using MSI-X
2009-01-05 19:53 ` Jesse Barnes
@ 2009-01-07 13:13 ` Ingo Molnar
2009-01-07 17:33 ` Jesse Barnes
0 siblings, 1 reply; 11+ messages in thread
From: Ingo Molnar @ 2009-01-07 13:13 UTC (permalink / raw)
To: Jesse Barnes
Cc: Rafael J. Wysocki, LKML, Linux PCI, H. Peter Anvin,
Thomas Gleixner
* Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> On Monday, January 5, 2009 5:04 am Ingo Molnar wrote:
> > * Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > > From: Rafael J. Wysocki <rjw@sisk.pl>
> > >
> > > pcibios_enable_device() and pcibios_disable_device() don't handle
> > > IRQs for devices that have MSI enabled and it should tread the
> >
> > s/tread/treat
> >
> > > devices with MSI-X enabled in the same way.
> > >
> > > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> > > ---
> > > arch/x86/pci/common.c | 4 ++--
> > > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > looks good - Jesse, what do you think?
>
> Yeah, seems obviously correct, I'll queue it up.
>
> > Rafael, i'm curious is this in response to some regression/bug? Did some
> > box or driver get confused by us enabling/disabling the GSI? Some IRQ
> > flood perhaps?
> >
> > btw., there's a small observation:
> > > + if (!dev->msi_enabled && !dev->msix_enabled)
> >
> > maybe a "pci_has_gsi_irq()" wrapper would make these checks cleaner and
> > would make things more robust, should there be any new IRQ delivery method
> > be introduced in the future?
>
> pci_has_msi_irq surely? Otherwise we'll catch pretty much everything? Or did
> you mean !pci_has_gsi_irq() here instead?
Well - here the check is: "if (not MSI or MSIX)" in essence. I thought
that it might be confusing to call it _msi() as well, so we could approach
it via the inverse space: general system interrupts (GSIs) - which are
device irqs that are neither MSI nor MSIX.
But if pci_has_msi_irq() can cleanly include the MSIX portion too, that's
fine too. (MSI-X is really MSI with wider eventing capabilities but
otherwise non-GSI just as much - and we dont want to enable (or even
touch) the legacy IRQ line registers for any of them, even if they happen
to be enumerated)
Right?
Ingo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86 PCI: Do not use interrupt links for devices using MSI-X
2009-01-07 13:13 ` Ingo Molnar
@ 2009-01-07 17:33 ` Jesse Barnes
2009-01-07 17:45 ` Ingo Molnar
2009-01-07 18:12 ` Rafael J. Wysocki
0 siblings, 2 replies; 11+ messages in thread
From: Jesse Barnes @ 2009-01-07 17:33 UTC (permalink / raw)
To: Ingo Molnar
Cc: Rafael J. Wysocki, LKML, Linux PCI, H. Peter Anvin,
Thomas Gleixner
On Wednesday, January 7, 2009 5:13 am Ingo Molnar wrote:
> * Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > On Monday, January 5, 2009 5:04 am Ingo Molnar wrote:
> > > * Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > > > From: Rafael J. Wysocki <rjw@sisk.pl>
> > > >
> > > > pcibios_enable_device() and pcibios_disable_device() don't handle
> > > > IRQs for devices that have MSI enabled and it should tread the
> > >
> > > s/tread/treat
> > >
> > > > devices with MSI-X enabled in the same way.
> > > >
> > > > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> > > > ---
> > > > arch/x86/pci/common.c | 4 ++--
> > > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > >
> > > looks good - Jesse, what do you think?
> >
> > Yeah, seems obviously correct, I'll queue it up.
> >
> > > Rafael, i'm curious is this in response to some regression/bug? Did
> > > some box or driver get confused by us enabling/disabling the GSI? Some
> > > IRQ flood perhaps?
> > >
> > > btw., there's a small observation:
> > > > + if (!dev->msi_enabled && !dev->msix_enabled)
> > >
> > > maybe a "pci_has_gsi_irq()" wrapper would make these checks cleaner and
> > > would make things more robust, should there be any new IRQ delivery
> > > method be introduced in the future?
> >
> > pci_has_msi_irq surely? Otherwise we'll catch pretty much everything?
> > Or did you mean !pci_has_gsi_irq() here instead?
>
> Well - here the check is: "if (not MSI or MSIX)" in essence. I thought
> that it might be confusing to call it _msi() as well, so we could approach
> it via the inverse space: general system interrupts (GSIs) - which are
> device irqs that are neither MSI nor MSIX.
>
> But if pci_has_msi_irq() can cleanly include the MSIX portion too, that's
> fine too. (MSI-X is really MSI with wider eventing capabilities but
> otherwise non-GSI just as much - and we dont want to enable (or even
> touch) the legacy IRQ line registers for any of them, even if they happen
> to be enumerated)
>
> Right?
Right, I see where you're coming from. However, I've queued up Rafael's last
patch with some fixes for dev vs. pci_dev and a name collision
(pci_msi_enabled -> pci_dev_msi_enabled). Bjorn caught the fact that some
other arches may want similar treatment too, I think Rafael is checking that
out.
--
Jesse Barnes, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86 PCI: Do not use interrupt links for devices using MSI-X
2009-01-07 17:33 ` Jesse Barnes
@ 2009-01-07 17:45 ` Ingo Molnar
2009-01-07 18:12 ` Rafael J. Wysocki
1 sibling, 0 replies; 11+ messages in thread
From: Ingo Molnar @ 2009-01-07 17:45 UTC (permalink / raw)
To: Jesse Barnes
Cc: Rafael J. Wysocki, LKML, Linux PCI, H. Peter Anvin,
Thomas Gleixner
* Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> On Wednesday, January 7, 2009 5:13 am Ingo Molnar wrote:
> > * Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > > On Monday, January 5, 2009 5:04 am Ingo Molnar wrote:
> > > > * Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > > > > From: Rafael J. Wysocki <rjw@sisk.pl>
> > > > >
> > > > > pcibios_enable_device() and pcibios_disable_device() don't handle
> > > > > IRQs for devices that have MSI enabled and it should tread the
> > > >
> > > > s/tread/treat
> > > >
> > > > > devices with MSI-X enabled in the same way.
> > > > >
> > > > > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> > > > > ---
> > > > > arch/x86/pci/common.c | 4 ++--
> > > > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > > >
> > > > looks good - Jesse, what do you think?
> > >
> > > Yeah, seems obviously correct, I'll queue it up.
> > >
> > > > Rafael, i'm curious is this in response to some regression/bug? Did
> > > > some box or driver get confused by us enabling/disabling the GSI? Some
> > > > IRQ flood perhaps?
> > > >
> > > > btw., there's a small observation:
> > > > > + if (!dev->msi_enabled && !dev->msix_enabled)
> > > >
> > > > maybe a "pci_has_gsi_irq()" wrapper would make these checks cleaner and
> > > > would make things more robust, should there be any new IRQ delivery
> > > > method be introduced in the future?
> > >
> > > pci_has_msi_irq surely? Otherwise we'll catch pretty much everything?
> > > Or did you mean !pci_has_gsi_irq() here instead?
> >
> > Well - here the check is: "if (not MSI or MSIX)" in essence. I thought
> > that it might be confusing to call it _msi() as well, so we could approach
> > it via the inverse space: general system interrupts (GSIs) - which are
> > device irqs that are neither MSI nor MSIX.
> >
> > But if pci_has_msi_irq() can cleanly include the MSIX portion too, that's
> > fine too. (MSI-X is really MSI with wider eventing capabilities but
> > otherwise non-GSI just as much - and we dont want to enable (or even
> > touch) the legacy IRQ line registers for any of them, even if they happen
> > to be enumerated)
> >
> > Right?
>
> Right, I see where you're coming from. However, I've queued up Rafael's
> last patch with some fixes for dev vs. pci_dev and a name collision
> (pci_msi_enabled -> pci_dev_msi_enabled). Bjorn caught the fact that
> some other arches may want similar treatment too, I think Rafael is
> checking that out.
Sure - that sounds good too!
Ingo
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH] x86 PCI: Do not use interrupt links for devices using MSI-X
2009-01-07 17:33 ` Jesse Barnes
2009-01-07 17:45 ` Ingo Molnar
@ 2009-01-07 18:12 ` Rafael J. Wysocki
1 sibling, 0 replies; 11+ messages in thread
From: Rafael J. Wysocki @ 2009-01-07 18:12 UTC (permalink / raw)
To: Jesse Barnes
Cc: Ingo Molnar, LKML, Linux PCI, H. Peter Anvin, Thomas Gleixner
On Wednesday 07 January 2009, Jesse Barnes wrote:
> On Wednesday, January 7, 2009 5:13 am Ingo Molnar wrote:
> > * Jesse Barnes <jbarnes@virtuousgeek.org> wrote:
> > > On Monday, January 5, 2009 5:04 am Ingo Molnar wrote:
> > > > * Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > > > > From: Rafael J. Wysocki <rjw@sisk.pl>
> > > > >
> > > > > pcibios_enable_device() and pcibios_disable_device() don't handle
> > > > > IRQs for devices that have MSI enabled and it should tread the
> > > >
> > > > s/tread/treat
> > > >
> > > > > devices with MSI-X enabled in the same way.
> > > > >
> > > > > Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
> > > > > ---
> > > > > arch/x86/pci/common.c | 4 ++--
> > > > > 1 file changed, 2 insertions(+), 2 deletions(-)
> > > >
> > > > looks good - Jesse, what do you think?
> > >
> > > Yeah, seems obviously correct, I'll queue it up.
> > >
> > > > Rafael, i'm curious is this in response to some regression/bug? Did
> > > > some box or driver get confused by us enabling/disabling the GSI? Some
> > > > IRQ flood perhaps?
> > > >
> > > > btw., there's a small observation:
> > > > > + if (!dev->msi_enabled && !dev->msix_enabled)
> > > >
> > > > maybe a "pci_has_gsi_irq()" wrapper would make these checks cleaner and
> > > > would make things more robust, should there be any new IRQ delivery
> > > > method be introduced in the future?
> > >
> > > pci_has_msi_irq surely? Otherwise we'll catch pretty much everything?
> > > Or did you mean !pci_has_gsi_irq() here instead?
> >
> > Well - here the check is: "if (not MSI or MSIX)" in essence. I thought
> > that it might be confusing to call it _msi() as well, so we could approach
> > it via the inverse space: general system interrupts (GSIs) - which are
> > device irqs that are neither MSI nor MSIX.
> >
> > But if pci_has_msi_irq() can cleanly include the MSIX portion too, that's
> > fine too. (MSI-X is really MSI with wider eventing capabilities but
> > otherwise non-GSI just as much - and we dont want to enable (or even
> > touch) the legacy IRQ line registers for any of them, even if they happen
> > to be enumerated)
> >
> > Right?
>
> Right, I see where you're coming from. However, I've queued up Rafael's last
> patch with some fixes for dev vs. pci_dev and a name collision
> (pci_msi_enabled -> pci_dev_msi_enabled). Bjorn caught the fact that some
> other arches may want similar treatment too, I think Rafael is checking that
> out.
Yes, I am.
Thanks,
Rafael
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2009-01-07 18:13 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-04 22:08 [PATCH] x86 PCI: Do not use interrupt links for devices using MSI-X Rafael J. Wysocki
2009-01-05 13:04 ` Ingo Molnar
2009-01-05 13:50 ` Rafael J. Wysocki
2009-01-05 19:55 ` Jesse Barnes
2009-01-05 19:53 ` Jesse Barnes
2009-01-07 13:13 ` Ingo Molnar
2009-01-07 17:33 ` Jesse Barnes
2009-01-07 17:45 ` Ingo Molnar
2009-01-07 18:12 ` Rafael J. Wysocki
2009-01-06 17:19 ` Bjorn Helgaas
2009-01-06 19:45 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox