From: "Dan Horák" <dan@danny.cz>
To: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Cc: Gaurav Batra <gbatra@linux.ibm.com>,
linuxppc-dev@lists.ozlabs.org, amd-gfx@lists.freedesktop.org,
Donet Tom <donettom@linux.ibm.com>
Subject: Re: amdgpu driver fails to initialize on ppc64le in 7.0-rc1 and newer
Date: Thu, 26 Mar 2026 11:29:20 +0100 [thread overview]
Message-ID: <20260326112920.07eb56ee6d133947d8bcf6f3@danny.cz> (raw)
In-Reply-To: <341nolfr.ritesh.list@gmail.com>
Hi Ritesh,
On Wed, 25 Mar 2026 23:12:16 +0530
Ritesh Harjani (IBM) <ritesh.list@gmail.com> wrote:
> Gaurav Batra <gbatra@linux.ibm.com> writes:
>
> > Hello Ritesh
> >
> > I think, what you are proposing to add dev->bus_dma_limit in the check
> > might work. In the case of PowerNV, this is not set, but
> > dev->dma_ops_bypass is set. So, for PowerNV, it will fall back to how it
> > was before.
> >
> > Also, since these both are set in LPAR mode, the current patch as-is
> > will work.
> >
> > Dan, can you please try Ritesh proposed fix on your PowerNV box? I am
> > not able to lay my hands on a PowerNV box yet.
> >
>
> It would be this diff then. Note, I have only compile tested it.
>
> diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c
> index 73e10bd4d56d..8b4de508d2eb 100644
> --- a/arch/powerpc/kernel/dma-iommu.c
> +++ b/arch/powerpc/kernel/dma-iommu.c
> @@ -67,7 +67,7 @@ bool arch_dma_unmap_sg_direct(struct device *dev, struct scatterlist *sg,
> }
> bool arch_dma_alloc_direct(struct device *dev)
> {
> - if (dev->dma_ops_bypass)
> + if (dev->dma_ops_bypass && dev->bus_dma_limit)
> return true;
>
> return false;
> @@ -75,7 +75,7 @@ bool arch_dma_alloc_direct(struct device *dev)
>
> bool arch_dma_free_direct(struct device *dev, dma_addr_t dma_handle)
> {
> - if (!dev->dma_ops_bypass)
> + if (!dev->dma_ops_bypass || !dev->bus_dma_limit)
> return false;
>
> return is_direct_handle(dev, dma_handle);
this seems to fix the amdgpu initialization, full kernel log available
as https://fedora.danny.cz/tmp/kernel-7.0-rc5.log
Tested-by: Dan Horák <dan@danny.cz>
Dan
next prev parent reply other threads:[~2026-03-26 10:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-13 13:23 amdgpu driver fails to initialize on ppc64le in 7.0-rc1 and newer Dan Horák
2026-03-15 4:25 ` Ritesh Harjani
2026-03-15 9:50 ` Dan Horák
2026-03-16 21:02 ` Gaurav Batra
2026-03-25 12:12 ` Ritesh Harjani
2026-03-25 14:56 ` Gaurav Batra
2026-03-25 16:28 ` Gaurav Batra
2026-03-25 17:42 ` Ritesh Harjani
2026-03-25 20:00 ` Dan Horák
2026-03-26 10:29 ` Dan Horák [this message]
2026-03-26 10:38 ` Ritesh Harjani
2026-03-26 13:37 ` Gaurav Batra
2026-03-17 11:43 ` Ritesh Harjani
2026-03-17 14:31 ` Dan Horák
2026-03-17 22:34 ` Karl Schimanek
2026-03-16 13:55 ` Alex Deucher
2026-03-23 0:30 ` Timothy Pearson
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=20260326112920.07eb56ee6d133947d8bcf6f3@danny.cz \
--to=dan@danny.cz \
--cc=amd-gfx@lists.freedesktop.org \
--cc=donettom@linux.ibm.com \
--cc=gbatra@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=ritesh.list@gmail.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