From: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
To: "Gaurav Batra" <gbatra@linux.ibm.com>, "Dan Horák" <dan@danny.cz>
Cc: 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: Wed, 25 Mar 2026 23:12:16 +0530 [thread overview]
Message-ID: <341nolfr.ritesh.list@gmail.com> (raw)
In-Reply-To: <2d5fd6ec-003f-4d24-aa2e-06ba94d6cba4@linux.ibm.com>
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);
next prev parent reply other threads:[~2026-03-25 17:48 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 [this message]
2026-03-25 20:00 ` Dan Horák
2026-03-26 10:29 ` Dan Horák
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=341nolfr.ritesh.list@gmail.com \
--to=ritesh.list@gmail.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=dan@danny.cz \
--cc=donettom@linux.ibm.com \
--cc=gbatra@linux.ibm.com \
--cc=linuxppc-dev@lists.ozlabs.org \
/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