Thread (3 messages) 3 messages, 3 authors, 2012-06-12

Re: [PATCH v2 06/10] ARM: tegra: pcie: Add MSI support

From: Stephen Warren <hidden>
Date: 2012-06-11 21:19:53
Also in: linux-arm-kernel, linux-pci, linux-tegra

On 06/11/2012 09:05 AM, Thierry Reding wrote:
This commit adds support for message signaled interrupts to the Tegra
PCIe controller. Based on code by Krishna Kishore [off-list ref].
quoted hunk
diff --git a/arch/arm/mach-tegra/pcie.c b/arch/arm/mach-tegra/pcie.c
+static irqreturn_t tegra_pcie_msi_irq(int irq, void *data)
...
+			irq = irq_find_mapping(pcie->msi->domain, index);
+			if (irq) {
+				if (test_bit(index, pcie->msi->used))
+					generic_handle_irq(irq);
This invokes the handler first ...

...
+			/* clear the interrupt */
+			afi_writel(pcie, 1 << offset, AFI_MSI_VEC0 + i * 4);
+			/* see if there's any more pending in this vector */
+			reg = afi_readl(pcie, AFI_MSI_VEC0 + i * 4);
... then clears the interrupt status in the PCIe controller. Won't that
lose interrupts if one is raised between when the handler clears the
root-cause, and when this code clears the received interrupt status?
+static int tegra_pcie_disable_msi(struct platform_device *pdev)
Should this free pcie->msi->pages?

Why allocate pcie->msi separately; why not include the fields directly
into struct tegra_pcie_info *pcie?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help