On 3/20/26 23:39, Lorenzo Stoakes (Oracle) wrote: > Currently drivers use vm_iomap_memory() as a simple helper function for > I/O remapping memory over a range starting at a specified physical address > over a specified length. > > In order to utilise this from mmap_prepare, separate out the core logic > into __simple_ioremap_prep(), update vm_iomap_memory() to use it, and add > simple_ioremap_prepare() to do the same with a VMA descriptor object. > > We also add MMAP_SIMPLE_IO_REMAP and relevant fields to the struct > mmap_action type to permit this operation also. > > We use mmap_action_ioremap() to set up the actual I/O remap operation once > we have checked and figured out the parameters, which makes > simple_ioremap_prepare() easy to implement. > > We then add mmap_action_simple_ioremap() to allow drivers to make use of > this mode. > > We update the mmap_prepare documentation to describe this mode. Finally, > we update the VMA tests to reflect this change. > > Reviewed-by: Suren Baghdasaryan <[email protected]> > Signed-off-by: Lorenzo Stoakes (Oracle) <[email protected]>
Acked-by: Vlastimil Babka (SUSE) <[email protected]>

