linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dax/kmem: Pass valid argument to memory_group_register_static
@ 2023-06-20 14:03 Tarun Sahu
  2023-06-20 23:18 ` Alison Schofield
  0 siblings, 1 reply; 5+ messages in thread
From: Tarun Sahu @ 2023-06-20 14:03 UTC (permalink / raw)
  To: nvdimm, linux-cxl
  Cc: linux-kernel, dave.jiang, dan.j.williams, vishal.l.verma,
	aneesh.kumar, jaypatel, tsahu

memory_group_register_static takes maximum number of pages as the argument
while dev_dax_kmem_probe passes total_len (in bytes) as the argument.

Signed-off-by: Tarun Sahu <tsahu@linux.ibm.com>
---
 drivers/dax/kmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dax/kmem.c b/drivers/dax/kmem.c
index 7b36db6f1cbd..898ca9505754 100644
--- a/drivers/dax/kmem.c
+++ b/drivers/dax/kmem.c
@@ -99,7 +99,7 @@ static int dev_dax_kmem_probe(struct dev_dax *dev_dax)
 	if (!data->res_name)
 		goto err_res_name;
 
-	rc = memory_group_register_static(numa_node, total_len);
+	rc = memory_group_register_static(numa_node, PFN_UP(total_len));
 	if (rc < 0)
 		goto err_reg_mgid;
 	data->mgid = rc;
-- 
2.31.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-06-22  7:16 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-20 14:03 [PATCH] dax/kmem: Pass valid argument to memory_group_register_static Tarun Sahu
2023-06-20 23:18 ` Alison Schofield
2023-06-21  6:06   ` Tarun Sahu
2023-06-21  6:42     ` Verma, Vishal L
2023-06-22  7:15       ` Tarun Sahu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).