[PATCH 05/12] mm: Remove remaining uses of PFN_DEV

Dan Williams dan.j.williams at intel.com
Wed Jun 4 19:02:52 PDT 2025


Alistair Popple wrote:
> PFN_DEV was used by callers of dax_direct_access() to figure out if the
> returned PFN is associated with a page using pfn_t_has_page() or
> not. However all DAX PFNs now require an assoicated ZONE_DEVICE page so can
> assume a page exists.
> 
> Other users of PFN_DEV were setting it before calling
> vmf_insert_mixed(). This is unnecessary as it is no longer checked, instead
> relying on pfn_valid() to determine if there is an associated page or not.
> 
> Signed-off-by: Alistair Popple <apopple at nvidia.com>
> Reviewed-by: Christoph Hellwig <hch at lst.de>

Looks good,

Reviewed-by: Dan Williams <dan.j.williams at intel.com>



More information about the linux-riscv mailing list