From: Christoph Hellwig <hch@lst.de>
To: Ryan Roberts <ryan.roberts@arm.com>
Cc: Huan Yang <link@vivo.com>,
Bingbu Cao <bingbu.cao@linux.intel.com>,
vivek.kasireddy@intel.com, hch@lst.de,
linux-kernel@vger.kernel.org, christian.koenig@amd.com,
dri-devel@lists.freedesktop.org
Subject: Re: udmabuf vmap failed (Revert "udmabuf: fix vmap_udmabuf error page set" can help)
Date: Wed, 12 Mar 2025 06:32:45 +0100 [thread overview]
Message-ID: <20250312053245.GA12112@lst.de> (raw)
In-Reply-To: <32814695-359e-4c4b-90a4-c7c34421a1d5@arm.com>
On Tue, Mar 11, 2025 at 11:14:28AM +0000, Ryan Roberts wrote:
> Hi,
>
> On 11/03/2025 09:34, Huan Yang wrote:
> > Hi Christoph and Ryan,
> >
> > Can you help us check vmap_pfn's pfn check is right? Did here mischecked pfn_valid?
>
> I'm no expert on this piece of code, but I believe pfn_valid() is checking to
> see if a pfn is valid *memory*. i.e. does it have a corresponding struct page?
>
> I'm guessing that vmap_pfn() is only intended to be used for non-memory pfns,
> e.g. mmio regions. You probably want either vmap() or vm_map_ram()?
Exactly. vmap_pfn is a special case for mapping non-page backed memory.
Wjile looking ad udmabuf, the crap it does with dma mapping to the
misc device-attached struct device also can't work except by chance in a
few very exceptional setups. So as far as I can tell udmabuf isn't
really something usable to start with, which might explain why the
issues with vmap/vmap_pfn weren't easily noticed.
prev parent reply other threads:[~2025-03-12 5:32 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-11 6:40 udmabuf vmap failed (Revert "udmabuf: fix vmap_udmabuf error page set" can help) Bingbu Cao
2025-03-11 7:12 ` Huan Yang
2025-03-11 8:42 ` Bingbu Cao
2025-03-11 8:54 ` Huan Yang
2025-03-11 9:02 ` Bingbu Cao
2025-03-11 9:34 ` Huan Yang
2025-03-11 11:14 ` Ryan Roberts
2025-03-12 5:32 ` Christoph Hellwig [this message]
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=20250312053245.GA12112@lst.de \
--to=hch@lst.de \
--cc=bingbu.cao@linux.intel.com \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=link@vivo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ryan.roberts@arm.com \
--cc=vivek.kasireddy@intel.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