All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Williams <dan.j.williams@intel.com>
To: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
Cc: Linux NVDIMM <linux-nvdimm@lists.01.org>,
	Vaibhav Jain <vaibhav@linux.ibm.com>,
	Shivaprasad G Bhat <sbhat@linux.ibm.com>,
	Harish Sriram <harish@linux.ibm.com>
Subject: Re: [PATCH RFC v3] testing/nvdimm: Add test module for non-nfit platforms
Date: Tue, 8 Dec 2020 20:43:51 -0800	[thread overview]
Message-ID: <CAPcyv4isaiWqBPGymyAmbrAhH31C96wUsrRq5Oeuv7F=ko_hsg@mail.gmail.com> (raw)
In-Reply-To: <50842a9b-2ff8-2623-fe00-7c91e9405131@linux.ibm.com>

On Tue, Dec 8, 2020 at 8:17 PM Aneesh Kumar K.V
<aneesh.kumar@linux.ibm.com> wrote:
>
> On 12/8/20 3:30 AM, Dan Williams wrote:
> > On Mon, Oct 5, 2020 at 6:01 PM Santosh Sivaraj <santosh@fossix.org> wrote:
> >
>
> ...
>
> >> +static int ndtest_blk_do_io(struct nd_blk_region *ndbr, resource_size_t dpa,
> >> +               void *iobuf, u64 len, int rw)
> >> +{
> >> +       struct ndtest_dimm *dimm = ndbr->blk_provider_data;
> >> +       struct ndtest_blk_mmio *mmio = dimm->mmio;
> >> +       struct nd_region *nd_region = &ndbr->nd_region;
> >> +       unsigned int lane;
> >> +
> >> +       lane = nd_region_acquire_lane(nd_region);
> >> +
> >> +       if (rw)
> >> +               memcpy(mmio->base + dpa, iobuf, len);
> >> +       else {
> >> +               memcpy(iobuf, mmio->base + dpa, len);
> >> +               arch_invalidate_pmem(mmio->base + dpa, len);
> >> +       }
> >> +
> >> +       nd_region_release_lane(nd_region, lane);
> >> +
> >> +       return 0;
> >> +}
> >> +
> >> +static int ndtest_blk_region_enable(struct nvdimm_bus *nvdimm_bus,
> >> +                                   struct device *dev)
> >> +{
> >> +       struct nd_blk_region *ndbr = to_nd_blk_region(dev);
> >> +       struct nvdimm *nvdimm;
> >> +       struct ndtest_dimm *p;
> >> +       struct ndtest_blk_mmio *mmio;
> >> +
> >> +       nvdimm = nd_blk_region_to_dimm(ndbr);
> >> +       p = nvdimm_provider_data(nvdimm);
> >> +
> >> +       nd_blk_region_set_provider_data(ndbr, p);
> >> +       p->region = to_nd_region(dev);
> >> +
> >> +       mmio = devm_kzalloc(dev, sizeof(struct ndtest_blk_mmio), GFP_KERNEL);
> >> +       if (!mmio)
> >> +               return -ENOMEM;
> >> +
> >> +       mmio->base = devm_nvdimm_memremap(dev, p->address, 12,
> >> +                                        nd_blk_memremap_flags(ndbr));
> >> +       if (!mmio->base) {
> >> +               dev_err(dev, "%s failed to map blk dimm\n", nvdimm_name(nvdimm));
> >> +               return -ENOMEM;
> >> +       }
> >> +
> >> +       p->mmio = mmio;
> >> +
> >> +       return 0;
> >> +}
> >
> > Are there any ppc nvdimm that will use BLK mode? As far as I know
> > BLK-mode is only an abandoned mechanism in the ACPI specification, not
> > anything that has made it into a shipping implementation. I'd prefer
> > to not extend it if it's not necessary.
> >
> That is correct. There is no BLK mode/type usage in ppc64. But IIUC, we
> also had difficulty in isolating the BLK test to ACPI systems. The test
> code had dependencies and splitting that out was making it complex.

I wouldn't be opposed to an "if (nfit_test)" gate for the BLK tests.
Whatever is easiest for you because I'm just thrilled to be able to
regression test the ppc infrastructure, i.e. no need to spend extra
effort making the tests perfect.
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org

      reply	other threads:[~2020-12-09  4:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06  1:00 [PATCH RFC v3] testing/nvdimm: Add test module for non-nfit platforms Santosh Sivaraj
2020-10-07  4:22 ` [PATCH RFC ndctl 1/9] libndctl: test enablement for non-nfit devices Santosh Sivaraj
2020-10-07  4:22   ` [PATCH RFC ndctl 2/9] test/core: Don't fail is nfit module is missing Santosh Sivaraj
2020-10-07  4:22   ` [PATCH RFC ndctl 3/9] test/libndctl: Don't compare phys-id if no-interleave support Santosh Sivaraj
2020-10-07  4:22   ` [PATCH RFC ndctl 4/9] test/libndctl: search by handle instead of range index Santosh Sivaraj
2020-10-07  4:22   ` [PATCH RFC ndctl 5/9] test/libndctl: skip smart tests for non-nfit platforms Santosh Sivaraj
2020-10-07  4:22   ` [PATCH RFC ndctl 6/9] test/libndctl: Don't check for two formats on a dimm Santosh Sivaraj
2020-10-07  4:22   ` [PATCH RFC ndctl 7/9] test/libndctl: Don't check for error flags on non-nfit dimms Santosh Sivaraj
2020-10-07  4:22   ` [PATCH RFC ndctl 8/9] test/multi-pmem: fix for no-interleave support Santosh Sivaraj
2020-10-07  4:22   ` [PATCH RFC ndctl 9/9] test: Disable paths which are possibly wrong Santosh Sivaraj
2020-12-07 22:00 ` [PATCH RFC v3] testing/nvdimm: Add test module for non-nfit platforms Dan Williams
2020-12-09  4:17   ` Aneesh Kumar K.V
2020-12-09  4:43     ` Dan Williams [this message]

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='CAPcyv4isaiWqBPGymyAmbrAhH31C96wUsrRq5Oeuv7F=ko_hsg@mail.gmail.com' \
    --to=dan.j.williams@intel.com \
    --cc=aneesh.kumar@linux.ibm.com \
    --cc=harish@linux.ibm.com \
    --cc=linux-nvdimm@lists.01.org \
    --cc=sbhat@linux.ibm.com \
    --cc=vaibhav@linux.ibm.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.