mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Nelson, Shannon" <shannon.nelson@amd.com>
To: David Christensen <drc@linux.ibm.com>,
	Brett Creeley <brett.creeley@amd.com>,
	"supporter:PENSANDO ETHERNET DRIVERS" <drivers@pensando.io>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	"open list:PENSANDO ETHERNET DRIVERS" <netdev@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next] ionic: advertise 52-bit addressing limitation for MSI-X
Date: Thu, 30 May 2024 15:34:02 -0700	[thread overview]
Message-ID: <462c0b21-c800-4b9b-bd79-72ecd135ad0f@amd.com> (raw)
In-Reply-To: <20240530214026.774256-1-drc@linux.ibm.com>

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
> 

  reply	other threads:[~2024-05-30 22:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30 21:40 David Christensen
2024-05-30 22:34 ` Nelson, Shannon [this message]
2024-06-03 21:27 ` [PATCH net-next v2] " David Christensen
2024-06-03 22:16   ` Nelson, Shannon
2024-06-05 23:00   ` patchwork-bot+netdevbpf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=462c0b21-c800-4b9b-bd79-72ecd135ad0f@amd.com \
    --to=shannon.nelson@amd.com \
    --cc=brett.creeley@amd.com \
    --cc=davem@davemloft.net \
    --cc=drc@linux.ibm.com \
    --cc=drivers@pensando.io \
    --cc=edumazet@google.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®