[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250312053245.GA12112@lst.de>
Date: Wed, 12 Mar 2025 06:32:45 +0100
From: Christoph Hellwig <hch@....de>
To: Ryan Roberts <ryan.roberts@....com>
Cc: Huan Yang <link@...o.com>, Bingbu Cao <bingbu.cao@...ux.intel.com>,
vivek.kasireddy@...el.com, hch@....de, linux-kernel@...r.kernel.org,
christian.koenig@....com, dri-devel@...ts.freedesktop.org
Subject: Re: udmabuf vmap failed (Revert "udmabuf: fix vmap_udmabuf error
page set" can help)
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.
Powered by blists - more mailing lists