[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z6Gnat93skcoFZqn@infradead.org>
Date: Mon, 3 Feb 2025 21:36:42 -0800
From: Christoph Hellwig <hch@...radead.org>
To: Lorenzo Stoakes <lorenzo.stoakes@...cle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Jaya Kumar <jayakumar.lkml@...il.com>,
Simona Vetter <simona@...ll.ch>, Helge Deller <deller@....de>,
linux-fbdev@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
Matthew Wilcox <willy@...radead.org>,
David Hildenbrand <david@...hat.com>,
Kajtar Zsolt <soci@....rulez.org>, Maira Canal <mcanal@...lia.com>,
Thomas Zimmermann <tzimmermann@...e.de>
Subject: Re: [PATCH 2/3] mm: provide mapping_wrprotect_page() function
Hi Simona,
On Mon, Feb 03, 2025 at 04:49:34PM +0100, Simona Vetter wrote:
>
> Could we go one step further and entirely drop the struct page? Similar to
> unmap_mapping_range for VM_SPECIAL mappings, except it only updates the
> write protection. The reason is that ideally we'd like fbdev defio to
> entirely get rid of any struct page usage, because with some dma_alloc()
> memory regions there's simply no struct page for them (it's a carveout).
Umm, for dma_alloc* where * is not _pages you never can get a page or
PFN form them. They are block boxes and drivers must not attempt to
translated them into either a page or PFN or things will go wrong.
Only the kernel virtual address and dma_address may be used.
> See e.g. Sa498d4d06d6 ("drm/fbdev-dma: Only install deferred I/O if
> necessary") for some of the pain this has caused.
The commit hash is corrupted, I guess this is 5a498d4d06d6 as the
subject line matches. And that commit (just like the code it is trying
to fix) is completely broken as it violates the above.
Powered by blists - more mailing lists