linux-nvdimm.lists.01.org archive mirror
 help / color / mirror / Atom feed
From: "Aneesh Kumar K.V" <aneesh.kumar@linux.ibm.com>
To: Dan Williams <dan.j.williams@intel.com>,
	Santosh Sivaraj <santosh@fossix.org>
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: Wed, 9 Dec 2020 09:47:31 +0530	[thread overview]
Message-ID: <50842a9b-2ff8-2623-fe00-7c91e9405131@linux.ibm.com> (raw)
In-Reply-To: <CAPcyv4jEpw2Yvj1eVNaW6z7D=pf31w1cQXuF9ymqxckhxANeCQ@mail.gmail.com>

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.


-aneesh
_______________________________________________
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:17 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 [this message]
2020-12-09  4:43     ` Dan Williams

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=50842a9b-2ff8-2623-fe00-7c91e9405131@linux.ibm.com \
    --to=aneesh.kumar@linux.ibm.com \
    --cc=dan.j.williams@intel.com \
    --cc=harish@linux.ibm.com \
    --cc=linux-nvdimm@lists.01.org \
    --cc=santosh@fossix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).