From 560cb3bd9a48115f334c0a127347575ca7c13f6f Mon Sep 17 00:00:00 2001 From: Shawn Lin Date: Fri, 26 Dec 2025 09:45:28 +0800 Subject: [PATCH 1/3] Documentation: PCI: Fix typos in msi-howto.rst Fix subject-verb agreement for "has a requirements" as well as "neither...or" conjunction mistake. And convert "Message Signalled Interrupts" to "Message Signaled Interrupts" to match the PCIe spec. Signed-off-by: Shawn Lin Signed-off-by: Bjorn Helgaas Tested-by: Randy Dunlap Reviewed-by: Randy Dunlap Reviewed-by: Bagas Sanjaya Link: https://patch.msgid.link/1766713528-173281-1-git-send-email-shawn.lin@rock-chips.com --- Documentation/PCI/msi-howto.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/PCI/msi-howto.rst b/Documentation/PCI/msi-howto.rst index 0692c9aec66f..667ebe2156b4 100644 --- a/Documentation/PCI/msi-howto.rst +++ b/Documentation/PCI/msi-howto.rst @@ -98,7 +98,7 @@ function:: which allocates up to max_vecs interrupt vectors for a PCI device. It returns the number of vectors allocated or a negative error. If the device -has a requirements for a minimum number of vectors the driver can pass a +has a requirement for a minimum number of vectors the driver can pass a min_vecs argument set to this limit, and the PCI core will return -ENOSPC if it can't meet the minimum number of vectors. @@ -127,7 +127,7 @@ not be able to allocate as many vectors for MSI as it could for MSI-X. On some platforms, MSI interrupts must all be targeted at the same set of CPUs whereas MSI-X interrupts can all be targeted at different CPUs. -If a device supports neither MSI-X or MSI it will fall back to a single +If a device supports neither MSI-X nor MSI it will fall back to a single legacy IRQ vector. The typical usage of MSI or MSI-X interrupts is to allocate as many vectors @@ -203,7 +203,7 @@ How to tell whether MSI/MSI-X is enabled on a device ---------------------------------------------------- Using 'lspci -v' (as root) may show some devices with "MSI", "Message -Signalled Interrupts" or "MSI-X" capabilities. Each of these capabilities +Signaled Interrupts" or "MSI-X" capabilities. Each of these capabilities has an 'Enable' flag which is followed with either "+" (enabled) or "-" (disabled). From 80d9411c00e805488b631c91034e9b6c14a6dbdc Mon Sep 17 00:00:00 2001 From: Leon Romanovsky Date: Sun, 4 Jan 2026 14:51:28 +0200 Subject: [PATCH 2/3] PCI/P2PDMA: Add missing struct p2pdma_provider documentation Two fields in struct p2pdma_provider were not documented, which resulted in the following kernel-doc warning: Warning: include/linux/pci-p2pdma.h:26 struct member 'owner' not described in 'p2pdma_provider' Warning: include/linux/pci-p2pdma.h:26 struct member 'bus_offset' not described in 'p2pdma_provider' Repro: $ scripts/kernel-doc -none include/linux/pci-p2pdma.h Fixes: f58ef9d1d135 ("PCI/P2PDMA: Separate the mmap() support from the core logic") Reported-by: Bjorn Helgaas Closes: https://lore.kernel.org/all/20260102234033.GA246107@bhelgaas Signed-off-by: Leon Romanovsky Signed-off-by: Bjorn Helgaas Reviewed-by: Logan Gunthorpe Link: https://patch.msgid.link/20260104-fix-p2p-kdoc-v1-1-6d181233f8bc@nvidia.com --- include/linux/pci-p2pdma.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/pci-p2pdma.h b/include/linux/pci-p2pdma.h index 517e121d2598..873de20a2247 100644 --- a/include/linux/pci-p2pdma.h +++ b/include/linux/pci-p2pdma.h @@ -20,6 +20,8 @@ struct scatterlist; * struct p2pdma_provider * * A p2pdma provider is a range of MMIO address space available to the CPU. + * @owner: Device to which this provider belongs. + * @bus_offset: Bus offset for p2p communication. */ struct p2pdma_provider { struct device *owner; From 94cf23f6b7c3d6551af513b5f3ddba7838312494 Mon Sep 17 00:00:00 2001 From: Philipp Stanner Date: Thu, 18 Dec 2025 10:28:20 +0100 Subject: [PATCH 3/3] PCI: Remove useless WARN_ON() from devres PCI's devres implementation contains a WARN_ON() which served to inform users relying on the legacy devres iomap table that this table does not support multiple mappings per BAR. The WARN_ON() can be regarded as useless by now, since mapping a BAR multiple times is legal behavior and old users of pcim_iomap_table(), the accessor function for that table, did not break in the past PCI devres cleanup. New PCI users will hopefully notice that pcim_iomap_table() is deprecated and are unlikely to use it for mapping the same BAR multiple times. Moreover, WARN_ON()s create noisy, difficult to read error messages which can be more confusing than helpful, since they don't inform the user about what precisely the problem is. Remove the WARN_ON(). Reported-by: Guenter Roeck Signed-off-by: Philipp Stanner Signed-off-by: Bjorn Helgaas Link: https://patch.msgid.link/20251218092819.149665-2-phasta@kernel.org --- drivers/pci/devres.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/pci/devres.c b/drivers/pci/devres.c index 9f4190501395..f075e7881c3a 100644 --- a/drivers/pci/devres.c +++ b/drivers/pci/devres.c @@ -469,9 +469,6 @@ static int pcim_add_mapping_to_legacy_table(struct pci_dev *pdev, if (!legacy_iomap_table) return -ENOMEM; - /* The legacy mechanism doesn't allow for duplicate mappings. */ - WARN_ON(legacy_iomap_table[bar]); - legacy_iomap_table[bar] = mapping; return 0;