|
@@ -138,6 +138,7 @@ bool nd_is_uuid_unique(struct device *dev, u8 *uuid)
|
|
|
bool pmem_should_map_pages(struct device *dev)
|
|
bool pmem_should_map_pages(struct device *dev)
|
|
|
{
|
|
{
|
|
|
struct nd_region *nd_region = to_nd_region(dev->parent);
|
|
struct nd_region *nd_region = to_nd_region(dev->parent);
|
|
|
|
|
+ struct nd_namespace_common *ndns = to_ndns(dev);
|
|
|
struct nd_namespace_io *nsio;
|
|
struct nd_namespace_io *nsio;
|
|
|
|
|
|
|
|
if (!IS_ENABLED(CONFIG_ZONE_DEVICE))
|
|
if (!IS_ENABLED(CONFIG_ZONE_DEVICE))
|
|
@@ -149,6 +150,9 @@ bool pmem_should_map_pages(struct device *dev)
|
|
|
if (is_nd_pfn(dev) || is_nd_btt(dev))
|
|
if (is_nd_pfn(dev) || is_nd_btt(dev))
|
|
|
return false;
|
|
return false;
|
|
|
|
|
|
|
|
|
|
+ if (ndns->force_raw)
|
|
|
|
|
+ return false;
|
|
|
|
|
+
|
|
|
nsio = to_nd_namespace_io(dev);
|
|
nsio = to_nd_namespace_io(dev);
|
|
|
if (region_intersects(nsio->res.start, resource_size(&nsio->res),
|
|
if (region_intersects(nsio->res.start, resource_size(&nsio->res),
|
|
|
IORESOURCE_SYSTEM_RAM,
|
|
IORESOURCE_SYSTEM_RAM,
|