]> Git Repo - linux.git/commitdiff
Merge tag 'libnvdimm-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdim...
authorLinus Torvalds <[email protected]>
Fri, 7 Jul 2017 16:44:06 +0000 (09:44 -0700)
committerLinus Torvalds <[email protected]>
Fri, 7 Jul 2017 16:44:06 +0000 (09:44 -0700)
Pull libnvdimm updates from Dan Williams:
 "libnvdimm updates for the latest ACPI and UEFI specifications. This
  pull request also includes new 'struct dax_operations' enabling to
  undo the abuse of copy_user_nocache() for copy operations to pmem.

  The dax work originally missed 4.12 to address concerns raised by Al.

  Summary:

   - Introduce the _flushcache() family of memory copy helpers and use
     them for persistent memory write operations on x86. The
     _flushcache() semantic indicates that the cache is either bypassed
     for the copy operation (movnt) or any lines dirtied by the copy
     operation are written back (clwb, clflushopt, or clflush).

   - Extend dax_operations with ->copy_from_iter() and ->flush()
     operations. These operations and other infrastructure updates allow
     all persistent memory specific dax functionality to be pushed into
     libnvdimm and the pmem driver directly. It also allows dax-specific
     sysfs attributes to be linked to a host device, for example:
     /sys/block/pmem0/dax/write_cache

   - Add support for the new NVDIMM platform/firmware mechanisms
     introduced in ACPI 6.2 and UEFI 2.7. This support includes the v1.2
     namespace label format, extensions to the address-range-scrub
     command set, new error injection commands, and a new BTT
     (block-translation-table) layout. These updates support inter-OS
     and pre-OS compatibility.

   - Fix a longstanding memory corruption bug in nfit_test.

   - Make the pmem and nvdimm-region 'badblocks' sysfs files poll(2)
     capable.

   - Miscellaneous fixes and small updates across libnvdimm and the nfit
     driver.

  Acknowledgements that came after the branch was pushed: commit
  6aa734a2f38e ("libnvdimm, region, pmem: fix 'badblocks'
  sysfs_get_dirent() reference lifetime") was reviewed by Toshi Kani
  <[email protected]>"

* tag 'libnvdimm-for-4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm: (42 commits)
  libnvdimm, namespace: record 'lbasize' for pmem namespaces
  acpi/nfit: Issue Start ARS to retrieve existing records
  libnvdimm: New ACPI 6.2 DSM functions
  acpi, nfit: Show bus_dsm_mask in sysfs
  libnvdimm, acpi, nfit: Add bus level dsm mask for pass thru.
  acpi, nfit: Enable DSM pass thru for root functions.
  libnvdimm: passthru functions clear to send
  libnvdimm, btt: convert some info messages to warn/err
  libnvdimm, region, pmem: fix 'badblocks' sysfs_get_dirent() reference lifetime
  libnvdimm: fix the clear-error check in nsio_rw_bytes
  libnvdimm, btt: fix btt_rw_page not returning errors
  acpi, nfit: quiet invalid block-aperture-region warnings
  libnvdimm, btt: BTT updates for UEFI 2.7 format
  acpi, nfit: constify *_attribute_group
  libnvdimm, pmem: disable dax flushing when pmem is fronting a volatile region
  libnvdimm, pmem, dax: export a cache control attribute
  dax: convert to bitmask for flags
  dax: remove default copy_from_iter fallback
  libnvdimm, nfit: enable support for volatile ranges
  libnvdimm, pmem: fix persistence warning
  ...

13 files changed:
1  2 
MAINTAINERS
arch/x86/Kconfig
drivers/block/brd.c
drivers/dax/super.c
drivers/md/dm-linear.c
drivers/md/dm-stripe.c
drivers/md/dm.c
drivers/nvdimm/btt.c
drivers/nvdimm/pmem.c
drivers/s390/block/dcssblk.c
fs/dax.c
include/linux/device-mapper.h
lib/Kconfig

diff --combined MAINTAINERS
index e23b07d2ce1d7b062e57f9f0bdb4f36302421fc5,369a547476c28c6fbd8f40d008f6dee7bbe686ee..1db3152993ba55d53a96dac61baf62695fead67a
@@@ -155,7 -155,7 +155,7 @@@ S: Maintaine
  F:    drivers/scsi/53c700*
  
  6LOWPAN GENERIC (BTLE/IEEE 802.15.4)
 -M:    Alexander Aring <a[email protected]>
 +M:    Alexander Aring <a[email protected]>
  M:    Jukka Rissanen <[email protected]>
  L:    [email protected]
  L:    [email protected]
  S:    Maintained
  F:    Documentation/hwmon/ads1015
  F:    drivers/hwmon/ads1015.c
 -F:    include/linux/i2c/ads1015.h
 +F:    include/linux/platform_data/ads1015.h
  
  ADT746X FAN DRIVER
  M:    Colin Leroy <[email protected]>
@@@ -1036,22 -1036,6 +1036,22 @@@ S:    Maintaine
  F:    drivers/amba/
  F:    include/linux/amba/bus.h
  
 +ARM/ACTIONS SEMI ARCHITECTURE
 +M:    Andreas Färber <[email protected]>
 +L:    [email protected] (moderated for non-subscribers)
 +S:    Maintained
 +N:    owl
 +F:    arch/arm/mach-actions/
 +F:    arch/arm/boot/dts/owl-*
 +F:    arch/arm64/boot/dts/actions/
 +F:    drivers/clocksource/owl-*
 +F:    drivers/soc/actions/
 +F:    include/dt-bindings/power/owl-*
 +F:    include/linux/soc/actions/
 +F:    Documentation/devicetree/bindings/arm/actions.txt
 +F:    Documentation/devicetree/bindings/power/actions,owl-sps.txt
 +F:    Documentation/devicetree/bindings/timer/actions,owl-timer.txt
 +
  ARM/ADS SPHERE MACHINE SUPPORT
  M:    Lennert Buytenhek <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
@@@ -1188,7 -1172,7 +1188,7 @@@ N:      clps711
  
  ARM/CIRRUS LOGIC EP93XX ARM ARCHITECTURE
  M:    Hartley Sweeten <[email protected]>
 -M:    Ryan Mallon <rmallo[email protected]>
 +M:    Alexander Sverdlin <alexander.sverdli[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  F:    arch/arm/mach-ep93xx/
@@@ -1223,9 -1207,7 +1223,9 @@@ L:      [email protected]
  S:    Maintained
  F:    drivers/hwtracing/coresight/*
  F:    Documentation/trace/coresight.txt
 +F:    Documentation/trace/coresight-cpu-debug.txt
  F:    Documentation/devicetree/bindings/arm/coresight.txt
 +F:    Documentation/devicetree/bindings/arm/coresight-cpu-debug.txt
  F:    Documentation/ABI/testing/sysfs-bus-coresight-devices-*
  F:    tools/perf/arch/arm/util/pmu.c
  F:    tools/perf/arch/arm/util/auxtrace.c
@@@ -1507,16 -1489,13 +1507,16 @@@ M:   Gregory Clement <gregory.clement@fre
  M:    Sebastian Hesselbarth <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
 -F:    arch/arm/mach-mvebu/
 -F:    drivers/rtc/rtc-armada38x.c
  F:    arch/arm/boot/dts/armada*
  F:    arch/arm/boot/dts/kirkwood*
 +F:    arch/arm/configs/mvebu_*_defconfig
 +F:    arch/arm/mach-mvebu/
  F:    arch/arm64/boot/dts/marvell/armada*
  F:    drivers/cpufreq/mvebu-cpufreq.c
 -F:    arch/arm/configs/mvebu_*_defconfig
 +F:    drivers/irqchip/irq-armada-370-xp.c
 +F:    drivers/irqchip/irq-mvebu-*
 +F:    drivers/pinctrl/mvebu/
 +F:    drivers/rtc/rtc-armada38x.c
  
  ARM/Marvell Berlin SoC support
  M:    Jisheng Zhang <[email protected]>
@@@ -1682,6 -1661,7 +1682,6 @@@ F:      arch/arm/mach-qcom
  F:    arch/arm64/boot/dts/qcom/*
  F:    drivers/i2c/busses/i2c-qup.c
  F:    drivers/clk/qcom/
 -F:    drivers/pinctrl/qcom/
  F:    drivers/dma/qcom/
  F:    drivers/soc/qcom/
  F:    drivers/spi/spi-qup.c
@@@ -1697,13 -1677,6 +1697,13 @@@ M:    Lennert Buytenhek <kernel@wantstofly
  L:    [email protected] (moderated for non-subscribers)
  S:    Maintained
  
 +ARM/REALTEK ARCHITECTURE
 +M:    Andreas Färber <[email protected]>
 +L:    [email protected] (moderated for non-subscribers)
 +S:    Maintained
 +F:    arch/arm64/boot/dts/realtek/
 +F:    Documentation/devicetree/bindings/arm/realtek.txt
 +
  ARM/RENESAS ARM64 ARCHITECTURE
  M:    Simon Horman <[email protected]>
  M:    Magnus Damm <[email protected]>
@@@ -1737,7 -1710,6 +1737,7 @@@ L:      [email protected]
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git
  S:    Maintained
  F:    arch/arm/boot/dts/rk3*
 +F:    arch/arm/boot/dts/rv1108*
  F:    arch/arm/mach-rockchip/
  F:    drivers/clk/rockchip/
  F:    drivers/i2c/busses/i2c-rk3x.c
@@@ -1749,6 -1721,7 +1749,6 @@@ N:      rockchi
  ARM/SAMSUNG EXYNOS ARM ARCHITECTURES
  M:    Kukjin Kim <[email protected]>
  M:    Krzysztof Kozlowski <[email protected]>
 -R:    Javier Martinez Canillas <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
  L:    [email protected] (moderated for non-subscribers)
  Q:    https://patchwork.kernel.org/project/linux-samsung-soc/list/
@@@ -1802,12 -1775,11 +1802,12 @@@ F:   arch/arm/plat-samsung/s5p-dev-mfc.
  F:    drivers/media/platform/s5p-mfc/
  
  ARM/SAMSUNG S5P SERIES HDMI CEC SUBSYSTEM SUPPORT
 -M:    Kyungmin Park <kyungmin.park@samsung.com>
 -L:    linux-[email protected]
 +M:    Marek Szyprowski <m.szyprowski@samsung.com>
 +L:    linux-[email protected] (moderated for non-subscribers)
  L:    [email protected]
  S:    Maintained
 -F:    drivers/staging/media/platform/s5p-cec/
 +F:    drivers/media/platform/s5p-cec/
 +F:    Documentation/devicetree/bindings/media/s5p-cec.txt
  
  ARM/SAMSUNG S5P SERIES JPEG CODEC SUPPORT
  M:    Andrzej Pietrasiewicz <[email protected]>
@@@ -1857,6 -1829,7 +1857,6 @@@ F:      drivers/edac/altera_edac
  ARM/STI ARCHITECTURE
  M:    Patrice Chotard <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
 -L:    [email protected]
  W:    http://www.stlinux.com
  S:    Maintained
  F:    arch/arm/mach-sti/
@@@ -1870,8 -1843,8 +1870,8 @@@ F:      drivers/i2c/busses/i2c-st.
  F:    drivers/media/rc/st_rc.c
  F:    drivers/media/platform/sti/c8sectpfe/
  F:    drivers/mmc/host/sdhci-st.c
 -F:    drivers/phy/phy-miphy28lp.c
 -F:    drivers/phy/phy-stih407-usb.c
 +F:    drivers/phy/st/phy-miphy28lp.c
 +F:    drivers/phy/st/phy-stih407-usb.c
  F:    drivers/pinctrl/pinctrl-st.c
  F:    drivers/remoteproc/st_remoteproc.c
  F:    drivers/remoteproc/st_slim_rproc.c
@@@ -2349,15 -2322,6 +2349,15 @@@ F:    Documentation/devicetree/bindings/in
  F:    drivers/input/touchscreen/atmel_mxt_ts.c
  F:    include/linux/platform_data/atmel_mxt_ts.h
  
 +ATOMIC INFRASTRUCTURE
 +M:    Will Deacon <[email protected]>
 +M:    Peter Zijlstra <[email protected]>
 +R:    Boqun Feng <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    arch/*/include/asm/atomic*.h
 +F:    include/*/atomic*.h
 +
  ATTO EXPRESSSAS SAS/SATA RAID SCSI DRIVER
  M:    Bradley Grove <[email protected]>
  L:    [email protected]
@@@ -2631,21 -2595,6 +2631,21 @@@ S:    Maintaine
  F:    net/bluetooth/
  F:    include/net/bluetooth/
  
 +DMA MAPPING HELPERS
 +M:    Christoph Hellwig <[email protected]>
 +M:    Marek Szyprowski <[email protected]>
 +R:    Robin Murphy <[email protected]>
 +L:    [email protected]
 +T:    git git://git.infradead.org/users/hch/dma-mapping.git
 +W:    http://git.infradead.org/users/hch/dma-mapping.git
 +S:    Supported
 +F:    lib/dma-debug.c
 +F:    lib/dma-noop.c
 +F:    lib/dma-virt.c
 +F:    drivers/base/dma-mapping.c
 +F:    drivers/base/dma-coherent.c
 +F:    include/linux/dma-mapping.h
 +
  BONDING DRIVER
  M:    Jay Vosburgh <[email protected]>
  M:    Veaceslav Falico <[email protected]>
@@@ -2736,6 -2685,7 +2736,6 @@@ N:      kon
  F:    arch/arm/mach-bcm/
  
  BROADCOM BCM2835 ARM ARCHITECTURE
 -M:    Lee Jones <[email protected]>
  M:    Eric Anholt <[email protected]>
  M:    Stefan Wahren <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
@@@ -2835,11 -2785,8 +2835,11 @@@ BROADCOM BRCM80211 IEEE802.11n WIRELES
  M:    Arend van Spriel <[email protected]>
  M:    Franky Lin <[email protected]>
  M:    Hante Meuleman <[email protected]>
 +M:    Chi-Hsien Lin <[email protected]>
 +M:    Wright Feng <[email protected]>
  L:    [email protected]
  L:    [email protected]
 +L:    [email protected]
  S:    Supported
  F:    drivers/net/wireless/broadcom/brcm80211/
  
@@@ -3017,7 -2964,7 +3017,7 @@@ F:      sound/pci/oxygen
  
  C6X ARCHITECTURE
  M:    Mark Salter <[email protected]>
 -M:    Aurelien Jacquiot <a-jacquiot@ti.com>
 +M:    Aurelien Jacquiot <jacquiot.aurelien@gmail.com>
  L:    [email protected]
  W:    http://www.linux-c6x.org/wiki/index.php/Main_Page
  S:    Maintained
@@@ -3190,7 -3137,6 +3190,7 @@@ F:      include/media/cec.
  F:    include/media/cec-notifier.h
  F:    include/uapi/linux/cec.h
  F:    include/uapi/linux/cec-funcs.h
 +F:    Documentation/devicetree/bindings/media/cec.txt
  
  CELL BROADBAND ENGINE ARCHITECTURE
  M:    Arnd Bergmann <[email protected]>
@@@ -3640,6 -3586,7 +3640,6 @@@ T:      git git://git.kernel.org/pub/scm/lin
  S:    Maintained
  F:    Documentation/crypto/
  F:    Documentation/devicetree/bindings/crypto/
 -F:    Documentation/DocBook/crypto-API.tmpl
  F:    arch/*/crypto/
  F:    crypto/
  F:    drivers/crypto/
@@@ -3766,13 -3713,6 +3766,13 @@@ S:    Supporte
  F:    drivers/infiniband/hw/cxgb4/
  F:    include/uapi/rdma/cxgb4-abi.h
  
 +CXGB4 CRYPTO DRIVER (chcr)
 +M:    Harsh Jain <[email protected]>
 +L:    [email protected]
 +W:    http://www.chelsio.com
 +S:    Supported
 +F:    drivers/crypto/chelsio
 +
  CXGB4VF ETHERNET DRIVER (CXGB4VF)
  M:    Casey Leedom <[email protected]>
  L:    [email protected]
@@@ -4203,7 -4143,8 +4203,7 @@@ M:      Jonathan Corbet <[email protected]
  L:    [email protected]
  S:    Maintained
  F:    Documentation/
 -F:    scripts/docproc.c
 -F:    scripts/kernel-doc*
 +F:    scripts/kernel-doc
  X:    Documentation/ABI/
  X:    Documentation/devicetree/
  X:    Documentation/acpi
@@@ -4751,13 -4692,6 +4751,13 @@@ S:    Maintaine
  F:    drivers/media/usb/dvb-usb-v2/dvb_usb*
  F:    drivers/media/usb/dvb-usb-v2/usb_urb.c
  
 +DONGWOON DW9714 LENS VOICE COIL DRIVER
 +M:    Sakari Ailus <[email protected]>
 +L:    [email protected]
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    drivers/media/i2c/dw9714.c
 +
  DYNAMIC DEBUG
  M:    Jason Baron <[email protected]>
  S:    Maintained
@@@ -5688,7 -5622,7 +5688,7 @@@ F:      scripts/get_maintainer.p
  
  GENWQE (IBM Generic Workqueue Card)
  M:    Frank Haverkamp <[email protected]>
 -M:    Gabriel Krisman Bertazi <krisman@linux.vnet.ibm.com>
 +M:    Guilherme G. Piccoli <gpiccoli@linux.vnet.ibm.com>
  S:    Supported
  F:    drivers/misc/genwqe/
  
@@@ -5733,6 -5667,7 +5733,6 @@@ F:      tools/testing/selftests/gpio
  
  GPIO SUBSYSTEM
  M:    Linus Walleij <[email protected]>
 -M:    Alexandre Courbot <[email protected]>
  L:    [email protected]
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git
  S:    Maintained
@@@ -6492,7 -6427,7 +6492,7 @@@ F:      Documentation/cdrom/ide-c
  F:    drivers/ide/ide-cd*
  
  IEEE 802.15.4 SUBSYSTEM
 -M:    Alexander Aring <a[email protected]>
 +M:    Alexander Aring <a[email protected]>
  M:    Stefan Schmidt <[email protected]>
  L:    [email protected]
  W:    http://wpan.cakelab.org/
@@@ -6546,13 -6481,6 +6546,13 @@@ F:    Documentation/ABI/testing/sysfs-bus-
  F:    Documentation/devicetree/bindings/iio/adc/envelope-detector.txt
  F:    drivers/iio/adc/envelope-detector.c
  
 +IIO MULTIPLEXER
 +M:    Peter Rosin <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/iio/multiplexer/iio-mux.txt
 +F:    drivers/iio/multiplexer/iio-mux.c
 +
  IIO SUBSYSTEM AND DRIVERS
  M:    Jonathan Cameron <[email protected]>
  R:    Hartmut Knaack <[email protected]>
@@@ -6681,12 -6609,6 +6681,12 @@@ F:    Documentation/input/multi-touch-prot
  F:    drivers/input/input-mt.c
  K:    \b(ABS|SYN)_MT_
  
 +INSIDE SECURE CRYPTO DRIVER
 +M:    Antoine Tenart <[email protected]>
 +F:    drivers/crypto/inside-secure/
 +S:    Maintained
 +L:    [email protected]
 +
  INTEL ASoC BDW/HSW DRIVERS
  M:    Jie Yang <[email protected]>
  L:    [email protected] (moderated for non-subscribers)
@@@ -6816,7 -6738,6 +6816,7 @@@ F:      Documentation/networking/i40e.tx
  F:    Documentation/networking/i40evf.txt
  F:    drivers/net/ethernet/intel/
  F:    drivers/net/ethernet/intel/*/
 +F:    include/linux/avf/virtchnl.h
  
  INTEL RDMA RNIC DRIVER
  M:     Faisal Latif <[email protected]>
@@@ -7365,7 -7286,7 +7365,7 @@@ F:      arch/powerpc/kvm
  
  KERNEL VIRTUAL MACHINE for s390 (KVM/s390)
  M:    Christian Borntraeger <[email protected]>
 -M:    Cornelia Huck <co[email protected].com>
 +M:    Cornelia Huck <cohuck@redhat.com>
  L:    [email protected]
  W:    http://www.ibm.com/developerworks/linux/linux390/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git
@@@ -7428,7 -7349,7 +7428,7 @@@ KEYS/KEYRINGS
  M:    David Howells <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    Documentation/security/keys.txt
 +F:    Documentation/security/keys/core.rst
  F:    include/linux/key.h
  F:    include/linux/key-type.h
  F:    include/linux/keyctl.h
@@@ -7442,7 -7363,7 +7442,7 @@@ M:      Mimi Zohar <[email protected]
  L:    [email protected]
  L:    [email protected]
  S:    Supported
 -F:    Documentation/security/keys-trusted-encrypted.txt
 +F:    Documentation/security/keys/trusted-encrypted.rst
  F:    include/keys/trusted-type.h
  F:    security/keys/trusted.c
  F:    security/keys/trusted.h
@@@ -7453,7 -7374,7 +7453,7 @@@ M:      David Safford <[email protected]
  L:    [email protected]
  L:    [email protected]
  S:    Supported
 -F:    Documentation/security/keys-trusted-encrypted.txt
 +F:    Documentation/security/keys/trusted-encrypted.rst
  F:    include/keys/encrypted-type.h
  F:    security/keys/encrypted-keys/
  
@@@ -7463,7 -7384,7 +7463,7 @@@ W:      http://kgdb.wiki.kernel.org
  L:    [email protected]
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jwessel/kgdb.git
  S:    Maintained
 -F:    Documentation/DocBook/kgdb.tmpl
 +F:    Documentation/dev-tools/kgdb.rst
  F:    drivers/misc/kgdbts.c
  F:    drivers/tty/serial/kgdboc.c
  F:    include/linux/kdb.h
@@@ -7617,15 -7538,6 +7617,15 @@@ S:    Maintaine
  F:    drivers/ata/pata_*.c
  F:    drivers/ata/ata_generic.c
  
 +LIBATA PATA FARADAY FTIDE010 AND GEMINI SATA BRIDGE DRIVERS
 +M:    Linus Walleij <[email protected]>
 +L:    [email protected]
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/libata.git
 +S:    Maintained
 +F:    drivers/ata/pata_ftide010.c
 +F:    drivers/ata/sata_gemini.c
 +F:    drivers/ata/sata_gemini.h
 +
  LIBATA SATA AHCI PLATFORM devices support
  M:    Hans de Goede <[email protected]>
  M:    Tejun Heo <[email protected]>
@@@ -7644,7 -7556,7 +7644,7 @@@ S:      Maintaine
  F:    drivers/ata/sata_promise.*
  
  LIBLOCKDEP
 -M:    Sasha Levin <sasha.levin@oracle.com>
 +M:    Sasha Levin <alexander.levin@verizon.com>
  S:    Maintained
  F:    tools/lib/lockdep/
  
@@@ -7680,9 -7592,7 +7680,7 @@@ M:      Ross Zwisler <[email protected]
  L:    [email protected]
  Q:    https://patchwork.kernel.org/project/linux-nvdimm/list/
  S:    Supported
- F:    drivers/nvdimm/pmem.c
- F:    include/linux/pmem.h
- F:    arch/*/include/asm/pmem.h
+ F:    drivers/nvdimm/pmem*
  
  LIGHTNVM PLATFORM SUPPORT
  M:    Matias Bjorling <[email protected]>
@@@ -7795,7 -7705,7 +7793,7 @@@ F:      drivers/platform/x86/hp_accel.
  
  LIVE PATCHING
  M:    Josh Poimboeuf <[email protected]>
 -M:    Jessica Yu <jeyu@redhat.com>
 +M:    Jessica Yu <jeyu@kernel.org>
  M:    Jiri Kosina <[email protected]>
  M:    Miroslav Benes <[email protected]>
  R:    Petr Mladek <[email protected]>
@@@ -8066,12 -7976,6 +8064,12 @@@ S:    Maintaine
  F:    drivers/net/ethernet/marvell/mv643xx_eth.*
  F:    include/linux/mv643xx.h
  
 +MARVELL MV88X3310 PHY DRIVER
 +M:    Russell King <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/net/phy/marvell10g.c
 +
  MARVELL MVNETA ETHERNET DRIVER
  M:    Thomas Petazzoni <[email protected]>
  L:    [email protected]
@@@ -8125,16 -8029,6 +8123,16 @@@ S:    Maintaine
  F:    Documentation/hwmon/max20751
  F:    drivers/hwmon/max20751.c
  
 +MAX2175 SDR TUNER DRIVER
 +M:    Ramesh Shanmugasundaram <[email protected]>
 +L:    [email protected]
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/media/i2c/max2175.txt
 +F:    Documentation/media/v4l-drivers/max2175.rst
 +F:    drivers/media/i2c/max2175*
 +F:    include/uapi/linux/max2175.h
 +
  MAX6650 HARDWARE MONITOR AND FAN CONTROLLER DRIVER
  L:    [email protected]
  S:    Orphan
@@@ -8165,11 -8059,11 +8163,11 @@@ S:   Supporte
  F:    drivers/power/supply/max14577_charger.c
  F:    drivers/power/supply/max77693_charger.c
  
 -MAXIM MAX77802 MULTIFUNCTION PMIC DEVICE DRIVERS
 -M:    Javier Martinez Canillas <javier@osg.samsung.com>
 +MAXIM MAX77802 PMIC REGULATOR DEVICE DRIVER
 +M:    Javier Martinez Canillas <javier@dowhile0.org>
  L:    [email protected]
  S:    Supported
 -F:    drivers/*/*max77802*.c
 +F:    drivers/regulator/max77802-regulator.c
  F:    Documentation/devicetree/bindings/*/*max77802.txt
  F:    include/dt-bindings/*/*max77802.h
  
  S:    Maintained
  F:    drivers/iio/dac/cio-dac.c
  
 +MEDIA DRIVERS FOR RENESAS - DRIF
 +M:    Ramesh Shanmugasundaram <[email protected]>
 +L:    [email protected]
 +L:    [email protected]
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Supported
 +F:    Documentation/devicetree/bindings/media/renesas,drif.txt
 +F:    drivers/media/platform/rcar_drif.c
 +
 +MEDIA DRIVERS FOR FREESCALE IMX
 +M:    Steve Longerbeam <[email protected]>
 +M:    Philipp Zabel <[email protected]>
 +L:    [email protected]
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/media/imx.txt
 +F:    Documentation/media/v4l-drivers/imx.rst
 +F:    drivers/staging/media/imx/
 +F:    include/linux/imx-media.h
 +F:    include/media/imx.h
 +
  MEDIA DRIVERS FOR RENESAS - FCP
  M:    Laurent Pinchart <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/net/wireless/mediatek/mt7601u/
  
 +MEDIATEK RANDOM NUMBER GENERATOR SUPPORT
 +M:      Sean Wang <[email protected]>
 +S:      Maintained
 +F:      drivers/char/hw_random/mtk-rng.c
 +
  MEGACHIPS STDPXXXX-GE-B850V3-FW LVDS/DP++ BRIDGES
  M:    Peter Senna Tschudin <[email protected]>
  M:    Martin Donnelly <[email protected]>
@@@ -8441,26 -8309,6 +8439,26 @@@ W:    http://www.mellanox.co
  Q:    http://patchwork.ozlabs.org/project/netdev/list/
  F:    drivers/net/ethernet/mellanox/mlx5/core/en_*
  
 +MELLANOX ETHERNET INNOVA DRIVER
 +M:    Ilan Tayari <[email protected]>
 +R:    Boris Pismenny <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +W:    http://www.mellanox.com
 +Q:    http://patchwork.ozlabs.org/project/netdev/list/
 +F:    drivers/net/ethernet/mellanox/mlx5/core/fpga/*
 +F:    include/linux/mlx5/mlx5_ifc_fpga.h
 +
 +MELLANOX ETHERNET INNOVA IPSEC DRIVER
 +M:    Ilan Tayari <[email protected]>
 +R:    Boris Pismenny <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +W:    http://www.mellanox.com
 +Q:    http://patchwork.ozlabs.org/project/netdev/list/
 +F:    drivers/net/ethernet/mellanox/mlx5/core/en_ipsec/*
 +F:    drivers/net/ethernet/mellanox/mlx5/core/ipsec*
 +
  MELLANOX ETHERNET SWITCH DRIVERS
  M:    Jiri Pirko <[email protected]>
  M:    Ido Schimmel <[email protected]>
@@@ -8470,14 -8318,6 +8468,14 @@@ W:    http://www.mellanox.co
  Q:    http://patchwork.ozlabs.org/project/netdev/list/
  F:    drivers/net/ethernet/mellanox/mlxsw/
  
 +MELLANOX FIRMWARE FLASH LIBRARY (mlxfw)
 +M:    Yotam Gigi <[email protected]>
 +L:    [email protected]
 +S:    Supported
 +W:    http://www.mellanox.com
 +Q:    http://patchwork.ozlabs.org/project/netdev/list/
 +F:    drivers/net/ethernet/mellanox/mlxfw/
 +
  MELLANOX MLXCPLD I2C AND MUX DRIVER
  M:    Vadim Pasternak <[email protected]>
  M:    Michael Shych <[email protected]>
@@@ -8596,7 -8436,7 +8594,7 @@@ T:      git git://git.monstr.eu/linux-2.6-mi
  S:    Supported
  F:    arch/microblaze/
  
 -MICROCHIP / ATMEL AT91 / AT32 SERIAL DRIVER
 +MICROCHIP / ATMEL AT91 SERIAL DRIVER
  M:    Richard Genoud <[email protected]>
  S:    Maintained
  F:    drivers/tty/serial/atmel_serial.c
@@@ -8619,16 -8459,6 +8617,16 @@@ F:    drivers/media/platform/atmel/atmel-i
  F:    drivers/media/platform/atmel/atmel-isc-regs.h
  F:    devicetree/bindings/media/atmel-isc.txt
  
 +MICROCHIP KSZ SERIES ETHERNET SWITCH DRIVER
 +M:    Woojung Huh <[email protected]>
 +M:    Microchip Linux Driver Support <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    net/dsa/tag_ksz.c
 +F:    drivers/net/dsa/microchip/*
 +F:    include/linux/platform_data/microchip-ksz.h
 +F:    Documentation/devicetree/bindings/net/dsa/ksz.txt
 +
  MICROCHIP USB251XB DRIVER
  M:    Richard Leitner <[email protected]>
  L:    [email protected]
@@@ -8676,7 -8506,7 +8674,7 @@@ S:      Odd Fixe
  F:    drivers/media/radio/radio-miropcm20*
  
  MELLANOX MLX4 core VPI driver
 -M:    Yishai Hadas <yishaih@mellanox.com>
 +M:    Tariq Toukan <tariqt@mellanox.com>
  L:    [email protected]
  L:    [email protected]
  W:    http://www.mellanox.com
@@@ -8684,6 -8514,7 +8682,6 @@@ Q:      http://patchwork.ozlabs.org/project/
  S:    Supported
  F:    drivers/net/ethernet/mellanox/mlx4/
  F:    include/linux/mlx4/
 -F:    include/uapi/rdma/mlx4-abi.h
  
  MELLANOX MLX4 IB driver
  M:    Yishai Hadas <[email protected]>
@@@ -8693,7 -8524,6 +8691,7 @@@ Q:      http://patchwork.kernel.org/project/
  S:    Supported
  F:    drivers/infiniband/hw/mlx4/
  F:    include/linux/mlx4/
 +F:    include/uapi/rdma/mlx4-abi.h
  
  MELLANOX MLX5 core VPI driver
  M:    Saeed Mahameed <[email protected]>
@@@ -8706,6 -8536,7 +8704,6 @@@ Q:      http://patchwork.ozlabs.org/project/
  S:    Supported
  F:    drivers/net/ethernet/mellanox/mlx5/core/
  F:    include/linux/mlx5/
 -F:    include/uapi/rdma/mlx5-abi.h
  
  MELLANOX MLX5 IB driver
  M:    Matan Barak <[email protected]>
@@@ -8716,7 -8547,6 +8714,7 @@@ Q:      http://patchwork.kernel.org/project/
  S:    Supported
  F:    drivers/infiniband/hw/mlx5/
  F:    include/linux/mlx5/
 +F:    include/uapi/rdma/mlx5-abi.h
  
  MELEXIS MLX90614 DRIVER
  M:    Crt Mori <[email protected]>
@@@ -8756,7 -8586,7 +8754,7 @@@ S:      Maintaine
  F:    drivers/media/dvb-frontends/mn88473*
  
  MODULE SUPPORT
 -M:    Jessica Yu <jeyu@redhat.com>
 +M:    Jessica Yu <jeyu@kernel.org>
  M:    Rusty Russell <[email protected]>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux.git modules-next
  S:    Maintained
@@@ -8884,15 -8714,6 +8882,15 @@@ S:    Orpha
  F:    drivers/mmc/host/mmc_spi.c
  F:    include/linux/spi/mmc_spi.h
  
 +MULTIPLEXER SUBSYSTEM
 +M:    Peter Rosin <[email protected]>
 +S:    Maintained
 +F:    Documentation/ABI/testing/mux/sysfs-class-mux*
 +F:    Documentation/devicetree/bindings/mux/
 +F:    include/linux/dt-bindings/mux/
 +F:    include/linux/mux/
 +F:    drivers/mux/
 +
  MULTISOUND SOUND DRIVER
  M:    Andrew Veliath <[email protected]>
  S:    Maintained
@@@ -9121,16 -8942,6 +9119,16 @@@ F:    net/ipv6
  F:    include/net/ip*
  F:    arch/x86/net/*
  
 +NETWORKING [TLS]
 +M:    Ilya Lesokhin <[email protected]>
 +M:    Aviad Yehezkel <[email protected]>
 +M:    Dave Watson <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    net/tls/*
 +F:    include/uapi/linux/tls.h
 +F:    include/net/tls.h
 +
  NETWORKING [IPSEC]
  M:    Steffen Klassert <[email protected]>
  M:    Herbert Xu <[email protected]>
@@@ -9212,6 -9023,9 +9210,6 @@@ F:      include/uapi/linux/nfc.
  F:    drivers/nfc/
  F:    include/linux/platform_data/nfcmrvl.h
  F:    include/linux/platform_data/nxp-nci.h
 -F:    include/linux/platform_data/pn544.h
 -F:    include/linux/platform_data/st21nfca.h
 -F:    include/linux/platform_data/st-nci.h
  F:    Documentation/devicetree/bindings/net/nfc/
  
  NFS, SUNRPC, AND LOCKD CLIENTS
@@@ -9603,13 -9417,6 +9601,13 @@@ M:    Harald Welte <[email protected]
  S:    Maintained
  F:    drivers/char/pcmcia/cm4040_cs.*
  
 +OMNIVISION OV5640 SENSOR DRIVER
 +M:    Steve Longerbeam <[email protected]>
 +L:    [email protected]
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    drivers/media/i2c/ov5640.c
 +
  OMNIVISION OV5647 SENSOR DRIVER
  M:    Ramiro Oliveira <[email protected]>
  L:    [email protected]
@@@ -9625,13 -9432,6 +9623,13 @@@ S:    Maintaine
  F:    drivers/media/i2c/ov7670.c
  F:    Documentation/devicetree/bindings/media/i2c/ov7670.txt
  
 +OMNIVISION OV13858 SENSOR DRIVER
 +M:    Sakari Ailus <[email protected]>
 +L:    [email protected]
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    drivers/media/i2c/ov13858.c
 +
  ONENAND FLASH DRIVER
  M:    Kyungmin Park <[email protected]>
  L:    [email protected]
@@@ -10282,13 -10082,6 +10280,13 @@@ M: Heikki Krogerus <heikki.krogerus@lin
  S:    Maintained
  F:    drivers/pinctrl/intel/
  
 +PIN CONTROLLER - QUALCOMM
 +M:    Bjorn Andersson <[email protected]>
 +S:    Maintained
 +L:    [email protected]
 +F:    Documentation/devicetree/bindings/pinctrl/qcom,*.txt
 +F:    drivers/pinctrl/qcom/
 +
  PIN CONTROLLER - RENESAS
  M:    Laurent Pinchart <[email protected]>
  M:    Geert Uytterhoeven <[email protected]>
@@@ -10360,7 -10153,7 +10358,7 @@@ T:   git git://git.kernel.org/pub/scm/lin
  S:    Maintained
  F:    Documentation/hwmon/pmbus
  F:    drivers/hwmon/pmbus/
 -F:    include/linux/i2c/pmbus.h
 +F:    include/linux/pmbus.h
  
  PMC SIERRA MaxRAID DRIVER
  L:    [email protected]
@@@ -10750,7 -10543,6 +10748,7 @@@ M:   Laurentiu Tudor <laurentiu.tudor@nxp
  L:    [email protected]
  S:    Maintained
  F:    drivers/staging/fsl-mc/
 +F:    Documentation/devicetree/bindings/misc/fsl,qoriq-mc.txt
  
  QT1010 MEDIA DRIVER
  M:    Antti Palosaari <[email protected]>
@@@ -10790,14 -10582,6 +10788,14 @@@ T: git git://git.kernel.org/pub/scm/lin
  S:    Supported
  F:    arch/hexagon/
  
 +QUALCOMM VENUS VIDEO ACCELERATOR DRIVER
 +M:    Stanimir Varbanov <[email protected]>
 +L:    [email protected]
 +L:    [email protected]
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    drivers/media/platform/qcom/venus/
 +
  QUALCOMM WCN36XX WIRELESS DRIVER
  M:    Eugene Krasnikov <[email protected]>
  L:    [email protected]
  S:    Maintained
  F:    drivers/firmware/qemu_fw_cfg.c
  
 +QUANTENNA QTNFMAC WIRELESS DRIVER
 +M:   Igor Mitsyanko <[email protected]>
 +M:   Avinash Patil <[email protected]>
 +M:   Sergey Matyukevich <[email protected]>
 +S:   Maintained
 +F:   drivers/net/wireless/quantenna
 +
  RADOS BLOCK DEVICE (RBD)
  M:    Ilya Dryomov <[email protected]>
  M:    Sage Weil <[email protected]>
@@@ -11054,11 -10830,11 +11052,11 @@@ L:        [email protected]
  S:    Supported
  F:    drivers/iio/adc/rcar_gyro_adc.c
  
 -RENESAS USB2 PHY DRIVER
 +RENESAS USB PHY DRIVER
  M:    Yoshihiro Shimoda <[email protected]>
  L:    [email protected]
  S:    Maintained
 -F:    drivers/phy/phy-rcar-gen3-usb2.c
 +F:    drivers/phy/renesas/phy-rcar-gen3-usb*.c
  
  RESET CONTROLLER FRAMEWORK
  M:    Philipp Zabel <[email protected]>
@@@ -11215,7 -10991,7 +11213,7 @@@ S:   Supporte
  F:    arch/s390/
  F:    drivers/s390/
  F:    Documentation/s390/
 -F:    Documentation/DocBook/s390*
 +F:    Documentation/driver-api/s390-drivers.rst
  
  S390 COMMON I/O LAYER
  M:    Sebastian Ott <[email protected]>
@@@ -11283,7 -11059,7 +11281,7 @@@ S:   Supporte
  F:    drivers/iommu/s390-iommu.c
  
  S390 VFIO-CCW DRIVER
 -M:    Cornelia Huck <co[email protected].com>
 +M:    Cornelia Huck <cohuck@redhat.com>
  M:    Dong Jia Shi <[email protected]>
  L:    [email protected]
  L:    [email protected]
@@@ -11460,12 -11236,12 +11458,12 @@@ L:        [email protected]
  S:    Supported
  F:    Documentation/devicetree/bindings/phy/samsung-phy.txt
  F:    Documentation/phy/samsung-usb2.txt
 -F:    drivers/phy/phy-exynos4210-usb2.c
 -F:    drivers/phy/phy-exynos4x12-usb2.c
 -F:    drivers/phy/phy-exynos5250-usb2.c
 -F:    drivers/phy/phy-s5pv210-usb2.c
 -F:    drivers/phy/phy-samsung-usb2.c
 -F:    drivers/phy/phy-samsung-usb2.h
 +F:    drivers/phy/samsung/phy-exynos4210-usb2.c
 +F:    drivers/phy/samsung/phy-exynos4x12-usb2.c
 +F:    drivers/phy/samsung/phy-exynos5250-usb2.c
 +F:    drivers/phy/samsung/phy-s5pv210-usb2.c
 +F:    drivers/phy/samsung/phy-samsung-usb2.c
 +F:    drivers/phy/samsung/phy-samsung-usb2.h
  
  SERIAL DRIVERS
  M:    Greg Kroah-Hartman <[email protected]>
@@@ -11490,6 -11266,7 +11488,6 @@@ F:   drivers/media/rc/serial_ir.
  
  STI CEC DRIVER
  M:    Benjamin Gaignard <[email protected]>
 -L:    [email protected]
  S:    Maintained
  F:    drivers/staging/media/st-cec/
  F:    Documentation/devicetree/bindings/media/stih-cec.txt
@@@ -11549,9 -11326,6 +11547,9 @@@ F:   Documentation/tee.tx
  
  THUNDERBOLT DRIVER
  M:    Andreas Noever <[email protected]>
 +M:    Michael Jamet <[email protected]>
 +M:    Mika Westerberg <[email protected]>
 +M:    Yehezkel Bernat <[email protected]>
  S:    Maintained
  F:    drivers/thunderbolt/
  
@@@ -11579,14 -11353,6 +11577,14 @@@ F: kernel/time/alarmtimer.
  F:    kernel/time/ntp.c
  F:    tools/testing/selftests/timers/
  
 +TI TRF7970A NFC DRIVER
 +M:    Mark Greer <[email protected]>
 +L:    [email protected]
 +L:    [email protected] (moderated for non-subscribers)
 +S:    Supported
 +F:    drivers/nfc/trf7970a.c
 +F:    Documentation/devicetree/bindings/net/nfc/trf7970a.txt
 +
  SC1200 WDT DRIVER
  M:    Zwane Mwaikambo <[email protected]>
  S:    Maintained
@@@ -11727,7 -11493,6 +11725,7 @@@ F:   kernel/seccomp.
  F:    include/uapi/linux/seccomp.h
  F:    include/linux/seccomp.h
  F:    tools/testing/selftests/seccomp/*
 +F:    Documentation/userspace-api/seccomp_filter.rst
  K:    \bsecure_computing
  K:    \bTIF_SECCOMP\b
  
@@@ -11786,7 -11551,6 +11784,7 @@@ S:   Supporte
  F:    include/linux/selinux*
  F:    security/selinux/
  F:    scripts/selinux/
 +F:    Documentation/admin-guide/LSM/SELinux.rst
  
  APPARMOR SECURITY MODULE
  M:    John Johansen <[email protected]>
@@@ -11795,21 -11559,18 +11793,21 @@@ W:        apparmor.wiki.kernel.or
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jj/apparmor-dev.git
  S:    Supported
  F:    security/apparmor/
 +F:    Documentation/admin-guide/LSM/apparmor.rst
  
  LOADPIN SECURITY MODULE
  M:    Kees Cook <[email protected]>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git lsm/loadpin
  S:    Supported
  F:    security/loadpin/
 +F:    Documentation/admin-guide/LSM/LoadPin.rst
  
  YAMA SECURITY MODULE
  M:    Kees Cook <[email protected]>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git yama/tip
  S:    Supported
  F:    security/yama/
 +F:    Documentation/admin-guide/LSM/Yama.rst
  
  SENSABLE PHANTOM
  M:    Jiri Slaby <[email protected]>
@@@ -12015,7 -11776,6 +12013,7 @@@ T:   git git://git.kernel.org/pub/scm/lin
  S:    Supported
  F:    arch/arm/mach-davinci/
  F:    drivers/i2c/busses/i2c-davinci.c
 +F:    arch/arm/boot/dts/da850*
  
  TI DAVINCI SERIES MEDIA DRIVER
  M:    "Lad, Prabhakar" <[email protected]>
  W:    http://schaufler-ca.com
  T:    git git://github.com/cschaufler/smack-next
  S:    Maintained
 -F:    Documentation/security/Smack.txt
 +F:    Documentation/admin-guide/LSM/Smack.rst
  F:    security/smack/
  
  DRIVERS FOR ADAPTIVE VOLTAGE SCALING (AVS)
@@@ -12202,9 -11962,8 +12200,9 @@@ F:   drivers/leds/leds-net48xx.
  
  SOFTLOGIC 6x10 MPEG CODEC
  M:    Bluecherry Maintainers <[email protected]>
 +M:    Anton Sviridenko <[email protected]>
  M:    Andrey Utkin <[email protected]>
 -M:    Andrey Utkin <andrey.krieger.utkin@gmail.com>
 +M:    Andrey Utkin <andrey_utkin@fastmail.com>
  M:    Ismael Luceno <[email protected]>
  L:    [email protected]
  S:    Supported
@@@ -12872,8 -12631,6 +12870,8 @@@ F:   include/linux/soc/ti/ti_sci_protocol
  F:    Documentation/devicetree/bindings/soc/ti/sci-pm-domain.txt
  F:    include/dt-bindings/genpd/k2g.h
  F:    drivers/soc/ti/ti_sci_pm_domains.c
 +F:    Documentation/devicetree/bindings/reset/ti,sci-reset.txt
 +F:    drivers/reset/reset-ti-sci.c
  
  THANKO'S RAREMONO AM/FM/SW RADIO RECEIVER USB DRIVER
  M:    Hans Verkuil <[email protected]>
@@@ -13123,7 -12880,7 +13121,7 @@@ M:   Wolfram Sang <wsa+renesas@sang-engin
  L:    [email protected]
  S:    Supported
  F:    drivers/mmc/host/tmio_mmc*
 -F:    drivers/mmc/host/sh_mobile_sdhi.c
 +F:    drivers/mmc/host/renesas_sdhi*
  F:    include/linux/mfd/tmio.h
  
  TMP401 HARDWARE MONITOR DRIVER
@@@ -13152,7 -12909,6 +13150,7 @@@ F:   Documentation/media/v4l-drivers/tm60
  
  TW5864 VIDEO4LINUX DRIVER
  M:    Bluecherry Maintainers <[email protected]>
 +M:    Anton Sviridenko <[email protected]>
  M:    Andrey Utkin <[email protected]>
  M:    Andrey Utkin <[email protected]>
  L:    [email protected]
@@@ -13778,12 -13534,6 +13776,12 @@@ S: Maintaine
  F:    drivers/media/v4l2-core/videobuf2-*
  F:    include/media/videobuf2-*
  
 +VIDEO MULTIPLEXER DRIVER
 +M:    Philipp Zabel <[email protected]>
 +L:    [email protected]
 +S:    Maintained
 +F:    drivers/media/platform/video-mux.c
 +
  VIRTIO AND VHOST VSOCK DRIVER
  M:    Stefan Hajnoczi <[email protected]>
  L:    [email protected]
@@@ -13829,7 -13579,7 +13827,7 @@@ F:   include/uapi/linux/virtio_*.
  F:    drivers/crypto/virtio/
  
  VIRTIO DRIVERS FOR S390
 -M:    Cornelia Huck <co[email protected].com>
 +M:    Cornelia Huck <cohuck@redhat.com>
  M:    Halil Pasic <[email protected]>
  L:    [email protected]
  L:    [email protected]
@@@ -14028,7 -13778,6 +14026,7 @@@ M:   Evgeniy Polyakov <[email protected]
  S:    Maintained
  F:    Documentation/w1/
  F:    drivers/w1/
 +F:    include/linux/w1.h
  
  W83791D HARDWARE MONITORING DRIVER
  M:    Marc Hulsman <[email protected]>
@@@ -14121,7 -13870,7 +14119,7 @@@ S:   Odd fixe
  F:    drivers/net/wireless/wl3501*
  
  WOLFSON MICROELECTRONICS DRIVERS
 -L:    patches@opensource.wolfsonmicro.com
 +L:    patches@opensource.cirrus.com
  T:    git https://github.com/CirrusLogic/linux-drivers.git
  W:    https://github.com/CirrusLogic/linux-drivers/wiki
  S:    Supported
@@@ -14243,8 -13992,6 +14241,8 @@@ F:   drivers/xen
  F:    arch/x86/include/asm/xen/
  F:    include/xen/
  F:    include/uapi/xen/
 +F:    Documentation/ABI/stable/sysfs-hypervisor-xen
 +F:    Documentation/ABI/testing/sysfs-hypervisor-xen
  
  XEN HYPERVISOR ARM
  M:    Stefano Stabellini <[email protected]>
diff --combined arch/x86/Kconfig
index fe53a3aa805a93612ca3d35434b786c4054b0bc7,bb273b2f50b5ef38d41d7a23f38d17ada47df091..7d7e0e811c46319eb0d58d3f9905ad9a1be8cd7d
@@@ -22,7 -22,7 +22,7 @@@ config X86_6
        def_bool y
        depends on 64BIT
        # Options that are inherently 64-bit kernel only:
 -      select ARCH_HAS_GIGANTIC_PAGE
 +      select ARCH_HAS_GIGANTIC_PAGE if (MEMORY_ISOLATION && COMPACTION) || CMA
        select ARCH_SUPPORTS_INT128
        select ARCH_USE_CMPXCHG_LOCKREF
        select HAVE_ARCH_SOFT_DIRTY
@@@ -54,6 -54,7 +54,7 @@@ config X8
        select ARCH_HAS_KCOV                    if X86_64
        select ARCH_HAS_MMIO_FLUSH
        select ARCH_HAS_PMEM_API                if X86_64
+       select ARCH_HAS_UACCESS_FLUSHCACHE      if X86_64
        select ARCH_HAS_SET_MEMORY
        select ARCH_HAS_SG_CHAIN
        select ARCH_HAS_STRICT_KERNEL_RWX
        select ARCH_USE_BUILTIN_BSWAP
        select ARCH_USE_QUEUED_RWLOCKS
        select ARCH_USE_QUEUED_SPINLOCKS
 -      select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH if SMP
 +      select ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
        select ARCH_WANT_FRAME_POINTERS
        select ARCH_WANTS_DYNAMIC_TASK_STRUCT
 +      select ARCH_WANTS_THP_SWAP              if X86_64
        select BUILDTIME_EXTABLE_SORT
        select CLKEVT_I8253
        select CLOCKSOURCE_VALIDATE_LAST_CYCLE
@@@ -88,8 -88,6 +89,8 @@@
        select GENERIC_EARLY_IOREMAP
        select GENERIC_FIND_FIRST_BIT
        select GENERIC_IOMAP
 +      select GENERIC_IRQ_EFFECTIVE_AFF_MASK   if SMP
 +      select GENERIC_IRQ_MIGRATION            if SMP
        select GENERIC_IRQ_PROBE
        select GENERIC_IRQ_SHOW
        select GENERIC_PENDING_IRQ              if SMP
        select HAVE_UNSTABLE_SCHED_CLOCK
        select HAVE_USER_RETURN_NOTIFIER
        select IRQ_FORCED_THREADING
 +      select PCI_LOCKLESS_CONFIG
        select PERF_EVENTS
        select RTC_LIB
        select RTC_MC146818_LIB
@@@ -1086,7 -1083,7 +1087,7 @@@ config X86_MCE_THRESHOL
        def_bool y
  
  config X86_MCE_INJECT
 -      depends on X86_MCE && X86_LOCAL_APIC && X86_MCELOG_LEGACY
 +      depends on X86_MCE && X86_LOCAL_APIC && DEBUG_FS
        tristate "Machine check injector support"
        ---help---
          Provide support for injecting machine checks for testing purposes.
@@@ -2780,6 -2777,10 +2781,6 @@@ config COMPAT_FOR_U64_ALIGNMEN
  config SYSVIPC_COMPAT
        def_bool y
        depends on SYSVIPC
 -
 -config KEYS_COMPAT
 -      def_bool y
 -      depends on KEYS
  endif
  
  endmenu
@@@ -2797,9 -2798,6 +2798,9 @@@ config X86_DMA_REMA
        bool
        depends on STA2X11
  
 +config HAVE_GENERIC_GUP
 +      def_bool y
 +
  source "net/Kconfig"
  
  source "drivers/Kconfig"
diff --combined drivers/block/brd.c
index 6112e99bedf7bde65a0d698e69317165ecbc937c,f2a7ac350f6a74de238366b9dcfec2c735eebb32..17723fd50a53b0016b0cb90bf039257fd01a04aa
@@@ -22,6 -22,7 +22,7 @@@
  #ifdef CONFIG_BLK_DEV_RAM_DAX
  #include <linux/pfn_t.h>
  #include <linux/dax.h>
+ #include <linux/uio.h>
  #endif
  
  #include <linux/uaccess.h>
@@@ -354,8 -355,15 +355,15 @@@ static long brd_dax_direct_access(struc
        return __brd_direct_access(brd, pgoff, nr_pages, kaddr, pfn);
  }
  
+ static size_t brd_dax_copy_from_iter(struct dax_device *dax_dev, pgoff_t pgoff,
+               void *addr, size_t bytes, struct iov_iter *i)
+ {
+       return copy_from_iter(addr, bytes, i);
+ }
  static const struct dax_operations brd_dax_ops = {
        .direct_access = brd_dax_direct_access,
+       .copy_from_iter = brd_dax_copy_from_iter,
  };
  #endif
  
@@@ -418,6 -426,7 +426,6 @@@ static struct brd_device *brd_alloc(in
  
        blk_queue_make_request(brd->brd_queue, brd_make_request);
        blk_queue_max_hw_sectors(brd->brd_queue, 1024);
 -      blk_queue_bounce_limit(brd->brd_queue, BLK_BOUNCE_ANY);
  
        /* This is so fdisk will align partitions on 4k, because of
         * direct_access API needing 4k alignment, returning a PFN
diff --combined drivers/dax/super.c
index 922d0823f8ec2b32e14ed6bef64bfe4bfdd268e1,4827251782a1729f7c73cc30e0096faa3ecad1e3..ce9e563e6e1d47715a776405c3b86b283900a283
@@@ -18,6 -18,7 +18,7 @@@
  #include <linux/cdev.h>
  #include <linux/hash.h>
  #include <linux/slab.h>
+ #include <linux/uio.h>
  #include <linux/dax.h>
  #include <linux/fs.h>
  
@@@ -115,13 -116,20 +116,20 @@@ int __bdev_dax_supported(struct super_b
  EXPORT_SYMBOL_GPL(__bdev_dax_supported);
  #endif
  
+ enum dax_device_flags {
+       /* !alive + rcu grace period == no new operations / mappings */
+       DAXDEV_ALIVE,
+       /* gate whether dax_flush() calls the low level flush routine */
+       DAXDEV_WRITE_CACHE,
+ };
  /**
   * struct dax_device - anchor object for dax services
   * @inode: core vfs
   * @cdev: optional character interface for "device dax"
   * @host: optional name for lookups where the device path is not available
   * @private: dax driver private data
-  * @alive: !alive + rcu grace period == no new operations / mappings
+  * @flags: state and boolean properties
   */
  struct dax_device {
        struct hlist_node list;
        struct cdev cdev;
        const char *host;
        void *private;
-       bool alive;
+       unsigned long flags;
        const struct dax_operations *ops;
  };
  
+ static ssize_t write_cache_show(struct device *dev,
+               struct device_attribute *attr, char *buf)
+ {
+       struct dax_device *dax_dev = dax_get_by_host(dev_name(dev));
+       ssize_t rc;
+       WARN_ON_ONCE(!dax_dev);
+       if (!dax_dev)
+               return -ENXIO;
+       rc = sprintf(buf, "%d\n", !!test_bit(DAXDEV_WRITE_CACHE,
+                               &dax_dev->flags));
+       put_dax(dax_dev);
+       return rc;
+ }
+ static ssize_t write_cache_store(struct device *dev,
+               struct device_attribute *attr, const char *buf, size_t len)
+ {
+       bool write_cache;
+       int rc = strtobool(buf, &write_cache);
+       struct dax_device *dax_dev = dax_get_by_host(dev_name(dev));
+       WARN_ON_ONCE(!dax_dev);
+       if (!dax_dev)
+               return -ENXIO;
+       if (rc)
+               len = rc;
+       else if (write_cache)
+               set_bit(DAXDEV_WRITE_CACHE, &dax_dev->flags);
+       else
+               clear_bit(DAXDEV_WRITE_CACHE, &dax_dev->flags);
+       put_dax(dax_dev);
+       return len;
+ }
+ static DEVICE_ATTR_RW(write_cache);
+ static umode_t dax_visible(struct kobject *kobj, struct attribute *a, int n)
+ {
+       struct device *dev = container_of(kobj, typeof(*dev), kobj);
+       struct dax_device *dax_dev = dax_get_by_host(dev_name(dev));
+       WARN_ON_ONCE(!dax_dev);
+       if (!dax_dev)
+               return 0;
+       if (a == &dev_attr_write_cache.attr && !dax_dev->ops->flush)
+               return 0;
+       return a->mode;
+ }
+ static struct attribute *dax_attributes[] = {
+       &dev_attr_write_cache.attr,
+       NULL,
+ };
+ struct attribute_group dax_attribute_group = {
+       .name = "dax",
+       .attrs = dax_attributes,
+       .is_visible = dax_visible,
+ };
+ EXPORT_SYMBOL_GPL(dax_attribute_group);
  /**
   * dax_direct_access() - translate a device pgoff to an absolute pfn
   * @dax_dev: a dax_device instance representing the logical memory range
@@@ -172,10 -245,43 +245,43 @@@ long dax_direct_access(struct dax_devic
  }
  EXPORT_SYMBOL_GPL(dax_direct_access);
  
+ size_t dax_copy_from_iter(struct dax_device *dax_dev, pgoff_t pgoff, void *addr,
+               size_t bytes, struct iov_iter *i)
+ {
+       if (!dax_alive(dax_dev))
+               return 0;
+       return dax_dev->ops->copy_from_iter(dax_dev, pgoff, addr, bytes, i);
+ }
+ EXPORT_SYMBOL_GPL(dax_copy_from_iter);
+ void dax_flush(struct dax_device *dax_dev, pgoff_t pgoff, void *addr,
+               size_t size)
+ {
+       if (!dax_alive(dax_dev))
+               return;
+       if (!test_bit(DAXDEV_WRITE_CACHE, &dax_dev->flags))
+               return;
+       if (dax_dev->ops->flush)
+               dax_dev->ops->flush(dax_dev, pgoff, addr, size);
+ }
+ EXPORT_SYMBOL_GPL(dax_flush);
+ void dax_write_cache(struct dax_device *dax_dev, bool wc)
+ {
+       if (wc)
+               set_bit(DAXDEV_WRITE_CACHE, &dax_dev->flags);
+       else
+               clear_bit(DAXDEV_WRITE_CACHE, &dax_dev->flags);
+ }
+ EXPORT_SYMBOL_GPL(dax_write_cache);
  bool dax_alive(struct dax_device *dax_dev)
  {
        lockdep_assert_held(&dax_srcu);
-       return dax_dev->alive;
+       return test_bit(DAXDEV_ALIVE, &dax_dev->flags);
  }
  EXPORT_SYMBOL_GPL(dax_alive);
  
@@@ -195,7 -301,7 +301,7 @@@ void kill_dax(struct dax_device *dax_de
        if (!dax_dev)
                return;
  
-       dax_dev->alive = false;
+       clear_bit(DAXDEV_ALIVE, &dax_dev->flags);
  
        synchronize_srcu(&dax_srcu);
  
@@@ -210,12 -316,9 +316,12 @@@ EXPORT_SYMBOL_GPL(kill_dax)
  static struct inode *dax_alloc_inode(struct super_block *sb)
  {
        struct dax_device *dax_dev;
 +      struct inode *inode;
  
        dax_dev = kmem_cache_alloc(dax_cache, GFP_KERNEL);
 -      return &dax_dev->inode;
 +      inode = &dax_dev->inode;
 +      inode->i_rdev = 0;
 +      return inode;
  }
  
  static struct dax_device *to_dax_dev(struct inode *inode)
@@@ -230,8 -333,7 +336,8 @@@ static void dax_i_callback(struct rcu_h
  
        kfree(dax_dev->host);
        dax_dev->host = NULL;
 -      ida_simple_remove(&dax_minor_ida, MINOR(inode->i_rdev));
 +      if (inode->i_rdev)
 +              ida_simple_remove(&dax_minor_ida, MINOR(inode->i_rdev));
        kmem_cache_free(dax_cache, dax_dev);
  }
  
@@@ -239,7 -341,7 +345,7 @@@ static void dax_destroy_inode(struct in
  {
        struct dax_device *dax_dev = to_dax_dev(inode);
  
-       WARN_ONCE(dax_dev->alive,
+       WARN_ONCE(test_bit(DAXDEV_ALIVE, &dax_dev->flags),
                        "kill_dax() must be called before final iput()\n");
        call_rcu(&inode->i_rcu, dax_i_callback);
  }
@@@ -291,7 -393,7 +397,7 @@@ static struct dax_device *dax_dev_get(d
  
        dax_dev = to_dax_dev(inode);
        if (inode->i_state & I_NEW) {
-               dax_dev->alive = true;
+               set_bit(DAXDEV_ALIVE, &dax_dev->flags);
                inode->i_cdev = &dax_dev->cdev;
                inode->i_mode = S_IFCHR;
                inode->i_flags = S_DAX;
@@@ -427,7 -529,6 +533,7 @@@ static void init_once(void *_dax_dev
        struct dax_device *dax_dev = _dax_dev;
        struct inode *inode = &dax_dev->inode;
  
 +      memset(dax_dev, 0, sizeof(*dax_dev));
        inode_init_once(inode);
  }
  
diff --combined drivers/md/dm-linear.c
index c03c203a90b43a1972dfcf69870d0fbcbcbbd027,25e6619743193edcfb59ea2e2bf6fec6ba313826..41971a090e34d02ea26a348af0c66fc9615b44a2
@@@ -89,7 -89,7 +89,7 @@@ static void linear_map_bio(struct dm_ta
        struct linear_c *lc = ti->private;
  
        bio->bi_bdev = lc->dev->bdev;
 -      if (bio_sectors(bio))
 +      if (bio_sectors(bio) || bio_op(bio) == REQ_OP_ZONE_RESET)
                bio->bi_iter.bi_sector =
                        linear_map_sector(ti, bio->bi_iter.bi_sector);
  }
@@@ -101,17 -101,6 +101,17 @@@ static int linear_map(struct dm_target 
        return DM_MAPIO_REMAPPED;
  }
  
 +static int linear_end_io(struct dm_target *ti, struct bio *bio,
 +                       blk_status_t *error)
 +{
 +      struct linear_c *lc = ti->private;
 +
 +      if (!*error && bio_op(bio) == REQ_OP_ZONE_REPORT)
 +              dm_remap_zone_report(ti, bio, lc->start);
 +
 +      return DM_ENDIO_DONE;
 +}
 +
  static void linear_status(struct dm_target *ti, status_type_t type,
                          unsigned status_flags, char *result, unsigned maxlen)
  {
@@@ -170,19 -159,48 +170,49 @@@ static long linear_dax_direct_access(st
        return dax_direct_access(dax_dev, pgoff, nr_pages, kaddr, pfn);
  }
  
+ static size_t linear_dax_copy_from_iter(struct dm_target *ti, pgoff_t pgoff,
+               void *addr, size_t bytes, struct iov_iter *i)
+ {
+       struct linear_c *lc = ti->private;
+       struct block_device *bdev = lc->dev->bdev;
+       struct dax_device *dax_dev = lc->dev->dax_dev;
+       sector_t dev_sector, sector = pgoff * PAGE_SECTORS;
+       dev_sector = linear_map_sector(ti, sector);
+       if (bdev_dax_pgoff(bdev, dev_sector, ALIGN(bytes, PAGE_SIZE), &pgoff))
+               return 0;
+       return dax_copy_from_iter(dax_dev, pgoff, addr, bytes, i);
+ }
+ static void linear_dax_flush(struct dm_target *ti, pgoff_t pgoff, void *addr,
+               size_t size)
+ {
+       struct linear_c *lc = ti->private;
+       struct block_device *bdev = lc->dev->bdev;
+       struct dax_device *dax_dev = lc->dev->dax_dev;
+       sector_t dev_sector, sector = pgoff * PAGE_SECTORS;
+       dev_sector = linear_map_sector(ti, sector);
+       if (bdev_dax_pgoff(bdev, dev_sector, ALIGN(size, PAGE_SIZE), &pgoff))
+               return;
+       dax_flush(dax_dev, pgoff, addr, size);
+ }
  static struct target_type linear_target = {
        .name   = "linear",
 -      .version = {1, 3, 0},
 -      .features = DM_TARGET_PASSES_INTEGRITY,
 +      .version = {1, 4, 0},
 +      .features = DM_TARGET_PASSES_INTEGRITY | DM_TARGET_ZONED_HM,
        .module = THIS_MODULE,
        .ctr    = linear_ctr,
        .dtr    = linear_dtr,
        .map    = linear_map,
 +      .end_io = linear_end_io,
        .status = linear_status,
        .prepare_ioctl = linear_prepare_ioctl,
        .iterate_devices = linear_iterate_devices,
        .direct_access = linear_dax_direct_access,
+       .dax_copy_from_iter = linear_dax_copy_from_iter,
+       .dax_flush = linear_dax_flush,
  };
  
  int __init dm_linear_init(void)
diff --combined drivers/md/dm-stripe.c
index 11621a0af8870e63533031c191edd2314c4fe6eb,8e73517967b6539f4989ab19047fa93850a1b063..a0375530b07f6afc7713f4ac2904e84490027d67
@@@ -332,6 -332,44 +332,44 @@@ static long stripe_dax_direct_access(st
        return dax_direct_access(dax_dev, pgoff, nr_pages, kaddr, pfn);
  }
  
+ static size_t stripe_dax_copy_from_iter(struct dm_target *ti, pgoff_t pgoff,
+               void *addr, size_t bytes, struct iov_iter *i)
+ {
+       sector_t dev_sector, sector = pgoff * PAGE_SECTORS;
+       struct stripe_c *sc = ti->private;
+       struct dax_device *dax_dev;
+       struct block_device *bdev;
+       uint32_t stripe;
+       stripe_map_sector(sc, sector, &stripe, &dev_sector);
+       dev_sector += sc->stripe[stripe].physical_start;
+       dax_dev = sc->stripe[stripe].dev->dax_dev;
+       bdev = sc->stripe[stripe].dev->bdev;
+       if (bdev_dax_pgoff(bdev, dev_sector, ALIGN(bytes, PAGE_SIZE), &pgoff))
+               return 0;
+       return dax_copy_from_iter(dax_dev, pgoff, addr, bytes, i);
+ }
+ static void stripe_dax_flush(struct dm_target *ti, pgoff_t pgoff, void *addr,
+               size_t size)
+ {
+       sector_t dev_sector, sector = pgoff * PAGE_SECTORS;
+       struct stripe_c *sc = ti->private;
+       struct dax_device *dax_dev;
+       struct block_device *bdev;
+       uint32_t stripe;
+       stripe_map_sector(sc, sector, &stripe, &dev_sector);
+       dev_sector += sc->stripe[stripe].physical_start;
+       dax_dev = sc->stripe[stripe].dev->dax_dev;
+       bdev = sc->stripe[stripe].dev->bdev;
+       if (bdev_dax_pgoff(bdev, dev_sector, ALIGN(size, PAGE_SIZE), &pgoff))
+               return;
+       dax_flush(dax_dev, pgoff, addr, size);
+ }
  /*
   * Stripe status:
   *
@@@ -375,21 -413,20 +413,21 @@@ static void stripe_status(struct dm_tar
        }
  }
  
 -static int stripe_end_io(struct dm_target *ti, struct bio *bio, int error)
 +static int stripe_end_io(struct dm_target *ti, struct bio *bio,
 +              blk_status_t *error)
  {
        unsigned i;
        char major_minor[16];
        struct stripe_c *sc = ti->private;
  
 -      if (!error)
 -              return 0; /* I/O complete */
 +      if (!*error)
 +              return DM_ENDIO_DONE; /* I/O complete */
  
 -      if ((error == -EWOULDBLOCK) && (bio->bi_opf & REQ_RAHEAD))
 -              return error;
 +      if (bio->bi_opf & REQ_RAHEAD)
 +              return DM_ENDIO_DONE;
  
 -      if (error == -EOPNOTSUPP)
 -              return error;
 +      if (*error == BLK_STS_NOTSUPP)
 +              return DM_ENDIO_DONE;
  
        memset(major_minor, 0, sizeof(major_minor));
        sprintf(major_minor, "%d:%d",
                                schedule_work(&sc->trigger_event);
                }
  
 -      return error;
 +      return DM_ENDIO_DONE;
  }
  
  static int stripe_iterate_devices(struct dm_target *ti,
@@@ -452,6 -489,8 +490,8 @@@ static struct target_type stripe_targe
        .iterate_devices = stripe_iterate_devices,
        .io_hints = stripe_io_hints,
        .direct_access = stripe_dax_direct_access,
+       .dax_copy_from_iter = stripe_dax_copy_from_iter,
+       .dax_flush = stripe_dax_flush,
  };
  
  int __init dm_stripe_init(void)
diff --combined drivers/md/dm.c
index c2afe7a5755f3f04a9a4d6a029c063e2a5b78326,09b3efdc8abfa794486680c48bdbb4150215201c..10cabe961bdbe663c999293131833355a20456e0
@@@ -19,6 -19,7 +19,7 @@@
  #include <linux/dax.h>
  #include <linux/slab.h>
  #include <linux/idr.h>
+ #include <linux/uio.h>
  #include <linux/hdreg.h>
  #include <linux/delay.h>
  #include <linux/wait.h>
@@@ -58,15 -59,12 +59,15 @@@ static DECLARE_WORK(deferred_remove_wor
  
  static struct workqueue_struct *deferred_remove_workqueue;
  
 +atomic_t dm_global_event_nr = ATOMIC_INIT(0);
 +DECLARE_WAIT_QUEUE_HEAD(dm_global_eventq);
 +
  /*
   * One of these is allocated per bio.
   */
  struct dm_io {
        struct mapped_device *md;
 -      int error;
 +      blk_status_t status;
        atomic_t io_count;
        struct bio *bio;
        unsigned long start_time;
@@@ -771,24 -769,23 +772,24 @@@ static int __noflush_suspending(struct 
   * Decrements the number of outstanding ios that a bio has been
   * cloned into, completing the original io if necc.
   */
 -static void dec_pending(struct dm_io *io, int error)
 +static void dec_pending(struct dm_io *io, blk_status_t error)
  {
        unsigned long flags;
 -      int io_error;
 +      blk_status_t io_error;
        struct bio *bio;
        struct mapped_device *md = io->md;
  
        /* Push-back supersedes any I/O errors */
        if (unlikely(error)) {
                spin_lock_irqsave(&io->endio_lock, flags);
 -              if (!(io->error > 0 && __noflush_suspending(md)))
 -                      io->error = error;
 +              if (!(io->status == BLK_STS_DM_REQUEUE &&
 +                              __noflush_suspending(md)))
 +                      io->status = error;
                spin_unlock_irqrestore(&io->endio_lock, flags);
        }
  
        if (atomic_dec_and_test(&io->io_count)) {
 -              if (io->error == DM_ENDIO_REQUEUE) {
 +              if (io->status == BLK_STS_DM_REQUEUE) {
                        /*
                         * Target requested pushing back the I/O.
                         */
                                bio_list_add_head(&md->deferred, io->bio);
                        else
                                /* noflush suspend was interrupted. */
 -                              io->error = -EIO;
 +                              io->status = BLK_STS_IOERR;
                        spin_unlock_irqrestore(&md->deferred_lock, flags);
                }
  
 -              io_error = io->error;
 +              io_error = io->status;
                bio = io->bio;
                end_io_acct(io);
                free_io(md, io);
  
 -              if (io_error == DM_ENDIO_REQUEUE)
 +              if (io_error == BLK_STS_DM_REQUEUE)
                        return;
  
                if ((bio->bi_opf & REQ_PREFLUSH) && bio->bi_iter.bi_size) {
                        queue_io(md, bio);
                } else {
                        /* done with normal IO or empty flush */
 -                      bio->bi_error = io_error;
 +                      bio->bi_status = io_error;
                        bio_endio(bio);
                }
        }
@@@ -842,13 -839,31 +843,13 @@@ void disable_write_zeroes(struct mapped
  
  static void clone_endio(struct bio *bio)
  {
 -      int error = bio->bi_error;
 -      int r = error;
 +      blk_status_t error = bio->bi_status;
        struct dm_target_io *tio = container_of(bio, struct dm_target_io, clone);
        struct dm_io *io = tio->io;
        struct mapped_device *md = tio->io->md;
        dm_endio_fn endio = tio->ti->type->end_io;
  
 -      if (endio) {
 -              r = endio(tio->ti, bio, error);
 -              if (r < 0 || r == DM_ENDIO_REQUEUE)
 -                      /*
 -                       * error and requeue request are handled
 -                       * in dec_pending().
 -                       */
 -                      error = r;
 -              else if (r == DM_ENDIO_INCOMPLETE)
 -                      /* The target will handle the io */
 -                      return;
 -              else if (r) {
 -                      DMWARN("unimplemented target endio return value: %d", r);
 -                      BUG();
 -              }
 -      }
 -
 -      if (unlikely(r == -EREMOTEIO)) {
 +      if (unlikely(error == BLK_STS_TARGET)) {
                if (bio_op(bio) == REQ_OP_WRITE_SAME &&
                    !bdev_get_queue(bio->bi_bdev)->limits.max_write_same_sectors)
                        disable_write_same(md);
                        disable_write_zeroes(md);
        }
  
 +      if (endio) {
 +              int r = endio(tio->ti, bio, &error);
 +              switch (r) {
 +              case DM_ENDIO_REQUEUE:
 +                      error = BLK_STS_DM_REQUEUE;
 +                      /*FALLTHRU*/
 +              case DM_ENDIO_DONE:
 +                      break;
 +              case DM_ENDIO_INCOMPLETE:
 +                      /* The target will handle the io */
 +                      return;
 +              default:
 +                      DMWARN("unimplemented target endio return value: %d", r);
 +                      BUG();
 +              }
 +      }
 +
        free_tio(tio);
        dec_pending(io, error);
  }
@@@ -972,6 -970,48 +973,48 @@@ static long dm_dax_direct_access(struc
        return ret;
  }
  
+ static size_t dm_dax_copy_from_iter(struct dax_device *dax_dev, pgoff_t pgoff,
+               void *addr, size_t bytes, struct iov_iter *i)
+ {
+       struct mapped_device *md = dax_get_private(dax_dev);
+       sector_t sector = pgoff * PAGE_SECTORS;
+       struct dm_target *ti;
+       long ret = 0;
+       int srcu_idx;
+       ti = dm_dax_get_live_target(md, sector, &srcu_idx);
+       if (!ti)
+               goto out;
+       if (!ti->type->dax_copy_from_iter) {
+               ret = copy_from_iter(addr, bytes, i);
+               goto out;
+       }
+       ret = ti->type->dax_copy_from_iter(ti, pgoff, addr, bytes, i);
+  out:
+       dm_put_live_table(md, srcu_idx);
+       return ret;
+ }
+ static void dm_dax_flush(struct dax_device *dax_dev, pgoff_t pgoff, void *addr,
+               size_t size)
+ {
+       struct mapped_device *md = dax_get_private(dax_dev);
+       sector_t sector = pgoff * PAGE_SECTORS;
+       struct dm_target *ti;
+       int srcu_idx;
+       ti = dm_dax_get_live_target(md, sector, &srcu_idx);
+       if (!ti)
+               goto out;
+       if (ti->type->dax_flush)
+               ti->type->dax_flush(ti, pgoff, addr, size);
+  out:
+       dm_put_live_table(md, srcu_idx);
+ }
  /*
   * A target may call dm_accept_partial_bio only from the map routine.  It is
   * allowed for all bio types except REQ_PREFLUSH.
@@@ -1012,85 -1052,6 +1055,85 @@@ void dm_accept_partial_bio(struct bio *
  }
  EXPORT_SYMBOL_GPL(dm_accept_partial_bio);
  
 +/*
 + * The zone descriptors obtained with a zone report indicate
 + * zone positions within the target device. The zone descriptors
 + * must be remapped to match their position within the dm device.
 + * A target may call dm_remap_zone_report after completion of a
 + * REQ_OP_ZONE_REPORT bio to remap the zone descriptors obtained
 + * from the target device mapping to the dm device.
 + */
 +void dm_remap_zone_report(struct dm_target *ti, struct bio *bio, sector_t start)
 +{
 +#ifdef CONFIG_BLK_DEV_ZONED
 +      struct dm_target_io *tio = container_of(bio, struct dm_target_io, clone);
 +      struct bio *report_bio = tio->io->bio;
 +      struct blk_zone_report_hdr *hdr = NULL;
 +      struct blk_zone *zone;
 +      unsigned int nr_rep = 0;
 +      unsigned int ofst;
 +      struct bio_vec bvec;
 +      struct bvec_iter iter;
 +      void *addr;
 +
 +      if (bio->bi_status)
 +              return;
 +
 +      /*
 +       * Remap the start sector of the reported zones. For sequential zones,
 +       * also remap the write pointer position.
 +       */
 +      bio_for_each_segment(bvec, report_bio, iter) {
 +              addr = kmap_atomic(bvec.bv_page);
 +
 +              /* Remember the report header in the first page */
 +              if (!hdr) {
 +                      hdr = addr;
 +                      ofst = sizeof(struct blk_zone_report_hdr);
 +              } else
 +                      ofst = 0;
 +
 +              /* Set zones start sector */
 +              while (hdr->nr_zones && ofst < bvec.bv_len) {
 +                      zone = addr + ofst;
 +                      if (zone->start >= start + ti->len) {
 +                              hdr->nr_zones = 0;
 +                              break;
 +                      }
 +                      zone->start = zone->start + ti->begin - start;
 +                      if (zone->type != BLK_ZONE_TYPE_CONVENTIONAL) {
 +                              if (zone->cond == BLK_ZONE_COND_FULL)
 +                                      zone->wp = zone->start + zone->len;
 +                              else if (zone->cond == BLK_ZONE_COND_EMPTY)
 +                                      zone->wp = zone->start;
 +                              else
 +                                      zone->wp = zone->wp + ti->begin - start;
 +                      }
 +                      ofst += sizeof(struct blk_zone);
 +                      hdr->nr_zones--;
 +                      nr_rep++;
 +              }
 +
 +              if (addr != hdr)
 +                      kunmap_atomic(addr);
 +
 +              if (!hdr->nr_zones)
 +                      break;
 +      }
 +
 +      if (hdr) {
 +              hdr->nr_zones = nr_rep;
 +              kunmap_atomic(hdr);
 +      }
 +
 +      bio_advance(report_bio, report_bio->bi_iter.bi_size);
 +
 +#else /* !CONFIG_BLK_DEV_ZONED */
 +      bio->bi_status = BLK_STS_NOTSUPP;
 +#endif
 +}
 +EXPORT_SYMBOL_GPL(dm_remap_zone_report);
 +
  /*
   * Flush current->bio_list when the target map method blocks.
   * This fixes deadlocks in snapshot and possibly in other targets.
@@@ -1118,8 -1079,7 +1161,8 @@@ static void flush_current_bio_list(stru
  
                while ((bio = bio_list_pop(&list))) {
                        struct bio_set *bs = bio->bi_pool;
 -                      if (unlikely(!bs) || bs == fs_bio_set) {
 +                      if (unlikely(!bs) || bs == fs_bio_set ||
 +                          !bs->rescue_workqueue) {
                                bio_list_add(&current->bio_list[i], bio);
                                continue;
                        }
@@@ -1167,24 -1127,18 +1210,24 @@@ static void __map_bio(struct dm_target_
        r = ti->type->map(ti, clone);
        dm_offload_end(&o);
  
 -      if (r == DM_MAPIO_REMAPPED) {
 +      switch (r) {
 +      case DM_MAPIO_SUBMITTED:
 +              break;
 +      case DM_MAPIO_REMAPPED:
                /* the bio has been remapped so dispatch it */
 -
                trace_block_bio_remap(bdev_get_queue(clone->bi_bdev), clone,
                                      tio->io->bio->bi_bdev->bd_dev, sector);
 -
                generic_make_request(clone);
 -      } else if (r < 0 || r == DM_MAPIO_REQUEUE) {
 -              /* error the io and bail out, or requeue it if needed */
 -              dec_pending(tio->io, r);
 +              break;
 +      case DM_MAPIO_KILL:
 +              dec_pending(tio->io, BLK_STS_IOERR);
                free_tio(tio);
 -      } else if (r != DM_MAPIO_SUBMITTED) {
 +              break;
 +      case DM_MAPIO_REQUEUE:
 +              dec_pending(tio->io, BLK_STS_DM_REQUEUE);
 +              free_tio(tio);
 +              break;
 +      default:
                DMWARN("unimplemented target map return value: %d", r);
                BUG();
        }
@@@ -1231,8 -1185,7 +1274,8 @@@ static int clone_bio(struct dm_target_i
                        return r;
        }
  
 -      bio_advance(clone, to_bytes(sector - clone->bi_iter.bi_sector));
 +      if (bio_op(bio) != REQ_OP_ZONE_REPORT)
 +              bio_advance(clone, to_bytes(sector - clone->bi_iter.bi_sector));
        clone->bi_iter.bi_size = to_bytes(len);
  
        if (unlikely(bio_integrity(bio) != NULL))
@@@ -1421,11 -1374,7 +1464,11 @@@ static int __split_and_process_non_flus
        if (!dm_target_is_valid(ti))
                return -EIO;
  
 -      len = min_t(sector_t, max_io_len(ci->sector, ti), ci->sector_count);
 +      if (bio_op(bio) == REQ_OP_ZONE_REPORT)
 +              len = ci->sector_count;
 +      else
 +              len = min_t(sector_t, max_io_len(ci->sector, ti),
 +                          ci->sector_count);
  
        r = __clone_and_map_data_bio(ci, ti, ci->sector, &len);
        if (r < 0)
@@@ -1454,7 -1403,7 +1497,7 @@@ static void __split_and_process_bio(str
        ci.map = map;
        ci.md = md;
        ci.io = alloc_io(md);
 -      ci.io->error = 0;
 +      ci.io->status = 0;
        atomic_set(&ci.io->io_count, 1);
        ci.io->bio = bio;
        ci.io->md = md;
                ci.sector_count = 0;
                error = __send_empty_flush(&ci);
                /* dec_pending submits any data associated with flush */
 +      } else if (bio_op(bio) == REQ_OP_ZONE_RESET) {
 +              ci.bio = bio;
 +              ci.sector_count = 0;
 +              error = __split_and_process_non_flush(&ci);
        } else {
                ci.bio = bio;
                ci.sector_count = bio_sectors(bio);
@@@ -1625,6 -1570,7 +1668,6 @@@ void dm_init_normal_md_queue(struct map
         * Initialize aspects of queue that aren't relevant for blk-mq
         */
        md->queue->backing_dev_info->congested_fn = dm_any_congested;
 -      blk_queue_bounce_limit(md->queue, BLK_BOUNCE_ANY);
  }
  
  static void cleanup_mapped_device(struct mapped_device *md)
@@@ -1850,9 -1796,7 +1893,9 @@@ static void event_callback(void *contex
        dm_send_uevents(&uevents, &disk_to_dev(md->disk)->kobj);
  
        atomic_inc(&md->event_nr);
 +      atomic_inc(&dm_global_event_nr);
        wake_up(&md->eventq);
 +      wake_up(&dm_global_eventq);
  }
  
  /*
@@@ -2753,7 -2697,7 +2796,7 @@@ struct dm_md_mempools *dm_alloc_md_memp
                BUG();
        }
  
 -      pools->bs = bioset_create_nobvec(pool_size, front_pad);
 +      pools->bs = bioset_create(pool_size, front_pad, BIOSET_NEED_RESCUER);
        if (!pools->bs)
                goto out;
  
@@@ -2958,6 -2902,8 +3001,8 @@@ static const struct block_device_operat
  
  static const struct dax_operations dm_dax_ops = {
        .direct_access = dm_dax_direct_access,
+       .copy_from_iter = dm_dax_copy_from_iter,
+       .flush = dm_dax_flush,
  };
  
  /*
diff --combined drivers/nvdimm/btt.c
index b6ba0618ea46736fefb053bc067adb1e4f7d726f,2af329d6a833774d287b40b8bf1c411b7c34de50..64216dea5278479f3ada0935d68822d9626ba1af
@@@ -37,8 -37,8 +37,8 @@@ static int arena_read_bytes(struct aren
        struct nd_btt *nd_btt = arena->nd_btt;
        struct nd_namespace_common *ndns = nd_btt->ndns;
  
-       /* arena offsets are 4K from the base of the device */
-       offset += SZ_4K;
+       /* arena offsets may be shifted from the base of the device */
+       offset += arena->nd_btt->initial_offset;
        return nvdimm_read_bytes(ndns, offset, buf, n, flags);
  }
  
@@@ -48,8 -48,8 +48,8 @@@ static int arena_write_bytes(struct are
        struct nd_btt *nd_btt = arena->nd_btt;
        struct nd_namespace_common *ndns = nd_btt->ndns;
  
-       /* arena offsets are 4K from the base of the device */
-       offset += SZ_4K;
+       /* arena offsets may be shifted from the base of the device */
+       offset += arena->nd_btt->initial_offset;
        return nvdimm_write_bytes(ndns, offset, buf, n, flags);
  }
  
@@@ -323,7 -323,7 +323,7 @@@ static int btt_log_read(struct arena_in
  
        old_ent = btt_log_get_old(log);
        if (old_ent < 0 || old_ent > 1) {
-               dev_info(to_dev(arena),
+               dev_err(to_dev(arena),
                                "log corruption (%d): lane %d seq [%d, %d]\n",
                        old_ent, lane, log[0].seq, log[1].seq);
                /* TODO set error state? */
@@@ -576,8 -576,8 +576,8 @@@ static struct arena_info *alloc_arena(s
        arena->internal_lbasize = roundup(arena->external_lbasize,
                                        INT_LBASIZE_ALIGNMENT);
        arena->nfree = BTT_DEFAULT_NFREE;
-       arena->version_major = 1;
-       arena->version_minor = 1;
+       arena->version_major = btt->nd_btt->version_major;
+       arena->version_minor = btt->nd_btt->version_minor;
  
        if (available % BTT_PG_SIZE)
                available -= (available % BTT_PG_SIZE);
@@@ -684,7 -684,7 +684,7 @@@ static int discover_arenas(struct btt *
                                dev_info(to_dev(arena), "No existing arenas\n");
                                goto out;
                        } else {
-                               dev_info(to_dev(arena),
+                               dev_err(to_dev(arena),
                                                "Found corrupted metadata!\n");
                                ret = -ENODEV;
                                goto out;
@@@ -1210,7 -1210,7 +1210,7 @@@ static blk_qc_t btt_make_request(struc
         * another kernel subsystem, and we just pass it through.
         */
        if (bio_integrity_enabled(bio) && bio_integrity_prep(bio)) {
 -              bio->bi_error = -EIO;
 +              bio->bi_status = BLK_STS_IOERR;
                goto out;
        }
  
                err = btt_do_bvec(btt, bip, bvec.bv_page, len, bvec.bv_offset,
                                  op_is_write(bio_op(bio)), iter.bi_sector);
                if (err) {
-                       dev_info(&btt->nd_btt->dev,
+                       dev_err(&btt->nd_btt->dev,
                                        "io error in %s sector %lld, len %d,\n",
                                        (op_is_write(bio_op(bio))) ? "WRITE" :
                                        "READ",
                                        (unsigned long long) iter.bi_sector, len);
 -                      bio->bi_error = err;
 +                      bio->bi_status = errno_to_blk_status(err);
                        break;
                }
        }
@@@ -1248,10 -1248,13 +1248,13 @@@ static int btt_rw_page(struct block_dev
                struct page *page, bool is_write)
  {
        struct btt *btt = bdev->bd_disk->private_data;
+       int rc;
  
-       btt_do_bvec(btt, NULL, page, PAGE_SIZE, 0, is_write, sector);
-       page_endio(page, is_write, 0);
-       return 0;
+       rc = btt_do_bvec(btt, NULL, page, PAGE_SIZE, 0, is_write, sector);
+       if (rc == 0)
+               page_endio(page, is_write, 0);
+       return rc;
  }
  
  
@@@ -1297,6 -1300,7 +1300,6 @@@ static int btt_blk_init(struct btt *btt
        blk_queue_make_request(btt->btt_queue, btt_make_request);
        blk_queue_logical_block_size(btt->btt_queue, btt->sector_size);
        blk_queue_max_hw_sectors(btt->btt_queue, UINT_MAX);
 -      blk_queue_bounce_limit(btt->btt_queue, BLK_BOUNCE_ANY);
        queue_flag_set_unlocked(QUEUE_FLAG_NONROT, btt->btt_queue);
        btt->btt_queue->queuedata = btt;
  
@@@ -1369,7 -1373,7 +1372,7 @@@ static struct btt *btt_init(struct nd_b
        }
  
        if (btt->init_state != INIT_READY && nd_region->ro) {
-               dev_info(dev, "%s is read-only, unable to init btt metadata\n",
+               dev_warn(dev, "%s is read-only, unable to init btt metadata\n",
                                dev_name(&nd_region->dev));
                return NULL;
        } else if (btt->init_state != INIT_READY) {
@@@ -1424,6 -1428,7 +1427,7 @@@ int nvdimm_namespace_attach_btt(struct 
  {
        struct nd_btt *nd_btt = to_nd_btt(ndns->claim);
        struct nd_region *nd_region;
+       struct btt_sb *btt_sb;
        struct btt *btt;
        size_t rawsize;
  
                return -ENODEV;
        }
  
-       rawsize = nvdimm_namespace_capacity(ndns) - SZ_4K;
+       btt_sb = devm_kzalloc(&nd_btt->dev, sizeof(*btt_sb), GFP_KERNEL);
+       /*
+        * If this returns < 0, that is ok as it just means there wasn't
+        * an existing BTT, and we're creating a new one. We still need to
+        * call this as we need the version dependent fields in nd_btt to be
+        * set correctly based on the holder class
+        */
+       nd_btt_version(nd_btt, ndns, btt_sb);
+       rawsize = nvdimm_namespace_capacity(ndns) - nd_btt->initial_offset;
        if (rawsize < ARENA_MIN_SIZE) {
                dev_dbg(&nd_btt->dev, "%s must be at least %ld bytes\n",
-                               dev_name(&ndns->dev), ARENA_MIN_SIZE + SZ_4K);
+                               dev_name(&ndns->dev),
+                               ARENA_MIN_SIZE + nd_btt->initial_offset);
                return -ENXIO;
        }
        nd_region = to_nd_region(nd_btt->dev.parent);
diff --combined drivers/nvdimm/pmem.c
index 6b577afb1d4494d33a1cc54baa2dadf47b700fda,e0f6d83c5a6eac5f963db8ee55a7b69a80d59422..f7099adaabc0b643e703cf8b160b5c5debda2bde
@@@ -28,7 -28,7 +28,7 @@@
  #include <linux/blk-mq.h>
  #include <linux/pfn_t.h>
  #include <linux/slab.h>
- #include <linux/pmem.h>
+ #include <linux/uio.h>
  #include <linux/dax.h>
  #include <linux/nd.h>
  #include "pmem.h"
@@@ -49,28 -49,30 +49,30 @@@ static struct nd_region *to_region(stru
        return to_nd_region(to_dev(pmem)->parent);
  }
  
 -static int pmem_clear_poison(struct pmem_device *pmem, phys_addr_t offset,
 -              unsigned int len)
 +static blk_status_t pmem_clear_poison(struct pmem_device *pmem,
 +              phys_addr_t offset, unsigned int len)
  {
        struct device *dev = to_dev(pmem);
        sector_t sector;
        long cleared;
 -      int rc = 0;
 +      blk_status_t rc = BLK_STS_OK;
  
        sector = (offset - pmem->data_offset) / 512;
  
        cleared = nvdimm_clear_poison(dev, pmem->phys_addr + offset, len);
        if (cleared < len)
 -              rc = -EIO;
 +              rc = BLK_STS_IOERR;
        if (cleared > 0 && cleared / 512) {
                cleared /= 512;
                dev_dbg(dev, "%s: %#llx clear %ld sector%s\n", __func__,
                                (unsigned long long) sector, cleared,
                                cleared > 1 ? "s" : "");
                badblocks_clear(&pmem->bb, sector, cleared);
+               if (pmem->bb_state)
+                       sysfs_notify_dirent(pmem->bb_state);
        }
  
-       invalidate_pmem(pmem->virt_addr + offset, len);
+       arch_invalidate_pmem(pmem->virt_addr + offset, len);
  
        return rc;
  }
@@@ -80,11 -82,11 +82,11 @@@ static void write_pmem(void *pmem_addr
  {
        void *mem = kmap_atomic(page);
  
-       memcpy_to_pmem(pmem_addr, mem + off, len);
+       memcpy_flushcache(pmem_addr, mem + off, len);
        kunmap_atomic(mem);
  }
  
 -static int read_pmem(struct page *page, unsigned int off,
 +static blk_status_t read_pmem(struct page *page, unsigned int off,
                void *pmem_addr, unsigned int len)
  {
        int rc;
        rc = memcpy_mcsafe(mem + off, pmem_addr, len);
        kunmap_atomic(mem);
        if (rc)
 -              return -EIO;
 -      return 0;
 +              return BLK_STS_IOERR;
 +      return BLK_STS_OK;
  }
  
 -static int pmem_do_bvec(struct pmem_device *pmem, struct page *page,
 +static blk_status_t pmem_do_bvec(struct pmem_device *pmem, struct page *page,
                        unsigned int len, unsigned int off, bool is_write,
                        sector_t sector)
  {
 -      int rc = 0;
 +      blk_status_t rc = BLK_STS_OK;
        bool bad_pmem = false;
        phys_addr_t pmem_off = sector * 512 + pmem->data_offset;
        void *pmem_addr = pmem->virt_addr + pmem_off;
  
        if (!is_write) {
                if (unlikely(bad_pmem))
 -                      rc = -EIO;
 +                      rc = BLK_STS_IOERR;
                else {
                        rc = read_pmem(page, off, pmem_addr, len);
                        flush_dcache_page(page);
  
  static blk_qc_t pmem_make_request(struct request_queue *q, struct bio *bio)
  {
 -      int rc = 0;
 +      blk_status_t rc = 0;
        bool do_acct;
        unsigned long start;
        struct bio_vec bvec;
                                bvec.bv_offset, op_is_write(bio_op(bio)),
                                iter.bi_sector);
                if (rc) {
 -                      bio->bi_error = rc;
 +                      bio->bi_status = rc;
                        break;
                }
        }
@@@ -184,7 -186,7 +186,7 @@@ static int pmem_rw_page(struct block_de
                       struct page *page, bool is_write)
  {
        struct pmem_device *pmem = bdev->bd_queue->queuedata;
 -      int rc;
 +      blk_status_t rc;
  
        rc = pmem_do_bvec(pmem, page, PAGE_SIZE, 0, is_write, sector);
  
        if (rc == 0)
                page_endio(page, is_write, 0);
  
 -      return rc;
 +      return blk_status_to_errno(rc);
  }
  
  /* see "strong" declaration in tools/testing/nvdimm/pmem-dax.c */
@@@ -235,8 -237,27 +237,27 @@@ static long pmem_dax_direct_access(stru
        return __pmem_direct_access(pmem, pgoff, nr_pages, kaddr, pfn);
  }
  
+ static size_t pmem_copy_from_iter(struct dax_device *dax_dev, pgoff_t pgoff,
+               void *addr, size_t bytes, struct iov_iter *i)
+ {
+       return copy_from_iter_flushcache(addr, bytes, i);
+ }
+ static void pmem_dax_flush(struct dax_device *dax_dev, pgoff_t pgoff,
+               void *addr, size_t size)
+ {
+       arch_wb_cache_pmem(addr, size);
+ }
  static const struct dax_operations pmem_dax_ops = {
        .direct_access = pmem_dax_direct_access,
+       .copy_from_iter = pmem_copy_from_iter,
+       .flush = pmem_dax_flush,
+ };
+ static const struct attribute_group *pmem_attribute_groups[] = {
+       &dax_attribute_group,
+       NULL,
  };
  
  static void pmem_release_queue(void *q)
@@@ -265,14 -286,15 +286,15 @@@ static int pmem_attach_disk(struct devi
        struct nd_namespace_io *nsio = to_nd_namespace_io(&ndns->dev);
        struct nd_region *nd_region = to_nd_region(dev->parent);
        struct vmem_altmap __altmap, *altmap = NULL;
+       int nid = dev_to_node(dev), fua, wbc;
        struct resource *res = &nsio->res;
        struct nd_pfn *nd_pfn = NULL;
        struct dax_device *dax_dev;
-       int nid = dev_to_node(dev);
        struct nd_pfn_sb *pfn_sb;
        struct pmem_device *pmem;
        struct resource pfn_res;
        struct request_queue *q;
+       struct device *gendev;
        struct gendisk *disk;
        void *addr;
  
        dev_set_drvdata(dev, pmem);
        pmem->phys_addr = res->start;
        pmem->size = resource_size(res);
-       if (nvdimm_has_flush(nd_region) < 0)
+       fua = nvdimm_has_flush(nd_region);
+       if (!IS_ENABLED(CONFIG_ARCH_HAS_UACCESS_FLUSHCACHE) || fua < 0) {
                dev_warn(dev, "unable to guarantee persistence of writes\n");
+               fua = 0;
+       }
+       wbc = nvdimm_has_cache(nd_region);
  
        if (!devm_request_mem_region(dev, res->start, resource_size(res),
                                dev_name(&ndns->dev))) {
                return PTR_ERR(addr);
        pmem->virt_addr = addr;
  
-       blk_queue_write_cache(q, true, true);
+       blk_queue_write_cache(q, wbc, fua);
        blk_queue_make_request(q, pmem_make_request);
        blk_queue_physical_block_size(q, PAGE_SIZE);
+       blk_queue_logical_block_size(q, pmem_sector_size(ndns));
        blk_queue_max_hw_sectors(q, UINT_MAX);
 -      blk_queue_bounce_limit(q, BLK_BOUNCE_ANY);
        queue_flag_set_unlocked(QUEUE_FLAG_NONROT, q);
        queue_flag_set_unlocked(QUEUE_FLAG_DAX, q);
        q->queuedata = pmem;
                put_disk(disk);
                return -ENOMEM;
        }
+       dax_write_cache(dax_dev, wbc);
        pmem->dax_dev = dax_dev;
  
+       gendev = disk_to_dev(disk);
+       gendev->groups = pmem_attribute_groups;
        device_add_disk(dev, disk);
        if (devm_add_action_or_reset(dev, pmem_release_disk, pmem))
                return -ENOMEM;
  
        revalidate_disk(disk);
  
+       pmem->bb_state = sysfs_get_dirent(disk_to_dev(disk)->kobj.sd,
+                                         "badblocks");
+       if (!pmem->bb_state)
+               dev_warn(dev, "'badblocks' notification disabled\n");
        return 0;
  }
  
@@@ -407,8 -444,18 +443,18 @@@ static int nd_pmem_probe(struct device 
  
  static int nd_pmem_remove(struct device *dev)
  {
+       struct pmem_device *pmem = dev_get_drvdata(dev);
        if (is_nd_btt(dev))
                nvdimm_namespace_detach_btt(to_nd_btt(dev));
+       else {
+               /*
+                * Note, this assumes device_lock() context to not race
+                * nd_pmem_notify()
+                */
+               sysfs_put(pmem->bb_state);
+               pmem->bb_state = NULL;
+       }
        nvdimm_flush(to_nd_region(dev->parent));
  
        return 0;
@@@ -427,6 -474,7 +473,7 @@@ static void nd_pmem_notify(struct devic
        struct nd_namespace_io *nsio;
        struct resource res;
        struct badblocks *bb;
+       struct kernfs_node *bb_state;
  
        if (event != NVDIMM_REVALIDATE_POISON)
                return;
                nd_region = to_nd_region(ndns->dev.parent);
                nsio = to_nd_namespace_io(&ndns->dev);
                bb = &nsio->bb;
+               bb_state = NULL;
        } else {
                struct pmem_device *pmem = dev_get_drvdata(dev);
  
                nd_region = to_region(pmem);
                bb = &pmem->bb;
+               bb_state = pmem->bb_state;
  
                if (is_nd_pfn(dev)) {
                        struct nd_pfn *nd_pfn = to_nd_pfn(dev);
        res.start = nsio->res.start + offset;
        res.end = nsio->res.end - end_trunc;
        nvdimm_badblocks_populate(nd_region, bb, &res);
+       if (bb_state)
+               sysfs_notify_dirent(bb_state);
  }
  
  MODULE_ALIAS("pmem");
index 06eb1de52d1c0a02a1649a6b62c419388087b713,88fa7b3f7a9db605f488369453972c588867b57d..68bae4f6bd8881be00fd57a5ec3c691e1d2424bf
@@@ -18,6 -18,7 +18,7 @@@
  #include <linux/interrupt.h>
  #include <linux/platform_device.h>
  #include <linux/pfn_t.h>
+ #include <linux/uio.h>
  #include <linux/dax.h>
  #include <asm/extmem.h>
  #include <asm/io.h>
@@@ -43,8 -44,15 +44,15 @@@ static const struct block_device_operat
        .release        = dcssblk_release,
  };
  
+ static size_t dcssblk_dax_copy_from_iter(struct dax_device *dax_dev,
+               pgoff_t pgoff, void *addr, size_t bytes, struct iov_iter *i)
+ {
+       return copy_from_iter(addr, bytes, i);
+ }
  static const struct dax_operations dcssblk_dax_ops = {
        .direct_access = dcssblk_dax_direct_access,
+       .copy_from_iter = dcssblk_dax_copy_from_iter,
  };
  
  struct dcssblk_dev_info {
@@@ -845,7 -853,7 +853,7 @@@ dcssblk_make_request(struct request_que
        unsigned long source_addr;
        unsigned long bytes_done;
  
 -      blk_queue_split(q, &bio, q->bio_split);
 +      blk_queue_split(q, &bio);
  
        bytes_done = 0;
        dev_info = bio->bi_bdev->bd_disk->private_data;
diff --combined fs/dax.c
index cd8fced592d0a1b8e1a4bf0db591f375793fc79d,6d8699feae2eb2ab861c0454fd6dcd274eb99534..b1cd18dcc17754354ac1fd7c880c8366547719a2
+++ b/fs/dax.c
@@@ -25,7 -25,6 +25,6 @@@
  #include <linux/mm.h>
  #include <linux/mutex.h>
  #include <linux/pagevec.h>
- #include <linux/pmem.h>
  #include <linux/sched.h>
  #include <linux/sched/signal.h>
  #include <linux/uio.h>
@@@ -84,7 -83,7 +83,7 @@@ struct exceptional_entry_key 
  };
  
  struct wait_exceptional_entry_queue {
 -      wait_queue_t wait;
 +      wait_queue_entry_t wait;
        struct exceptional_entry_key key;
  };
  
@@@ -108,7 -107,7 +107,7 @@@ static wait_queue_head_t *dax_entry_wai
        return wait_table + hash;
  }
  
 -static int wake_exceptional_entry_func(wait_queue_t *wait, unsigned int mode,
 +static int wake_exceptional_entry_func(wait_queue_entry_t *wait, unsigned int mode,
                                       int sync, void *keyp)
  {
        struct exceptional_entry_key *key = keyp;
@@@ -784,7 -783,7 +783,7 @@@ static int dax_writeback_one(struct blo
        }
  
        dax_mapping_entry_mkclean(mapping, index, pfn_t_to_pfn(pfn));
-       wb_cache_pmem(kaddr, size);
+       dax_flush(dax_dev, pgoff, kaddr, size);
        /*
         * After we have flushed the cache, we can clear the dirty tag. There
         * cannot be new dirty data in the pfn after the flush has completed as
@@@ -859,7 -858,6 +858,7 @@@ int dax_writeback_mapping_range(struct 
                        if (ret < 0)
                                goto out;
                }
 +              start_index = indices[pvec.nr - 1] + 1;
        }
  out:
        put_dax(dax_dev);
@@@ -976,7 -974,8 +975,8 @@@ int __dax_zero_page_range(struct block_
                        dax_read_unlock(id);
                        return rc;
                }
-               clear_pmem(kaddr + offset, size);
+               memset(kaddr + offset, 0, size);
+               dax_flush(dax_dev, pgoff, kaddr + offset, size);
                dax_read_unlock(id);
        }
        return 0;
@@@ -1055,7 -1054,8 +1055,8 @@@ dax_iomap_actor(struct inode *inode, lo
                        map_len = end - pos;
  
                if (iov_iter_rw(iter) == WRITE)
-                       map_len = copy_from_iter_pmem(kaddr, map_len, iter);
+                       map_len = dax_copy_from_iter(dax_dev, pgoff, kaddr,
+                                       map_len, iter);
                else
                        map_len = copy_to_iter(kaddr, map_len, iter);
                if (map_len <= 0) {
@@@ -1213,7 -1213,7 +1214,7 @@@ static int dax_iomap_pte_fault(struct v
        case IOMAP_MAPPED:
                if (iomap.flags & IOMAP_F_NEW) {
                        count_vm_event(PGMAJFAULT);
 -                      mem_cgroup_count_vm_event(vmf->vma->vm_mm, PGMAJFAULT);
 +                      count_memcg_event_mm(vmf->vma->vm_mm, PGMAJFAULT);
                        major = VM_FAULT_MAJOR;
                }
                error = dax_insert_mapping(mapping, iomap.bdev, iomap.dax_dev,
index 0c1b50ad23b09fce974505191b4a05c0511954fd,67bfe8ddcb3238eae55e06163983172a63fa766b..1473455d0341bed5b157cab1cd95d8a08980e711
@@@ -72,9 -72,9 +72,9 @@@ typedef void (*dm_release_clone_request
   * 2   : The target wants to push back the io
   */
  typedef int (*dm_endio_fn) (struct dm_target *ti,
 -                          struct bio *bio, int error);
 +                          struct bio *bio, blk_status_t *error);
  typedef int (*dm_request_endio_fn) (struct dm_target *ti,
 -                                  struct request *clone, int error,
 +                                  struct request *clone, blk_status_t error,
                                    union map_info *map_context);
  
  typedef void (*dm_presuspend_fn) (struct dm_target *ti);
@@@ -132,6 -132,10 +132,10 @@@ typedef int (*dm_busy_fn) (struct dm_ta
   */
  typedef long (*dm_dax_direct_access_fn) (struct dm_target *ti, pgoff_t pgoff,
                long nr_pages, void **kaddr, pfn_t *pfn);
+ typedef size_t (*dm_dax_copy_from_iter_fn)(struct dm_target *ti, pgoff_t pgoff,
+               void *addr, size_t bytes, struct iov_iter *i);
+ typedef void (*dm_dax_flush_fn)(struct dm_target *ti, pgoff_t pgoff, void *addr,
+               size_t size);
  #define PAGE_SECTORS (PAGE_SIZE / 512)
  
  void dm_error(const char *message);
@@@ -181,6 -185,8 +185,8 @@@ struct target_type 
        dm_iterate_devices_fn iterate_devices;
        dm_io_hints_fn io_hints;
        dm_dax_direct_access_fn direct_access;
+       dm_dax_copy_from_iter_fn dax_copy_from_iter;
+       dm_dax_flush_fn dax_flush;
  
        /* For internal device-mapper use. */
        struct list_head list;
@@@ -237,12 -243,6 +243,12 @@@ typedef unsigned (*dm_num_write_bios_fn
  #define DM_TARGET_PASSES_INTEGRITY    0x00000020
  #define dm_target_passes_integrity(type) ((type)->features & DM_TARGET_PASSES_INTEGRITY)
  
 +/*
 + * Indicates that a target supports host-managed zoned block devices.
 + */
 +#define DM_TARGET_ZONED_HM            0x00000040
 +#define dm_target_supports_zoned_hm(type) ((type)->features & DM_TARGET_ZONED_HM)
 +
  struct dm_target {
        struct dm_table *table;
        struct target_type *type;
@@@ -450,8 -450,6 +456,8 @@@ struct gendisk *dm_disk(struct mapped_d
  int dm_suspended(struct dm_target *ti);
  int dm_noflush_suspending(struct dm_target *ti);
  void dm_accept_partial_bio(struct bio *bio, unsigned n_sectors);
 +void dm_remap_zone_report(struct dm_target *ti, struct bio *bio,
 +                        sector_t start);
  union map_info *dm_get_rq_mapinfo(struct request *rq);
  
  struct queue_limits *dm_get_queue_limits(struct mapped_device *md);
@@@ -551,41 -549,48 +557,41 @@@ extern struct ratelimit_state dm_rateli
  #define dm_ratelimit()        0
  #endif
  
 -#define DMCRIT(f, arg...) \
 -      printk(KERN_CRIT DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg)
 -
 -#define DMERR(f, arg...) \
 -      printk(KERN_ERR DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg)
 -#define DMERR_LIMIT(f, arg...) \
 -      do { \
 -              if (dm_ratelimit())     \
 -                      printk(KERN_ERR DM_NAME ": " DM_MSG_PREFIX ": " \
 -                             f "\n", ## arg); \
 -      } while (0)
 -
 -#define DMWARN(f, arg...) \
 -      printk(KERN_WARNING DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg)
 -#define DMWARN_LIMIT(f, arg...) \
 -      do { \
 -              if (dm_ratelimit())     \
 -                      printk(KERN_WARNING DM_NAME ": " DM_MSG_PREFIX ": " \
 -                             f "\n", ## arg); \
 -      } while (0)
 -
 -#define DMINFO(f, arg...) \
 -      printk(KERN_INFO DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg)
 -#define DMINFO_LIMIT(f, arg...) \
 -      do { \
 -              if (dm_ratelimit())     \
 -                      printk(KERN_INFO DM_NAME ": " DM_MSG_PREFIX ": " f \
 -                             "\n", ## arg); \
 -      } while (0)
 +#define DM_FMT(fmt) DM_NAME ": " DM_MSG_PREFIX ": " fmt "\n"
 +
 +#define DMCRIT(fmt, ...) pr_crit(DM_FMT(fmt), ##__VA_ARGS__)
 +
 +#define DMERR(fmt, ...) pr_err(DM_FMT(fmt), ##__VA_ARGS__)
 +#define DMERR_LIMIT(fmt, ...)                                         \
 +do {                                                                  \
 +      if (dm_ratelimit())                                             \
 +              DMERR(fmt, ##__VA_ARGS__);                              \
 +} while (0)
 +
 +#define DMWARN(fmt, ...) pr_warn(DM_FMT(fmt), ##__VA_ARGS__)
 +#define DMWARN_LIMIT(fmt, ...)                                                \
 +do {                                                                  \
 +      if (dm_ratelimit())                                             \
 +              DMWARN(fmt, ##__VA_ARGS__);                             \
 +} while (0)
 +
 +#define DMINFO(fmt, ...) pr_info(DM_FMT(fmt), ##__VA_ARGS__)
 +#define DMINFO_LIMIT(fmt, ...)                                                \
 +do {                                                                  \
 +      if (dm_ratelimit())                                             \
 +              DMINFO(fmt, ##__VA_ARGS__);                             \
 +} while (0)
  
  #ifdef CONFIG_DM_DEBUG
 -#  define DMDEBUG(f, arg...) \
 -      printk(KERN_DEBUG DM_NAME ": " DM_MSG_PREFIX " DEBUG: " f "\n", ## arg)
 -#  define DMDEBUG_LIMIT(f, arg...) \
 -      do { \
 -              if (dm_ratelimit())     \
 -                      printk(KERN_DEBUG DM_NAME ": " DM_MSG_PREFIX ": " f \
 -                             "\n", ## arg); \
 -      } while (0)
 +#define DMDEBUG(fmt, ...) printk(KERN_DEBUG DM_FMT(fmt), ##__VA_ARGS__)
 +#define DMDEBUG_LIMIT(fmt, ...)                                               \
 +do {                                                                  \
 +      if (dm_ratelimit())                                             \
 +              DMDEBUG(fmt, ##__VA_ARGS__);                            \
 +} while (0)
  #else
 -#  define DMDEBUG(f, arg...) do {} while (0)
 -#  define DMDEBUG_LIMIT(f, arg...) do {} while (0)
 +#define DMDEBUG(fmt, ...) no_printk(fmt, ##__VA_ARGS__)
 +#define DMDEBUG_LIMIT(fmt, ...) no_printk(fmt, ##__VA_ARGS__)
  #endif
  
  #define DMEMIT(x...) sz += ((sz >= maxlen) ? \
diff --combined lib/Kconfig
index d2fd2623721e1f5361baf1b049ec2dbb7bc7a4cb,2d1c4b3a085c28584e3788d7e03ddc15c5797f8c..6762529ad9e4597f473a07e9300bd0ac8a601c10
@@@ -158,14 -158,6 +158,14 @@@ config CRC32_BI
  
  endchoice
  
 +config CRC4
 +      tristate "CRC4 functions"
 +      help
 +        This option is provided for the case where no in-kernel-tree
 +        modules require CRC4 functions, but a module built outside
 +        the kernel tree does. Such modules that use library CRC4
 +        functions require M here.
 +
  config CRC7
        tristate "CRC7 functions"
        help
@@@ -556,6 -548,9 +556,9 @@@ config ARCH_HAS_SG_CHAI
  config ARCH_HAS_PMEM_API
        bool
  
+ config ARCH_HAS_UACCESS_FLUSHCACHE
+       bool
  config ARCH_HAS_MMIO_FLUSH
        bool
  
This page took 0.179248 seconds and 4 git commands to generate.