lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4DCCE6BF.8030109@ladisch.de>
Date:	Fri, 13 May 2011 10:07:27 +0200
From:	Clemens Ladisch <clemens@...isch.de>
To:	Simon Richter <Simon.Richter@...yros.de>
CC:	Nick Cheng <nick.cheng@...ca.com.tw>, linux-kernel@...r.kernel.org
Subject: Re: PCI devices sharing IRQs

Simon Richter wrote:
> most of the PCI slots appear to map to the same IRQ, and I'm wondering
> if anything can be done about this.

The routing of PCI interrupts cannot be changed on any modern system.

PCI-Express devices are required to support message-signaled interrupts
(MSIs), which do not require separate hardware interrupt lines and are
never shared.  So throw away those cheap Intel chips and use the good
Realtek one instead.  ;-)

As for the RAID card, the arcmsr driver does not enable MSI.
I don't know if this an oversight in the driver or a hardware bug.
Please try the patch below.

(Nick, it looks as if there is an error path that doesn't free the
requested interrupt.)

> If there is anything I could try to change in order to give each card
> its own IRQ (especially pulling the RAID card and the Ethernet
> controller apart could possibly be worth something,

If these devices are on cards, you could try changing slots.

> as would handling IRQs on more than one core)

My AMD CPU automatically routes interrupts to an idle core ...


Regards,
Clemens

--8<---------------------------------------------------------------->8--
[SCSI] arcmsr: add MSI support

Try to enable MSI for Areca host adapters.  It might actually work.

Signed-off-by: Clemens Ladisch <clemens@...isch.de>

--- a/drivers/scsi/arcmsr/arcmsr_hba.c
+++ b/drivers/scsi/arcmsr/arcmsr_hba.c
@@ -692,7 +692,10 @@ static int arcmsr_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	if(error){
 		goto RAID_controller_stop;
 	}
+	pci_enable_msi(pdev);
-	error = request_irq(pdev->irq, arcmsr_do_interrupt, IRQF_SHARED, "arcmsr", acb);
+	error = request_irq(pdev->irq, arcmsr_do_interrupt,
+			    pci_dev_msi_enabled(pdev) ? 0 : IRQF_SHARED,
+			    "arcmsr", acb);
 	if(error){
 		goto scsi_host_remove;
 	}
@@ -711,7 +714,9 @@ static int arcmsr_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 		goto out_free_sysfs;
 	return 0;
 out_free_sysfs:
+	/* FIXME: free_irq */
 scsi_host_remove:
+	pci_disable_msi(pdev);
 	scsi_remove_host(host);
 RAID_controller_stop:
 	arcmsr_stop_adapter_bgrb(acb);
@@ -1050,6 +1055,7 @@ static void arcmsr_remove(struct pci_dev *pdev)
 		}
 	}
 	free_irq(pdev->irq, acb);
+	pci_disable_msi(pdev);
 	arcmsr_free_ccb_pool(acb);
 	arcmsr_free_hbb_mu(acb);
 	arcmsr_unmap_pciregion(acb);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ