All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Williams, Dan J" <dan.j.williams@intel.com>
To: "torvalds@linux-foundation.org" <torvalds@linux-foundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: [GIT PULL] libnvdimm fix for 4.2
Date: Wed, 26 Aug 2015 00:16:06 +0000	[thread overview]
Message-ID: <1440548164.31365.13.camel@intel.com> (raw)

Hi Linus please pull from...

  git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-fixes

...to receive a single fix for the nd_blk driver.

The effect of getting the width of this register read wrong is that all
I/O fails when the read returns non-zero.  Given the availability of
ACPI 6 NFIT enabled platforms, this could reasonably wait to come in
during the 4.3 merge window with a tag for 4.2-stable.  Otherwise, this
makes the 4.2 kernel fully functional with devices that conform to the
mmio-block-apertures defined in the ACPI 6 NFIT (NVDIMM Firmware
Interface Table).

Full changelog and diffstat below.

---


The following changes since commit cbfe8fa6cd672011c755c3cd85c9ffd4e2d10a6f:

  Linux 4.2-rc4 (2015-07-26 12:26:21 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-fixes

for you to fetch changes up to de4a196c02a2a2631b516d90da6e8d052ccb07e8:

  nfit, nd_blk: BLK status register is only 32 bits (2015-08-25 19:42:01 -0400)

----------------------------------------------------------------
Ross Zwisler (1):
      nfit, nd_blk: BLK status register is only 32 bits

 drivers/acpi/nfit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

---

commit de4a196c02a2a2631b516d90da6e8d052ccb07e8
Author: Ross Zwisler <ross.zwisler@linux.intel.com>
Date:   Thu Aug 20 16:27:38 2015 -0600

    nfit, nd_blk: BLK status register is only 32 bits
    
    Only read 32 bits for the BLK status register in read_blk_stat().
    
    The format and size of this register is defined in the
    "NVDIMM Driver Writer's guide":
    
    http://pmem.io/documents/NVDIMM_Driver_Writers_Guide.pdf
    
    Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
    Reported-by: Nicholas Moulin <nicholas.w.moulin@linux.intel.com>
    Tested-by: Nicholas Moulin <nicholas.w.moulin@linux.intel.com>
    Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>

diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
index 628a42c41ab1..bb29e56276bd 100644
--- a/drivers/acpi/nfit.c
+++ b/drivers/acpi/nfit.c
@@ -1024,7 +1024,7 @@ static void wmb_blk(struct nfit_blk *nfit_blk)
 		wmb_pmem();
 }
 
-static u64 read_blk_stat(struct nfit_blk *nfit_blk, unsigned int bw)
+static u32 read_blk_stat(struct nfit_blk *nfit_blk, unsigned int bw)
 {
 	struct nfit_blk_mmio *mmio = &nfit_blk->mmio[DCR];
 	u64 offset = nfit_blk->stat_offset + mmio->size * bw;
@@ -1032,7 +1032,7 @@ static u64 read_blk_stat(struct nfit_blk *nfit_blk, unsigned int bw)
 	if (mmio->num_lines)
 		offset = to_interleave_offset(offset, mmio);
 
-	return readq(mmio->base + offset);
+	return readl(mmio->base + offset);
 }
 
 static void write_blk_ctl(struct nfit_blk *nfit_blk, unsigned int bw,


WARNING: multiple messages have this Message-ID (diff)
From: "Williams, Dan J" <dan.j.williams@intel.com>
To: "torvalds@linux-foundation.org" <torvalds@linux-foundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-nvdimm@lists.01.org" <linux-nvdimm@ml01.01.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: [GIT PULL] libnvdimm fix for 4.2
Date: Wed, 26 Aug 2015 00:16:06 +0000	[thread overview]
Message-ID: <1440548164.31365.13.camel@intel.com> (raw)

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2972 bytes --]

Hi Linus please pull from...

  git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-fixes

...to receive a single fix for the nd_blk driver.

The effect of getting the width of this register read wrong is that all
I/O fails when the read returns non-zero.  Given the availability of
ACPI 6 NFIT enabled platforms, this could reasonably wait to come in
during the 4.3 merge window with a tag for 4.2-stable.  Otherwise, this
makes the 4.2 kernel fully functional with devices that conform to the
mmio-block-apertures defined in the ACPI 6 NFIT (NVDIMM Firmware
Interface Table).

Full changelog and diffstat below.

---


The following changes since commit cbfe8fa6cd672011c755c3cd85c9ffd4e2d10a6f:

  Linux 4.2-rc4 (2015-07-26 12:26:21 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm libnvdimm-fixes

for you to fetch changes up to de4a196c02a2a2631b516d90da6e8d052ccb07e8:

  nfit, nd_blk: BLK status register is only 32 bits (2015-08-25 19:42:01 -0400)

----------------------------------------------------------------
Ross Zwisler (1):
      nfit, nd_blk: BLK status register is only 32 bits

 drivers/acpi/nfit.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

---

commit de4a196c02a2a2631b516d90da6e8d052ccb07e8
Author: Ross Zwisler <ross.zwisler@linux.intel.com>
Date:   Thu Aug 20 16:27:38 2015 -0600

    nfit, nd_blk: BLK status register is only 32 bits
    
    Only read 32 bits for the BLK status register in read_blk_stat().
    
    The format and size of this register is defined in the
    "NVDIMM Driver Writer's guide":
    
    http://pmem.io/documents/NVDIMM_Driver_Writers_Guide.pdf
    
    Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
    Reported-by: Nicholas Moulin <nicholas.w.moulin@linux.intel.com>
    Tested-by: Nicholas Moulin <nicholas.w.moulin@linux.intel.com>
    Reviewed-by: Jeff Moyer <jmoyer@redhat.com>
    Signed-off-by: Dan Williams <dan.j.williams@intel.com>

diff --git a/drivers/acpi/nfit.c b/drivers/acpi/nfit.c
index 628a42c41ab1..bb29e56276bd 100644
--- a/drivers/acpi/nfit.c
+++ b/drivers/acpi/nfit.c
@@ -1024,7 +1024,7 @@ static void wmb_blk(struct nfit_blk *nfit_blk)
 		wmb_pmem();
 }
 
-static u64 read_blk_stat(struct nfit_blk *nfit_blk, unsigned int bw)
+static u32 read_blk_stat(struct nfit_blk *nfit_blk, unsigned int bw)
 {
 	struct nfit_blk_mmio *mmio = &nfit_blk->mmio[DCR];
 	u64 offset = nfit_blk->stat_offset + mmio->size * bw;
@@ -1032,7 +1032,7 @@ static u64 read_blk_stat(struct nfit_blk *nfit_blk, unsigned int bw)
 	if (mmio->num_lines)
 		offset = to_interleave_offset(offset, mmio);
 
-	return readq(mmio->base + offset);
+	return readl(mmio->base + offset);
 }
 
 static void write_blk_ctl(struct nfit_blk *nfit_blk, unsigned int bw,

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

             reply	other threads:[~2015-08-26  0:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-26  0:16 Williams, Dan J [this message]
2015-08-26  0:16 ` [GIT PULL] libnvdimm fix for 4.2 Williams, Dan J

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=1440548164.31365.13.camel@intel.com \
    --to=dan.j.williams@intel.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@lists.01.org \
    --cc=torvalds@linux-foundation.org \
    /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.