Linux-NVDIMM Archive on
 help / color / Atom feed
From: "Aneesh Kumar K.V" <>
	"Aneesh Kumar K.V" <>
Subject: [PATCH v2 5/6] libnvdimm/namespace: Align DPA based on arch restrictions
Date: Thu, 28 Nov 2019 14:00:56 +0530
Message-ID: <> (raw)
In-Reply-To: <>

When creating new namespace make sure DPA address are properly aligned based
on arch restrictions.

Signed-off-by: Aneesh Kumar K.V <>
 drivers/nvdimm/namespace_devs.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/nvdimm/namespace_devs.c b/drivers/nvdimm/namespace_devs.c
index 06b55c41660d..6a83db9f8734 100644
--- a/drivers/nvdimm/namespace_devs.c
+++ b/drivers/nvdimm/namespace_devs.c
@@ -589,6 +589,8 @@ static void space_valid(struct nd_region *nd_region, struct nvdimm_drvdata *ndd,
+	valid->start = ALIGN(valid->start, arch_namespace_align_size());
 	/* allocation needs to be contiguous, so this is all or nothing */
 	if (resource_size(valid) < n)
 		goto invalid;
Linux-nvdimm mailing list --
To unsubscribe send an email to

  parent reply index

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-28  8:30 [PATCH v2 1/6] libnvdimm/namespace: Make namespace size validation arch dependent Aneesh Kumar K.V
2019-11-28  8:30 ` [PATCH v2 2/6] libnvdimm/namespace: Validate namespace start addr and size Aneesh Kumar K.V
2019-11-28  8:30 ` [PATCH v2 3/6] libnvdimm/namespace: Validate namespace size when creating new namespace Aneesh Kumar K.V
2019-11-28  8:30 ` [PATCH v2 4/6] libnvdimm/namespace: Add debug check while initializing namespace resource size Aneesh Kumar K.V
2019-11-28  8:30 ` Aneesh Kumar K.V [this message]
2019-11-28  8:30 ` [PATCH v2 6/6] libnvdimm/namespace: Expose arch specific supported size align value Aneesh Kumar K.V

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-NVDIMM Archive on

Archives are clonable:
	git clone --mirror linux-nvdimm/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-nvdimm linux-nvdimm/ \
	public-inbox-index linux-nvdimm

Example config snippet for mirrors

Newsgroup available over NNTP:

AGPL code for this site: git clone