diff options
author | Ross Zwisler <ross.zwisler@linux.intel.com> | 2015-08-20 18:27:38 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2015-08-25 19:42:01 -0400 |
commit | de4a196c02a2a2631b516d90da6e8d052ccb07e8 (patch) | |
tree | fe8c8914874372404e49d1f7c927fa66e8516087 | |
parent | cbfe8fa6cd672011c755c3cd85c9ffd4e2d10a6f (diff) |
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>
-rw-r--r-- | drivers/acpi/nfit.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) | |||
1024 | wmb_pmem(); | 1024 | wmb_pmem(); |
1025 | } | 1025 | } |
1026 | 1026 | ||
1027 | static u64 read_blk_stat(struct nfit_blk *nfit_blk, unsigned int bw) | 1027 | static u32 read_blk_stat(struct nfit_blk *nfit_blk, unsigned int bw) |
1028 | { | 1028 | { |
1029 | struct nfit_blk_mmio *mmio = &nfit_blk->mmio[DCR]; | 1029 | struct nfit_blk_mmio *mmio = &nfit_blk->mmio[DCR]; |
1030 | u64 offset = nfit_blk->stat_offset + mmio->size * bw; | 1030 | 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) | |||
1032 | if (mmio->num_lines) | 1032 | if (mmio->num_lines) |
1033 | offset = to_interleave_offset(offset, mmio); | 1033 | offset = to_interleave_offset(offset, mmio); |
1034 | 1034 | ||
1035 | return readq(mmio->base + offset); | 1035 | return readl(mmio->base + offset); |
1036 | } | 1036 | } |
1037 | 1037 | ||
1038 | static void write_blk_ctl(struct nfit_blk *nfit_blk, unsigned int bw, | 1038 | static void write_blk_ctl(struct nfit_blk *nfit_blk, unsigned int bw, |