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

PCI: tegra: Convert to MSI domains

In anticipation of the removal of the msi_controller structure, convert
the Tegra host controller driver to MSI domains.

We end-up with the usual two domain structure, the top one being a
generic PCI/MSI domain, the bottom one being Tegra-specific and handling
the actual HW interrupt allocation.

While at it, convert the normal interrupt handler to a chained handler,
handle the controller's MSI IRQ edge triggered, support multiple MSIs
per device and use the AFI_MSI_EN_VEC* registers to provide MSI masking.

[treding@nvidia.com: fix, clean up and address TODOs from Marc's draft]

Link: https://lore.kernel.org/r/20210330151145.997953-2-maz@kernel.org
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Bjorn Helgaas <bhelgaas@google.com>

authored by

Marc Zyngier and committed by
Lorenzo Pieralisi
2c99e55f a38fd874

+198 -166
-1
drivers/pci/controller/Kconfig
··· 41 41 bool "NVIDIA Tegra PCIe controller" 42 42 depends on ARCH_TEGRA || COMPILE_TEST 43 43 depends on PCI_MSI_IRQ_DOMAIN 44 - select PCI_MSI_ARCH_FALLBACKS 45 44 help 46 45 Say Y here if you want support for the PCIe host controller found 47 46 on NVIDIA Tegra SoCs.
+198 -165
drivers/pci/controller/pci-tegra.c
··· 21 21 #include <linux/interrupt.h> 22 22 #include <linux/iopoll.h> 23 23 #include <linux/irq.h> 24 + #include <linux/irqchip/chained_irq.h> 24 25 #include <linux/irqdomain.h> 25 26 #include <linux/kernel.h> 26 27 #include <linux/init.h> ··· 79 78 #define AFI_MSI_FPCI_BAR_ST 0x64 80 79 #define AFI_MSI_AXI_BAR_ST 0x68 81 80 82 - #define AFI_MSI_VEC0 0x6c 83 - #define AFI_MSI_VEC1 0x70 84 - #define AFI_MSI_VEC2 0x74 85 - #define AFI_MSI_VEC3 0x78 86 - #define AFI_MSI_VEC4 0x7c 87 - #define AFI_MSI_VEC5 0x80 88 - #define AFI_MSI_VEC6 0x84 89 - #define AFI_MSI_VEC7 0x88 90 - 91 - #define AFI_MSI_EN_VEC0 0x8c 92 - #define AFI_MSI_EN_VEC1 0x90 93 - #define AFI_MSI_EN_VEC2 0x94 94 - #define AFI_MSI_EN_VEC3 0x98 95 - #define AFI_MSI_EN_VEC4 0x9c 96 - #define AFI_MSI_EN_VEC5 0xa0 97 - #define AFI_MSI_EN_VEC6 0xa4 98 - #define AFI_MSI_EN_VEC7 0xa8 81 + #define AFI_MSI_VEC(x) (0x6c + ((x) * 4)) 82 + #define AFI_MSI_EN_VEC(x) (0x8c + ((x) * 4)) 99 83 100 84 #define AFI_CONFIGURATION 0xac 101 85 #define AFI_CONFIGURATION_EN_FPCI (1 << 0) ··· 266 280 #define LINK_RETRAIN_TIMEOUT 100000 /* in usec */ 267 281 268 282 struct tegra_msi { 269 - struct msi_controller chip; 270 283 DECLARE_BITMAP(used, INT_PCI_MSI_NR); 271 284 struct irq_domain *domain; 272 - struct mutex lock; 285 + struct mutex map_lock; 286 + spinlock_t mask_lock; 273 287 void *virt; 274 288 dma_addr_t phys; 275 289 int irq; ··· 319 333 } ectl; 320 334 }; 321 335 322 - static inline struct tegra_msi *to_tegra_msi(struct msi_controller *chip) 323 - { 324 - return container_of(chip, struct tegra_msi, chip); 325 - } 326 - 327 336 struct tegra_pcie { 328 337 struct device *dev; 329 338 ··· 352 371 const struct tegra_pcie_soc *soc; 353 372 struct dentry *debugfs; 354 373 }; 374 + 375 + static inline struct tegra_pcie *msi_to_pcie(struct tegra_msi *msi) 376 + { 377 + return container_of(msi, struct tegra_pcie, msi); 378 + } 355 379 356 380 struct tegra_pcie_port { 357 381 struct tegra_pcie *pcie; ··· 1418 1432 } 1419 1433 } 1420 1434 1421 - 1422 1435 static int tegra_pcie_get_resources(struct tegra_pcie *pcie) 1423 1436 { 1424 1437 struct device *dev = pcie->dev; ··· 1494 1509 phys_put: 1495 1510 if (soc->program_uphy) 1496 1511 tegra_pcie_phys_put(pcie); 1512 + 1497 1513 return err; 1498 1514 } 1499 1515 ··· 1537 1551 afi_writel(pcie, val, AFI_PCIE_PME); 1538 1552 } 1539 1553 1540 - static int tegra_msi_alloc(struct tegra_msi *chip) 1554 + static void tegra_pcie_msi_irq(struct irq_desc *desc) 1541 1555 { 1542 - int msi; 1543 - 1544 - mutex_lock(&chip->lock); 1545 - 1546 - msi = find_first_zero_bit(chip->used, INT_PCI_MSI_NR); 1547 - if (msi < INT_PCI_MSI_NR) 1548 - set_bit(msi, chip->used); 1549 - else 1550 - msi = -ENOSPC; 1551 - 1552 - mutex_unlock(&chip->lock); 1553 - 1554 - return msi; 1555 - } 1556 - 1557 - static void tegra_msi_free(struct tegra_msi *chip, unsigned long irq) 1558 - { 1559 - struct device *dev = chip->chip.dev; 1560 - 1561 - mutex_lock(&chip->lock); 1562 - 1563 - if (!test_bit(irq, chip->used)) 1564 - dev_err(dev, "trying to free unused MSI#%lu\n", irq); 1565 - else 1566 - clear_bit(irq, chip->used); 1567 - 1568 - mutex_unlock(&chip->lock); 1569 - } 1570 - 1571 - static irqreturn_t tegra_pcie_msi_irq(int irq, void *data) 1572 - { 1573 - struct tegra_pcie *pcie = data; 1574 - struct device *dev = pcie->dev; 1556 + struct tegra_pcie *pcie = irq_desc_get_handler_data(desc); 1557 + struct irq_chip *chip = irq_desc_get_chip(desc); 1575 1558 struct tegra_msi *msi = &pcie->msi; 1576 - unsigned int i, processed = 0; 1559 + struct device *dev = pcie->dev; 1560 + unsigned int i; 1561 + 1562 + chained_irq_enter(chip, desc); 1577 1563 1578 1564 for (i = 0; i < 8; i++) { 1579 - unsigned long reg = afi_readl(pcie, AFI_MSI_VEC0 + i * 4); 1565 + unsigned long reg = afi_readl(pcie, AFI_MSI_VEC(i)); 1580 1566 1581 1567 while (reg) { 1582 1568 unsigned int offset = find_first_bit(&reg, 32); 1583 1569 unsigned int index = i * 32 + offset; 1584 1570 unsigned int irq; 1585 1571 1586 - /* clear the interrupt */ 1587 - afi_writel(pcie, 1 << offset, AFI_MSI_VEC0 + i * 4); 1588 - 1589 - irq = irq_find_mapping(msi->domain, index); 1572 + irq = irq_find_mapping(msi->domain->parent, index); 1590 1573 if (irq) { 1591 - if (test_bit(index, msi->used)) 1592 - generic_handle_irq(irq); 1593 - else 1594 - dev_info(dev, "unhandled MSI\n"); 1574 + generic_handle_irq(irq); 1595 1575 } else { 1596 1576 /* 1597 1577 * that's weird who triggered this? 1598 1578 * just clear it 1599 1579 */ 1600 1580 dev_info(dev, "unexpected MSI\n"); 1581 + afi_writel(pcie, BIT(index % 32), AFI_MSI_VEC(index)); 1601 1582 } 1602 1583 1603 1584 /* see if there's any more pending in this vector */ 1604 - reg = afi_readl(pcie, AFI_MSI_VEC0 + i * 4); 1605 - 1606 - processed++; 1585 + reg = afi_readl(pcie, AFI_MSI_VEC(i)); 1607 1586 } 1608 1587 } 1609 1588 1610 - return processed > 0 ? IRQ_HANDLED : IRQ_NONE; 1589 + chained_irq_exit(chip, desc); 1611 1590 } 1612 1591 1613 - static int tegra_msi_setup_irq(struct msi_controller *chip, 1614 - struct pci_dev *pdev, struct msi_desc *desc) 1592 + static void tegra_msi_top_irq_ack(struct irq_data *d) 1615 1593 { 1616 - struct tegra_msi *msi = to_tegra_msi(chip); 1617 - struct msi_msg msg; 1618 - unsigned int irq; 1619 - int hwirq; 1620 - 1621 - hwirq = tegra_msi_alloc(msi); 1622 - if (hwirq < 0) 1623 - return hwirq; 1624 - 1625 - irq = irq_create_mapping(msi->domain, hwirq); 1626 - if (!irq) { 1627 - tegra_msi_free(msi, hwirq); 1628 - return -EINVAL; 1629 - } 1630 - 1631 - irq_set_msi_desc(irq, desc); 1632 - 1633 - msg.address_lo = lower_32_bits(msi->phys); 1634 - msg.address_hi = upper_32_bits(msi->phys); 1635 - msg.data = hwirq; 1636 - 1637 - pci_write_msi_msg(irq, &msg); 1638 - 1639 - return 0; 1594 + irq_chip_ack_parent(d); 1640 1595 } 1641 1596 1642 - static void tegra_msi_teardown_irq(struct msi_controller *chip, 1643 - unsigned int irq) 1597 + static void tegra_msi_top_irq_mask(struct irq_data *d) 1644 1598 { 1645 - struct tegra_msi *msi = to_tegra_msi(chip); 1646 - struct irq_data *d = irq_get_irq_data(irq); 1647 - irq_hw_number_t hwirq = irqd_to_hwirq(d); 1648 - 1649 - irq_dispose_mapping(irq); 1650 - tegra_msi_free(msi, hwirq); 1599 + pci_msi_mask_irq(d); 1600 + irq_chip_mask_parent(d); 1651 1601 } 1652 1602 1653 - static struct irq_chip tegra_msi_irq_chip = { 1654 - .name = "Tegra PCIe MSI", 1655 - .irq_enable = pci_msi_unmask_irq, 1656 - .irq_disable = pci_msi_mask_irq, 1657 - .irq_mask = pci_msi_mask_irq, 1658 - .irq_unmask = pci_msi_unmask_irq, 1603 + static void tegra_msi_top_irq_unmask(struct irq_data *d) 1604 + { 1605 + pci_msi_unmask_irq(d); 1606 + irq_chip_unmask_parent(d); 1607 + } 1608 + 1609 + static struct irq_chip tegra_msi_top_chip = { 1610 + .name = "Tegra PCIe MSI", 1611 + .irq_ack = tegra_msi_top_irq_ack, 1612 + .irq_mask = tegra_msi_top_irq_mask, 1613 + .irq_unmask = tegra_msi_top_irq_unmask, 1659 1614 }; 1660 1615 1661 - static int tegra_msi_map(struct irq_domain *domain, unsigned int irq, 1662 - irq_hw_number_t hwirq) 1616 + static void tegra_msi_irq_ack(struct irq_data *d) 1663 1617 { 1664 - irq_set_chip_and_handler(irq, &tegra_msi_irq_chip, handle_simple_irq); 1665 - irq_set_chip_data(irq, domain->host_data); 1618 + struct tegra_msi *msi = irq_data_get_irq_chip_data(d); 1619 + struct tegra_pcie *pcie = msi_to_pcie(msi); 1620 + unsigned int index = d->hwirq / 32; 1621 + 1622 + /* clear the interrupt */ 1623 + afi_writel(pcie, BIT(d->hwirq % 32), AFI_MSI_VEC(index)); 1624 + } 1625 + 1626 + static void tegra_msi_irq_mask(struct irq_data *d) 1627 + { 1628 + struct tegra_msi *msi = irq_data_get_irq_chip_data(d); 1629 + struct tegra_pcie *pcie = msi_to_pcie(msi); 1630 + unsigned int index = d->hwirq / 32; 1631 + unsigned long flags; 1632 + u32 value; 1633 + 1634 + spin_lock_irqsave(&msi->mask_lock, flags); 1635 + value = afi_readl(pcie, AFI_MSI_EN_VEC(index)); 1636 + value &= ~BIT(d->hwirq % 32); 1637 + afi_writel(pcie, value, AFI_MSI_EN_VEC(index)); 1638 + spin_unlock_irqrestore(&msi->mask_lock, flags); 1639 + } 1640 + 1641 + static void tegra_msi_irq_unmask(struct irq_data *d) 1642 + { 1643 + struct tegra_msi *msi = irq_data_get_irq_chip_data(d); 1644 + struct tegra_pcie *pcie = msi_to_pcie(msi); 1645 + unsigned int index = d->hwirq / 32; 1646 + unsigned long flags; 1647 + u32 value; 1648 + 1649 + spin_lock_irqsave(&msi->mask_lock, flags); 1650 + value = afi_readl(pcie, AFI_MSI_EN_VEC(index)); 1651 + value |= BIT(d->hwirq % 32); 1652 + afi_writel(pcie, value, AFI_MSI_EN_VEC(index)); 1653 + spin_unlock_irqrestore(&msi->mask_lock, flags); 1654 + } 1655 + 1656 + static int tegra_msi_set_affinity(struct irq_data *d, const struct cpumask *mask, bool force) 1657 + { 1658 + return -EINVAL; 1659 + } 1660 + 1661 + static void tegra_compose_msi_msg(struct irq_data *data, struct msi_msg *msg) 1662 + { 1663 + struct tegra_msi *msi = irq_data_get_irq_chip_data(data); 1664 + 1665 + msg->address_lo = lower_32_bits(msi->phys); 1666 + msg->address_hi = upper_32_bits(msi->phys); 1667 + msg->data = data->hwirq; 1668 + } 1669 + 1670 + static struct irq_chip tegra_msi_bottom_chip = { 1671 + .name = "Tegra MSI", 1672 + .irq_ack = tegra_msi_irq_ack, 1673 + .irq_mask = tegra_msi_irq_mask, 1674 + .irq_unmask = tegra_msi_irq_unmask, 1675 + .irq_set_affinity = tegra_msi_set_affinity, 1676 + .irq_compose_msi_msg = tegra_compose_msi_msg, 1677 + }; 1678 + 1679 + static int tegra_msi_domain_alloc(struct irq_domain *domain, unsigned int virq, 1680 + unsigned int nr_irqs, void *args) 1681 + { 1682 + struct tegra_msi *msi = domain->host_data; 1683 + unsigned int i; 1684 + int hwirq; 1685 + 1686 + mutex_lock(&msi->map_lock); 1687 + 1688 + hwirq = bitmap_find_free_region(msi->used, INT_PCI_MSI_NR, order_base_2(nr_irqs)); 1689 + 1690 + mutex_unlock(&msi->map_lock); 1691 + 1692 + if (hwirq < 0) 1693 + return -ENOSPC; 1694 + 1695 + for (i = 0; i < nr_irqs; i++) 1696 + irq_domain_set_info(domain, virq + i, hwirq + i, 1697 + &tegra_msi_bottom_chip, domain->host_data, 1698 + handle_edge_irq, NULL, NULL); 1666 1699 1667 1700 tegra_cpuidle_pcie_irqs_in_use(); 1668 1701 1669 1702 return 0; 1670 1703 } 1671 1704 1672 - static const struct irq_domain_ops msi_domain_ops = { 1673 - .map = tegra_msi_map, 1705 + static void tegra_msi_domain_free(struct irq_domain *domain, unsigned int virq, 1706 + unsigned int nr_irqs) 1707 + { 1708 + struct irq_data *d = irq_domain_get_irq_data(domain, virq); 1709 + struct tegra_msi *msi = domain->host_data; 1710 + 1711 + mutex_lock(&msi->map_lock); 1712 + 1713 + bitmap_release_region(msi->used, d->hwirq, order_base_2(nr_irqs)); 1714 + 1715 + mutex_unlock(&msi->map_lock); 1716 + } 1717 + 1718 + static const struct irq_domain_ops tegra_msi_domain_ops = { 1719 + .alloc = tegra_msi_domain_alloc, 1720 + .free = tegra_msi_domain_free, 1674 1721 }; 1722 + 1723 + static struct msi_domain_info tegra_msi_info = { 1724 + .flags = (MSI_FLAG_USE_DEF_DOM_OPS | MSI_FLAG_USE_DEF_CHIP_OPS | 1725 + MSI_FLAG_PCI_MSIX), 1726 + .chip = &tegra_msi_top_chip, 1727 + }; 1728 + 1729 + static int tegra_allocate_domains(struct tegra_msi *msi) 1730 + { 1731 + struct tegra_pcie *pcie = msi_to_pcie(msi); 1732 + struct fwnode_handle *fwnode = dev_fwnode(pcie->dev); 1733 + struct irq_domain *parent; 1734 + 1735 + parent = irq_domain_create_linear(fwnode, INT_PCI_MSI_NR, 1736 + &tegra_msi_domain_ops, msi); 1737 + if (!parent) { 1738 + dev_err(pcie->dev, "failed to create IRQ domain\n"); 1739 + return -ENOMEM; 1740 + } 1741 + irq_domain_update_bus_token(parent, DOMAIN_BUS_NEXUS); 1742 + 1743 + msi->domain = pci_msi_create_irq_domain(fwnode, &tegra_msi_info, parent); 1744 + if (!msi->domain) { 1745 + dev_err(pcie->dev, "failed to create MSI domain\n"); 1746 + irq_domain_remove(parent); 1747 + return -ENOMEM; 1748 + } 1749 + 1750 + return 0; 1751 + } 1752 + 1753 + static void tegra_free_domains(struct tegra_msi *msi) 1754 + { 1755 + struct irq_domain *parent = msi->domain->parent; 1756 + 1757 + irq_domain_remove(msi->domain); 1758 + irq_domain_remove(parent); 1759 + } 1675 1760 1676 1761 static int tegra_pcie_msi_setup(struct tegra_pcie *pcie) 1677 1762 { 1678 - struct pci_host_bridge *host = pci_host_bridge_from_priv(pcie); 1679 1763 struct platform_device *pdev = to_platform_device(pcie->dev); 1680 1764 struct tegra_msi *msi = &pcie->msi; 1681 1765 struct device *dev = pcie->dev; 1682 1766 int err; 1683 1767 1684 - mutex_init(&msi->lock); 1768 + mutex_init(&msi->map_lock); 1769 + spin_lock_init(&msi->mask_lock); 1685 1770 1686 - msi->chip.dev = dev; 1687 - msi->chip.setup_irq = tegra_msi_setup_irq; 1688 - msi->chip.teardown_irq = tegra_msi_teardown_irq; 1689 - 1690 - msi->domain = irq_domain_add_linear(dev->of_node, INT_PCI_MSI_NR, 1691 - &msi_domain_ops, &msi->chip); 1692 - if (!msi->domain) { 1693 - dev_err(dev, "failed to create IRQ domain\n"); 1694 - return -ENOMEM; 1771 + if (IS_ENABLED(CONFIG_PCI_MSI)) { 1772 + err = tegra_allocate_domains(msi); 1773 + if (err) 1774 + return err; 1695 1775 } 1696 1776 1697 1777 err = platform_get_irq_byname(pdev, "msi"); ··· 1766 1714 1767 1715 msi->irq = err; 1768 1716 1769 - err = request_irq(msi->irq, tegra_pcie_msi_irq, IRQF_NO_THREAD, 1770 - tegra_msi_irq_chip.name, pcie); 1771 - if (err < 0) { 1772 - dev_err(dev, "failed to request IRQ: %d\n", err); 1773 - goto free_irq_domain; 1774 - } 1717 + irq_set_chained_handler_and_data(msi->irq, tegra_pcie_msi_irq, pcie); 1775 1718 1776 1719 /* Though the PCIe controller can address >32-bit address space, to 1777 1720 * facilitate endpoints that support only 32-bit MSI target address, ··· 1787 1740 goto free_irq; 1788 1741 } 1789 1742 1790 - host->msi = &msi->chip; 1791 - 1792 1743 return 0; 1793 1744 1794 1745 free_irq: 1795 - free_irq(msi->irq, pcie); 1746 + irq_set_chained_handler_and_data(msi->irq, NULL, NULL); 1796 1747 free_irq_domain: 1797 - irq_domain_remove(msi->domain); 1748 + if (IS_ENABLED(CONFIG_PCI_MSI)) 1749 + tegra_free_domains(msi); 1750 + 1798 1751 return err; 1799 1752 } 1800 1753 ··· 1802 1755 { 1803 1756 const struct tegra_pcie_soc *soc = pcie->soc; 1804 1757 struct tegra_msi *msi = &pcie->msi; 1805 - u32 reg; 1758 + u32 reg, msi_state[INT_PCI_MSI_NR / 32]; 1759 + int i; 1806 1760 1807 1761 afi_writel(pcie, msi->phys >> soc->msi_base_shift, AFI_MSI_FPCI_BAR_ST); 1808 1762 afi_writel(pcie, msi->phys, AFI_MSI_AXI_BAR_ST); 1809 1763 /* this register is in 4K increments */ 1810 1764 afi_writel(pcie, 1, AFI_MSI_BAR_SZ); 1811 1765 1812 - /* enable all MSI vectors */ 1813 - afi_writel(pcie, 0xffffffff, AFI_MSI_EN_VEC0); 1814 - afi_writel(pcie, 0xffffffff, AFI_MSI_EN_VEC1); 1815 - afi_writel(pcie, 0xffffffff, AFI_MSI_EN_VEC2); 1816 - afi_writel(pcie, 0xffffffff, AFI_MSI_EN_VEC3); 1817 - afi_writel(pcie, 0xffffffff, AFI_MSI_EN_VEC4); 1818 - afi_writel(pcie, 0xffffffff, AFI_MSI_EN_VEC5); 1819 - afi_writel(pcie, 0xffffffff, AFI_MSI_EN_VEC6); 1820 - afi_writel(pcie, 0xffffffff, AFI_MSI_EN_VEC7); 1766 + /* Restore the MSI allocation state */ 1767 + bitmap_to_arr32(msi_state, msi->used, INT_PCI_MSI_NR); 1768 + for (i = 0; i < ARRAY_SIZE(msi_state); i++) 1769 + afi_writel(pcie, msi_state[i], AFI_MSI_EN_VEC(i)); 1821 1770 1822 1771 /* and unmask the MSI interrupt */ 1823 1772 reg = afi_readl(pcie, AFI_INTR_MASK); ··· 1829 1786 dma_free_attrs(pcie->dev, PAGE_SIZE, msi->virt, msi->phys, 1830 1787 DMA_ATTR_NO_KERNEL_MAPPING); 1831 1788 1832 - if (msi->irq > 0) 1833 - free_irq(msi->irq, pcie); 1834 - 1835 1789 for (i = 0; i < INT_PCI_MSI_NR; i++) { 1836 1790 irq = irq_find_mapping(msi->domain, i); 1837 1791 if (irq > 0) 1838 - irq_dispose_mapping(irq); 1792 + irq_domain_free_irqs(irq, 1); 1839 1793 } 1840 1794 1841 - irq_domain_remove(msi->domain); 1795 + irq_set_chained_handler_and_data(msi->irq, NULL, NULL); 1796 + 1797 + if (IS_ENABLED(CONFIG_PCI_MSI)) 1798 + tegra_free_domains(msi); 1842 1799 } 1843 1800 1844 1801 static int tegra_pcie_disable_msi(struct tegra_pcie *pcie) ··· 1849 1806 value = afi_readl(pcie, AFI_INTR_MASK); 1850 1807 value &= ~AFI_INTR_MASK_MSI_MASK; 1851 1808 afi_writel(pcie, value, AFI_INTR_MASK); 1852 - 1853 - /* disable all MSI vectors */ 1854 - afi_writel(pcie, 0, AFI_MSI_EN_VEC0); 1855 - afi_writel(pcie, 0, AFI_MSI_EN_VEC1); 1856 - afi_writel(pcie, 0, AFI_MSI_EN_VEC2); 1857 - afi_writel(pcie, 0, AFI_MSI_EN_VEC3); 1858 - afi_writel(pcie, 0, AFI_MSI_EN_VEC4); 1859 - afi_writel(pcie, 0, AFI_MSI_EN_VEC5); 1860 - afi_writel(pcie, 0, AFI_MSI_EN_VEC6); 1861 - afi_writel(pcie, 0, AFI_MSI_EN_VEC7); 1862 1809 1863 1810 return 0; 1864 1811 }