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 toUmm, for dma_alloc* where * is not _pages you never can get a page or
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).
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 ifThe commit hash is corrupted, I guess this is 5a498d4d06d6 as the
necessary") for some of the pain this has caused.
subject line matches. And that commit (just like the code it is trying
to fix) is completely broken as it violates the above.