[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1493156958.26622.8.camel@hpe.com>
Date: Tue, 25 Apr 2017 21:49:50 +0000
From: "Kani, Toshimitsu" <toshi.kani@....com>
To: "vishal.l.verma@...el.com" <vishal.l.verma@...el.com>
CC: "dan.j.williams@...el.com" <dan.j.williams@...el.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"dave.jiang@...el.com" <dave.jiang@...el.com>,
"linux-nvdimm@...ts.01.org" <linux-nvdimm@...ts.01.org>
Subject: Re: [PATCH] libnvdimm: fix phys_addr for nvdimm_clear_poison
On Tue, 2017-04-25 at 15:44 -0600, Vishal Verma wrote:
> On 04/25, Toshi Kani wrote:
> > nvdimm_clear_poison() expects a physical address, not an offset.
> > Fix nsio_rw_bytes() to call nvdimm_clear_poison() with a physical
> > address.
>
> Good catch!
>
> >
> > Signed-off-by: Toshi Kani <toshi.kani@....com>
> > Cc: Dan Williams <dan.j.williams@...el.com>
> > Cc: Dave Jiang <dave.jiang@...el.com>
> > Cc: Vishal Verma <vishal.l.verma@...el.com>
> > ---
> > drivers/nvdimm/claim.c | 3 ++-
> > 1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/nvdimm/claim.c b/drivers/nvdimm/claim.c
> > index ca6d572..0b31073 100644
> > --- a/drivers/nvdimm/claim.c
> > +++ b/drivers/nvdimm/claim.c
> > @@ -254,7 +254,8 @@ static int nsio_rw_bytes(struct
> > nd_namespace_common *ndns,
> > && (!ndns->claim ||
> > !is_nd_btt(ndns->claim))) {
> > long cleared;
> >
> > - cleared = nvdimm_clear_poison(&ndns->dev,
> > offset, size);
> > + cleared = nvdimm_clear_poison(&ndns->dev,
> > + nsio->res.start + offset,
> > size);
>
> Should we be using nsio->res.start here or nsio->addr ?
nsio->addr is a virtual address. We need to pass the physical address
of this range.
Thanks,
-Toshi
>
> > if (cleared < size)
> > rc = -EIO;
> > if (cleared > 0 && cleared / 512) {
Powered by blists - more mailing lists