diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index 265a32e1ff74c6f9f5ab87a538044749ec3b7b1d..7da43337ad2337cf54f68acfa007038b7b28dbc3 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -1445,6 +1445,17 @@ static inline int pfn_section_valid(struct mem_section *ms, unsigned long pfn) #endif #ifndef CONFIG_HAVE_ARCH_PFN_VALID +/** + * pfn_valid - check if there is a valid memory map entry for a PFN + * @pfn: the page frame number to check + * + * Check if there is a valid memory map entry aka struct page for the @pfn. + * Note, that availability of the memory map entry does not imply that + * there is actual usable memory at that @pfn. The struct page may + * represent a hole or an unusable page frame. + * + * Return: 1 for PFNs that have memory map entries and 0 otherwise + */ static inline int pfn_valid(unsigned long pfn) { struct mem_section *ms;