[PATCH v4 0/9] introduce __pfn_t, evacuate struct page from sgls
by Dan Williams
Introduce __pfn_t which:
1/ Allows kernel internal DAX mappings to adhere to the lifetime of the
the underlying block device. In general, it enables a mechanism to
allow any device driver to advertise "device memory" (CONFIG_DEV_PFN)
to other parts of the kernel.
2/ Replaces usage of struct page in struct scatterlist. A scatterlist
need only carry enough information to generate a dma address, and
removing struct page from scatterlists is a precursor to allowing DMA to
device memory. Some dma mapping implementations are not ready for a
scatterlist-pfn to reference unampped device memory, those
implementations are disabled by CONFIG_DEV_PFN=y.
Changes since v4 [1]:
1/ Drop the bio_vec conversion of struct page to __pfn_t for now. Wait
until there's a hierarchical block driver that would make use of direct
dma to pmem. (Christoph)
2/ Reorder the patch set to put the dax fixes first.
3/ Unconditionally convert struct scatterlist to use a pfn. Strictly
speaking the scatterlist conversion could also be deferred until we have
a driver that attempts dma to pmem, but struct scatterlist really has no
valid reason to carry a struct page. (Christoph)
4/ Rebased on block.git/for-next
---
Dan Williams (9):
introduce __pfn_t for scatterlists and pmem
x86: support kmap_atomic_pfn_t() for persistent memory
dax: drop size parameter to ->direct_access()
dax: fix mapping lifetime handling, convert to __pfn_t + kmap_atomic_pfn_t()
dma-mapping: allow archs to optionally specify a ->map_pfn() operation
scatterlist: use sg_phys()
scatterlist: cleanup sg_chain() and sg_unmark_end()
scatterlist: convert to __pfn_t
x86: convert dma_map_ops to support mapping a __pfn_t.
arch/Kconfig | 6 +
arch/arm/mm/dma-mapping.c | 2
arch/microblaze/kernel/dma.c | 2
arch/powerpc/sysdev/axonram.c | 26 ++++--
arch/x86/Kconfig | 7 ++
arch/x86/kernel/amd_gart_64.c | 22 ++++-
arch/x86/kernel/pci-nommu.c | 22 ++++-
arch/x86/kernel/pci-swiotlb.c | 4 +
arch/x86/pci/sta2x11-fixup.c | 4 +
block/blk-merge.c | 2
drivers/block/brd.c | 9 --
drivers/block/pmem.c | 16 +++
drivers/crypto/omap-sham.c | 2
drivers/dma/imx-dma.c | 8 --
drivers/dma/ste_dma40.c | 5 -
drivers/iommu/amd_iommu.c | 21 +++--
drivers/iommu/intel-iommu.c | 26 ++++--
drivers/iommu/iommu.c | 2
drivers/mmc/card/queue.c | 4 -
drivers/pci/Kconfig | 2
drivers/s390/block/dcssblk.c | 26 +++++-
drivers/staging/android/ion/ion_chunk_heap.c | 4 -
fs/block_dev.c | 4 -
fs/dax.c | 62 +++++++++++--
include/asm-generic/dma-mapping-common.h | 30 +++++++
include/asm-generic/memory_model.h | 1
include/asm-generic/pfn.h | 120 ++++++++++++++++++++++++++
include/crypto/scatterwalk.h | 9 --
include/linux/blkdev.h | 7 +-
include/linux/dma-debug.h | 23 ++++-
include/linux/dma-mapping.h | 8 ++
include/linux/highmem.h | 23 +++++
include/linux/mm.h | 1
include/linux/scatterlist.h | 103 ++++++++++++++++------
include/linux/swiotlb.h | 4 +
init/Kconfig | 13 +++
lib/dma-debug.c | 10 +-
lib/swiotlb.c | 20 +++-
mm/Makefile | 1
mm/pfn.c | 98 +++++++++++++++++++++
samples/kfifo/dma-example.c | 8 +-
41 files changed, 626 insertions(+), 141 deletions(-)
create mode 100644 include/asm-generic/pfn.h
create mode 100644 mm/pfn.c
5 years, 5 months
[PATCH v5 0/6] pmem api, generic ioremap_cache, and memremap
by Dan Williams
The pmem api is responsible for shepherding data out to persistent
media. The pmem driver uses this api, when available, to assert that
data is durable by the time bio_endio() is invoked. When an
architecture or cpu can not make persistence guarantees the driver warns
and falls back to "best effort" implementation.
Changes since v4 [1]:
1/ Christoph asked me to pull the dangling piece of yarn [2] and the
whole sweater came apart, but for the better. This finally unifies all
the disparate ways archs had chosen to implement ioremap and friends,
and uncovered several cases where drivers were incorrectly including
<asm/io.h> instead of <linux/io.h>.
2/ Drop pmem ops and introduce a cheap arch_has_pmem_api() conditional
to use at each site where a pmem api call is made (Christoph and Andy)
3/ Document the wmb(), "sfence", in the x86 implementation of
arch_wmb_pmem() (Andy)
4/ Document and rename arch_sync_pmem(), now named arch_wmb_pmem(). (Andy)
This has been run through a defconfig build of all archs and is exposed
to the kbuild robot via nvdimm.git.
[1]: https://lists.01.org/pipermail/linux-nvdimm/2015-June/001189.html
[2]: https://lists.01.org/pipermail/linux-nvdimm/2015-June/001208.html
---
Dan Williams (5):
arch, drivers: don't include <asm/io.h> directly, use <linux/io.h> instead
arch: unify ioremap prototypes and macro aliases
cleanup IORESOURCE_CACHEABLE vs ioremap()
devm: fix ioremap_cache() usage
arch: introduce memremap_cache() and memremap_wt()
Ross Zwisler (1):
arch, x86: pmem api for ensuring durability of persistent memory updates
arch/alpha/include/asm/io.h | 7 +-
arch/arc/include/asm/io.h | 6 -
arch/arm/Kconfig | 1
arch/arm/include/asm/io.h | 31 ++++++--
arch/arm/mach-clps711x/board-cdb89712.c | 2
arch/arm/mach-shmobile/pm-rcar.c | 2
arch/arm64/Kconfig | 1
arch/arm64/include/asm/io.h | 23 ++++--
arch/arm64/kernel/efi.c | 4 -
arch/arm64/kernel/smp_spin_table.c | 10 +-
arch/avr32/include/asm/io.h | 22 +++--
arch/avr32/mm/ioremap.c | 2
arch/cris/include/asm/io.h | 8 +-
arch/cris/mm/ioremap.c | 2
arch/frv/Kconfig | 1
arch/frv/include/asm/io.h | 23 ++----
arch/hexagon/include/asm/io.h | 5 +
arch/ia64/include/asm/io.h | 10 --
arch/ia64/kernel/cyclone.c | 2
arch/ia64/mm/ioremap.c | 4 -
arch/m32r/include/asm/io.h | 9 +-
arch/m68k/Kconfig | 1
arch/m68k/include/asm/io_mm.h | 21 +++--
arch/m68k/include/asm/io_no.h | 34 +++++---
arch/m68k/include/asm/raw_io.h | 3 -
arch/m68k/mm/kmap.c | 2
arch/metag/Kconfig | 1
arch/metag/include/asm/io.h | 35 +++++----
arch/microblaze/include/asm/io.h | 6 -
arch/microblaze/mm/pgtable.c | 2
arch/mips/Kconfig | 1
arch/mips/include/asm/io.h | 42 ++++------
arch/mn10300/include/asm/io.h | 10 +-
arch/nios2/include/asm/io.h | 15 +---
arch/openrisc/include/asm/io.h | 3 -
arch/openrisc/mm/ioremap.c | 2
arch/parisc/include/asm/io.h | 6 -
arch/parisc/mm/ioremap.c | 2
arch/powerpc/Kconfig | 1
arch/powerpc/include/asm/io.h | 7 +-
arch/powerpc/kernel/pci_of_scan.c | 2
arch/s390/include/asm/io.h | 8 +-
arch/sh/include/asm/io.h | 9 ++
arch/sparc/include/asm/io_32.h | 7 --
arch/sparc/include/asm/io_64.h | 8 +-
arch/sparc/kernel/ioport.c | 2
arch/sparc/kernel/pci.c | 3 -
arch/tile/include/asm/io.h | 17 +++-
arch/unicore32/include/asm/io.h | 25 +++++-
arch/x86/Kconfig | 2
arch/x86/include/asm/cacheflush.h | 71 +++++++++++++++++
arch/x86/include/asm/io.h | 15 +++-
arch/x86/kernel/crash_dump_64.c | 6 +
arch/x86/kernel/kdebugfs.c | 8 +-
arch/x86/kernel/ksysfs.c | 28 +++----
arch/x86/mm/ioremap.c | 10 +-
arch/xtensa/Kconfig | 1
arch/xtensa/include/asm/io.h | 13 ++-
drivers/acpi/apei/einj.c | 8 +-
drivers/acpi/apei/erst.c | 4 -
drivers/block/Kconfig | 1
drivers/block/pmem.c | 46 ++++++++++-
drivers/firmware/google/memconsole.c | 4 -
drivers/isdn/icn/icn.h | 2
drivers/mtd/devices/slram.c | 2
drivers/mtd/nand/diskonchip.c | 2
drivers/mtd/onenand/generic.c | 2
drivers/net/ethernet/sfc/io.h | 2
drivers/pci/probe.c | 3 -
drivers/pnp/manager.c | 2
drivers/scsi/aic94xx/aic94xx_init.c | 7 --
drivers/scsi/arcmsr/arcmsr_hba.c | 5 -
drivers/scsi/mvsas/mv_init.c | 15 +---
drivers/scsi/sun3x_esp.c | 2
drivers/staging/comedi/drivers/ii_pci20kc.c | 1
drivers/tty/serial/8250/8250_core.c | 2
drivers/video/fbdev/ocfb.c | 1
drivers/video/fbdev/s1d13xxxfb.c | 3 -
drivers/video/fbdev/stifb.c | 1
include/asm-generic/iomap.h | 8 --
include/linux/compiler.h | 2
include/linux/device.h | 5 +
include/linux/io-mapping.h | 2
include/linux/io.h | 64 ++++++++++++++++
include/linux/mtd/map.h | 2
include/linux/pmem.h | 110 +++++++++++++++++++++++++++
include/video/vga.h | 2
kernel/resource.c | 41 ++++++++++
lib/Kconfig | 8 ++
lib/devres.c | 48 +++++-------
lib/pci_iomap.c | 7 --
91 files changed, 684 insertions(+), 334 deletions(-)
create mode 100644 include/linux/pmem.h
5 years, 6 months
[PATCH v7 00/16] libnvdimm: non-volatile memory devices
by Dan Williams
A new sub-system in support of non-volatile memory storage devices.
Stephen, please add libnvdimm-for-next to -next:
git://git.kernel.org/pub/scm/linux/kernel/git/djbw/nvdimm libnvdimm-for-next
Changes since v6 [1]:
1/ Deferred the patches dependent on ->rw_bytes() (BTT - stacked block
driver, BLK - mmio aperture windows driver, NFIT_TEST - unit test
infrastructure for all libnvdimm + nfit components) to their own
patchset. Make the ->rw_bytes() implementation the first patch in
that series (Christoph)
2/ Collected acks from Christoph and Rafael!
3/ Add a HAS_IOMEM dependency to CONFIG_BLK_DEV_PMEM following commit
b6f2098fb708 "block: pmem: Add dependency on HAS_IOMEM" in 4.1-rc8.
4/ Move libnvdimm to subsys_initcall() and move arch/x86/kernel/pmem.c
back to device_initcall(). This allows ACPI_NFIT to be built-in.
(Linda)
5/ Drop the ACPI_DRIVER_ALL_NOTIFY_EVENTS flag in the nfit driver.
(Rafael)
6/ Reference count the nvdimm_drvdata object. This fixes a bug that was
found when the unit tests were extended to test disabling an nvdimm
while a region device still had references to label data.
Diffstat since v6:
arch/x86/kernel/pmem.c | 2 +-
drivers/acpi/nfit.c | 1 -
drivers/nvdimm/Kconfig | 1 +
drivers/nvdimm/bus.c | 2 +-
drivers/nvdimm/core.c | 2 +-
drivers/nvdimm/dimm.c | 21 ++++-----------------
drivers/nvdimm/dimm_devs.c | 34 ++++++++++++++++++++++++++++++++++
drivers/nvdimm/namespace_devs.c | 43 +++++++++++++++++++++++++------------------
drivers/nvdimm/nd-core.h | 2 +-
drivers/nvdimm/nd.h | 3 +++
drivers/nvdimm/region_devs.c | 21 ++++++++-------------
include/linux/libnvdimm.h | 8 ++++++++
12 files changed, 87 insertions(+), 53 deletions(-)
[1]: https://lists.01.org/pipermail/linux-nvdimm/2015-June/001166.html
---
Dan Williams (16):
e820, efi: add ACPI 6.0 persistent memory types
libnvdimm, nfit: initial libnvdimm infrastructure and NFIT support
libnvdimm: control character device and nvdimm_bus sysfs attributes
libnvdimm, nfit: dimm/memory-devices
libnvdimm: control (ioctl) messages for nvdimm_bus and nvdimm devices
libnvdimm, nvdimm: dimm driver and base libnvdimm device-driver infrastructure
libnvdimm, nfit: regions (block-data-window, persistent memory, volatile memory)
libnvdimm: support for legacy (non-aliasing) nvdimms
libnvdimm, pmem: move pmem to drivers/nvdimm/
libnvdimm, pmem: add libnvdimm support to the pmem driver
libnvdimm, nfit: add interleave-set state-tracking infrastructure
libnvdimm: namespace indices: read and validate
libnvdimm: pmem label sets and namespace instantiation.
libnvdimm: blk labels and namespace instantiation
libnvdimm: write pmem label set
libnvdimm: write blk label set
arch/arm64/kernel/efi.c | 1
arch/ia64/kernel/efi.c | 4
arch/x86/Kconfig | 3
arch/x86/boot/compressed/eboot.c | 4
arch/x86/include/uapi/asm/e820.h | 1
arch/x86/kernel/e820.c | 28 +
arch/x86/kernel/pmem.c | 92 +-
arch/x86/platform/efi/efi.c | 3
drivers/Kconfig | 2
drivers/Makefile | 1
drivers/acpi/Kconfig | 26 +
drivers/acpi/Makefile | 1
drivers/acpi/nfit.c | 1123 ++++++++++++++++++++++++++
drivers/acpi/nfit.h | 100 ++
drivers/block/Kconfig | 11
drivers/block/Makefile | 1
drivers/block/pmem.c | 262 ------
drivers/nvdimm/Kconfig | 36 +
drivers/nvdimm/Makefile | 13
drivers/nvdimm/bus.c | 668 +++++++++++++++
drivers/nvdimm/core.c | 396 +++++++++
drivers/nvdimm/dimm.c | 102 ++
drivers/nvdimm/dimm_devs.c | 542 +++++++++++++
drivers/nvdimm/label.c | 926 +++++++++++++++++++++
drivers/nvdimm/label.h | 141 +++
drivers/nvdimm/namespace_devs.c | 1645 ++++++++++++++++++++++++++++++++++++++
drivers/nvdimm/nd-core.h | 80 ++
drivers/nvdimm/nd.h | 135 +++
drivers/nvdimm/pmem.c | 278 ++++++
drivers/nvdimm/region.c | 96 ++
drivers/nvdimm/region_devs.c | 585 ++++++++++++++
include/linux/efi.h | 3
include/linux/libnvdimm.h | 123 +++
include/linux/nd.h | 98 ++
include/uapi/linux/Kbuild | 1
include/uapi/linux/ndctl.h | 197 +++++
36 files changed, 7417 insertions(+), 311 deletions(-)
create mode 100644 drivers/acpi/nfit.c
create mode 100644 drivers/acpi/nfit.h
delete mode 100644 drivers/block/pmem.c
create mode 100644 drivers/nvdimm/Kconfig
create mode 100644 drivers/nvdimm/Makefile
create mode 100644 drivers/nvdimm/bus.c
create mode 100644 drivers/nvdimm/core.c
create mode 100644 drivers/nvdimm/dimm.c
create mode 100644 drivers/nvdimm/dimm_devs.c
create mode 100644 drivers/nvdimm/label.c
create mode 100644 drivers/nvdimm/label.h
create mode 100644 drivers/nvdimm/namespace_devs.c
create mode 100644 drivers/nvdimm/nd-core.h
create mode 100644 drivers/nvdimm/nd.h
create mode 100644 drivers/nvdimm/pmem.c
create mode 100644 drivers/nvdimm/region.c
create mode 100644 drivers/nvdimm/region_devs.c
create mode 100644 include/linux/libnvdimm.h
create mode 100644 include/linux/nd.h
create mode 100644 include/uapi/linux/ndctl.h
5 years, 6 months
re: libnvdimm, nfit, nd_blk: driver for BLK-mode access persistent memory
by Dan Carpenter
Hello Ross Zwisler,
This is a semi-automatic email about new static checker warnings.
The patch 047fc8a1f9a6: "libnvdimm, nfit, nd_blk: driver for BLK-mode
access persistent memory" from Jun 25, 2015, leads to the following
Smatch complaint:
drivers/acpi/nfit.c:1224 acpi_nfit_blk_region_enable()
error: we previously assumed 'nfit_mem' could be null (see line 1223)
drivers/acpi/nfit.c
1222 nfit_mem = nvdimm_provider_data(nvdimm);
1223 if (!nfit_mem || !nfit_mem->dcr || !nfit_mem->bdw) {
^^^^^^^^
Check.
1224 dev_dbg(dev, "%s: missing%s%s%s\n", __func__,
1225 nfit_mem ? "" : " nfit_mem",
1226 nfit_mem->dcr ? "" : " dcr",
^^^^^^^^^^^^^
Unchecked dereference.
regards,
dan carpenter
5 years, 6 months
Re: libnvdimm: control (ioctl) messages for nvdimm_bus and nvdimm devices
by Dan Williams
On Tue, Jun 23, 2015 at 5:49 AM, Dan Carpenter <dan.carpenter(a)oracle.com> wrote:
> Hello Dan Williams,
>
> The patch 85af0c1db6d8: "libnvdimm: control (ioctl) messages for
> nvdimm_bus and nvdimm devices" from Jun 8, 2015, leads to the
> following static checker warning:
>
> drivers/nvdimm/bus.c:484 __nd_ioctl()
> warn: should we be adding 'in_size' of the min_t value?
>
> drivers/nvdimm/bus.c
> 466 /* process an input envelope */
> 467 for (i = 0; i < desc->in_num; i++) {
> 468 u32 in_size, copy;
> 469
> 470 in_size = nd_cmd_in_size(nvdimm, cmd, desc, i, in_env);
> 471 if (in_size == UINT_MAX) {
> 472 dev_err(dev, "%s:%s unknown input size cmd: %s field: %d\n",
> 473 __func__, dimm_name, cmd_name, i);
> 474 return -ENXIO;
> 475 }
> 476 if (!access_ok(VERIFY_READ, p + in_len, in_size))
> 477 return -EFAULT;
> 478 if (in_len < sizeof(in_env))
> 479 copy = min_t(u32, sizeof(in_env) - in_len, in_size);
> 480 else
> 481 copy = 0;
> 482 if (copy && copy_from_user(&in_env[in_len], p + in_len, copy))
> 483 return -EFAULT;
> 484 in_len += in_size;
>
> The warning message is saying that probably this should be:
>
> in_len += copy;
>
> I think this is true. On most iterations an invalid "in_size" would be
> caught perhaps except on the last iteration. It means "in_len" is
> something invalid when we use it below.
Except that in_size can't be invalid as it's determined from
validating the first fields of the input. If we get in_size's that
overflow in_env we're also ok because the implementation is prepared
to only need the first 16-bytes of input to determine the total size
of the incoming command.
>
> 485 }
> 486
> 487 /* process an output envelope */
> 488 for (i = 0; i < desc->out_num; i++) {
> 489 u32 out_size = nd_cmd_out_size(nvdimm, cmd, desc, i,
> 490 (u32 *) in_env, (u32 *) out_env);
> 491 u32 copy;
> 492
> 493 if (out_size == UINT_MAX) {
> 494 dev_dbg(dev, "%s:%s unknown output size cmd: %s field: %d\n",
> 495 __func__, dimm_name, cmd_name, i);
> 496 return -EFAULT;
> 497 }
> 498 if (!access_ok(VERIFY_WRITE, p + in_len + out_len, out_size))
>
> Most of the time an invalid "in_len" doesn't really matter. Maybe it
> could be used to trigger an integer overflow?
>
> 499 return -EFAULT;
> 500 if (out_len < sizeof(out_env))
> 501 copy = min_t(u32, sizeof(out_env) - out_len, out_size);
> 502 else
> 503 copy = 0;
> 504 if (copy && copy_from_user(&out_env[out_len],
> 505 p + in_len + out_len, copy))
> 506 return -EFAULT;
> 507 out_len += out_size;
> 508 }
> 509
> 510 buf_len = out_len + in_len;
>
>
> So "buflen" is something invalid. Integer overflow as well?
>
> 511 if (!access_ok(VERIFY_WRITE, p, sizeof(buf_len)))
> ^^^^^^^^^^^^^^^
>
> This is shoud be:
>
> if (!access_ok(VERIFY_WRITE, p, buf_len))
>
> These days Linus frowns on anyone using __copy_to/from_user unless they
> have benchmark data to prove it matters so do we even need this
> access_ok() check?
I had missed that copy_{from|to}_user() do access_ok() internally. Will drop.
5 years, 6 months
re: libnvdimm: infrastructure for btt devices
by Dan Carpenter
Hello Dan Williams,
This is a semi-automatic email about new static checker warnings.
The patch 8c2f7e8658df: "libnvdimm: infrastructure for btt devices"
from Jun 25, 2015, leads to the following Smatch complaint:
drivers/nvdimm/region_devs.c:461 nd_region_notify_driver_action()
error: we previously assumed 'dev->parent' could be null (see line 453)
drivers/nvdimm/region_devs.c
452 }
453 if (dev->parent && is_nd_blk(dev->parent) && probe) {
^^^^^^^^^^^
New check.
454 nd_region = to_nd_region(dev->parent);
455 nvdimm_bus_lock(dev);
456 if (nd_region->ns_seed == dev)
457 nd_region_create_blk_seed(nd_region);
458 nvdimm_bus_unlock(dev);
459 }
460 if (is_nd_btt(dev) && probe) {
461 nd_region = to_nd_region(dev->parent);
^^^^^^^^^^^
New unchecked dereference inside function call.
462 nvdimm_bus_lock(dev);
463 if (nd_region->btt_seed == dev)
regards,
dan carpenter
5 years, 6 months
[PATCH v2 00/17] libnvdimm: ->rw_bytes(), BLK, BTT, PMEM api, and unit tests
by Dan Williams
->rw_bytes() is a byte-aligned interface for accessing persistent memory
namespaces. The primary consumer of the ->rw_bytes() interface is the
BTT library.
BTT is a library that converts a byte-accessible namespace into a disk
with atomic sector update semantics (prevents sector tearing on crash or
power loss). The sinister aspect of sector tearing is that most
applications do not know they have a atomic sector dependency. At least
today's disk's rarely ever tear sectors and if they do you almost
certainly get a CRC error on access. NVDIMMs will always tear and
always silently.
BLK is a driver for NVDIMMs that provide sliding mmio windows to access
persistent memory.
The PMEM api defines ensures writes have hit persistent media relative
to the completion of an i/o.
Changes since v1 [1]:
1/ The ->rw_bytes() interface has been removed from struct
block_device_operations and is now a common operation of NVDIMM
namespace devices. Accordingly a BTT instance is now a libnvdimm
device-model peer of a namespace rather than a stacked block device
driver. The BTT is no longer a driver in its own right, instead it is a
extension library used by a BLK or PMEM namespace. This clarifies the
device model and reduced the core implementation by a couple hundred
lines of code. (Christoph)
2/ Kill ND_MAX_REGIONS and ND_IOSTAT Kconfig options. (Christoph)
3/ Killed the access out of range check separately in PMEM, BLK, and BTT
(Christoph)
4/ Kill the central helper for blk queue properties (Christoph)
5/ Added Toshi's numa patches with a change to set the numa info at
device create time rather than driver probe time.
6/ Cherry picked the PMEM api. The wider arch cleanups in the full
pmem-api series are too large / invasive to pick up at this late date.
The keeps the pmem.c driver x86-only for one more cycle.
[1]: https://lists.01.org/pipermail/linux-nvdimm/2015-June/001246.html
Diffstat since v1:
Documentation/nvdimm/btt.txt | 24 ++-
Documentation/nvdimm/nvdimm.txt | 79 ++++----
arch/x86/Kconfig | 1 +
arch/x86/include/asm/cacheflush.h | 72 +++++++
arch/x86/include/asm/io.h | 6 +
drivers/acpi/nfit.c | 17 +-
drivers/acpi/numa.c | 50 ++++-
drivers/nvdimm/Kconfig | 56 ++----
drivers/nvdimm/Makefile | 2 +-
drivers/nvdimm/blk.c | 148 +++++++-------
drivers/nvdimm/btt.c | 166 ++++------------
drivers/nvdimm/btt_devs.c | 403 +++++++++++++++++---------------------
drivers/nvdimm/bus.c | 190 ++++--------------
drivers/nvdimm/core.c | 30 ---
drivers/nvdimm/label.c | 5 +-
drivers/nvdimm/namespace_devs.c | 252 +++++++++++++++++++-----
drivers/nvdimm/nd-core.h | 47 +----
drivers/nvdimm/nd.h | 51 +++--
drivers/nvdimm/pmem.c | 185 ++++++++---------
drivers/nvdimm/region.c | 85 +-------
drivers/nvdimm/region_devs.c | 182 +++++++++++++----
include/linux/acpi.h | 5 +
include/linux/blkdev.h | 44 -----
include/linux/compiler.h | 2 +
include/linux/libnvdimm.h | 2 +
include/linux/nd.h | 63 +++++-
include/linux/pmem.h | 153 +++++++++++++++
include/uapi/linux/ndctl.h | 2 -
lib/Kconfig | 3 +
tools/testing/nvdimm/Kbuild | 2 +-
tools/testing/nvdimm/test/nfit.c | 1 +
31 files changed, 1272 insertions(+), 1056 deletions(-)
create mode 100644 include/linux/pmem.h
---
Dan Williams (8):
libnvdimm: infrastructure for btt devices
tools/testing/nvdimm: libnvdimm unit test infrastructure
libnvdimm: Non-Volatile Devices
libnvdimm, pmem: fix up max_hw_sectors
pmem: make_request cleanups
libnvdimm: enable iostat
pmem: flag pmem block devices as non-rotational
libnvdimm, nfit: handle unarmed dimms, mark namespaces read-only
Ross Zwisler (2):
libnvdimm, nfit, nd_blk: driver for BLK-mode access persistent memory
arch, x86: pmem api for ensuring durability of persistent memory updates
Toshi Kani (3):
acpi: Add acpi_map_pxm_to_online_node()
libnvdimm: Set numa_node to NVDIMM devices
libnvdimm: Add sysfs numa_node to NVDIMM devices
Vishal Verma (4):
nd_btt: atomic sector updates
fs/block_dev.c: skip rw_page if bdev has integrity
libnvdimm, btt: add support for blk integrity
libnvdimm, blk: add support for blk integrity
Documentation/nvdimm/btt.txt | 283 ++++++
Documentation/nvdimm/nvdimm.txt | 808 ++++++++++++++++++
MAINTAINERS | 39 +
arch/x86/Kconfig | 1
arch/x86/include/asm/cacheflush.h | 72 ++
arch/x86/include/asm/io.h | 6
drivers/acpi/nfit.c | 498 +++++++++++
drivers/acpi/nfit.h | 58 +
drivers/acpi/numa.c | 50 +
drivers/nvdimm/Kconfig | 42 +
drivers/nvdimm/Makefile | 7
drivers/nvdimm/blk.c | 384 +++++++++
drivers/nvdimm/btt.c | 1479 +++++++++++++++++++++++++++++++++
drivers/nvdimm/btt.h | 185 ++++
drivers/nvdimm/btt_devs.c | 426 ++++++++++
drivers/nvdimm/bus.c | 60 +
drivers/nvdimm/core.c | 69 ++
drivers/nvdimm/dimm_devs.c | 9
drivers/nvdimm/label.c | 5
drivers/nvdimm/namespace_devs.c | 295 ++++++-
drivers/nvdimm/nd-core.h | 5
drivers/nvdimm/nd.h | 86 ++
drivers/nvdimm/pmem.c | 181 ++--
drivers/nvdimm/region.c | 28 +
drivers/nvdimm/region_devs.c | 238 +++++
fs/block_dev.c | 4
include/linux/acpi.h | 5
include/linux/compiler.h | 2
include/linux/libnvdimm.h | 32 +
include/linux/nd.h | 63 +
include/linux/pmem.h | 153 +++
lib/Kconfig | 3
tools/testing/nvdimm/Kbuild | 40 +
tools/testing/nvdimm/Makefile | 7
tools/testing/nvdimm/config_check.c | 15
tools/testing/nvdimm/test/Kbuild | 8
tools/testing/nvdimm/test/iomap.c | 151 +++
tools/testing/nvdimm/test/nfit.c | 1116 +++++++++++++++++++++++++
tools/testing/nvdimm/test/nfit_test.h | 29 +
39 files changed, 6759 insertions(+), 183 deletions(-)
create mode 100644 Documentation/nvdimm/btt.txt
create mode 100644 Documentation/nvdimm/nvdimm.txt
create mode 100644 drivers/nvdimm/blk.c
create mode 100644 drivers/nvdimm/btt.c
create mode 100644 drivers/nvdimm/btt.h
create mode 100644 drivers/nvdimm/btt_devs.c
create mode 100644 include/linux/pmem.h
create mode 100644 tools/testing/nvdimm/Kbuild
create mode 100644 tools/testing/nvdimm/Makefile
create mode 100644 tools/testing/nvdimm/config_check.c
create mode 100644 tools/testing/nvdimm/test/Kbuild
create mode 100644 tools/testing/nvdimm/test/iomap.c
create mode 100644 tools/testing/nvdimm/test/nfit.c
create mode 100644 tools/testing/nvdimm/test/nfit_test.h
5 years, 6 months
[ndctl PATCH 0/4] release v41, and sync with upstream libnvdimm
by Dan Williams
The libnvdimm subsystem was accepted into the upstream Linux kernel [1].
This update brings the implementation in line with the final updates to
the architecture (BTTs are children of REGIONs), and bumps the version
number to indicate the first release of the library that is relative to
upstream kernel commit ids.
[1]: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?i...
---
Dan Williams (4):
ndctl: fix module association for dimm objects
ndctl: drop "is enabled" checks, just propagate the kernel error
ndctl: rework btt instances to consume namespaces instead of block_devices
ndctl: release v41
Makefile.am | 4 -
configure.ac | 2
lib/libndctl.c | 393 +++++++++++++++++++++++++++++++++-----------------
lib/libndctl.sym | 13 +-
lib/ndctl/libndctl.h | 23 ++-
lib/test-libndctl.c | 256 ++++++++++++++++++---------------
ndctl.h | 2
7 files changed, 431 insertions(+), 262 deletions(-)
5 years, 7 months