All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: linux-nvdimm@lists.01.org
Cc: Jan Kara <jack@suse.cz>, Matthew Wilcox <mawilcox@microsoft.com>,
	linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	Christoph Hellwig <hch@lst.de>
Subject: [PATCH 10/13] libnvdimm, pmem: fix persistence warning
Date: Thu, 19 Jan 2017 19:51:07 -0800	[thread overview]
Message-ID: <148488426722.37913.8831687104802903343.stgit@dwillia2-desk3.amr.corp.intel.com> (raw)
In-Reply-To: <148488421301.37913.12835362165895864897.stgit@dwillia2-desk3.amr.corp.intel.com>

The pmem driver assumes if platform firmware describes the memory
devices associated with a persistent memory range and
CONFIG_ARCH_HAS_PMEM_API=y that it has all the mechanism necessary to
flush data to a power-fail safe zone. We warn if the firmware does not
describe memory devices, but we also need to warn if the architecture
does not claim pmem support.

Cc: Jan Kara <jack@suse.cz>
Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 drivers/nvdimm/region_devs.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c
index c47cecc9358b..820cdf05343b 100644
--- a/drivers/nvdimm/region_devs.c
+++ b/drivers/nvdimm/region_devs.c
@@ -961,8 +961,9 @@ int nvdimm_has_flush(struct nd_region *nd_region)
 	struct nd_region_data *ndrd = dev_get_drvdata(&nd_region->dev);
 	int i;
 
-	/* no nvdimm == flushing capability unknown */
-	if (nd_region->ndr_mappings == 0)
+	/* no nvdimm or pmem api == flushing capability unknown */
+	if (nd_region->ndr_mappings == 0
+			|| !IS_ENABLED(CONFIG_ARCH_HAS_PMEM_API))
 		return -ENXIO;
 
 	for (i = 0; i < nd_region->ndr_mappings; i++)

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

WARNING: multiple messages have this Message-ID (diff)
From: Dan Williams <dan.j.williams@intel.com>
To: linux-nvdimm@ml01.01.org
Cc: Jan Kara <jack@suse.cz>, Matthew Wilcox <mawilcox@microsoft.com>,
	linux-kernel@vger.kernel.org, Jeff Moyer <jmoyer@redhat.com>,
	linux-fsdevel@vger.kernel.org,
	Ross Zwisler <ross.zwisler@linux.intel.com>,
	Christoph Hellwig <hch@lst.de>
Subject: [PATCH 10/13] libnvdimm, pmem: fix persistence warning
Date: Thu, 19 Jan 2017 19:51:07 -0800	[thread overview]
Message-ID: <148488426722.37913.8831687104802903343.stgit@dwillia2-desk3.amr.corp.intel.com> (raw)
In-Reply-To: <148488421301.37913.12835362165895864897.stgit@dwillia2-desk3.amr.corp.intel.com>

The pmem driver assumes if platform firmware describes the memory
devices associated with a persistent memory range and
CONFIG_ARCH_HAS_PMEM_API=y that it has all the mechanism necessary to
flush data to a power-fail safe zone. We warn if the firmware does not
describe memory devices, but we also need to warn if the architecture
does not claim pmem support.

Cc: Jan Kara <jack@suse.cz>
Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 drivers/nvdimm/region_devs.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c
index c47cecc9358b..820cdf05343b 100644
--- a/drivers/nvdimm/region_devs.c
+++ b/drivers/nvdimm/region_devs.c
@@ -961,8 +961,9 @@ int nvdimm_has_flush(struct nd_region *nd_region)
 	struct nd_region_data *ndrd = dev_get_drvdata(&nd_region->dev);
 	int i;
 
-	/* no nvdimm == flushing capability unknown */
-	if (nd_region->ndr_mappings == 0)
+	/* no nvdimm or pmem api == flushing capability unknown */
+	if (nd_region->ndr_mappings == 0
+			|| !IS_ENABLED(CONFIG_ARCH_HAS_PMEM_API))
 		return -ENXIO;
 
 	for (i = 0; i < nd_region->ndr_mappings; i++)

WARNING: multiple messages have this Message-ID (diff)
From: Dan Williams <dan.j.williams@intel.com>
To: linux-nvdimm@lists.01.org
Cc: Jan Kara <jack@suse.cz>, Matthew Wilcox <mawilcox@microsoft.com>,
	linux-kernel@vger.kernel.org, Jeff Moyer <jmoyer@redhat.com>,
	linux-fsdevel@vger.kernel.org,
	Ross Zwisler <ross.zwisler@linux.intel.com>,
	Christoph Hellwig <hch@lst.de>
Subject: [PATCH 10/13] libnvdimm, pmem: fix persistence warning
Date: Thu, 19 Jan 2017 19:51:07 -0800	[thread overview]
Message-ID: <148488426722.37913.8831687104802903343.stgit@dwillia2-desk3.amr.corp.intel.com> (raw)
In-Reply-To: <148488421301.37913.12835362165895864897.stgit@dwillia2-desk3.amr.corp.intel.com>

The pmem driver assumes if platform firmware describes the memory
devices associated with a persistent memory range and
CONFIG_ARCH_HAS_PMEM_API=y that it has all the mechanism necessary to
flush data to a power-fail safe zone. We warn if the firmware does not
describe memory devices, but we also need to warn if the architecture
does not claim pmem support.

Cc: Jan Kara <jack@suse.cz>
Cc: Jeff Moyer <jmoyer@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Cc: Matthew Wilcox <mawilcox@microsoft.com>
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
---
 drivers/nvdimm/region_devs.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c
index c47cecc9358b..820cdf05343b 100644
--- a/drivers/nvdimm/region_devs.c
+++ b/drivers/nvdimm/region_devs.c
@@ -961,8 +961,9 @@ int nvdimm_has_flush(struct nd_region *nd_region)
 	struct nd_region_data *ndrd = dev_get_drvdata(&nd_region->dev);
 	int i;
 
-	/* no nvdimm == flushing capability unknown */
-	if (nd_region->ndr_mappings == 0)
+	/* no nvdimm or pmem api == flushing capability unknown */
+	if (nd_region->ndr_mappings == 0
+			|| !IS_ENABLED(CONFIG_ARCH_HAS_PMEM_API))
 		return -ENXIO;
 
 	for (i = 0; i < nd_region->ndr_mappings; i++)


  parent reply	other threads:[~2017-01-20  3:55 UTC|newest]

Thread overview: 126+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-20  3:50 [PATCH 00/13] dax, pmem: move cpu cache maintenance to libnvdimm Dan Williams
2017-01-20  3:50 ` Dan Williams
2017-01-20  3:50 ` Dan Williams
2017-01-20  3:50 ` Dan Williams
2017-01-20  3:50 ` [PATCH 01/13] x86, dax, pmem: remove indirection around memcpy_from_pmem() Dan Williams
2017-01-20  3:50   ` Dan Williams
2017-01-20  3:50   ` Dan Williams
2017-01-20  3:50 ` [PATCH 02/13] block, dax: introduce dax_operations Dan Williams
2017-01-20  3:50   ` Dan Williams
2017-01-20  3:50   ` Dan Williams
2017-01-20 17:28   ` Dan Williams
2017-01-20 17:28     ` Dan Williams
2017-01-20 17:28     ` Dan Williams
2017-01-20 17:28     ` Dan Williams
2017-01-20  3:50 ` [PATCH 03/13] x86, dax, pmem: introduce 'copy_from_iter' dax operation Dan Williams
2017-01-20  3:50   ` Dan Williams
2017-01-20  3:50   ` Dan Williams
2017-02-03  1:52   ` [lkp-robot] [x86, dax, pmem] 2e12109d1c: fio.write_bw_MBps -75% regression kernel test robot
2017-02-03  1:52     ` kernel test robot
2017-02-03  1:52     ` kernel test robot
2017-02-03  1:52     ` kernel test robot
2017-02-17  3:52   ` [PATCH 03/13] x86, dax, pmem: introduce 'copy_from_iter' dax operation Ross Zwisler
2017-02-17  3:52     ` Ross Zwisler
2017-02-17  3:52     ` Ross Zwisler
2017-02-17  3:56     ` Dan Williams
2017-02-17  3:56       ` Dan Williams
2017-02-17  3:56       ` Dan Williams
2017-01-20  3:50 ` [PATCH 04/13] dax, pmem: introduce an optional 'flush' " Dan Williams
2017-01-20  3:50   ` Dan Williams
2017-01-20  3:50   ` Dan Williams
2017-01-20  3:50 ` [PATCH 05/13] x86, dax: replace clear_pmem() with open coded memset + dax_ops->flush Dan Williams
2017-01-20  3:50   ` Dan Williams
2017-01-20  3:50   ` Dan Williams
2017-01-20 10:27   ` Jan Kara
2017-01-20 10:27     ` Jan Kara
2017-01-20 10:27     ` Jan Kara
2017-01-20 15:33     ` Dan Williams
2017-01-20 15:33       ` Dan Williams
2017-01-20 15:33       ` Dan Williams
2017-01-20  3:50 ` [PATCH 06/13] x86, dax, libnvdimm: move wb_cache_pmem() to libnvdimm Dan Williams
2017-01-20  3:50   ` Dan Williams
2017-01-20  3:50   ` Dan Williams
2017-01-20  3:50 ` [PATCH 07/13] x86, libnvdimm, pmem: move arch_invalidate_pmem() " Dan Williams
2017-01-20  3:50   ` Dan Williams
2017-01-20  3:50   ` Dan Williams
2017-01-20  3:50 ` [PATCH 08/13] x86, libnvdimm, dax: stop abusing __copy_user_nocache Dan Williams
2017-01-20  3:50   ` Dan Williams
2017-01-20  3:50   ` Dan Williams
2017-03-28 16:21   ` Ross Zwisler
2017-03-28 16:21     ` Ross Zwisler
2017-03-28 16:21     ` Ross Zwisler
2017-03-28 16:26     ` Dan Williams
2017-03-28 16:26       ` Dan Williams
2017-03-28 16:26       ` Dan Williams
2017-01-20  3:51 ` [PATCH 09/13] libnvdimm, pmem: implement cache bypass for all copy_from_iter() operations Dan Williams
2017-01-20  3:51   ` Dan Williams
2017-01-20  3:51   ` Dan Williams
2017-01-20  3:51 ` Dan Williams [this message]
2017-01-20  3:51   ` [PATCH 10/13] libnvdimm, pmem: fix persistence warning Dan Williams
2017-01-20  3:51   ` Dan Williams
2017-01-20  3:51 ` [PATCH 11/13] libnvdimm, nfit: enable support for volatile ranges Dan Williams
2017-01-20  3:51   ` Dan Williams
2017-01-20  3:51   ` Dan Williams
2017-01-20  3:51 ` [PATCH 12/13] libnvdimm, pmem: disable dax flushing when pmem is fronting a volatile region Dan Williams
2017-01-20  3:51   ` Dan Williams
2017-01-20  3:51   ` Dan Williams
2017-01-20  3:51 ` [PATCH 13/13] libnvdimm, pmem: disable dax flushing for 'cache flush on fail' platforms Dan Williams
2017-01-20  3:51   ` Dan Williams
2017-01-20  3:51   ` Dan Williams
     [not found] ` <148488421301.37913.12835362165895864897.stgit-p8uTFz9XbKj2zm6wflaqv1nYeNYlB/vhral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2017-01-21 16:28   ` [PATCH 00/13] dax, pmem: move cpu cache maintenance to libnvdimm Matthew Wilcox
2017-01-21 16:28     ` Matthew Wilcox
2017-01-21 17:52     ` Christoph Hellwig
2017-01-21 17:52       ` Christoph Hellwig
2017-01-21 17:52       ` Christoph Hellwig
2017-01-21 17:52       ` Christoph Hellwig
     [not found]       ` <20170121175212.GA28180-jcswGhMUV9g@public.gmane.org>
2017-01-22 15:43         ` Matthew Wilcox
2017-01-22 15:43           ` Matthew Wilcox
2017-01-22 15:43           ` Matthew Wilcox
2017-01-22 16:29           ` Christoph Hellwig
2017-01-22 16:29             ` Christoph Hellwig
2017-01-22 16:29             ` Christoph Hellwig
2017-01-22 16:29             ` Christoph Hellwig
2017-01-22 18:19             ` Matthew Wilcox
2017-01-22 18:19               ` Matthew Wilcox
2017-01-22 18:30               ` Christoph Hellwig
2017-01-22 18:30                 ` Christoph Hellwig
2017-01-22 18:30                 ` Christoph Hellwig
2017-01-22 18:30                 ` Christoph Hellwig
     [not found]                 ` <20170122183046.GA7359-jcswGhMUV9g@public.gmane.org>
2017-01-22 18:39                   ` Matthew Wilcox
2017-01-22 18:39                     ` Matthew Wilcox
2017-01-22 18:39                     ` Matthew Wilcox
2017-01-22 18:44                     ` Christoph Hellwig
2017-01-22 18:44                       ` Christoph Hellwig
2017-01-22 18:44                       ` Christoph Hellwig
2017-01-22 18:44                       ` Christoph Hellwig
2017-01-23  6:37                       ` Matthew Wilcox
2017-01-23  6:37                         ` Matthew Wilcox
2017-01-23  7:10                         ` Dan Williams
2017-01-23  7:10                           ` Dan Williams
2017-01-23  7:10                           ` Dan Williams
2017-01-23  7:10                           ` Dan Williams
2017-01-23 16:00                           ` Christoph Hellwig
2017-01-23 16:00                             ` Christoph Hellwig
2017-01-23 16:00                             ` Christoph Hellwig
2017-01-23 17:14                             ` Dan Williams
2017-01-23 17:14                               ` Dan Williams
2017-01-23 17:14                               ` Dan Williams
2017-01-23 18:03                               ` Christoph Hellwig
2017-01-23 18:03                                 ` Christoph Hellwig
2017-01-23 18:03                                 ` Christoph Hellwig
2017-01-23 18:03                                 ` Christoph Hellwig
2017-01-23 18:31                                 ` Dan Williams
2017-01-23 18:31                                   ` Dan Williams
2017-01-23 18:31                                   ` Dan Williams
2017-01-23 18:31                                   ` Dan Williams
2017-01-23 15:58                         ` Christoph Hellwig
2017-01-23 15:58                           ` Christoph Hellwig
2017-01-23 15:58                           ` Christoph Hellwig
2017-01-22 17:30       ` Dan Williams
2017-01-22 17:30         ` Dan Williams
2017-01-22 17:30         ` Dan Williams
2017-01-22 17:30         ` Dan Williams
2017-01-23 16:01         ` Christoph Hellwig
2017-01-23 16:01           ` Christoph Hellwig
2017-01-23 16:01           ` Christoph Hellwig
2017-01-23 16:01           ` Christoph Hellwig

Reply instructions:

You may reply publicly 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:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

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

  git send-email \
    --in-reply-to=148488426722.37913.8831687104802903343.stgit@dwillia2-desk3.amr.corp.intel.com \
    --to=dan.j.williams@intel.com \
    --cc=hch@lst.de \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=mawilcox@microsoft.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.