diff mbox series

[net-next] ionic: advertise 52-bit addressing limitation for MSI-X

Message ID 20240530214026.774256-1-drc@linux.ibm.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net-next] ionic: advertise 52-bit addressing limitation for MSI-X | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 906 this patch: 906
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 906 this patch: 906
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 10 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest fail net-next-2024-05-31--00-00 (tests: 1040)

Commit Message

David Christensen May 30, 2024, 9:40 p.m. UTC
Current ionic devices only support 52 internal physical address
lines. This is sufficient for x86_64 systems which have similar
limitations but does not apply to all other architectures,
notably IBM POWER (ppc64). To ensure that MSI/MSI-X vectors are
not set outside the physical address limits of the NIC, set the
recently added no_64bit_msi value of the pci_dev structure
during device probe.

Signed-off-by: David Christensen <drc@linux.ibm.com>
---
 drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Shannon Nelson May 30, 2024, 10:34 p.m. UTC | #1
On 5/30/2024 2:40 PM, David Christensen wrote:
> 
> Current ionic devices only support 52 internal physical address
> lines. This is sufficient for x86_64 systems which have similar
> limitations but does not apply to all other architectures,
> notably IBM POWER (ppc64). To ensure that MSI/MSI-X vectors are
> not set outside the physical address limits of the NIC, set the
> recently added no_64bit_msi value of the pci_dev structure
> during device probe.
> 
> Signed-off-by: David Christensen <drc@linux.ibm.com>
> ---
>   drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c | 4 ++++
>   1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
> index 6ba8d4aca0a0..1e7f507f461f 100644
> --- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
> +++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
> @@ -326,6 +326,10 @@ static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
>                  goto err_out;
>          }
> 
> +       /* Ensure MSI/MSI-X interrupts lie within addressable physical memory */
> +       if (IONIC_ADDR_LEN < 64)
> +               pdev->no_64bit_msi = 1;
> +

Thanks, David, for the reminder that we have something like this in our 
out-of-tree driver.  I'm far from being a DMA expert, but this seems 
limiting for those architectures that don't need it, and I would have 
thought that setting the dma mask would already be the way of telling 
the system what our limitation was so there wouldn't be this problem. 
(I'm sure someone will point out the error in my thinking...)

Perhaps to solve your problem with less limitation on others we could do 
something like:

#ifdef CONFIG_PPC64
        pdev->no_64bit_msi = 1;
#endif

Thanks,
sln

>          err = ionic_setup_one(ionic);
>          if (err)
>                  goto err_out;
> --
> 2.43.0
>
diff mbox series

Patch

diff --git a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
index 6ba8d4aca0a0..1e7f507f461f 100644
--- a/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
+++ b/drivers/net/ethernet/pensando/ionic/ionic_bus_pci.c
@@ -326,6 +326,10 @@  static int ionic_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
 		goto err_out;
 	}
 
+	/* Ensure MSI/MSI-X interrupts lie within addressable physical memory */
+	if (IONIC_ADDR_LEN < 64)
+		pdev->no_64bit_msi = 1;
+
 	err = ionic_setup_one(ionic);
 	if (err)
 		goto err_out;