Re: [PATCH v3 07/13] mm: introduce io_remap_pfn_range_[prepare, complete]()

Lorenzo Stoakes
2025-09-17T11:16:01Z

On Wed, Sep 17, 2025 at 12:12:17PM +0100, Pedro Falcato wrote:
> On Tue, Sep 16, 2025 at 03:11:53PM +0100, Lorenzo Stoakes wrote:
> > We introduce the io_remap*() equivalents of remap_pfn_range_prepare() and
> > remap_pfn_range_complete() to allow for I/O remapping via mmap_prepare.
> >
> > We have to make some architecture-specific changes for those architectures
> > which define customised handlers.
> >
> > It doesn't really make sense to make this internal-only as arches specify
> > their version of these functions so we declare these in mm.h.
>
> Similar question to the remap_pfn_range patch.

There's arch-specific implementations, which in turn invoke the new
prepare/complete helpers.

(This answers your query here and on the remap_pfn_prepare/complete patch).

With the abstraction of the get pfn function suggested by Jason it may be
possible to move these over and just utilise that in internal.h/util.c.

I will look into that.

> >
> > Signed-off-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com>
>
> Looks ok, but again, i'm no expert on this.
>
> Acked-by: Pedro Falcato <pfalcato@suse.de>

Thanks!

>
> --
> Pedro

Cheers, Lorenzo