Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pci-v4.14-fixes-5' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI fixes from Bjorn Helgaas:

- revert Tegra MSI change that caused a regression on TrimSlice
(Thierry Reding)

- finish Aardvark conversion to host bridge IRQ mapping. We missed
Aardvark the first time around so it regressed (Thomas Petazzoni)

* tag 'pci-v4.14-fixes-5' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
PCI: aardvark: Move to struct pci_host_bridge IRQ mapping functions
Revert "PCI: tegra: Do not allocate MSI target memory"

+8 -16
+2
drivers/pci/host/pci-aardvark.c
··· 935 935 bridge->sysdata = pcie; 936 936 bridge->busnr = 0; 937 937 bridge->ops = &advk_pcie_ops; 938 + bridge->map_irq = of_irq_parse_and_map_pci; 939 + bridge->swizzle_irq = pci_common_swizzle; 938 940 939 941 ret = pci_scan_root_bus_bridge(bridge); 940 942 if (ret < 0) {
+6 -16
drivers/pci/host/pci-tegra.c
··· 233 233 struct msi_controller chip; 234 234 DECLARE_BITMAP(used, INT_PCI_MSI_NR); 235 235 struct irq_domain *domain; 236 + unsigned long pages; 236 237 struct mutex lock; 237 238 u64 phys; 238 239 int irq; ··· 1530 1529 goto err; 1531 1530 } 1532 1531 1533 - /* 1534 - * The PCI host bridge on Tegra contains some logic that intercepts 1535 - * MSI writes, which means that the MSI target address doesn't have 1536 - * to point to actual physical memory. Rather than allocating one 4 1537 - * KiB page of system memory that's never used, we can simply pick 1538 - * an arbitrary address within an area reserved for system memory 1539 - * in the FPCI address map. 1540 - * 1541 - * However, in order to avoid confusion, we pick an address that 1542 - * doesn't map to physical memory. The FPCI address map reserves a 1543 - * 1012 GiB region for system memory and memory-mapped I/O. Since 1544 - * none of the Tegra SoCs that contain this PCI host bridge can 1545 - * address more than 16 GiB of system memory, the last 4 KiB of 1546 - * these 1012 GiB is a good candidate. 1547 - */ 1548 - msi->phys = 0xfcfffff000; 1532 + /* setup AFI/FPCI range */ 1533 + msi->pages = __get_free_pages(GFP_KERNEL, 0); 1534 + msi->phys = virt_to_phys((void *)msi->pages); 1549 1535 1550 1536 afi_writel(pcie, msi->phys >> soc->msi_base_shift, AFI_MSI_FPCI_BAR_ST); 1551 1537 afi_writel(pcie, msi->phys, AFI_MSI_AXI_BAR_ST); ··· 1583 1595 afi_writel(pcie, 0, AFI_MSI_EN_VEC5); 1584 1596 afi_writel(pcie, 0, AFI_MSI_EN_VEC6); 1585 1597 afi_writel(pcie, 0, AFI_MSI_EN_VEC7); 1598 + 1599 + free_pages(msi->pages, 0); 1586 1600 1587 1601 if (msi->irq > 0) 1588 1602 free_irq(msi->irq, pcie);