Re: [PATCH 0/3] v4.4: Revert "PCI: Implement pcibios_alloc_irq() and
On Mon, Apr 18, 2016 at 09:43:36AM -0500, Bjorn Helgaas wrote: > That might work, but the problem seems to be that we aren't enabling > IRQs correctly, so I'd rather have a fix that explicitly addresses > IRQs than one that relies on some non-obvious connection between > enabling BARs and IRQs. Yeah, either we or the BIOS does something wrong. The bugzilla entry states that it works with pci=routeirq. The dmesg from kernel 4.3 shows that per default ACPI routing is used for IRQs. The difference this makes in the code is the pcibios_enable_irq function pointer. For ACPI it points to acpi_pci_irq_enable and in the pci=routeirq case to pirq_enable_irq. So the problem appears when acpi_pci_irq_enable is used with device resources disabled. This might very well also be a bios issue that we have to work around, no? Joerg
Re: [PATCH 0/3] v4.4: Revert "PCI: Implement pcibios_alloc_irq() and
On Mon, Apr 18, 2016 at 09:43:36AM -0500, Bjorn Helgaas wrote: > That might work, but the problem seems to be that we aren't enabling > IRQs correctly, so I'd rather have a fix that explicitly addresses > IRQs than one that relies on some non-obvious connection between > enabling BARs and IRQs. Yeah, either we or the BIOS does something wrong. The bugzilla entry states that it works with pci=routeirq. The dmesg from kernel 4.3 shows that per default ACPI routing is used for IRQs. The difference this makes in the code is the pcibios_enable_irq function pointer. For ACPI it points to acpi_pci_irq_enable and in the pci=routeirq case to pirq_enable_irq. So the problem appears when acpi_pci_irq_enable is used with device resources disabled. This might very well also be a bios issue that we have to work around, no? Joerg
Re: [PATCH 0/3] v4.4: Revert "PCI: Implement pcibios_alloc_irq() and
On Mon, Apr 18, 2016 at 01:50:15PM +0200, Joerg Roedel wrote: > Hi Bjorn, > > On Fri, Apr 15, 2016 at 10:08:21AM -0500, Bjorn Helgaas wrote: > > I assume you're thinking about doing pci_enable_resources() before > > the core calls the driver's probe method? One question there is how > > we would deal with pci_enable_device_mem(). If the core calls > > pci_enable_resources(), it has to assume the driver requires all BARs, > > and there are quite a few drivers that don't need the I/O BARs. > > Yes, I think that the problem might be fixed when the resources are > enabled during the pcibios-call. > > What do you think of enabling the the resources at probe time for the > pcibios-call and disable them afterwards? Then the driver can re-enable > whatever it needs and keep the rest disabled. That might work, but the problem seems to be that we aren't enabling IRQs correctly, so I'd rather have a fix that explicitly addresses IRQs than one that relies on some non-obvious connection between enabling BARs and IRQs. Bjorn
Re: [PATCH 0/3] v4.4: Revert "PCI: Implement pcibios_alloc_irq() and
On Mon, Apr 18, 2016 at 01:50:15PM +0200, Joerg Roedel wrote: > Hi Bjorn, > > On Fri, Apr 15, 2016 at 10:08:21AM -0500, Bjorn Helgaas wrote: > > I assume you're thinking about doing pci_enable_resources() before > > the core calls the driver's probe method? One question there is how > > we would deal with pci_enable_device_mem(). If the core calls > > pci_enable_resources(), it has to assume the driver requires all BARs, > > and there are quite a few drivers that don't need the I/O BARs. > > Yes, I think that the problem might be fixed when the resources are > enabled during the pcibios-call. > > What do you think of enabling the the resources at probe time for the > pcibios-call and disable them afterwards? Then the driver can re-enable > whatever it needs and keep the rest disabled. That might work, but the problem seems to be that we aren't enabling IRQs correctly, so I'd rather have a fix that explicitly addresses IRQs than one that relies on some non-obvious connection between enabling BARs and IRQs. Bjorn
Re: [PATCH 0/3] v4.4: Revert "PCI: Implement pcibios_alloc_irq() and
Hi Bjorn, On Fri, Apr 15, 2016 at 10:08:21AM -0500, Bjorn Helgaas wrote: > I assume you're thinking about doing pci_enable_resources() before > the core calls the driver's probe method? One question there is how > we would deal with pci_enable_device_mem(). If the core calls > pci_enable_resources(), it has to assume the driver requires all BARs, > and there are quite a few drivers that don't need the I/O BARs. Yes, I think that the problem might be fixed when the resources are enabled during the pcibios-call. What do you think of enabling the the resources at probe time for the pcibios-call and disable them afterwards? Then the driver can re-enable whatever it needs and keep the rest disabled. Joerg
Re: [PATCH 0/3] v4.4: Revert "PCI: Implement pcibios_alloc_irq() and
Hi Bjorn, On Fri, Apr 15, 2016 at 10:08:21AM -0500, Bjorn Helgaas wrote: > I assume you're thinking about doing pci_enable_resources() before > the core calls the driver's probe method? One question there is how > we would deal with pci_enable_device_mem(). If the core calls > pci_enable_resources(), it has to assume the driver requires all BARs, > and there are quite a few drivers that don't need the I/O BARs. Yes, I think that the problem might be fixed when the resources are enabled during the pcibios-call. What do you think of enabling the the resources at probe time for the pcibios-call and disable them afterwards? Then the driver can re-enable whatever it needs and keep the rest disabled. Joerg
Re: [PATCH 0/3] v4.4: Revert "PCI: Implement pcibios_alloc_irq() and
On Wed, Apr 13, 2016 at 12:56:59AM -0500, Bjorn Helgaas wrote: > pcibios_free_irq()" > > Please apply these reverts to the v4.4 stable kernel. > > We reverted the following changes from v4.5 to fix a regression: > > 8affb487d4a4 ("x86/PCI: Don't alloc pcibios-irq when MSI is enabled") > 811a4e6fce09 ("PCI: Add helpers to manage pci_dev->irq and > pci_dev->irq_managed") > 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and > pcibios_free_irq()") > > but I forgot to mark those reverts for stable. This series contains the > backports for v4.4. > > For reference, the v4.5 reverts are: > > fe25d078874f ("Revert "x86/PCI: Don't alloc pcibios-irq when MSI is > enabled"") > 67b4eab91caf ("Revert "PCI: Add helpers to manage pci_dev->irq and > pci_dev->irq_managed"") > 6c777e8799a9 ("Revert "PCI, x86: Implement pcibios_alloc_irq() and > pcibios_free_irq()"") All now applied, thanks for these. greg k-h
Re: [PATCH 0/3] v4.4: Revert "PCI: Implement pcibios_alloc_irq() and
On Wed, Apr 13, 2016 at 12:56:59AM -0500, Bjorn Helgaas wrote: > pcibios_free_irq()" > > Please apply these reverts to the v4.4 stable kernel. > > We reverted the following changes from v4.5 to fix a regression: > > 8affb487d4a4 ("x86/PCI: Don't alloc pcibios-irq when MSI is enabled") > 811a4e6fce09 ("PCI: Add helpers to manage pci_dev->irq and > pci_dev->irq_managed") > 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and > pcibios_free_irq()") > > but I forgot to mark those reverts for stable. This series contains the > backports for v4.4. > > For reference, the v4.5 reverts are: > > fe25d078874f ("Revert "x86/PCI: Don't alloc pcibios-irq when MSI is > enabled"") > 67b4eab91caf ("Revert "PCI: Add helpers to manage pci_dev->irq and > pci_dev->irq_managed"") > 6c777e8799a9 ("Revert "PCI, x86: Implement pcibios_alloc_irq() and > pcibios_free_irq()"") All now applied, thanks for these. greg k-h
Re: [PATCH 0/3] v4.4: Revert "PCI: Implement pcibios_alloc_irq() and
On Thu, Apr 14, 2016 at 05:50:44PM +0200, Joerg Roedel wrote: > Hi Bjorn, > > On Wed, Apr 13, 2016 at 12:56:59AM -0500, Bjorn Helgaas wrote: > > We reverted the following changes from v4.5 to fix a regression: > > > > 8affb487d4a4 ("x86/PCI: Don't alloc pcibios-irq when MSI is enabled") > > 811a4e6fce09 ("PCI: Add helpers to manage pci_dev->irq and > > pci_dev->irq_managed") > > 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and > > pcibios_free_irq()") > > Do you have a link to the thread about these issues? I'd like to have a > look at what has been tried to solve the regressions before the revert. The revert was 6c777e8799a9 ("Revert "PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()""). Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=111211 Email discussion: http://lkml.kernel.org/r/56a27e7e.4080...@mcc.vniiem.ru > I had a look at commit 991de2e59090 and noted that the main difference > it introduces is that the pcibios-irq is allocated earlier (probe time, > before the commit it was pci_enable_device() time). In fact, it is now > allocated before pci_enable_resources() has been called on the device > (as far as I can see). I wonder if the regression can be fixed by > also moving pci_enable_resources() to probe time. I assume you're thinking about doing pci_enable_resources() before the core calls the driver's probe method? One question there is how we would deal with pci_enable_device_mem(). If the core calls pci_enable_resources(), it has to assume the driver requires all BARs, and there are quite a few drivers that don't need the I/O BARs. I'd be very glad if you poked at this a little more. Jiang did a lot of nice work on IOAPIC hotplug, and I feel bad reverting this piece of it. It's just that nobody so far has had the time or interest to work out a better fix. Bjorn
Re: [PATCH 0/3] v4.4: Revert "PCI: Implement pcibios_alloc_irq() and
On Thu, Apr 14, 2016 at 05:50:44PM +0200, Joerg Roedel wrote: > Hi Bjorn, > > On Wed, Apr 13, 2016 at 12:56:59AM -0500, Bjorn Helgaas wrote: > > We reverted the following changes from v4.5 to fix a regression: > > > > 8affb487d4a4 ("x86/PCI: Don't alloc pcibios-irq when MSI is enabled") > > 811a4e6fce09 ("PCI: Add helpers to manage pci_dev->irq and > > pci_dev->irq_managed") > > 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and > > pcibios_free_irq()") > > Do you have a link to the thread about these issues? I'd like to have a > look at what has been tried to solve the regressions before the revert. The revert was 6c777e8799a9 ("Revert "PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()""). Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=111211 Email discussion: http://lkml.kernel.org/r/56a27e7e.4080...@mcc.vniiem.ru > I had a look at commit 991de2e59090 and noted that the main difference > it introduces is that the pcibios-irq is allocated earlier (probe time, > before the commit it was pci_enable_device() time). In fact, it is now > allocated before pci_enable_resources() has been called on the device > (as far as I can see). I wonder if the regression can be fixed by > also moving pci_enable_resources() to probe time. I assume you're thinking about doing pci_enable_resources() before the core calls the driver's probe method? One question there is how we would deal with pci_enable_device_mem(). If the core calls pci_enable_resources(), it has to assume the driver requires all BARs, and there are quite a few drivers that don't need the I/O BARs. I'd be very glad if you poked at this a little more. Jiang did a lot of nice work on IOAPIC hotplug, and I feel bad reverting this piece of it. It's just that nobody so far has had the time or interest to work out a better fix. Bjorn
Re: [PATCH 0/3] v4.4: Revert "PCI: Implement pcibios_alloc_irq() and
Hi Bjorn, On Wed, Apr 13, 2016 at 12:56:59AM -0500, Bjorn Helgaas wrote: > We reverted the following changes from v4.5 to fix a regression: > > 8affb487d4a4 ("x86/PCI: Don't alloc pcibios-irq when MSI is enabled") > 811a4e6fce09 ("PCI: Add helpers to manage pci_dev->irq and > pci_dev->irq_managed") > 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and > pcibios_free_irq()") Do you have a link to the thread about these issues? I'd like to have a look at what has been tried to solve the regressions before the revert. I had a look at commit 991de2e59090 and noted that the main difference it introduces is that the pcibios-irq is allocated earlier (probe time, before the commit it was pci_enable_device() time). In fact, it is now allocated before pci_enable_resources() has been called on the device (as far as I can see). I wonder if the regression can be fixed by also moving pci_enable_resources() to probe time. Regards, Joerg
Re: [PATCH 0/3] v4.4: Revert "PCI: Implement pcibios_alloc_irq() and
Hi Bjorn, On Wed, Apr 13, 2016 at 12:56:59AM -0500, Bjorn Helgaas wrote: > We reverted the following changes from v4.5 to fix a regression: > > 8affb487d4a4 ("x86/PCI: Don't alloc pcibios-irq when MSI is enabled") > 811a4e6fce09 ("PCI: Add helpers to manage pci_dev->irq and > pci_dev->irq_managed") > 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and > pcibios_free_irq()") Do you have a link to the thread about these issues? I'd like to have a look at what has been tried to solve the regressions before the revert. I had a look at commit 991de2e59090 and noted that the main difference it introduces is that the pcibios-irq is allocated earlier (probe time, before the commit it was pci_enable_device() time). In fact, it is now allocated before pci_enable_resources() has been called on the device (as far as I can see). I wonder if the regression can be fixed by also moving pci_enable_resources() to probe time. Regards, Joerg
[PATCH 0/3] v4.4: Revert "PCI: Implement pcibios_alloc_irq() and
pcibios_free_irq()" Please apply these reverts to the v4.4 stable kernel. We reverted the following changes from v4.5 to fix a regression: 8affb487d4a4 ("x86/PCI: Don't alloc pcibios-irq when MSI is enabled") 811a4e6fce09 ("PCI: Add helpers to manage pci_dev->irq and pci_dev->irq_managed") 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()") but I forgot to mark those reverts for stable. This series contains the backports for v4.4. For reference, the v4.5 reverts are: fe25d078874f ("Revert "x86/PCI: Don't alloc pcibios-irq when MSI is enabled"") 67b4eab91caf ("Revert "PCI: Add helpers to manage pci_dev->irq and pci_dev->irq_managed"") 6c777e8799a9 ("Revert "PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()"") --- Bjorn Helgaas (3): Revert "x86/PCI: Don't alloc pcibios-irq when MSI is enabled" Revert "PCI: Add helpers to manage pci_dev->irq and pci_dev->irq_managed" Revert "PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()" arch/x86/include/asm/pci_x86.h |2 ++ arch/x86/pci/common.c | 26 ++ arch/x86/pci/intel_mid_pci.c |9 +++-- arch/x86/pci/irq.c | 23 +++ drivers/acpi/pci_irq.c | 17 + include/linux/pci.h| 17 - 6 files changed, 47 insertions(+), 47 deletions(-)
[PATCH 0/3] v4.4: Revert "PCI: Implement pcibios_alloc_irq() and
pcibios_free_irq()" Please apply these reverts to the v4.4 stable kernel. We reverted the following changes from v4.5 to fix a regression: 8affb487d4a4 ("x86/PCI: Don't alloc pcibios-irq when MSI is enabled") 811a4e6fce09 ("PCI: Add helpers to manage pci_dev->irq and pci_dev->irq_managed") 991de2e59090 ("PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()") but I forgot to mark those reverts for stable. This series contains the backports for v4.4. For reference, the v4.5 reverts are: fe25d078874f ("Revert "x86/PCI: Don't alloc pcibios-irq when MSI is enabled"") 67b4eab91caf ("Revert "PCI: Add helpers to manage pci_dev->irq and pci_dev->irq_managed"") 6c777e8799a9 ("Revert "PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()"") --- Bjorn Helgaas (3): Revert "x86/PCI: Don't alloc pcibios-irq when MSI is enabled" Revert "PCI: Add helpers to manage pci_dev->irq and pci_dev->irq_managed" Revert "PCI, x86: Implement pcibios_alloc_irq() and pcibios_free_irq()" arch/x86/include/asm/pci_x86.h |2 ++ arch/x86/pci/common.c | 26 ++ arch/x86/pci/intel_mid_pci.c |9 +++-- arch/x86/pci/irq.c | 23 +++ drivers/acpi/pci_irq.c | 17 + include/linux/pci.h| 17 - 6 files changed, 47 insertions(+), 47 deletions(-)