@@ -11,6 +11,7 @@
#include <linux/fs.h>
#include <linux/mm.h>
#include <linux/mman.h>
+#include <linux/memory-tiers.h>
#include "dax-private.h"
#include "bus.h"
@@ -147,6 +148,9 @@ static int dev_dax_kmem_probe(struct dev_dax *dev_dax)
dev_set_drvdata(dev, data);
+#ifdef CONFIG_TIERED_MEMORY
+ node_set_memory_tier(numa_node, MEMORY_TIER_PMEM);
+#endif
return 0;
err_request_mem:
@@ -364,6 +364,7 @@ int node_set_memory_tier(int node, int tier)
return ret;
}
+EXPORT_SYMBOL_GPL(node_set_memory_tier);
/**
* next_demotion_node() - Get the next node in the demotion path