* [PATCH 0/1] ahci: Do not receive interrupts sent by dummy ports @ 2014-04-17 16:06 Alexander Gordeev 2014-04-17 16:06 ` [PATCH 1/1] " Alexander Gordeev 0 siblings, 1 reply; 5+ messages in thread From: Alexander Gordeev @ 2014-04-17 16:06 UTC (permalink / raw) To: linux-kernel; +Cc: Alexander Gordeev, Tejun Heo, David Milburn, linux-ide Tejun, David, I would expect handle_bad_irq()->print_irq_desc() gets called if dummy port interrupt arrived. Could be a spurious interrupt complain as well. Cc: Tejun Heo <tj@kernel.org> Cc: David Milburn <dmilburn@redhat.com> Cc: linux-ide@vger.kernel.org Alexander Gordeev (1): ahci: Do not receive interrupts sent by dummy ports drivers/ata/ahci.c | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) -- 1.7.7.6 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/1] ahci: Do not receive interrupts sent by dummy ports 2014-04-17 16:06 [PATCH 0/1] ahci: Do not receive interrupts sent by dummy ports Alexander Gordeev @ 2014-04-17 16:06 ` Alexander Gordeev 2014-04-17 17:06 ` Tejun Heo 2014-04-18 19:56 ` Tejun Heo 0 siblings, 2 replies; 5+ messages in thread From: Alexander Gordeev @ 2014-04-17 16:06 UTC (permalink / raw) To: linux-kernel; +Cc: Alexander Gordeev, Tejun Heo, David Milburn, linux-ide In multiple MSI mode all AHCI ports (including dummy) get assigned separate MSI vectors and (as result of execution pci_enable_msi_exact() function) separate IRQ numbers, (mapped to the MSI vectors). Therefore, although interrupts from dummy ports are not desired they are still enabled. We do not request IRQs for dummy ports, but that only means we do not assign AHCI-specific ISRs to corresponding IRQ numbers. As result, dummy port interrupts still could come and traverse all the way from the PCI device to the kernel, causing unnecessary overhead. This update disables IRQs for dummy ports and prevents the described issue. Signed-off-by: Alexander Gordeev <agordeev@redhat.com> Cc: Tejun Heo <tj@kernel.org> Cc: David Milburn <dmilburn@redhat.com> Cc: linux-ide@vger.kernel.org --- drivers/ata/ahci.c | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 44d40c7..71e15b7 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1241,12 +1241,16 @@ int ahci_host_activate(struct ata_host *host, int irq, unsigned int n_msis) for (i = 0; i < host->n_ports; i++) { struct ahci_port_priv *pp = host->ports[i]->private_data; - /* pp is NULL for dummy ports */ - if (pp) - rc = devm_request_threaded_irq(host->dev, - irq + i, ahci_hw_interrupt, - ahci_thread_fn, IRQF_SHARED, - pp->irq_desc, host->ports[i]); + /* Do not receive interrupts sent by dummy ports */ + if (!pp) { + disable_irq(irq + i); + continue; + } + + rc = devm_request_threaded_irq(host->dev, irq + i, + ahci_hw_interrupt, + ahci_thread_fn, IRQF_SHARED, + pp->irq_desc, host->ports[i]); if (rc) goto out_free_irqs; } -- 1.7.7.6 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] ahci: Do not receive interrupts sent by dummy ports 2014-04-17 16:06 ` [PATCH 1/1] " Alexander Gordeev @ 2014-04-17 17:06 ` Tejun Heo 2014-04-17 17:50 ` David Milburn 2014-04-18 19:56 ` Tejun Heo 1 sibling, 1 reply; 5+ messages in thread From: Tejun Heo @ 2014-04-17 17:06 UTC (permalink / raw) To: Alexander Gordeev; +Cc: linux-kernel, David Milburn, linux-ide On Thu, Apr 17, 2014 at 06:06:15PM +0200, Alexander Gordeev wrote: > In multiple MSI mode all AHCI ports (including dummy) get > assigned separate MSI vectors and (as result of execution > pci_enable_msi_exact() function) separate IRQ numbers, > (mapped to the MSI vectors). > > Therefore, although interrupts from dummy ports are not > desired they are still enabled. We do not request IRQs > for dummy ports, but that only means we do not assign > AHCI-specific ISRs to corresponding IRQ numbers. > > As result, dummy port interrupts still could come and > traverse all the way from the PCI device to the kernel, > causing unnecessary overhead. > > This update disables IRQs for dummy ports and prevents > the described issue. > > Signed-off-by: Alexander Gordeev <agordeev@redhat.com> > Cc: Tejun Heo <tj@kernel.org> > Cc: David Milburn <dmilburn@redhat.com> > Cc: linux-ide@vger.kernel.org David, can you please test the patch? Thanks. -- tejun ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] ahci: Do not receive interrupts sent by dummy ports 2014-04-17 17:06 ` Tejun Heo @ 2014-04-17 17:50 ` David Milburn 0 siblings, 0 replies; 5+ messages in thread From: David Milburn @ 2014-04-17 17:50 UTC (permalink / raw) To: Tejun Heo; +Cc: Alexander Gordeev, linux-kernel, linux-ide On 04/17/2014 12:06 PM, Tejun Heo wrote: > On Thu, Apr 17, 2014 at 06:06:15PM +0200, Alexander Gordeev wrote: >> In multiple MSI mode all AHCI ports (including dummy) get >> assigned separate MSI vectors and (as result of execution >> pci_enable_msi_exact() function) separate IRQ numbers, >> (mapped to the MSI vectors). >> >> Therefore, although interrupts from dummy ports are not >> desired they are still enabled. We do not request IRQs >> for dummy ports, but that only means we do not assign >> AHCI-specific ISRs to corresponding IRQ numbers. >> >> As result, dummy port interrupts still could come and >> traverse all the way from the PCI device to the kernel, >> causing unnecessary overhead. >> >> This update disables IRQs for dummy ports and prevents >> the described issue. >> >> Signed-off-by: Alexander Gordeev <agordeev@redhat.com> >> Cc: Tejun Heo <tj@kernel.org> >> Cc: David Milburn <dmilburn@redhat.com> >> Cc: linux-ide@vger.kernel.org > > David, can you please test the patch? > Hi, I have re-tested successfully, this patch prevents the crash when using kdump, and I boot tested a system that boots off ahci and has dummy ports present, no problems seen. Thanks, David ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 1/1] ahci: Do not receive interrupts sent by dummy ports 2014-04-17 16:06 ` [PATCH 1/1] " Alexander Gordeev 2014-04-17 17:06 ` Tejun Heo @ 2014-04-18 19:56 ` Tejun Heo 1 sibling, 0 replies; 5+ messages in thread From: Tejun Heo @ 2014-04-18 19:56 UTC (permalink / raw) To: Alexander Gordeev; +Cc: linux-kernel, David Milburn, linux-ide On Thu, Apr 17, 2014 at 06:06:15PM +0200, Alexander Gordeev wrote: > In multiple MSI mode all AHCI ports (including dummy) get > assigned separate MSI vectors and (as result of execution > pci_enable_msi_exact() function) separate IRQ numbers, > (mapped to the MSI vectors). > > Therefore, although interrupts from dummy ports are not > desired they are still enabled. We do not request IRQs > for dummy ports, but that only means we do not assign > AHCI-specific ISRs to corresponding IRQ numbers. > > As result, dummy port interrupts still could come and > traverse all the way from the PCI device to the kernel, > causing unnecessary overhead. > > This update disables IRQs for dummy ports and prevents > the described issue. > > Signed-off-by: Alexander Gordeev <agordeev@redhat.com> > Cc: Tejun Heo <tj@kernel.org> > Cc: David Milburn <dmilburn@redhat.com> > Cc: linux-ide@vger.kernel.org Applied to libata/for-3.15-fixes w/ David's tested-by added. Thanks. -- tejun ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-04-18 19:56 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-04-17 16:06 [PATCH 0/1] ahci: Do not receive interrupts sent by dummy ports Alexander Gordeev 2014-04-17 16:06 ` [PATCH 1/1] " Alexander Gordeev 2014-04-17 17:06 ` Tejun Heo 2014-04-17 17:50 ` David Milburn 2014-04-18 19:56 ` Tejun Heo
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).