Messages in this thread | | | From | "Williams, Dan J" <> | Subject | [GIT PULL] libnvdimm for 4.12 | Date | Fri, 5 May 2017 21:40:03 +0000 |
| |
Hi Linus, please pull from:
git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm tags/libnvdimm-for-4.12
...to receive the libnvdimm update for 4.12. The bulk of this has been in multiple -next releases. There were a few late breaking fixes and small features that got added in the last couple days, but the whole set has received a build success notification from the kbuild robot.
Another late change that was merged through the x86/mm tree causes a conflict with this branch. The proposed merge resolution below matches what Stephen Rothwell came up with as well.
Lastly the default diffstat from git request-pull shows some changes from Greg's char-misc tree because I based the for-4.12/dax work on the new cdev_device_add() helper and related fallout in drivers/dax/. A cleaner diffstat is also included below starting from commit bfca9acf1a5d "Merge branch 'for-4.11/libnvdimm' into for-4.12/dax".
Please pull, thanks!
diff --cc drivers/nvdimm/pmem.c index fbc640bf06b0,58db813e7b7b..c544d466ea51 --- a/drivers/nvdimm/pmem.c +++ b/drivers/nvdimm/pmem.c @@@ -232,15 -243,14 +244,19 @@@ static void pmem_release_queue(void *q blk_cleanup_queue(q); } +static void pmem_freeze_queue(void *q) +{ + blk_freeze_queue_start(q); +} + - static void pmem_release_disk(void *disk) + static void pmem_release_disk(void *__pmem) { - del_gendisk(disk); - put_disk(disk); + struct pmem_device *pmem = __pmem; + + kill_dax(pmem->dax_dev); + put_dax(pmem->dax_dev); + del_gendisk(pmem->disk); + put_disk(pmem->disk); } static int pmem_attach_disk(struct device *dev, diff --cc fs/dax.c index 6433650be833,ce9dc9c3e829..43bbd6d1037d --- a/fs/dax.c +++ b/fs/dax.c @@@ -979,24 -956,34 +965,34 @@@ static bool dax_range_is_aligned(struc return true; } - int __dax_zero_page_range(struct block_device *bdev, sector_t sector, - unsigned int offset, unsigned int length) + int __dax_zero_page_range(struct block_device *bdev, + struct dax_device *dax_dev, sector_t sector, + unsigned int offset, unsigned int size) { - struct blk_dax_ctl dax = { - .sector = sector, - .size = PAGE_SIZE, - }; - if (dax_range_is_aligned(bdev, offset, length)) { - sector_t start_sector = dax.sector + (offset >> 9); + if (dax_range_is_aligned(bdev, offset, size)) { + sector_t start_sector = sector + (offset >> 9); return blkdev_issue_zeroout(bdev, start_sector, - length >> 9, GFP_NOFS, 0); - size >> 9, GFP_NOFS, true); ++ size >> 9, GFP_NOFS, 0); } else { - if (dax_map_atomic(bdev, &dax) < 0) - return PTR_ERR(dax.addr); - clear_pmem(dax.addr + offset, length); - dax_unmap_atomic(bdev, &dax); + pgoff_t pgoff; + long rc, id; + void *kaddr; + pfn_t pfn; + + rc = bdev_dax_pgoff(bdev, sector, size, &pgoff); + if (rc) + return rc; + + id = dax_read_lock(); + rc = dax_direct_access(dax_dev, pgoff, PHYS_PFN(size), &kaddr, + &pfn); + if (rc < 0) { + dax_read_unlock(id); + return rc; + } + clear_pmem(kaddr + offset, size); + dax_read_unlock(id); } return 0; }
The following changes since commit 11e63f6d920d6f2dfd3cd421e939a4aec9a58dcd:
x86, pmem: fix broken __copy_user_nocache cache-bypass assumptions (2017-04-12 13:45:18 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm tags/libnvdimm-for-4.12
for you to fetch changes up to 736163671bcb163fc82600b46c83dfa89d532d95:
Merge branch 'for-4.12/dax' into libnvdimm-for-next (2017-05-04 23:38:43 -0700)
---------------------------------------------------------------- libnvdimm for 4.12
* Region media error reporting: A libnvdimm region device is the parent to one or more namespaces. To date, media errors have been reported via the "badblocks" attribute attached to pmem block devices for namespaces in "raw" or "memory" mode. Given that namespaces can be in "device-dax" or "btt-sector" mode this new interface reports media errors generically, i.e. independent of namespace modes or state. This subsequently allows userspace tooling to craft "ACPI 6.1 Section 9.20.7.6 Function Index 4 - Clear Uncorrectable Error" requests and submit them via the ioctl path for NVDIMM root bus devices.
* Introduce 'struct dax_device' and 'struct dax_operations': Prompted by a request from Linus and feedback from Christoph this allows for dax capable drivers to publish their own custom dax operations. This fixes the broken assumption that all dax operations are related to a persistent memory device, and makes it easier for other architectures and platforms to add customized persistent memory support.
* 'libnvdimm' core updates: A new "deep_flush" sysfs attribute is available for storage appliance applications to manually trigger memory controllers to drain write-pending buffers that would otherwise be flushed automatically by the platform ADR (asynchronous-DRAM-refresh) mechanism at a power loss event. Support for "locked" DIMMs is included to prevent namespaces from surfacing when the namespace label data area is locked. Finally, fixes for various reported deadlocks and crashes, also tagged for -stable.
* ACPI / nfit driver updates: General updates of the nfit driver to add DSM command overrides, ACPI 6.1 health state flags support, DSM payload debug available by default, and various fixes.
Acknowledgements that came after the branch was pushed:
commmit 565851c972b5 "device-dax: fix sysfs attribute deadlock" Tested-by: Yi Zhang <yizhan@redhat.com>
commit 23f498448362 "libnvdimm: rework region badblocks clearing" Tested-by: Toshi Kani <toshi.kani@hpe.com>
---------------------------------------------------------------- Arnd Bergmann (1): block, dax: use correct format string in bdev_dax_supported
Dan Williams (39): acpi, nfit: fix acpi_get_table leak Merge branch 'for-4.11/libnvdimm' into for-4.12/dax device-dax: rename 'dax_dev' to 'dev_dax' dax: refactor dax-fs into a generic provider of 'struct dax_device' instances Revert "libnvdimm: band aid btt vs clear poison locking" acpi, nfit: add support for acpi 6.1 dimm state flags tools/testing/nvdimm: test acpi 6.1 health state flags acpi, nfit: support "map failed" dimms acpi, nfit: collate health state flags acpi, nfit: limit ->flush_probe() to initialization work tools/testing/nvdimm: fix nfit_test shutdown crash acpi, nfit: fix module unload vs workqueue shutdown race dax: add a facility to lookup a dax device by 'host' device name dax: introduce dax_operations pmem: add dax_operations support axon_ram: add dax_operations support brd: add dax_operations support dcssblk: add dax_operations support block: kill bdev_dax_capable() dax: introduce dax_direct_access() dm: add dax_device and dax_operations support libnvdimm, region: fix flush hint detection crash dm: teach dm-targets to use a dax_device + dax_operations ext2, ext4, xfs: retrieve dax_device for iomap operations Revert "block: use DAX for partition table reads" filesystem-dax: convert to dax_direct_access() block, dax: convert bdev_dax_supported() to dax_direct_access() block: remove block_device_operations ->direct_access() x86, dax, pmem: remove indirection around memcpy_from_pmem() libnvdimm, region: sysfs trigger for nvdimm_flush() acpi, nfit: kill ACPI_NFIT_DEBUG libnvdimm: rework region badblocks clearing libnvdimm: fix nvdimm_bus_lock() vs device_lock() ordering libnvdimm: restore "libnvdimm: band aid btt vs clear poison locking" device-dax: fix sysfs attribute deadlock libnvdimm: convert NDD_ flags to use bitops, introduce NDD_LOCKED libnvdimm: handle locked label storage areas libnvdimm, pfn: fix 'npfns' vs section alignment Merge branch 'for-4.12/dax' into libnvdimm-for-next
Dave Jiang (5): libnvdimm: add mechanism to publish badblocks at the region level libnvdimm: Add 'resource' sysfs attribute to regions libnvdimm: add support for clear poison list and badblocks for device dax device-dax, tools/testing/nvdimm: enable device-dax with mock resources libnvdimm: fix clear poison locking with spinlock and GFP_NOWAIT allocation
Gerald Schaefer (1): brd: fix uninitialized use of brd->dax_dev
Linda Knippers (3): acpi, nfit: allow override of built-in bitmasks for nvdimm DSMs acpi, nfit: allow specifying a default DSM family acpi, nfit: remove unnecessary newline
Oliver O'Halloran (1): device-dax: improve fault handler debug output
Pushkar Jambhlekar (1): device-dax: fix dax_dev_huge_fault() unknown fault size handling
Toshi Kani (3): libnvdimm: fix phys_addr for nvdimm_clear_poison libnvdimm, pmem: fix a NULL pointer BUG in nd_pmem_notify libnvdimm: fix clear length of nvdimm_forget_poison()
Documentation/DocBook/rapidio.tmpl | 3 - .../devicetree/bindings/auxdisplay/hit,hd44780.txt | 44 ++ .../devicetree/bindings/fpga/fpga-region.txt | 1 + .../bindings/fpga/lattice-ice40-fpga-mgr.txt | 21 + Documentation/driver-api/vme.rst | 363 +++------ Documentation/w1/slaves/00-INDEX | 4 + Documentation/w1/slaves/w1_ds2413 | 50 ++ Documentation/w1/slaves/w1_ds2438 | 63 ++ MAINTAINERS | 1 - arch/arm/mach-ep93xx/ts72xx.c | 26 + arch/powerpc/platforms/Kconfig | 1 + arch/powerpc/sysdev/axonram.c | 45 +- arch/x86/hyperv/hv_init.c | 2 +- arch/x86/include/asm/pmem.h | 5 - arch/x86/include/asm/string_64.h | 1 + arch/x86/include/uapi/asm/hyperv.h | 7 +- block/Kconfig | 1 + block/partition-generic.c | 17 +- drivers/Makefile | 2 +- drivers/acpi/nfit/Kconfig | 12 - drivers/acpi/nfit/core.c | 233 ++++-- drivers/acpi/nfit/nfit.h | 4 +- drivers/android/Kconfig | 2 +- drivers/auxdisplay/Kconfig | 14 + drivers/auxdisplay/Makefile | 2 + drivers/auxdisplay/charlcd.c | 818 ++++++++++++++++++++ drivers/auxdisplay/hd44780.c | 325 ++++++++ drivers/block/Kconfig | 1 + drivers/block/brd.c | 48 +- drivers/char/hpet.c | 2 +- drivers/char/virtio_console.c | 2 +- drivers/dax/Kconfig | 10 +- drivers/dax/Makefile | 5 +- drivers/dax/dax-private.h | 57 ++ drivers/dax/dax.h | 15 +- drivers/dax/device-dax.h | 25 + drivers/dax/{dax.c => device.c} | 516 ++++--------- drivers/dax/pmem.c | 10 +- drivers/dax/super.c | 425 +++++++++++ drivers/fpga/Kconfig | 13 + drivers/fpga/Makefile | 2 + drivers/fpga/fpga-bridge.c | 17 +- drivers/fpga/fpga-mgr.c | 2 +- drivers/fpga/fpga-region.c | 8 +- drivers/fpga/ice40-spi.c | 207 ++++++ drivers/fpga/ts73xx-fpga.c | 156 ++++ drivers/fpga/zynq-fpga.c | 28 +- drivers/hv/channel.c | 10 +- drivers/hv/channel_mgmt.c | 48 +- drivers/hv/connection.c | 65 +- drivers/hv/hv.c | 5 +- drivers/hv/hv_balloon.c | 2 - drivers/hv/hv_fcopy.c | 2 - drivers/hv/hv_kvp.c | 12 +- drivers/hv/hv_snapshot.c | 2 - drivers/hv/hyperv_vmbus.h | 29 +- drivers/hv/ring_buffer.c | 22 +- drivers/hv/vmbus_drv.c | 4 +- drivers/md/Kconfig | 1 + drivers/md/dm-core.h | 1 + drivers/md/dm-linear.c | 27 +- drivers/md/dm-snap.c | 6 +- drivers/md/dm-stripe.c | 29 +- drivers/md/dm-target.c | 6 +- drivers/md/dm.c | 67 +- drivers/misc/Kconfig | 9 + drivers/misc/Makefile | 1 + drivers/misc/aspeed-lpc-ctrl.c | 267 +++++++ drivers/misc/panel.c | 827 +++------------------ drivers/nvdimm/Kconfig | 1 + drivers/nvdimm/btt_devs.c | 2 +- drivers/nvdimm/bus.c | 122 ++- drivers/nvdimm/claim.c | 37 +- drivers/nvdimm/core.c | 51 +- drivers/nvdimm/dax_devs.c | 2 +- drivers/nvdimm/dimm.c | 2 + drivers/nvdimm/dimm_devs.c | 19 +- drivers/nvdimm/namespace_devs.c | 17 +- drivers/nvdimm/nd-core.h | 1 + drivers/nvdimm/nd.h | 2 + drivers/nvdimm/pfn_devs.c | 8 +- drivers/nvdimm/pmem.c | 90 ++- drivers/nvdimm/pmem.h | 7 +- drivers/nvdimm/region.c | 24 + drivers/nvdimm/region_devs.c | 83 ++- drivers/pps/pps.c | 123 ++- drivers/rapidio/rio-sysfs.c | 76 +- drivers/rapidio/rio.c | 3 - drivers/rapidio/rio.h | 2 - drivers/s390/block/Kconfig | 1 + drivers/s390/block/dcssblk.c | 45 +- drivers/vme/vme.c | 469 +++++++++++- drivers/w1/slaves/Kconfig | 6 + drivers/w1/slaves/Makefile | 1 + drivers/w1/slaves/w1_ds2438.c | 390 ++++++++++ drivers/w1/slaves/w1_ds2760.h | 10 +- drivers/w1/w1_family.h | 1 + drivers/zorro/zorro-driver.c | 15 +- drivers/zorro/zorro-sysfs.c | 76 +- drivers/zorro/zorro.c | 3 - drivers/zorro/zorro.h | 3 +- fs/block_dev.c | 117 +-- fs/char_dev.c | 86 +++ fs/dax.c | 297 ++++---- fs/ext2/inode.c | 9 +- fs/ext4/inode.c | 9 +- fs/iomap.c | 3 +- fs/xfs/xfs_iomap.c | 10 + include/linux/blkdev.h | 19 +- include/linux/cdev.h | 5 + include/linux/dax.h | 34 +- include/linux/device-mapper.h | 8 +- include/linux/fpga/fpga-mgr.h | 1 + include/linux/hyperv.h | 31 +- include/linux/iomap.h | 1 + include/linux/libnvdimm.h | 8 +- include/linux/pmem.h | 23 - include/linux/string.h | 8 + include/linux/vme.h | 12 +- include/misc/charlcd.h | 42 ++ include/uapi/linux/aspeed-lpc-ctrl.h | 60 ++ include/uapi/linux/ndctl.h | 1 + include/uapi/linux/pps.h | 19 + tools/testing/nvdimm/Kbuild | 11 +- tools/testing/nvdimm/dax-dev.c | 49 ++ tools/testing/nvdimm/pmem-dax.c | 21 +- tools/testing/nvdimm/test/nfit.c | 54 +- 127 files changed, 5423 insertions(+), 2265 deletions(-) create mode 100644 Documentation/devicetree/bindings/auxdisplay/hit,hd44780.txt create mode 100644 Documentation/devicetree/bindings/fpga/lattice-ice40-fpga-mgr.txt create mode 100644 Documentation/w1/slaves/w1_ds2413 create mode 100644 Documentation/w1/slaves/w1_ds2438 create mode 100644 drivers/auxdisplay/charlcd.c create mode 100644 drivers/auxdisplay/hd44780.c create mode 100644 drivers/dax/dax-private.h create mode 100644 drivers/dax/device-dax.h rename drivers/dax/{dax.c => device.c} (50%) create mode 100644 drivers/dax/super.c create mode 100644 drivers/fpga/ice40-spi.c create mode 100644 drivers/fpga/ts73xx-fpga.c create mode 100644 drivers/misc/aspeed-lpc-ctrl.c create mode 100644 drivers/w1/slaves/w1_ds2438.c create mode 100644 include/misc/charlcd.h create mode 100644 include/uapi/linux/aspeed-lpc-ctrl.h create mode 100644 tools/testing/nvdimm/dax-dev.c
---
Diffstat starting from commit bfca9acf1a5d "Merge branch 'for- 4.11/libnvdimm' into for-4.12/dax"
arch/powerpc/platforms/Kconfig | 1 + arch/powerpc/sysdev/axonram.c | 45 +++- arch/x86/include/asm/pmem.h | 5 - arch/x86/include/asm/string_64.h | 1 + block/Kconfig | 1 + block/partition-generic.c | 17 +- drivers/Makefile | 2 +- drivers/acpi/nfit/Kconfig | 12 - drivers/acpi/nfit/core.c | 233 ++++++++++++------ drivers/acpi/nfit/nfit.h | 4 +- drivers/block/Kconfig | 1 + drivers/block/brd.c | 48 +++- drivers/dax/Kconfig | 10 +- drivers/dax/Makefile | 5 +- drivers/dax/dax-private.h | 57 +++++ drivers/dax/dax.h | 15 +- drivers/dax/device-dax.h | 25 ++ drivers/dax/{dax.c => device.c} | 501 ++++++++++++--------------------------- drivers/dax/pmem.c | 10 +- drivers/dax/super.c | 425 +++++++++++++++++++++++++++++++++ drivers/md/Kconfig | 1 + drivers/md/dm-core.h | 1 + drivers/md/dm-linear.c | 27 +-- drivers/md/dm-snap.c | 6 +- drivers/md/dm-stripe.c | 29 ++- drivers/md/dm-target.c | 6 +- drivers/md/dm.c | 67 ++++-- drivers/nvdimm/Kconfig | 1 + drivers/nvdimm/btt_devs.c | 2 +- drivers/nvdimm/bus.c | 122 +++++++++- drivers/nvdimm/claim.c | 37 +-- drivers/nvdimm/core.c | 51 ++-- drivers/nvdimm/dax_devs.c | 2 +- drivers/nvdimm/dimm.c | 2 + drivers/nvdimm/dimm_devs.c | 19 +- drivers/nvdimm/namespace_devs.c | 17 +- drivers/nvdimm/nd-core.h | 1 + drivers/nvdimm/nd.h | 2 + drivers/nvdimm/pfn_devs.c | 8 +- drivers/nvdimm/pmem.c | 90 +++++-- drivers/nvdimm/pmem.h | 7 +- drivers/nvdimm/region.c | 24 ++ drivers/nvdimm/region_devs.c | 83 ++++++- drivers/s390/block/Kconfig | 1 + drivers/s390/block/dcssblk.c | 45 +++- fs/block_dev.c | 117 +++------ fs/dax.c | 297 ++++++++++++----------- fs/ext2/inode.c | 9 +- fs/ext4/inode.c | 9 +- fs/iomap.c | 3 +- fs/xfs/xfs_iomap.c | 10 + include/linux/blkdev.h | 19 +- include/linux/dax.h | 34 ++- include/linux/device-mapper.h | 8 +- include/linux/iomap.h | 1 + include/linux/libnvdimm.h | 8 +- include/linux/pmem.h | 23 -- include/linux/string.h | 8 + include/uapi/linux/ndctl.h | 1 + tools/testing/nvdimm/Kbuild | 11 +- tools/testing/nvdimm/dax-dev.c | 49 ++++ tools/testing/nvdimm/pmem-dax.c | 21 +- tools/testing/nvdimm/test/nfit.c | 54 ++++- 63 files changed, 1807 insertions(+), 944 deletions(-) create mode 100644 drivers/dax/dax-private.h create mode 100644 drivers/dax/device-dax.h rename drivers/dax/{dax.c => device.c} (51%) create mode 100644 drivers/dax/super.c create mode 100644 tools/testing/nvdimm/dax-dev.c
| |