@@ -365,6 +365,7 @@ enum {
int region_intersects(resource_size_t offset, size_t size, const char *type,
unsigned long flags);
int region_intersects_ram(resource_size_t offset, size_t size);
+int region_intersects_pmem(resource_size_t offset, size_t size);
/* Support for virtually mapped pages */
struct page *vmalloc_to_page(const void *addr);
@@ -548,6 +548,18 @@ int region_intersects_ram(resource_size_t start, size_t size)
}
EXPORT_SYMBOL_GPL(region_intersects_ram);
+/*
+ * region_intersects_pmem() checks if a specified address range is
+ * persistent memory, registered as "Persistent Memory", in the
+ * iomem_resource list.
+ */
+int region_intersects_pmem(resource_size_t start, size_t size)
+{
+ return region_intersects(start, size, "Persistent Memory",
+ IORESOURCE_MEM);
+}
+EXPORT_SYMBOL_GPL(region_intersects_pmem);
+
void __weak arch_remove_reservations(struct resource *avail)
{
}