[PATCH v4 07/14] mm: abstract io_remap_pfn_range() based on PFN

Jason Gunthorpe jgg at nvidia.com
Wed Sep 17 14:19:44 PDT 2025


On Wed, Sep 17, 2025 at 08:11:09PM +0100, Lorenzo Stoakes wrote:

> -#define io_remap_pfn_range(vma, vaddr, pfn, size, prot) \
> -	remap_pfn_range(vma, vaddr, pfn, size, prot)
> +#define io_remap_pfn_range_pfn(pfn, size) (pfn)

??

Just delete it? Looks like cargo cult cruft, see below about
pgprot_decrypted().

> +#ifdef io_remap_pfn_range_pfn
> +static inline unsigned long io_remap_pfn_range_prot(pgprot_t prot)
> +{
> +	/* We do not decrypt if arch customises PFN. */
> +	return prot;

pgprot_decrypted() is a NOP on all the arches that use this override,
please drop this.

Soon future work will require something more complicated to compute if
pgprot_decrypted() should be called so this unused stuff isn't going
to hold up.

Otherwise looks good to me

Reviewed-by: Jason Gunthorpe <jgg at nvidia.com>

Jason



More information about the kexec mailing list