On Mon, 31 Mar 2025 at 18:01, Steven Rostedt <rost...@goodmis.org> wrote: > > Note, I believe that Linus brought up the issue that because this physical > memory is not currently part of the memory allocator (it's not aware of it > yet), that the getting struct page or a "pfn" for it may not be reliable.
'pfn' is always reliable. The pfn ('page frame number') is literally just the physical address expressed in 'page units', ie just shifted down by the page shift. So pfn and phys_addr_t are interchangeable when it comes to mapping pages. The pfn is in fact often the preferred form, because on 32-bit architectures a pfn is 32-bit, but a phys_addr_t is often 64-bit and generates extra code. I think 'pfn' was introduced as a name ong long ago because it was what the alpha architecture used in the VM documentation. It probably predates that too, but it's where I got it from, iirc. Linus