Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 18 Aug 2018 23:48:07 +0000 (16:48 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 18 Aug 2018 23:48:07 +0000 (16:48 -0700)
Pull input updates from Dmitry Torokhov:

 - a new driver for Rohm BU21029 touch controller

 - new bitmap APIs: bitmap_alloc, bitmap_zalloc and bitmap_free

 - updates to Atmel, eeti. pxrc and iforce drivers

 - assorted driver cleanups and fixes.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (57 commits)
  MAINTAINERS: Add PhoenixRC Flight Controller Adapter
  Input: do not use WARN() in input_alloc_absinfo()
  Input: mark expected switch fall-throughs
  Input: raydium_i2c_ts - use true and false for boolean values
  Input: evdev - switch to bitmap API
  Input: gpio-keys - switch to bitmap_zalloc()
  Input: elan_i2c_smbus - cast sizeof to int for comparison
  bitmap: Add bitmap_alloc(), bitmap_zalloc() and bitmap_free()
  md: Avoid namespace collision with bitmap API
  dm: Avoid namespace collision with bitmap API
  Input: pm8941-pwrkey - add resin entry
  Input: pm8941-pwrkey - abstract register offsets and event code
  Input: iforce - reorganize joystick configuration lists
  Input: atmel_mxt_ts - move completion to after config crc is updated
  Input: atmel_mxt_ts - don't report zero pressure from T9
  Input: atmel_mxt_ts - zero terminate config firmware file
  Input: atmel_mxt_ts - refactor config update code to add context struct
  Input: atmel_mxt_ts - config CRC may start at T71
  Input: atmel_mxt_ts - remove unnecessary debug on ENOMEM
  Input: atmel_mxt_ts - remove duplicate setup of ABS_MT_PRESSURE
  ...

14 files changed:
1  2 
MAINTAINERS
drivers/input/joystick/joydump.c
drivers/input/touchscreen/Kconfig
drivers/input/touchscreen/Makefile
drivers/md/dm-raid.c
drivers/md/md-bitmap.c
drivers/md/md-cluster.c
drivers/md/md.c
drivers/md/raid1.c
drivers/md/raid10.c
drivers/md/raid5-cache.c
drivers/md/raid5.c
include/xen/interface/io/kbdif.h
lib/bitmap.c

diff --combined MAINTAINERS
@@@ -199,13 -199,12 +199,13 @@@ F:      drivers/net/ethernet/8390
  
  9P FILE SYSTEM
  M:    Eric Van Hensbergen <ericvh@gmail.com>
 -M:    Ron Minnich <rminnich@sandia.gov>
  M:    Latchesar Ionkov <lucho@ionkov.net>
 +M:    Dominique Martinet <asmadeus@codewreck.org>
  L:    v9fs-developer@lists.sourceforge.net
  W:    http://swik.net/v9fs
  Q:    http://patchwork.kernel.org/project/v9fs-devel/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ericvh/v9fs.git
 +T:    git git://github.com/martinetd/linux.git
  S:    Maintained
  F:    Documentation/filesystems/9p.txt
  F:    fs/9p/
@@@ -368,12 -367,6 +368,12 @@@ L:       linux-acpi@vger.kernel.or
  S:    Maintained
  F:    drivers/acpi/arm64
  
 +ACPI I2C MULTI INSTANTIATE DRIVER
 +M:    Hans de Goede <hdegoede@redhat.com>
 +L:    platform-driver-x86@vger.kernel.org
 +S:    Maintained
 +F:    drivers/platform/x86/i2c-multi-instantiate.c
 +
  ACPI PMIC DRIVERS
  M:    "Rafael J. Wysocki" <rjw@rjwysocki.net>
  M:    Len Brown <lenb@kernel.org>
@@@ -588,7 -581,7 +588,7 @@@ W: https://www.infradead.org/~dhowells/
  
  AGPGART DRIVER
  M:    David Airlie <airlied@linux.ie>
 -T:    git git://people.freedesktop.org/~airlied/linux (part of drm maint)
 +T:    git git://anongit.freedesktop.org/drm/drm
  S:    Maintained
  F:    drivers/char/agp/
  F:    include/linux/agp*
@@@ -735,14 -728,6 +735,14 @@@ S:       Supporte
  F:    drivers/crypto/ccp/
  F:    include/linux/ccp.h
  
 +AMD DISPLAY CORE
 +M:    Harry Wentland <harry.wentland@amd.com>
 +M:    Leo Li <sunpeng.li@amd.com>
 +L:    amd-gfx@lists.freedesktop.org
 +T:    git git://people.freedesktop.org/~agd5f/linux
 +S:    Supported
 +F:    drivers/gpu/drm/amd/display/
 +
  AMD FAM15H PROCESSOR POWER MONITORING DRIVER
  M:    Huang Rui <ray.huang@amd.com>
  L:    linux-hwmon@vger.kernel.org
@@@ -782,24 -767,14 +782,24 @@@ F:      drivers/gpu/drm/amd/amdgpu/amdgpu_am
  F:    drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.h
  F:    drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c
  F:    drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v8.c
 +F:    drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v9.c
  F:    drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_fence.c
  F:    drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
  F:    drivers/gpu/drm/amd/amdkfd/
  F:    drivers/gpu/drm/amd/include/cik_structs.h
  F:    drivers/gpu/drm/amd/include/kgd_kfd_interface.h
  F:    drivers/gpu/drm/amd/include/vi_structs.h
 +F:    drivers/gpu/drm/amd/include/v9_structs.h
  F:    include/uapi/linux/kfd_ioctl.h
  
 +AMD POWERPLAY
 +M:    Rex Zhu <rex.zhu@amd.com>
 +M:    Evan Quan <evan.quan@amd.com>
 +L:    amd-gfx@lists.freedesktop.org
 +S:    Supported
 +F:    drivers/gpu/drm/amd/powerplay/
 +T:    git git://people.freedesktop.org/~agd5f/linux
 +
  AMD SEATTLE DEVICE TREE SUPPORT
  M:    Brijesh Singh <brijeshkumar.singh@amd.com>
  M:    Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
@@@ -814,21 -789,10 +814,21 @@@ S:      Supporte
  F:    drivers/net/ethernet/amd/xgbe/
  F:    arch/arm64/boot/dts/amd/amd-seattle-xgbe*.dtsi
  
 -AMS (Apple Motion Sensor) DRIVER
 -M:    Michael Hanselmann <linux-kernel@hansmi.ch>
 +ANALOG DEVICES INC AD5686 DRIVER
 +M:    Stefan Popa <stefan.popa@analog.com>
 +L:    linux-pm@vger.kernel.org
 +W:    http://ez.analog.com/community/linux-device-drivers
 +S:    Supported
 +F:    drivers/iio/dac/ad5686*
 +F:    drivers/iio/dac/ad5696*
 +
 +ANALOG DEVICES INC AD5758 DRIVER
 +M:    Stefan Popa <stefan.popa@analog.com>
 +L:    linux-iio@vger.kernel.org
 +W:    http://ez.analog.com/community/linux-device-drivers
  S:    Supported
 -F:    drivers/macintosh/ams/
 +F:    drivers/iio/dac/ad5758.c
 +F:    Documentation/devicetree/bindings/iio/dac/ad5758.txt
  
  ANALOG DEVICES INC AD9389B DRIVER
  M:    Hans Verkuil <hans.verkuil@cisco.com>
@@@ -836,12 -800,6 +836,12 @@@ L:       linux-media@vger.kernel.or
  S:    Maintained
  F:    drivers/media/i2c/ad9389b*
  
 +ANALOG DEVICES INC ADGS1408 DRIVER
 +M:    Mircea Caprioru <mircea.caprioru@analog.com>
 +S:    Supported
 +F:    drivers/mux/adgs1408.c
 +F:    Documentation/devicetree/bindings/mux/adgs1408.txt
 +
  ANALOG DEVICES INC ADV7180 DRIVER
  M:    Lars-Peter Clausen <lars@metafoo.de>
  L:    linux-media@vger.kernel.org
@@@ -1175,12 -1133,10 +1175,12 @@@ F:   arch/arm/mach-actions
  F:    arch/arm/boot/dts/owl-*
  F:    arch/arm64/boot/dts/actions/
  F:    drivers/clocksource/owl-*
 +F:    drivers/pinctrl/actions/*
  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/pinctrl/actions,s900-pinctrl.txt
  F:    Documentation/devicetree/bindings/power/actions,owl-sps.txt
  F:    Documentation/devicetree/bindings/timer/actions,owl-timer.txt
  
@@@ -1451,7 -1407,6 +1451,7 @@@ M:      Shawn Guo <shawnguo@kernel.org
  M:    Sascha Hauer <s.hauer@pengutronix.de>
  R:    Pengutronix Kernel Team <kernel@pengutronix.de>
  R:    Fabio Estevam <fabio.estevam@nxp.com>
 +R:    NXP Linux Team <linux-imx@nxp.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux.git
@@@ -1679,8 -1634,7 +1679,8 @@@ M:      Chunfeng Yun <chunfeng.yun@mediatek.
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    linux-mediatek@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
 -F:    drivers/phy/mediatek/phy-mtk-tphy.c
 +F:    drivers/phy/mediatek/
 +F:    Documentation/devicetree/bindings/phy/phy-mtk-*
  
  ARM/MICREL KS8695 ARCHITECTURE
  M:    Greg Ungerer <gerg@uclinux.org>
@@@ -1765,8 -1719,7 +1765,8 @@@ F:      arch/arm/mach-npcm
  F:    arch/arm/boot/dts/nuvoton-npcm*
  F:    include/dt-bindings/clock/nuvoton,npcm7xx-clks.h
  F:    drivers/*/*npcm*
 -F:    Documentation/*/*npcm*
 +F:    Documentation/devicetree/bindings/*/*npcm*
 +F:    Documentation/devicetree/bindings/*/*/*npcm*
  
  ARM/NUVOTON W90X900 ARM ARCHITECTURE
  M:    Wan ZongShun <mcuos.com@gmail.com>
@@@ -1864,7 -1817,7 +1864,7 @@@ F:      drivers/spi/spi-qup.
  F:    drivers/tty/serial/msm_serial.c
  F:    drivers/*/pm8???-*
  F:    drivers/mfd/ssbi.c
 -F:    drivers/firmware/qcom_scm.c
 +F:    drivers/firmware/qcom_scm*
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux.git
  
  ARM/RADISYS ENP2611 MACHINE SUPPORT
@@@ -2297,7 -2250,6 +2297,7 @@@ L:      linux-arm-kernel@lists.infradead.or
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
  S:    Maintained
  F:    arch/arm64/
 +X:    arch/arm64/boot/dts/
  F:    Documentation/arm64/
  
  AS3645A LED FLASH CONTROLLER DRIVER
@@@ -2306,14 -2258,6 +2306,14 @@@ L:    linux-leds@vger.kernel.or
  S:    Maintained
  F:    drivers/leds/leds-as3645a.c
  
 +ASAHI KASEI AK7375 LENS VOICE COIL DRIVER
 +M:    Tianshu Qiu <tian.shu.qiu@intel.com>
 +L:    linux-media@vger.kernel.org
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    drivers/media/i2c/ak7375.c
 +F:    Documentation/devicetree/bindings/media/i2c/ak7375.txt
 +
  ASAHI KASEI AK8974 DRIVER
  M:    Linus Walleij <linus.walleij@linaro.org>
  L:    linux-iio@vger.kernel.org
@@@ -2387,14 -2331,6 +2387,14 @@@ S:    Maintaine
  F:    drivers/gpio/gpio-ath79.c
  F:    Documentation/devicetree/bindings/gpio/gpio-ath79.txt
  
 +ATHEROS 71XX/9XXX USB PHY DRIVER
 +M:    Alban Bedel <albeu@free.fr>
 +W:    https://github.com/AlbanBedel/linux
 +T:    git git://github.com/AlbanBedel/linux
 +S:    Maintained
 +F:    drivers/phy/qualcomm/phy-ath79-usb.c
 +F:    Documentation/devicetree/bindings/phy/phy-ath79-usb.txt
 +
  ATHEROS ATH GENERIC UTILITIES
  M:    Kalle Valo <kvalo@codeaurora.org>
  L:    linux-wireless@vger.kernel.org
@@@ -2565,7 -2501,7 +2565,7 @@@ S:      Supporte
  F:    drivers/scsi/esas2r
  
  ATUSB IEEE 802.15.4 RADIO DRIVER
 -M:    Stefan Schmidt <stefan@osg.samsung.com>
 +M:    Stefan Schmidt <stefan@datenfreihafen.org>
  L:    linux-wpan@vger.kernel.org
  S:    Maintained
  F:    drivers/net/ieee802154/atusb.c
@@@ -2585,17 -2521,12 +2585,17 @@@ F:   kernel/audit
  
  AUXILIARY DISPLAY DRIVERS
  M:    Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
 -W:    http://miguelojeda.es/auxdisplay.htm
 -W:    http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm
  S:    Maintained
  F:    drivers/auxdisplay/
  F:    include/linux/cfag12864b.h
  
 +AVIA HX711 ANALOG DIGITAL CONVERTER IIO DRIVER
 +M:    Andreas Klinger <ak@it-klinger.de>
 +L:    linux-iio@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/iio/adc/avia-hx711.txt
 +F:    drivers/iio/adc/hx711.c
 +
  AX.25 NETWORK LAYER
  M:    Ralf Baechle <ralf@linux-mips.org>
  L:    linux-hams@vger.kernel.org
@@@ -2657,7 -2588,6 +2657,7 @@@ BACKLIGHT CLASS/SUBSYSTE
  M:    Lee Jones <lee.jones@linaro.org>
  M:    Daniel Thompson <daniel.thompson@linaro.org>
  M:    Jingoo Han <jingoohan1@gmail.com>
 +L:    dri-devel@lists.freedesktop.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lee/backlight.git
  S:    Maintained
  F:    drivers/video/backlight/
@@@ -2792,13 -2722,13 +2792,13 @@@ L:   netdev@vger.kernel.or
  L:    linux-kernel@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git
 +Q:    https://patchwork.ozlabs.org/project/netdev/list/?delegate=77147
  S:    Supported
  F:    arch/x86/net/bpf_jit*
  F:    Documentation/networking/filter.txt
  F:    Documentation/bpf/
  F:    include/linux/bpf*
  F:    include/linux/filter.h
 -F:    include/trace/events/bpf.h
  F:    include/trace/events/xdp.h
  F:    include/uapi/linux/bpf*
  F:    include/uapi/linux/filter.h
@@@ -2811,7 -2741,6 +2811,7 @@@ F:      net/sched/act_bpf.
  F:    net/sched/cls_bpf.c
  F:    samples/bpf/
  F:    tools/bpf/
 +F:    tools/lib/bpf/
  F:    tools/testing/selftests/bpf/
  
  BROADCOM B44 10/100 ETHERNET DRIVER
@@@ -3020,13 -2949,9 +3020,13 @@@ N:    bcm585
  N:    bcm586*
  N:    bcm88312
  N:    hr2
 -F:    arch/arm64/boot/dts/broadcom/ns2*
 +N:    stingray
 +F:    arch/arm64/boot/dts/broadcom/northstar2/*
 +F:    arch/arm64/boot/dts/broadcom/stingray/*
  F:    drivers/clk/bcm/clk-ns*
 +F:    drivers/clk/bcm/clk-sr*
  F:    drivers/pinctrl/bcm/pinctrl-ns*
 +F:    include/dt-bindings/clock/bcm-sr*
  
  BROADCOM KONA GPIO DRIVER
  M:    Ray Jui <rjui@broadcom.com>
@@@ -3133,7 -3058,7 +3133,7 @@@ M:      Clemens Ladisch <clemens@ladisch.de
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
  T:    git git://git.alsa-project.org/alsa-kernel.git
  S:    Maintained
 -F:    Documentation/sound/alsa/Bt87x.txt
 +F:    Documentation/sound/cards/bt87x.rst
  F:    sound/pci/bt87x.c
  
  BT8XXGPIO DRIVER
@@@ -3211,13 -3136,6 +3211,13 @@@ S:    Supporte
  F:    Documentation/filesystems/caching/cachefiles.txt
  F:    fs/cachefiles/
  
 +CADENCE MIPI-CSI2 BRIDGES
 +M:    Maxime Ripard <maxime.ripard@bootlin.com>
 +L:    linux-media@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/media/cdns,*.txt
 +F:    drivers/media/platform/cadence/cdns-csi2*
 +
  CADET FM/AM RADIO RECEIVER DRIVER
  M:    Hans Verkuil <hverkuil@xs4all.nl>
  L:    linux-media@vger.kernel.org
@@@ -3429,7 -3347,7 +3429,7 @@@ M:      David Howells <dhowells@redhat.com
  M:    David Woodhouse <dwmw2@infradead.org>
  L:    keyrings@vger.kernel.org
  S:    Maintained
 -F:    Documentation/module-signing.txt
 +F:    Documentation/admin-guide/module-signing.rst
  F:    certs/
  F:    scripts/sign-file.c
  F:    scripts/extract-cert.c
@@@ -3446,12 -3364,16 +3446,12 @@@ F:   include/linux/usb/wusb
  
  CFAG12864B LCD DRIVER
  M:    Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
 -W:    http://miguelojeda.es/auxdisplay.htm
 -W:    http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm
  S:    Maintained
  F:    drivers/auxdisplay/cfag12864b.c
  F:    include/linux/cfag12864b.h
  
  CFAG12864BFB LCD FRAMEBUFFER DRIVER
  M:    Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
 -W:    http://miguelojeda.es/auxdisplay.htm
 -W:    http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm
  S:    Maintained
  F:    drivers/auxdisplay/cfag12864bfb.c
  F:    include/linux/cfag12864b.h
@@@ -3559,14 -3481,10 +3559,14 @@@ F:   drivers/net/ethernet/cisco/enic
  
  CISCO VIC LOW LATENCY NIC DRIVER
  M:    Christian Benvenuti <benve@cisco.com>
 -M:    Dave Goodell <dgoodell@cisco.com>
  S:    Supported
  F:    drivers/infiniband/hw/usnic/
  
 +CLANG-FORMAT FILE
 +M:    Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
 +S:    Maintained
 +F:    .clang-format
 +
  CLEANCACHE API
  M:    Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  L:    linux-kernel@vger.kernel.org
@@@ -3647,7 -3565,6 +3647,7 @@@ F:      drivers/clk
  X:    drivers/clk/clkdev.c
  F:    include/linux/clk-pr*
  F:    include/linux/clk/
 +F:    include/linux/of_clk.h
  
  COMMON INTERNET FILE SYSTEM (CIFS)
  M:    Steve French <sfrench@samba.org>
@@@ -4417,11 -4334,14 +4417,11 @@@ L:   iommu@lists.linux-foundation.or
  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-direct.c
 -F:    lib/dma-virt.c
 -F:    drivers/base/dma-mapping.c
 -F:    drivers/base/dma-coherent.c
 +F:    kernel/dma/
  F:    include/asm-generic/dma-mapping.h
  F:    include/linux/dma-direct.h
  F:    include/linux/dma-mapping.h
 +F:    include/linux/dma-noncoherent.h
  
  DME1737 HARDWARE MONITOR DRIVER
  M:    Juerg Haefliger <juergh@gmail.com>
@@@ -4453,12 -4373,6 +4453,12 @@@ X:    Documentation/sp
  X:    Documentation/media
  T:    git git://git.lwn.net/linux.git docs-next
  
 +DOCUMENTATION/ITALIAN
 +M:    Federico Vaga <federico.vaga@vaga.pv.it>
 +L:    linux-doc@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/translations/it_IT
 +
  DONGWOON DW9714 LENS VOICE COIL DRIVER
  M:    Sakari Ailus <sakari.ailus@linux.intel.com>
  L:    linux-media@vger.kernel.org
@@@ -4466,13 -4380,6 +4466,13 @@@ T:    git git://linuxtv.org/media_tree.gi
  S:    Maintained
  F:    drivers/media/i2c/dw9714.c
  
 +DONGWOON DW9807 LENS VOICE COIL DRIVER
 +M:    Sakari Ailus <sakari.ailus@linux.intel.com>
 +L:    linux-media@vger.kernel.org
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    drivers/media/i2c/dw9807.c
 +
  DOUBLETALK DRIVER
  M:    "James R. Van Zandt" <jrv@vanzandt.mv.com>
  L:    blinux-list@redhat.com
@@@ -4493,18 -4400,11 +4493,18 @@@ S:   Maintaine
  F:    drivers/staging/fsl-dpaa2/ethernet
  
  DPAA2 ETHERNET SWITCH DRIVER
 -M:    Razvan Stefanescu <razvan.stefanescu@nxp.com>
 +M:    Ioana Radulescu <ruxandra.radulescu@nxp.com>
 +M:    Ioana Ciornei <ioana.ciornei@nxp.com>
  L:    linux-kernel@vger.kernel.org
  S:    Maintained
  F:    drivers/staging/fsl-dpaa2/ethsw
  
 +DPAA2 PTP CLOCK DRIVER
 +M:    Yangbo Lu <yangbo.lu@nxp.com>
 +L:    linux-kernel@vger.kernel.org
 +S:    Maintained
 +F:    drivers/staging/fsl-dpaa2/rtc
 +
  DPT_I2O SCSI RAID DRIVER
  M:    Adaptec OEM Raid Solutions <aacraid@microsemi.com>
  L:    linux-scsi@vger.kernel.org
@@@ -4527,7 -4427,6 +4527,7 @@@ F:      Documentation/blockdev/drbd
  
  DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
 +R:    "Rafael J. Wysocki" <rafael@kernel.org>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
  S:    Supported
  F:    Documentation/kobject.txt
@@@ -4581,7 -4480,7 +4581,7 @@@ DRM DRIVER FOR ILITEK ILI9225 PANEL
  M:    David Lechner <david@lechnology.com>
  S:    Maintained
  F:    drivers/gpu/drm/tinydrm/ili9225.c
 -F:    Documentation/devicetree/bindings/display/ili9225.txt
 +F:    Documentation/devicetree/bindings/display/ilitek,ili9225.txt
  
  DRM DRIVER FOR INTEL I810 VIDEO CARDS
  S:    Orphan / Obsolete
@@@ -4667,13 -4566,13 +4667,13 @@@ DRM DRIVER FOR SITRONIX ST7586 PANEL
  M:    David Lechner <david@lechnology.com>
  S:    Maintained
  F:    drivers/gpu/drm/tinydrm/st7586.c
 -F:    Documentation/devicetree/bindings/display/st7586.txt
 +F:    Documentation/devicetree/bindings/display/sitronix,st7586.txt
  
  DRM DRIVER FOR SITRONIX ST7735R PANELS
  M:    David Lechner <david@lechnology.com>
  S:    Maintained
  F:    drivers/gpu/drm/tinydrm/st7735r.c
 -F:    Documentation/devicetree/bindings/display/st7735r.txt
 +F:    Documentation/devicetree/bindings/display/sitronix,st7735r.txt
  
  DRM DRIVER FOR TDFX VIDEO CARDS
  S:    Orphan / Obsolete
@@@ -4698,7 -4597,7 +4698,7 @@@ F:      include/uapi/drm/vmwgfx_drm.
  DRM DRIVERS
  M:    David Airlie <airlied@linux.ie>
  L:    dri-devel@lists.freedesktop.org
 -T:    git git://people.freedesktop.org/~airlied/linux
 +T:    git git://anongit.freedesktop.org/drm/drm
  B:    https://bugs.freedesktop.org/
  C:    irc://chat.freenode.net/dri-devel
  S:    Maintained
@@@ -4706,6 -4605,7 +4706,6 @@@ F:      drivers/gpu/drm
  F:    drivers/gpu/vga/
  F:    Documentation/devicetree/bindings/display/
  F:    Documentation/devicetree/bindings/gpu/
 -F:    Documentation/devicetree/bindings/video/
  F:    Documentation/gpu/
  F:    include/drm/
  F:    include/uapi/drm/
@@@ -4750,7 -4650,7 +4750,7 @@@ M:      Boris Brezillon <boris.brezillon@boo
  L:    dri-devel@lists.freedesktop.org
  S:    Supported
  F:    drivers/gpu/drm/atmel-hlcdc/
 -F:    Documentation/devicetree/bindings/drm/atmel/
 +F:    Documentation/devicetree/bindings/display/atmel/
  T:    git git://anongit.freedesktop.org/drm/drm-misc
  
  DRM DRIVERS FOR BRIDGE CHIPS
@@@ -4775,13 -4675,13 +4775,13 @@@ F:   Documentation/devicetree/bindings/di
  
  DRM DRIVERS FOR FREESCALE DCU
  M:    Stefan Agner <stefan@agner.ch>
 -M:    Alison Wang <alison.wang@freescale.com>
 +M:    Alison Wang <alison.wang@nxp.com>
  L:    dri-devel@lists.freedesktop.org
  S:    Supported
  F:    drivers/gpu/drm/fsl-dcu/
  F:    Documentation/devicetree/bindings/display/fsl,dcu.txt
  F:    Documentation/devicetree/bindings/display/fsl,tcon.txt
 -F:    Documentation/devicetree/bindings/display/panel/nec,nl4827hc19_05b.txt
 +F:    Documentation/devicetree/bindings/display/panel/nec,nl4827hc19-05b.txt
  
  DRM DRIVERS FOR FREESCALE IMX
  M:    Philipp Zabel <p.zabel@pengutronix.de>
@@@ -4886,14 -4786,6 +4886,14 @@@ S:    Maintaine
  F:    drivers/gpu/drm/omapdrm/
  F:    Documentation/devicetree/bindings/display/ti/
  
 +DRM DRIVERS FOR V3D
 +M:    Eric Anholt <eric@anholt.net>
 +S:    Supported
 +F:    drivers/gpu/drm/v3d/
 +F:    include/uapi/drm/v3d_drm.h
 +F:    Documentation/devicetree/bindings/gpu/brcm,bcm-v3d.txt
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
 +
  DRM DRIVERS FOR VC4
  M:    Eric Anholt <eric@anholt.net>
  T:    git git://github.com/anholt/linux
@@@ -4940,19 -4832,9 +4940,19 @@@ S:    Maintaine
  F:    drivers/gpu/drm/tinydrm/
  F:    include/drm/tinydrm/
  
 +DRM DRIVERS FOR XEN
 +M:    Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
 +T:    git git://anongit.freedesktop.org/drm/drm-misc
 +L:    dri-devel@lists.freedesktop.org
 +L:    xen-devel@lists.xen.org
 +S:    Supported
 +F:    drivers/gpu/drm/xen/
 +F:    Documentation/gpu/xen-front.rst
 +
  DRM TTM SUBSYSTEM
  M:    Christian Koenig <christian.koenig@amd.com>
 -M:    Roger He <Hongbo.He@amd.com>
 +M:    Huang Rui <ray.huang@amd.com>
 +M:    Junwei Zhang <Jerry.Zhang@amd.com>
  T:    git git://people.freedesktop.org/~agd5f/linux
  S:    Maintained
  L:    dri-devel@lists.freedesktop.org
@@@ -5124,18 -5006,6 +5124,18 @@@ T:    git git://linuxtv.org/anttip/media_t
  S:    Maintained
  F:    drivers/media/tuners/e4000*
  
 +EARTH_PT1 MEDIA DRIVER
 +M:    Akihiro Tsukada <tskd08@gmail.com>
 +L:    linux-media@vger.kernel.org
 +S:    Odd Fixes
 +F:    drivers/media/pci/pt1/
 +
 +EARTH_PT3 MEDIA DRIVER
 +M:    Akihiro Tsukada <tskd08@gmail.com>
 +L:    linux-media@vger.kernel.org
 +S:    Odd Fixes
 +F:    drivers/media/pci/pt3/
 +
  EC100 MEDIA DRIVER
  M:    Antti Palosaari <crope@iki.fi>
  L:    linux-media@vger.kernel.org
@@@ -5453,6 -5323,7 +5453,6 @@@ F:      include/linux/*mdio*.
  F:    include/linux/of_net.h
  F:    include/linux/phy.h
  F:    include/linux/phy_fixed.h
 -F:    include/linux/platform_data/mdio-gpio.h
  F:    include/linux/platform_data/mdio-bcm-unimac.h
  F:    include/trace/events/mdio.h
  F:    include/uapi/linux/mdio.h
@@@ -5524,7 -5395,6 +5524,7 @@@ F:      drivers/iommu/exynos-iommu.
  
  EZchip NPS platform support
  M:    Vineet Gupta <vgupta@synopsys.com>
 +M:    Ofer Levi <oferle@mellanox.com>
  S:    Supported
  F:    arch/arc/plat-eznps
  F:    arch/arc/boot/dts/eznps.dts
@@@ -5549,19 -5419,6 +5549,19 @@@ S:    Maintaine
  F:    Documentation/hwmon/f71805f
  F:    drivers/hwmon/f71805f.c
  
 +FADDR2LINE
 +M:    Josh Poimboeuf <jpoimboe@redhat.com>
 +S:    Maintained
 +F:    scripts/faddr2line
 +
 +FAILOVER MODULE
 +M:    Sridhar Samudrala <sridhar.samudrala@intel.com>
 +L:    netdev@vger.kernel.org
 +S:    Supported
 +F:    net/core/failover.c
 +F:    include/net/failover.h
 +F:    Documentation/networking/failover.rst
 +
  FANOTIFY
  M:    Jan Kara <jack@suse.cz>
  R:    Amir Goldstein <amir73il@gmail.com>
@@@ -5714,20 -5571,11 +5714,20 @@@ S:   Maintaine
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/atull/linux-fpga.git
  Q:    http://patchwork.kernel.org/project/linux-fpga/list/
  F:    Documentation/fpga/
 +F:    Documentation/driver-api/fpga/
  F:    Documentation/devicetree/bindings/fpga/
  F:    drivers/fpga/
  F:    include/linux/fpga/
  W:    http://www.rocketboards.org
  
 +FPGA DFL DRIVERS
 +M:    Wu Hao <hao.wu@intel.com>
 +L:    linux-fpga@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/fpga/dfl.txt
 +F:    include/uapi/linux/fpga-dfl.h
 +F:    drivers/fpga/dfl*
 +
  FPU EMULATOR
  M:    Bill Metzenthen <billm@melbpc.org.au>
  W:    http://floatingpoint.sourceforge.net/emulator/index.html
@@@ -5763,7 -5611,7 +5763,7 @@@ F:      drivers/crypto/caam
  F:    Documentation/devicetree/bindings/crypto/fsl-sec4.txt
  
  FREESCALE DIU FRAMEBUFFER DRIVER
 -M:    Timur Tabi <timur@tabi.org>
 +M:    Timur Tabi <timur@kernel.org>
  L:    linux-fbdev@vger.kernel.org
  S:    Maintained
  F:    drivers/video/fbdev/fsl-diu-fb.*
@@@ -5780,6 -5628,7 +5780,6 @@@ M:      Claudiu Manoil <claudiu.manoil@nxp.c
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/ethernet/freescale/gianfar*
 -X:    drivers/net/ethernet/freescale/gianfar_ptp.c
  F:    Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
  
  FREESCALE GPMI NAND DRIVER
@@@ -5824,15 -5673,7 +5824,15 @@@ M:    Madalin Bucur <madalin.bucur@nxp.com
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/ethernet/freescale/fman
 -F:    Documentation/devicetree/bindings/powerpc/fsl/fman.txt
 +F:    Documentation/devicetree/bindings/net/fsl-fman.txt
 +
 +FREESCALE QORIQ PTP CLOCK DRIVER
 +M:    Yangbo Lu <yangbo.lu@nxp.com>
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    drivers/ptp/ptp_qoriq.c
 +F:    include/linux/fsl/ptp_qoriq.h
 +F:    Documentation/devicetree/bindings/ptp/ptp-qoriq.txt
  
  FREESCALE QUAD SPI DRIVER
  M:    Han Xu <han.xu@nxp.com>
@@@ -5863,7 -5704,7 +5863,7 @@@ S:      Maintaine
  F:    drivers/net/wan/fsl_ucc_hdlc*
  
  FREESCALE QUICC ENGINE UCC UART DRIVER
 -M:    Timur Tabi <timur@tabi.org>
 +M:    Timur Tabi <timur@kernel.org>
  L:    linuxppc-dev@lists.ozlabs.org
  S:    Maintained
  F:    drivers/tty/serial/ucc_uart.c
@@@ -5879,6 -5720,7 +5879,6 @@@ F:      include/linux/fsl
  
  FREESCALE SOC FS_ENET DRIVER
  M:    Pantelis Antoniou <pantelis.antoniou@gmail.com>
 -M:    Vitaly Bordug <vbordug@ru.mvista.com>
  L:    linuxppc-dev@lists.ozlabs.org
  L:    netdev@vger.kernel.org
  S:    Maintained
@@@ -5886,7 -5728,7 +5886,7 @@@ F:      drivers/net/ethernet/freescale/fs_en
  F:    include/linux/fs_enet_pd.h
  
  FREESCALE SOC SOUND DRIVERS
 -M:    Timur Tabi <timur@tabi.org>
 +M:    Timur Tabi <timur@kernel.org>
  M:    Nicolin Chen <nicoleotsuka@gmail.com>
  M:    Xiubo Li <Xiubo.Lee@gmail.com>
  R:    Fabio Estevam <fabio.estevam@nxp.com>
@@@ -6010,13 -5852,6 +6010,13 @@@ F:    scripts/gcc-plugin.s
  F:    scripts/Makefile.gcc-plugins
  F:    Documentation/gcc-plugins.txt
  
 +GASKET DRIVER FRAMEWORK
 +M:    Rob Springer <rspringer@google.com>
 +M:    John Joseph <jnjoseph@google.com>
 +M:    Ben Chan <benchan@chromium.org>
 +S:    Maintained
 +F:    drivers/staging/gasket/
 +
  GCOV BASED KERNEL PROFILING
  M:    Peter Oberparleiter <oberpar@linux.ibm.com>
  S:    Maintained
@@@ -6025,7 -5860,7 +6025,7 @@@ F:      Documentation/dev-tools/gcov.rs
  
  GDB KERNEL DEBUGGING HELPER SCRIPTS
  M:    Jan Kiszka <jan.kiszka@siemens.com>
 -M:    Kieran Bingham <kieran@bingham.xyz>
 +M:    Kieran Bingham <kbingham@kernel.org>
  S:    Supported
  F:    scripts/gdb/
  
@@@ -6048,14 -5883,14 +6048,14 @@@ GENERIC GPIO I2C DRIVE
  M:    Haavard Skinnemoen <hskinnemoen@gmail.com>
  S:    Supported
  F:    drivers/i2c/busses/i2c-gpio.c
 -F:    include/linux/i2c-gpio.h
 +F:    include/linux/platform_data/i2c-gpio.h
  
  GENERIC GPIO I2C MULTIPLEXER DRIVER
  M:    Peter Korsgaard <peter.korsgaard@barco.com>
  L:    linux-i2c@vger.kernel.org
  S:    Supported
  F:    drivers/i2c/muxes/i2c-mux-gpio.c
 -F:    include/linux/i2c-mux-gpio.h
 +F:    include/linux/platform_data/i2c-mux-gpio.h
  F:    Documentation/i2c/muxes/i2c-mux-gpio
  
  GENERIC HDLC (WAN) DRIVERS
@@@ -6101,12 -5936,6 +6101,12 @@@ F:    drivers/base/power/domain*.
  F:    include/linux/pm_domain.h
  F:    Documentation/devicetree/bindings/power/power_domain.txt
  
 +GENERIC RESISTIVE TOUCHSCREEN ADC DRIVER
 +M:    Eugen Hristev <eugen.hristev@microchip.com>
 +L:    linux-input@vger.kernel.org
 +S:    Maintained
 +F:    drivers/input/touchscreen/resistive-adc-touch.c
 +
  GENERIC UIO DRIVER FOR PCI DEVICES
  M:    "Michael S. Tsirkin" <mst@redhat.com>
  L:    kvm@vger.kernel.org
@@@ -6125,8 -5954,8 +6125,8 @@@ S:      Maintaine
  F:    scripts/get_maintainer.pl
  
  GFS2 FILE SYSTEM
 -M:    Steven Whitehouse <swhiteho@redhat.com>
  M:    Bob Peterson <rpeterso@redhat.com>
 +M:    Andreas Gruenbacher <agruenba@redhat.com>
  L:    cluster-devel@redhat.com
  W:    http://sources.redhat.com/cluster/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git
@@@ -6144,14 -5973,6 +6144,14 @@@ F:    Documentation/isdn/README.gigase
  F:    drivers/isdn/gigaset/
  F:    include/uapi/linux/gigaset_dev.h
  
 +GNSS SUBSYSTEM
 +M:    Johan Hovold <johan@kernel.org>
 +S:    Maintained
 +F:    Documentation/ABI/testing/sysfs-class-gnss
 +F:    Documentation/devicetree/bindings/gnss/
 +F:    drivers/gnss/
 +F:    include/linux/gnss.h
 +
  GO7007 MPEG CODEC
  M:    Hans Verkuil <hans.verkuil@cisco.com>
  L:    linux-media@vger.kernel.org
@@@ -6250,7 -6071,7 +6250,7 @@@ F:      drivers/staging/greybus/bootrom.
  F:    drivers/staging/greybus/firmware.h
  F:    drivers/staging/greybus/fw-core.c
  F:    drivers/staging/greybus/fw-download.c
 -F:    drivers/staging/greybus/fw-managament.c
 +F:    drivers/staging/greybus/fw-management.c
  F:    drivers/staging/greybus/greybus_authentication.h
  F:    drivers/staging/greybus/greybus_firmware.h
  F:    drivers/staging/greybus/hid.c
@@@ -6259,10 -6080,12 +6259,10 @@@ F:   drivers/staging/greybus/spi.
  F:    drivers/staging/greybus/spilib.c
  F:    drivers/staging/greybus/spilib.h
  
 -GREYBUS LOOPBACK/TIME PROTOCOLS DRIVERS
 +GREYBUS LOOPBACK DRIVER
  M:    Bryan O'Donoghue <pure.logic@nexus-software.ie>
  S:    Maintained
  F:    drivers/staging/greybus/loopback.c
 -F:    drivers/staging/greybus/timesync.c
 -F:    drivers/staging/greybus/timesync_platform.c
  
  GREYBUS PLATFORM DRIVERS
  M:    Vaibhav Hiremath <hvaibhav.linux@gmail.com>
@@@ -6400,7 -6223,6 +6400,7 @@@ L:      linux-hwmon@vger.kernel.or
  W:    http://hwmon.wiki.kernel.org/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git
  S:    Maintained
 +F:    Documentation/devicetree/bindings/hwmon/
  F:    Documentation/hwmon/
  F:    drivers/hwmon/
  F:    include/linux/hwmon*.h
@@@ -6608,7 -6430,7 +6608,7 @@@ L:      linux-mm@kvack.or
  S:    Maintained
  F:    mm/hmm*
  F:    include/linux/hmm*
 -F:    Documentation/vm/hmm.txt
 +F:    Documentation/vm/hmm.rst
  
  HOST AP DRIVER
  M:    Jouni Malinen <j@w1.fi>
@@@ -6727,7 -6549,7 +6727,7 @@@ F:      arch/x86/hyper
  F:    drivers/hid/hid-hyperv.c
  F:    drivers/hv/
  F:    drivers/input/serio/hyperv-keyboard.c
 -F:    drivers/pci/host/pci-hyperv.c
 +F:    drivers/pci/controller/pci-hyperv.c
  F:    drivers/net/hyperv/
  F:    drivers/scsi/storvsc_drv.c
  F:    drivers/uio/uio_hv_generic.c
@@@ -6935,12 -6757,6 +6935,12 @@@ L:    linux-scsi@vger.kernel.or
  S:    Supported
  F:    drivers/scsi/ibmvscsi/ibmvfc*
  
 +IBM Power Virtual Management Channel Driver
 +M:    Bryant G. Ly <bryantly@linux.vnet.ibm.com>
 +M:    Steven Royer <seroyer@linux.vnet.ibm.com>
 +S:    Supported
 +F:    drivers/misc/ibmvmc.*
 +
  IBM Power Virtual SCSI Device Drivers
  M:    Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
  L:    linux-scsi@vger.kernel.org
@@@ -7016,7 -6832,7 +7016,7 @@@ F:      drivers/clk/clk-versaclock5.
  
  IEEE 802.15.4 SUBSYSTEM
  M:    Alexander Aring <alex.aring@gmail.com>
 -M:    Stefan Schmidt <stefan@osg.samsung.com>
 +M:    Stefan Schmidt <stefan@datenfreihafen.org>
  L:    linux-wpan@vger.kernel.org
  W:    http://wpan.cakelab.org/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/sschmidt/wpan.git
@@@ -7073,7 -6889,7 +7073,7 @@@ IIO MULTIPLEXE
  M:    Peter Rosin <peda@axentia.se>
  L:    linux-iio@vger.kernel.org
  S:    Maintained
 -F:    Documentation/devicetree/bindings/iio/multiplexer/iio-mux.txt
 +F:    Documentation/devicetree/bindings/iio/multiplexer/io-channel-mux.txt
  F:    drivers/iio/multiplexer/iio-mux.c
  
  IIO SUBSYSTEM AND DRIVERS
@@@ -7092,15 -6908,6 +7092,15 @@@ F:    drivers/staging/iio
  F:    include/linux/iio/
  F:    tools/iio/
  
 +IIO UNIT CONVERTER
 +M:    Peter Rosin <peda@axentia.se>
 +L:    linux-iio@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/iio/afe/current-sense-amplifier.txt
 +F:    Documentation/devicetree/bindings/iio/afe/current-sense-shunt.txt
 +F:    Documentation/devicetree/bindings/iio/afe/voltage-divider.txt
 +F:    drivers/iio/afe/iio-rescale.c
 +
  IKANOS/ADI EAGLE ADSL USB DRIVER
  M:    Matthieu Castet <castet.matthieu@free.fr>
  M:    Stanislaw Gruszka <stf_xl@wp.pl>
@@@ -7135,7 -6942,7 +7135,7 @@@ M:      Guenter Roeck <linux@roeck-us.net
  L:    linux-hwmon@vger.kernel.org
  S:    Maintained
  F:    Documentation/hwmon/ina209
 -F:    Documentation/devicetree/bindings/i2c/ina209.txt
 +F:    Documentation/devicetree/bindings/hwmon/ina2xx.txt
  F:    drivers/hwmon/ina209.c
  
  INA2XX HARDWARE MONITOR DRIVER
@@@ -7234,13 -7041,14 +7234,13 @@@ L:   linux-fbdev@vger.kernel.or
  S:    Maintained
  F:    drivers/video/fbdev/i810/
  
 -INTEL ASoC BDW/HSW DRIVERS
 +INTEL ASoC DRIVERS
 +M:    Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>
 +M:    Liam Girdwood <liam.r.girdwood@linux.intel.com>
  M:    Jie Yang <yang.jie@linux.intel.com>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
  S:    Supported
 -F:    sound/soc/intel/common/sst-dsp*
 -F:    sound/soc/intel/common/sst-firmware.c
 -F:    sound/soc/intel/boards/broadwell.c
 -F:    sound/soc/intel/haswell/
 +F:    sound/soc/intel/
  
  INTEL C600 SERIES SAS CONTROLLER DRIVER
  M:    Intel SCU Linux support <intel-linux-scu@intel.com>
@@@ -7275,8 -7083,8 +7275,8 @@@ Q:      http://patchwork.ozlabs.org/project/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-queue.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue.git
  S:    Supported
 -F:    Documentation/networking/e100.txt
 -F:    Documentation/networking/e1000.txt
 +F:    Documentation/networking/e100.rst
 +F:    Documentation/networking/e1000.rst
  F:    Documentation/networking/e1000e.txt
  F:    Documentation/networking/igb.txt
  F:    Documentation/networking/igbvf.txt
@@@ -7353,9 -7161,6 +7353,9 @@@ F:      drivers/dma/iop-adma.
  INTEL IPU3 CSI-2 CIO2 DRIVER
  M:    Yong Zhi <yong.zhi@intel.com>
  M:    Sakari Ailus <sakari.ailus@linux.intel.com>
 +M:    Bingbu Cao <bingbu.cao@intel.com>
 +R:    Tian Shu Qiu <tian.shu.qiu@intel.com>
 +R:    Jian Xu Zheng <jian.xu.zheng@intel.com>
  L:    linux-media@vger.kernel.org
  S:    Maintained
  F:    drivers/media/pci/intel/ipu3/
@@@ -7461,7 -7266,7 +7461,7 @@@ M:      Megha Dey <megha.dey@linux.intel.com
  R:    Tim Chen <tim.c.chen@linux.intel.com>
  L:    linux-crypto@vger.kernel.org
  S:    Supported
 -F:    arch/x86/crypto/sha*-mb
 +F:    arch/x86/crypto/sha*-mb/
  F:    crypto/mcryptd.c
  
  INTEL TELEMETRY DRIVER
@@@ -7512,7 -7317,7 +7512,7 @@@ F:      drivers/platform/x86/intel-wmi-thund
  INTEL(R) TRACE HUB
  M:    Alexander Shishkin <alexander.shishkin@linux.intel.com>
  S:    Supported
 -F:    Documentation/trace/intel_th.txt
 +F:    Documentation/trace/intel_th.rst
  F:    drivers/hwtracing/intel_th/
  
  INTEL(R) TRUSTED EXECUTION TECHNOLOGY (TXT)
@@@ -7536,7 -7341,7 +7536,7 @@@ M:      Linus Walleij <linus.walleij@linaro.
  L:    linux-iio@vger.kernel.org
  S:    Maintained
  F:    drivers/iio/gyro/mpu3050*
 -F:    Documentation/devicetree/bindings/iio/gyroscope/inv,mpu3050.txt
 +F:    Documentation/devicetree/bindings/iio/gyroscope/invensense,mpu3050.txt
  
  IOC3 ETHERNET DRIVER
  M:    Ralf Baechle <ralf@linux-mips.org>
@@@ -7673,8 -7478,9 +7673,8 @@@ S:      Maintaine
  F:    drivers/firmware/iscsi_ibft*
  
  ISCSI EXTENSIONS FOR RDMA (ISER) INITIATOR
 -M:    Or Gerlitz <ogerlitz@mellanox.com>
  M:    Sagi Grimberg <sagi@grimberg.me>
 -M:    Roi Dayan <roid@mellanox.com>
 +M:    Max Gurtovoy <maxg@mellanox.com>
  L:    linux-rdma@vger.kernel.org
  S:    Supported
  W:    http://www.openfabrics.org
@@@ -7838,9 -7644,8 +7838,9 @@@ M:      Masahiro Yamada <yamada.masahiro@soc
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild.git kconfig
  L:    linux-kbuild@vger.kernel.org
  S:    Maintained
 -F:    Documentation/kbuild/kconfig-language.txt
 +F:    Documentation/kbuild/kconfig*
  F:    scripts/kconfig/
 +F:    scripts/Kconfig.include
  
  KDUMP
  M:    Dave Young <dyoung@redhat.com>
@@@ -7859,11 -7664,11 +7859,11 @@@ W:   https://linuxtv.or
  S:    Maintained
  F:    drivers/media/radio/radio-keene*
  
 -KERNEL AUTOMOUNTER v4 (AUTOFS4)
 +KERNEL AUTOMOUNTER
  M:    Ian Kent <raven@themaw.net>
  L:    autofs@vger.kernel.org
  S:    Maintained
 -F:    fs/autofs4/
 +F:    fs/autofs/
  
  KERNEL BUILD + files below scripts/ (unless maintained elsewhere)
  M:    Masahiro Yamada <yamada.masahiro@socionext.com>
@@@ -8095,7 -7900,7 +8095,7 @@@ F:      lib/test_kmod.
  F:    tools/testing/selftests/kmod/
  
  KPROBES
 -M:    Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com>
 +M:    Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
  M:    Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
  M:    "David S. Miller" <davem@davemloft.net>
  M:    Masami Hiramatsu <mhiramat@kernel.org>
@@@ -8107,6 -7912,8 +8107,6 @@@ F:      kernel/kprobes.
  
  KS0108 LCD CONTROLLER DRIVER
  M:    Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
 -W:    http://miguelojeda.es/auxdisplay.htm
 -W:    http://jair.lab.fi.uva.es/~migojed/auxdisplay.htm
  S:    Maintained
  F:    Documentation/auxdisplay/ks0108
  F:    drivers/auxdisplay/ks0108.c
@@@ -8164,13 -7971,6 +8164,13 @@@ S:    Maintaine
  F:    Documentation/misc-devices/eeprom
  F:    drivers/misc/eeprom/eeprom.c
  
 +LEGO MINDSTORMS EV3
 +R:    David Lechner <david@lechnology.com>
 +S:    Maintained
 +F:    arch/arm/boot/dts/da850-lego-ev3.dts
 +F:    Documentation/devicetree/bindings/power/supply/lego_ev3_battery.txt
 +F:    drivers/power/supply/lego_ev3_battery.c
 +
  LEGO USB Tower driver
  M:    Juergen Stuber <starblue@users.sourceforge.net>
  L:    legousb-devel@lists.sourceforge.net
@@@ -8416,7 -8216,7 +8416,7 @@@ F:      drivers/misc/lkdtm/
  
  LINUX KERNEL MEMORY CONSISTENCY MODEL (LKMM)
  M:    Alan Stern <stern@rowland.harvard.edu>
 -M:    Andrea Parri <parri.andrea@gmail.com>
 +M:    Andrea Parri <andrea.parri@amarulasolutions.com>
  M:    Will Deacon <will.deacon@arm.com>
  M:    Peter Zijlstra <peterz@infradead.org>
  M:    Boqun Feng <boqun.feng@gmail.com>
@@@ -8426,18 -8226,17 +8426,18 @@@ M:   Jade Alglave <j.alglave@ucl.ac.uk
  M:    Luc Maranget <luc.maranget@inria.fr>
  M:    "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
  R:    Akira Yokosawa <akiyks@gmail.com>
 +R:    Daniel Lustig <dlustig@nvidia.com>
  L:    linux-kernel@vger.kernel.org
 +L:    linux-arch@vger.kernel.org
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
  F:    tools/memory-model/
 +F:    Documentation/atomic_bitops.txt
 +F:    Documentation/atomic_t.txt
 +F:    Documentation/core-api/atomic_ops.rst
 +F:    Documentation/core-api/refcount-vs-atomic.rst
  F:    Documentation/memory-barriers.txt
  
 -LINUX SECURITY MODULE (LSM) FRAMEWORK
 -M:    Chris Wright <chrisw@sous-sol.org>
 -L:    linux-security-module@vger.kernel.org
 -S:    Supported
 -
  LIS3LV02D ACCELEROMETER DRIVER
  M:    Eric Piel <eric.piel@tremplin-utc.net>
  S:    Maintained
@@@ -8524,7 -8323,6 +8524,7 @@@ F:      Documentation/admin-guide/LSM/LoadPi
  LOCKING PRIMITIVES
  M:    Peter Zijlstra <peterz@infradead.org>
  M:    Ingo Molnar <mingo@redhat.com>
 +M:    Will Deacon <will.deacon@arm.com>
  L:    linux-kernel@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core
  S:    Maintained
@@@ -8559,6 -8357,7 +8559,6 @@@ L:      linux-scsi@vger.kernel.or
  W:    http://www.avagotech.com/support/
  S:    Supported
  F:    drivers/message/fusion/
 -F:    drivers/scsi/mpt2sas/
  F:    drivers/scsi/mpt3sas/
  
  LSILOGIC/SYMBIOS/NCR 53C8XX and 53C1010 PCI-SCSI drivers
@@@ -8680,7 -8479,6 +8680,7 @@@ M:      Vivien Didelot <vivien.didelot@savoi
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/dsa/mv88e6xxx/
 +F:    linux/platform_data/mv88e6xxx.h
  F:    Documentation/devicetree/bindings/net/dsa/marvell.txt
  
  MARVELL ARMADA DRM SUPPORT
@@@ -8740,7 -8538,7 +8740,7 @@@ MARVELL MWIFIEX WIRELESS DRIVE
  M:    Amitkumar Karwar <amitkarwar@gmail.com>
  M:    Nishant Sarmukadam <nishants@marvell.com>
  M:    Ganapathi Bhat <gbhat@marvell.com>
 -M:    Xinming Hu <huxm@marvell.com>
 +M:    Xinming Hu <huxinming820@gmail.com>
  L:    linux-wireless@vger.kernel.org
  S:    Maintained
  F:    drivers/net/wireless/marvell/mwifiex/
@@@ -8811,7 -8609,7 +8811,7 @@@ M:      Guenter Roeck <linux@roeck-us.net
  L:    linux-hwmon@vger.kernel.org
  S:    Maintained
  F:    Documentation/hwmon/max6697
 -F:    Documentation/devicetree/bindings/i2c/max6697.txt
 +F:    Documentation/devicetree/bindings/hwmon/max6697.txt
  F:    drivers/hwmon/max6697.c
  F:    include/linux/platform_data/max6697.h
  
@@@ -9038,7 -8836,6 +9038,7 @@@ L:      linux-media@vger.kernel.or
  L:    linux-renesas-soc@vger.kernel.org
  T:    git git://linuxtv.org/media_tree.git
  S:    Supported
 +F:    Documentation/devicetree/bindings/media/renesas,rcar-csi2.txt
  F:    Documentation/devicetree/bindings/media/rcar_vin.txt
  F:    drivers/media/platform/rcar-vin/
  
@@@ -9067,14 -8864,6 +9067,14 @@@ T:    git git://linuxtv.org/media_tree.gi
  S:    Maintained
  F:    drivers/media/dvb-frontends/stv6111*
  
 +MEDIA DRIVERS FOR STM32 - DCMI
 +M:    Hugues Fruchet <hugues.fruchet@st.com>
 +L:    linux-media@vger.kernel.org
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Supported
 +F:    Documentation/devicetree/bindings/media/st,stm32-dcmi.txt
 +F:    drivers/media/platform/stm32/stm32-dcmi.c
 +
  MEDIA DRIVERS FOR NVIDIA TEGRA - VDE
  M:    Dmitry Osipenko <digetx@gmail.com>
  L:    linux-media@vger.kernel.org
@@@ -9106,14 -8895,6 +9106,14 @@@ F:    include/uapi/linux/meye.
  F:    include/uapi/linux/ivtv*
  F:    include/uapi/linux/uvcvideo.h
  
 +MEDIATEK BLUETOOTH DRIVER
 +M:    Sean Wang <sean.wang@mediatek.com>
 +L:    linux-bluetooth@vger.kernel.org
 +L:    linux-mediatek@lists.infradead.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/net/mediatek-bluetooth.txt
 +F:    drivers/bluetooth/btmtkuart.c
 +
  MEDIATEK CIR DRIVER
  M:    Sean Wang <sean.wang@mediatek.com>
  S:    Maintained
@@@ -9181,13 -8962,6 +9181,13 @@@ L:    linux-wireless@vger.kernel.or
  S:    Maintained
  F:    drivers/net/wireless/mediatek/mt7601u/
  
 +MEDIATEK NAND CONTROLLER DRIVER
 +M:    Xiaolei Li <xiaolei.li@mediatek.com>
 +L:    linux-mtd@lists.infradead.org
 +S:    Maintained
 +F:    drivers/mtd/nand/raw/mtk_*
 +F:    Documentation/devicetree/bindings/mtd/mtk-nand.txt
 +
  MEDIATEK RANDOM NUMBER GENERATOR SUPPORT
  M:    Sean Wang <sean.wang@mediatek.com>
  S:    Maintained
@@@ -9202,12 -8976,12 +9202,12 @@@ S:   Maintaine
  F:    drivers/usb/mtu3/
  
  MEGACHIPS STDPXXXX-GE-B850V3-FW LVDS/DP++ BRIDGES
 -M:    Peter Senna Tschudin <peter.senna@collabora.com>
 +M:    Peter Senna Tschudin <peter.senna@gmail.com>
  M:    Martin Donnelly <martin.donnelly@ge.com>
  M:    Martyn Welch <martyn.welch@collabora.co.uk>
  S:    Maintained
  F:    drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
 -F:    Documentation/devicetree/bindings/video/bridge/megachips-stdpxxxx-ge-b850v3-fw.txt
 +F:    Documentation/devicetree/bindings/display/bridge/megachips-stdpxxxx-ge-b850v3-fw.txt
  
  MEGARAID SCSI/SAS DRIVERS
  M:    Kashyap Desai <kashyap.desai@broadcom.com>
@@@ -9258,14 -9032,12 +9258,14 @@@ 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
 +MELLANOX ETHERNET INNOVA DRIVERS
  R:    Boris Pismenny <borisp@mellanox.com>
  L:    netdev@vger.kernel.org
  S:    Supported
  W:    http://www.mellanox.com
  Q:    http://patchwork.ozlabs.org/project/netdev/list/
 +F:    drivers/net/ethernet/mellanox/mlx5/core/en_accel/*
 +F:    drivers/net/ethernet/mellanox/mlx5/core/accel/*
  F:    drivers/net/ethernet/mellanox/mlx5/core/fpga/*
  F:    include/linux/mlx5/mlx5_ifc_fpga.h
  
@@@ -9286,7 -9058,6 +9286,7 @@@ S:      Supporte
  W:    http://www.mellanox.com
  Q:    http://patchwork.ozlabs.org/project/netdev/list/
  F:    drivers/net/ethernet/mellanox/mlxsw/
 +F:    tools/testing/selftests/drivers/net/mlxsw/
  
  MELLANOX FIRMWARE FLASH LIBRARY (mlxfw)
  M:    mlxsw@mellanox.com
@@@ -9427,12 -9198,6 +9427,12 @@@ F:    drivers/leds/leds-menf21bmc.
  F:    drivers/hwmon/menf21bmc_hwmon.c
  F:    Documentation/hwmon/menf21bmc
  
 +MEN Z069 WATCHDOG DRIVER
 +M:    Johannes Thumshirn <jth@kernel.org>
 +L:    linux-watchdog@vger.kernel.org
 +S:    Maintained
 +F:    drivers/watchdog/menz069_wdt.c
 +
  MESON AO CEC DRIVER FOR AMLOGIC SOCS
  M:    Neil Armstrong <narmstrong@baylibre.com>
  L:    linux-media@lists.freedesktop.org
@@@ -9480,6 -9245,7 +9480,6 @@@ F:      drivers/media/platform/atmel/atmel-i
  F:    devicetree/bindings/media/atmel-isc.txt
  
  MICROCHIP / ATMEL NAND DRIVER
 -M:    Wenyou Yang <wenyou.yang@microchip.com>
  M:    Josh Wu <rainyfeeling@outlook.com>
  L:    linux-mtd@lists.infradead.org
  S:    Supported
@@@ -9531,12 -9297,6 +9531,12 @@@ F:    include/linux/cciss*.
  F:    include/uapi/linux/cciss*.h
  F:    Documentation/scsi/smartpqi.txt
  
 +MICROSEMI ETHERNET SWITCH DRIVER
 +M:    Alexandre Belloni <alexandre.belloni@bootlin.com>
 +L:    netdev@vger.kernel.org
 +S:    Supported
 +F:    drivers/net/ethernet/mscc/
 +
  MICROSOFT SURFACE PRO 3 BUTTON DRIVER
  M:    Chen Yu <yu.c.chen@intel.com>
  L:    platform-driver-x86@vger.kernel.org
@@@ -9550,12 -9310,10 +9550,12 @@@ F:   drivers/usb/image/microtek.
  
  MIPS
  M:    Ralf Baechle <ralf@linux-mips.org>
 +M:    Paul Burton <paul.burton@mips.com>
  M:    James Hogan <jhogan@kernel.org>
  L:    linux-mips@linux-mips.org
  W:    http://www.linux-mips.org/
  T:    git git://git.linux-mips.org/pub/scm/ralf/linux.git
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux.git
  Q:    http://patchwork.linux-mips.org/project/linux-mips/list/
  S:    Supported
  F:    Documentation/devicetree/bindings/mips/
@@@ -9652,13 -9410,6 +9652,13 @@@ Q:    http://patchwork.linuxtv.org/project
  S:    Maintained
  F:    drivers/media/dvb-frontends/mn88473*
  
 +PCI DRIVER FOR MOBIVEIL PCIE IP
 +M:    Subrahmanya Lingappa <l.subrahmanya@mobiveil.co.in>
 +L:    linux-pci@vger.kernel.org
 +S:    Supported
 +F:    Documentation/devicetree/bindings/pci/mobiveil-pcie.txt
 +F:    drivers/pci/controller/pcie-mobiveil.c
 +
  MODULE SUPPORT
  M:    Jessica Yu <jeyu@kernel.org>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux.git modules-next
@@@ -9771,14 -9522,6 +9771,14 @@@ F:    Documentation/devicetree/bindings/me
  F:    drivers/media/i2c/mt9v032.c
  F:    include/media/i2c/mt9v032.h
  
 +MT9V111 APTINA CAMERA SENSOR
 +M:    Jacopo Mondi <jacopo@jmondi.org>
 +L:    linux-media@vger.kernel.org
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/media/i2c/aptina,mt9v111.txt
 +F:    drivers/media/i2c/mt9v111.c
 +
  MULTIFUNCTION DEVICES (MFD)
  M:    Lee Jones <lee.jones@linaro.org>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd.git
@@@ -9806,7 -9549,7 +9806,7 @@@ F:      include/uapi/linux/mmc
  MULTIPLEXER SUBSYSTEM
  M:    Peter Rosin <peda@axentia.se>
  S:    Maintained
 -F:    Documentation/ABI/testing/mux/sysfs-class-mux*
 +F:    Documentation/ABI/testing/sysfs-class-mux*
  F:    Documentation/devicetree/bindings/mux/
  F:    include/linux/dt-bindings/mux/
  F:    include/linux/mux/
@@@ -9823,12 -9566,6 +9823,12 @@@ L:    linux-usb@vger.kernel.or
  S:    Maintained
  F:    drivers/usb/musb/
  
 +MXL301RF MEDIA DRIVER
 +M:    Akihiro Tsukada <tskd08@gmail.com>
 +L:    linux-media@vger.kernel.org
 +S:    Odd Fixes
 +F:    drivers/media/tuners/mxl301rf*
 +
  MXL5007T MEDIA DRIVER
  M:    Michael Krufky <mkrufky@linuxtv.org>
  L:    linux-media@vger.kernel.org
@@@ -9843,7 -9580,7 +9843,7 @@@ MXSFB DRM DRIVE
  M:    Marek Vasut <marex@denx.de>
  S:    Supported
  F:    drivers/gpu/drm/mxsfb/
 -F:    Documentation/devicetree/bindings/display/mxsfb-drm.txt
 +F:    Documentation/devicetree/bindings/display/mxsfb.txt
  
  MYRICOM MYRI-10G 10GbE DRIVER (MYRI10GE)
  M:    Chris Lee <christopher.lee@cspi.com>
@@@ -9854,7 -9591,6 +9854,7 @@@ F:      drivers/net/ethernet/myricom/myri10g
  
  NAND FLASH SUBSYSTEM
  M:    Boris Brezillon <boris.brezillon@bootlin.com>
 +M:    Miquel Raynal <miquel.raynal@bootlin.com>
  R:    Richard Weinberger <richard@nod.at>
  L:    linux-mtd@lists.infradead.org
  W:    http://www.linux-mtd.infradead.org/
@@@ -9897,10 -9633,11 +9897,10 @@@ F:   drivers/scsi/mac_scsi.
  F:    drivers/scsi/sun3_scsi.*
  F:    drivers/scsi/sun3_scsi_vme.c
  
 -NCR DUAL 700 SCSI DRIVER (MICROCHANNEL)
 -M:    "James E.J. Bottomley" <James.Bottomley@HansenPartnership.com>
 -L:    linux-scsi@vger.kernel.org
 +NCSI LIBRARY:
 +M:    Samuel Mendoza-Jonas <sam@mendozajonas.com>
  S:    Maintained
 -F:    drivers/scsi/NCR_D700.*
 +F:    net/ncsi/
  
  NCT6775 HARDWARE MONITOR DRIVER
  M:    Guenter Roeck <linux@roeck-us.net>
@@@ -9909,14 -9646,6 +9909,14 @@@ S:    Maintaine
  F:    Documentation/hwmon/nct6775
  F:    drivers/hwmon/nct6775.c
  
 +NET_FAILOVER MODULE
 +M:    Sridhar Samudrala <sridhar.samudrala@intel.com>
 +L:    netdev@vger.kernel.org
 +S:    Supported
 +F:    driver/net/net_failover.c
 +F:    include/net/net_failover.h
 +F:    Documentation/networking/net_failover.rst
 +
  NETEFFECT IWARP RNIC DRIVER (IW_NES)
  M:    Faisal Latif <faisal.latif@intel.com>
  L:    linux-rdma@vger.kernel.org
@@@ -9978,7 -9707,7 +9978,7 @@@ S:      Maintaine
  F:    drivers/net/ethernet/netronome/
  
  NETWORK BLOCK DEVICE (NBD)
 -M:    Josef Bacik <jbacik@fb.com>
 +M:    Josef Bacik <josef@toxicpanda.com>
  S:    Maintained
  L:    linux-block@vger.kernel.org
  L:    nbd@other.debian.org
@@@ -10028,7 -9757,6 +10028,7 @@@ M:    Andrew Lunn <andrew@lunn.ch
  M:    Vivien Didelot <vivien.didelot@savoirfairelinux.com>
  M:    Florian Fainelli <f.fainelli@gmail.com>
  S:    Maintained
 +F:    Documentation/devicetree/bindings/net/dsa/
  F:    net/dsa/
  F:    include/net/dsa.h
  F:    include/linux/dsa/
@@@ -10111,21 -9839,7 +10111,21 @@@ F:  net/ipv6/calipso.
  F:    net/netfilter/xt_CONNSECMARK.c
  F:    net/netfilter/xt_SECMARK.c
  
 +NETWORKING [TCP]
 +M:    Eric Dumazet <edumazet@google.com>
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    net/ipv4/tcp*.c
 +F:    net/ipv4/syncookies.c
 +F:    net/ipv6/tcp*.c
 +F:    net/ipv6/syncookies.c
 +F:    include/uapi/linux/tcp.h
 +F:    include/net/tcp.h
 +F:    include/linux/tcp.h
 +F:    include/trace/events/tcp.h
 +
  NETWORKING [TLS]
 +M:    Boris Pismenny <borisp@mellanox.com>
  M:    Aviad Yehezkel <aviadye@mellanox.com>
  M:    Dave Watson <davejwatson@fb.com>
  L:    netdev@vger.kernel.org
@@@ -10355,13 -10069,11 +10355,13 @@@ F:        sound/soc/codecs/sgtl5000
  
  NXP TDA998X DRM DRIVER
  M:    Russell King <linux@armlinux.org.uk>
 -S:    Supported
 +S:    Maintained
  T:    git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-tda998x-devel
  T:    git git://git.armlinux.org.uk/~rmk/linux-arm.git drm-tda998x-fixes
  F:    drivers/gpu/drm/i2c/tda998x_drv.c
  F:    include/drm/i2c/tda998x.h
 +F:    include/dt-bindings/display/tda998x.h
 +K:    "nxp,tda998x"
  
  NXP TFA9879 DRIVER
  M:    Peter Rosin <peda@axentia.se>
@@@ -10393,7 -10105,7 +10393,7 @@@ F:   arch/powerpc/include/asm/pnv-ocxl.
  F:    drivers/misc/ocxl/
  F:    include/misc/ocxl*
  F:    include/uapi/misc/ocxl.h
 -F:    Documentation/accelerators/ocxl.txt
 +F:    Documentation/accelerators/ocxl.rst
  
  OMAP AUDIO SUPPORT
  M:    Peter Ujfalusi <peter.ujfalusi@ti.com>
@@@ -10422,16 -10134,18 +10422,16 @@@ F:        arch/arm/boot/dts/*am5
  F:    arch/arm/boot/dts/*dra7*
  
  OMAP DISPLAY SUBSYSTEM and FRAMEBUFFER SUPPORT (DSS2)
 -M:    Tomi Valkeinen <tomi.valkeinen@ti.com>
  L:    linux-omap@vger.kernel.org
  L:    linux-fbdev@vger.kernel.org
 -S:    Maintained
 +S:    Orphan
  F:    drivers/video/fbdev/omap2/
  F:    Documentation/arm/OMAP/DSS
  
  OMAP FRAMEBUFFER SUPPORT
 -M:    Tomi Valkeinen <tomi.valkeinen@ti.com>
  L:    linux-fbdev@vger.kernel.org
  L:    linux-omap@vger.kernel.org
 -S:    Maintained
 +S:    Orphan
  F:    drivers/video/fbdev/omap/
  
  OMAP GENERAL PURPOSE MEMORY CONTROLLER SUPPORT
@@@ -10539,7 -10253,7 +10539,7 @@@ F:   arch/arm/mach-omap1
  F:    arch/arm/plat-omap/
  F:    arch/arm/configs/omap1_defconfig
  F:    drivers/i2c/busses/i2c-omap.c
 -F:    include/linux/i2c-omap.h
 +F:    include/linux/platform_data/i2c-omap.h
  
  OMAP2+ SUPPORT
  M:    Tony Lindgren <tony@atomide.com>
@@@ -10571,7 -10285,7 +10571,7 @@@ F:   drivers/regulator/tps65218-regulator
  F:    drivers/regulator/tps65910-regulator.c
  F:    drivers/regulator/twl-regulator.c
  F:    drivers/regulator/twl6030-regulator.c
 -F:    include/linux/i2c-omap.h
 +F:    include/linux/platform_data/i2c-omap.h
  
  ONION OMEGA2+ BOARD
  M:    Harvey Hunt <harveyhuntnexus@gmail.com>
@@@ -10605,14 -10319,6 +10605,14 @@@ T: git git://linuxtv.org/media_tree.gi
  S:    Maintained
  F:    drivers/media/i2c/ov13858.c
  
 +OMNIVISION OV2680 SENSOR DRIVER
 +M:    Rui Miguel Silva <rmfrfs@gmail.com>
 +L:    linux-media@vger.kernel.org
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    drivers/media/i2c/ov2680.c
 +F:    Documentation/devicetree/bindings/media/i2c/ov2680.txt
 +
  OMNIVISION OV2685 SENSOR DRIVER
  M:    Shunqian Zheng <zhengsq@rock-chips.com>
  L:    linux-media@vger.kernel.org
@@@ -10656,7 -10362,6 +10656,7 @@@ T:   git git://linuxtv.org/media_tree.gi
  S:    Odd fixes
  F:    drivers/media/i2c/ov772x.c
  F:    include/media/i2c/ov772x.h
 +F:    Documentation/devicetree/bindings/media/i2c/ov772x.txt
  
  OMNIVISION OV7740 SENSOR DRIVER
  M:    Wenyou Yang <wenyou.yang@microchip.com>
@@@ -10707,14 -10412,12 +10707,14 @@@ F:        drivers/infiniband/ulp/opa_vni
  
  OPEN FIRMWARE AND DEVICE TREE OVERLAYS
  M:    Pantelis Antoniou <pantelis.antoniou@konsulko.com>
 +M:    Frank Rowand <frowand.list@gmail.com>
  L:    devicetree@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/dynamic-resolution-notes.txt
  F:    Documentation/devicetree/overlay-notes.txt
  F:    drivers/of/overlay.c
  F:    drivers/of/resolver.c
 +K:    of_overlay_notifier_
  
  OPEN FIRMWARE AND FLATTENED DEVICE TREE
  M:    Rob Herring <robh+dt@kernel.org>
@@@ -10883,7 -10586,7 +10883,7 @@@ PARALLEL LCD/KEYPAD PANEL DRIVE
  M:    Willy Tarreau <willy@haproxy.com>
  M:    Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
  S:    Odd Fixes
 -F:    Documentation/misc-devices/lcd-panel-cgram.txt
 +F:    Documentation/auxdisplay/lcd-panel-cgram.txt
  F:    drivers/misc/panel.c
  
  PARALLEL PORT SUBSYSTEM
@@@ -10984,7 -10687,7 +10984,7 @@@ L:   linux-pci@vger.kernel.or
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/aardvark-pci.txt
 -F:    drivers/pci/host/pci-aardvark.c
 +F:    drivers/pci/controller/pci-aardvark.c
  
  PCI DRIVER FOR ALTERA PCIE IP
  M:    Ley Foon Tan <lftan@altera.com>
@@@ -10992,7 -10695,7 +10992,7 @@@ L:   rfi@lists.rocketboards.org (moderate
  L:    linux-pci@vger.kernel.org
  S:    Supported
  F:    Documentation/devicetree/bindings/pci/altera-pcie.txt
 -F:    drivers/pci/host/pcie-altera.c
 +F:    drivers/pci/controller/pcie-altera.c
  
  PCI DRIVER FOR APPLIEDMICRO XGENE
  M:    Tanmay Inamdar <tinamdar@apm.com>
@@@ -11000,7 -10703,7 +11000,7 @@@ L:   linux-pci@vger.kernel.or
  L:    linux-arm-kernel@lists.infradead.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/xgene-pci.txt
 -F:    drivers/pci/host/pci-xgene.c
 +F:    drivers/pci/controller/pci-xgene.c
  
  PCI DRIVER FOR ARM VERSATILE PLATFORM
  M:    Rob Herring <robh@kernel.org>
@@@ -11008,7 -10711,7 +11008,7 @@@ L:   linux-pci@vger.kernel.or
  L:    linux-arm-kernel@lists.infradead.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/versatile.txt
 -F:    drivers/pci/host/pci-versatile.c
 +F:    drivers/pci/controller/pci-versatile.c
  
  PCI DRIVER FOR ARMADA 8K
  M:    Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
@@@ -11016,24 -10719,24 +11016,24 @@@ L:        linux-pci@vger.kernel.or
  L:    linux-arm-kernel@lists.infradead.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/pci-armada8k.txt
 -F:    drivers/pci/dwc/pcie-armada8k.c
 +F:    drivers/pci/controller/dwc/pcie-armada8k.c
  
  PCI DRIVER FOR CADENCE PCIE IP
  M:    Alan Douglas <adouglas@cadence.com>
  L:    linux-pci@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/cdns,*.txt
 -F:    drivers/pci/cadence/pcie-cadence*
 +F:    drivers/pci/controller/pcie-cadence*
  
  PCI DRIVER FOR FREESCALE LAYERSCAPE
 -M:    Minghuan Lian <minghuan.Lian@freescale.com>
 -M:    Mingkai Hu <mingkai.hu@freescale.com>
 -M:    Roy Zang <tie-fei.zang@freescale.com>
 +M:    Minghuan Lian <minghuan.Lian@nxp.com>
 +M:    Mingkai Hu <mingkai.hu@nxp.com>
 +M:    Roy Zang <roy.zang@nxp.com>
  L:    linuxppc-dev@lists.ozlabs.org
  L:    linux-pci@vger.kernel.org
  L:    linux-arm-kernel@lists.infradead.org
  S:    Maintained
 -F:    drivers/pci/dwc/*layerscape*
 +F:    drivers/pci/controller/dwc/*layerscape*
  
  PCI DRIVER FOR GENERIC OF HOSTS
  M:    Will Deacon <will.deacon@arm.com>
@@@ -11041,8 -10744,8 +11041,8 @@@ L:   linux-pci@vger.kernel.or
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/host-generic-pci.txt
 -F:    drivers/pci/host/pci-host-common.c
 -F:    drivers/pci/host/pci-host-generic.c
 +F:    drivers/pci/controller/pci-host-common.c
 +F:    drivers/pci/controller/pci-host-generic.c
  
  PCI DRIVER FOR IMX6
  M:    Richard Zhu <hongxing.zhu@nxp.com>
@@@ -11051,14 -10754,14 +11051,14 @@@ L:        linux-pci@vger.kernel.or
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/fsl,imx6q-pcie.txt
 -F:    drivers/pci/dwc/*imx6*
 +F:    drivers/pci/controller/dwc/*imx6*
  
  PCI DRIVER FOR INTEL VOLUME MANAGEMENT DEVICE (VMD)
  M:    Keith Busch <keith.busch@intel.com>
  M:    Jonathan Derrick <jonathan.derrick@intel.com>
  L:    linux-pci@vger.kernel.org
  S:    Supported
 -F:    drivers/pci/host/vmd.c
 +F:    drivers/pci/controller/vmd.c
  
  PCI DRIVER FOR MICROSEMI SWITCHTEC
  M:    Kurt Schwemmer <kurt.schwemmer@microsemi.com>
@@@ -11078,7 -10781,7 +11078,7 @@@ M:   Jason Cooper <jason@lakedaemon.net
  L:    linux-pci@vger.kernel.org
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
 -F:    drivers/pci/host/*mvebu*
 +F:    drivers/pci/controller/*mvebu*
  
  PCI DRIVER FOR NVIDIA TEGRA
  M:    Thierry Reding <thierry.reding@gmail.com>
@@@ -11086,14 -10789,14 +11086,14 @@@ L:        linux-tegra@vger.kernel.or
  L:    linux-pci@vger.kernel.org
  S:    Supported
  F:    Documentation/devicetree/bindings/pci/nvidia,tegra20-pcie.txt
 -F:    drivers/pci/host/pci-tegra.c
 +F:    drivers/pci/controller/pci-tegra.c
  
  PCI DRIVER FOR RENESAS R-CAR
  M:    Simon Horman <horms@verge.net.au>
  L:    linux-pci@vger.kernel.org
  L:    linux-renesas-soc@vger.kernel.org
  S:    Maintained
 -F:    drivers/pci/host/*rcar*
 +F:    drivers/pci/controller/*rcar*
  
  PCI DRIVER FOR SAMSUNG EXYNOS
  M:    Jingoo Han <jingoohan1@gmail.com>
@@@ -11101,7 -10804,7 +11101,7 @@@ L:   linux-pci@vger.kernel.or
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    linux-samsung-soc@vger.kernel.org (moderated for non-subscribers)
  S:    Maintained
 -F:    drivers/pci/dwc/pci-exynos.c
 +F:    drivers/pci/controller/dwc/pci-exynos.c
  
  PCI DRIVER FOR SYNOPSYS DESIGNWARE
  M:    Jingoo Han <jingoohan1@gmail.com>
@@@ -11109,7 -10812,7 +11109,7 @@@ M:   Joao Pinto <Joao.Pinto@synopsys.com
  L:    linux-pci@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/designware-pcie.txt
 -F:    drivers/pci/dwc/*designware*
 +F:    drivers/pci/controller/dwc/*designware*
  
  PCI DRIVER FOR TI DRA7XX
  M:    Kishon Vijay Abraham I <kishon@ti.com>
@@@ -11117,14 -10820,14 +11117,14 @@@ L:        linux-omap@vger.kernel.or
  L:    linux-pci@vger.kernel.org
  S:    Supported
  F:    Documentation/devicetree/bindings/pci/ti-pci.txt
 -F:    drivers/pci/dwc/pci-dra7xx.c
 +F:    drivers/pci/controller/dwc/pci-dra7xx.c
  
  PCI DRIVER FOR TI KEYSTONE
  M:    Murali Karicheri <m-karicheri2@ti.com>
  L:    linux-pci@vger.kernel.org
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Maintained
 -F:    drivers/pci/dwc/*keystone*
 +F:    drivers/pci/controller/dwc/*keystone*
  
  PCI ENDPOINT SUBSYSTEM
  M:    Kishon Vijay Abraham I <kishon@ti.com>
@@@ -11157,7 -10860,7 +11157,7 @@@ L:   rfi@lists.rocketboards.org (moderate
  L:    linux-pci@vger.kernel.org
  S:    Supported
  F:    Documentation/devicetree/bindings/pci/altera-pcie-msi.txt
 -F:    drivers/pci/host/pcie-altera-msi.c
 +F:    drivers/pci/controller/pcie-altera-msi.c
  
  PCI MSI DRIVER FOR APPLIEDMICRO XGENE
  M:    Duc Dang <dhdang@apm.com>
@@@ -11165,7 -10868,7 +11165,7 @@@ L:   linux-pci@vger.kernel.or
  L:    linux-arm-kernel@lists.infradead.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/xgene-pci-msi.txt
 -F:    drivers/pci/host/pci-xgene-msi.c
 +F:    drivers/pci/controller/pci-xgene-msi.c
  
  PCI SUBSYSTEM
  M:    Bjorn Helgaas <bhelgaas@google.com>
@@@ -11191,7 -10894,9 +11191,7 @@@ L:   linux-pci@vger.kernel.or
  Q:    http://patchwork.ozlabs.org/project/linux-pci/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lpieralisi/pci.git/
  S:    Supported
 -F:    drivers/pci/cadence/
 -F:    drivers/pci/host/
 -F:    drivers/pci/dwc/
 +F:    drivers/pci/controller/
  
  PCIE DRIVER FOR AXIS ARTPEC
  M:    Jesper Nilsson <jesper.nilsson@axis.com>
@@@ -11199,7 -10904,7 +11199,7 @@@ L:   linux-arm-kernel@axis.co
  L:    linux-pci@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/axis,artpec*
 -F:    drivers/pci/dwc/*artpec*
 +F:    drivers/pci/controller/dwc/*artpec*
  
  PCIE DRIVER FOR CAVIUM THUNDERX
  M:    David Daney <david.daney@cavium.com>
@@@ -11207,22 -10912,22 +11207,22 @@@ L:        linux-pci@vger.kernel.or
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  S:    Supported
  F:    Documentation/devicetree/bindings/pci/pci-thunder-*
 -F:    drivers/pci/host/pci-thunder-*
 +F:    drivers/pci/controller/pci-thunder-*
  
  PCIE DRIVER FOR HISILICON
  M:    Zhou Wang <wangzhou1@hisilicon.com>
  L:    linux-pci@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/hisilicon-pcie.txt
 -F:    drivers/pci/dwc/pcie-hisi.c
 +F:    drivers/pci/controller/dwc/pcie-hisi.c
  
  PCIE DRIVER FOR HISILICON KIRIN
  M:    Xiaowei Song <songxiaowei@hisilicon.com>
  M:    Binghui Wang <wangbinghui@hisilicon.com>
  L:    linux-pci@vger.kernel.org
  S:    Maintained
 -F:    Documentation/devicetree/bindings/pci/pcie-kirin.txt
 -F:    drivers/pci/dwc/pcie-kirin.c
 +F:    Documentation/devicetree/bindings/pci/kirin-pcie.txt
 +F:    drivers/pci/controller/dwc/pcie-kirin.c
  
  PCIE DRIVER FOR HISILICON STB
  M:    Jianguo Sun <sunjianguo1@huawei.com>
@@@ -11230,7 -10935,7 +11230,7 @@@ M:   Shawn Guo <shawn.guo@linaro.org
  L:    linux-pci@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/hisilicon-histb-pcie.txt
 -F:    drivers/pci/dwc/pcie-histb.c
 +F:    drivers/pci/controller/dwc/pcie-histb.c
  
  PCIE DRIVER FOR MEDIATEK
  M:    Ryder Lee <ryder.lee@mediatek.com>
@@@ -11238,35 -10943,35 +11238,35 @@@ L:        linux-pci@vger.kernel.or
  L:    linux-mediatek@lists.infradead.org
  S:    Supported
  F:    Documentation/devicetree/bindings/pci/mediatek*
 -F:    drivers/pci/host/*mediatek*
 +F:    drivers/pci/controller/*mediatek*
  
  PCIE DRIVER FOR QUALCOMM MSM
  M:    Stanimir Varbanov <svarbanov@mm-sol.com>
  L:    linux-pci@vger.kernel.org
  L:    linux-arm-msm@vger.kernel.org
  S:    Maintained
 -F:    drivers/pci/dwc/*qcom*
 +F:    drivers/pci/controller/dwc/*qcom*
  
  PCIE DRIVER FOR ROCKCHIP
  M:    Shawn Lin <shawn.lin@rock-chips.com>
  L:    linux-pci@vger.kernel.org
  L:    linux-rockchip@lists.infradead.org
  S:    Maintained
 -F:    Documentation/devicetree/bindings/pci/rockchip-pcie.txt
 -F:    drivers/pci/host/pcie-rockchip.c
 +F:    Documentation/devicetree/bindings/pci/rockchip-pcie*
 +F:    drivers/pci/controller/pcie-rockchip*
  
  PCI DRIVER FOR V3 SEMICONDUCTOR V360EPC
  M:    Linus Walleij <linus.walleij@linaro.org>
  L:    linux-pci@vger.kernel.org
  S:    Maintained
  F:    Documentation/devicetree/bindings/pci/v3-v360epc-pci.txt
 -F:    drivers/pci/host/pci-v3-semi.c
 +F:    drivers/pci/controller/pci-v3-semi.c
  
  PCIE DRIVER FOR ST SPEAR13XX
  M:    Pratyush Anand <pratyush.anand@gmail.com>
  L:    linux-pci@vger.kernel.org
  S:    Maintained
 -F:    drivers/pci/dwc/*spear*
 +F:    drivers/pci/controller/dwc/*spear*
  
  PCMCIA SUBSYSTEM
  M:    Dominik Brodowski <linux@dominikbrodowski.net>
@@@ -11340,6 -11045,13 +11340,13 @@@ S: Maintaine
  F:    include/linux/personality.h
  F:    include/uapi/linux/personality.h
  
+ PHOENIX RC FLIGHT CONTROLLER ADAPTER
+ M:    Marcus Folkesson <marcus.folkesson@gmail.com>
+ L:    linux-input@vger.kernel.org
+ S:    Maintained
+ F:    Documentation/input/devices/pxrc.rst
+ F:    drivers/input/joystick/pxrc.c
  PHONET PROTOCOL
  M:    Remi Denis-Courmont <courmisch@gmail.com>
  S:    Supported
@@@ -11406,7 -11118,7 +11413,7 @@@ F:   Documentation/devicetree/bindings/pi
  
  PIN CONTROLLER - INTEL
  M:    Mika Westerberg <mika.westerberg@linux.intel.com>
 -M:    Heikki Krogerus <heikki.krogerus@linux.intel.com>
 +M:    Andy Shevchenko <andriy.shevchenko@linux.intel.com>
  S:    Maintained
  F:    drivers/pinctrl/intel/
  
@@@ -11416,7 -11128,6 +11423,7 @@@ L:   linux-mediatek@lists.infradead.org (
  S:    Maintained
  F:    Documentation/devicetree/bindings/pinctrl/pinctrl-mt65xx.txt
  F:    Documentation/devicetree/bindings/pinctrl/pinctrl-mt7622.txt
 +F:    drivers/pinctrl/mediatek/mtk-eint.*
  F:    drivers/pinctrl/mediatek/pinctrl-mtk-common.*
  F:    drivers/pinctrl/mediatek/pinctrl-mt2701.c
  F:    drivers/pinctrl/mediatek/pinctrl-mt7622.c
@@@ -11555,7 -11266,6 +11562,7 @@@ M:   Sebastian Reichel <sre@kernel.org
  L:    linux-pm@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/sre/linux-power-supply.git
  S:    Maintained
 +F:    Documentation/ABI/testing/sysfs-class-power
  F:    Documentation/devicetree/bindings/power/supply/
  F:    include/linux/power_supply.h
  F:    drivers/power/supply/
@@@ -11633,15 -11343,6 +11640,15 @@@ W: http://wireless.kernel.org/en/users/
  S:    Obsolete
  F:    drivers/net/wireless/intersil/prism54/
  
 +PROC FILESYSTEM
 +R:    Alexey Dobriyan <adobriyan@gmail.com>
 +L:    linux-kernel@vger.kernel.org
 +L:    linux-fsdevel@vger.kernel.org
 +S:    Maintained
 +F:    fs/proc/
 +F:    include/linux/proc_fs.h
 +F:    tools/testing/selftests/proc/
 +
  PROC SYSCTL
  M:    "Luis R. Rodriguez" <mcgrof@kernel.org>
  M:    Kees Cook <keescook@chromium.org>
@@@ -11710,6 -11411,7 +11717,6 @@@ S:   Maintaine
  W:    http://linuxptp.sourceforge.net/
  F:    Documentation/ABI/testing/sysfs-ptp
  F:    Documentation/ptp/*
 -F:    drivers/net/ethernet/freescale/gianfar_ptp.c
  F:    drivers/net/phy/dp83640*
  F:    drivers/ptp/*
  F:    include/linux/ptp_cl*
@@@ -11916,18 -11618,6 +11923,18 @@@ L: netdev@vger.kernel.or
  S:    Supported
  F:    drivers/net/ethernet/qlogic/qlge/
  
 +QM1D1B0004 MEDIA DRIVER
 +M:    Akihiro Tsukada <tskd08@gmail.com>
 +L:    linux-media@vger.kernel.org
 +S:    Odd Fixes
 +F:    drivers/media/tuners/qm1d1b0004*
 +
 +QM1D1C0042 MEDIA DRIVER
 +M:    Akihiro Tsukada <tskd08@gmail.com>
 +L:    linux-media@vger.kernel.org
 +S:    Odd Fixes
 +F:    drivers/media/tuners/qm1d1c0042*
 +
  QNX4 FILESYSTEM
  M:    Anders Larsen <al@alarsen.net>
  W:    http://www.alarsen.net/linux/qnx4fs/
@@@ -11976,19 -11666,12 +11983,19 @@@ L:        linux-media@vger.kernel.or
  S:    Maintained
  F:    Documentation/devicetree/bindings/media/qcom,camss.txt
  F:    Documentation/media/v4l-drivers/qcom_camss.rst
 -F:    drivers/media/platform/qcom/camss-8x16/
 +F:    drivers/media/platform/qcom/camss/
 +
 +QUALCOMM CPUFREQ DRIVER MSM8996/APQ8096
 +M:  Ilia Lin <ilia.lin@gmail.com>
 +L:  linux-pm@vger.kernel.org
 +S:  Maintained
 +F:  Documentation/devicetree/bindings/opp/kryo-cpufreq.txt
 +F:  drivers/cpufreq/qcom-cpufreq-kryo.c
  
  QUALCOMM EMAC GIGABIT ETHERNET DRIVER
 -M:    Timur Tabi <timur@codeaurora.org>
 +M:    Timur Tabi <timur@kernel.org>
  L:    netdev@vger.kernel.org
 -S:    Supported
 +S:    Maintained
  F:    drivers/net/ethernet/qualcomm/emac/
  
  QUALCOMM HEXAGON ARCHITECTURE
@@@ -11998,14 -11681,6 +12005,14 @@@ T: git git://git.kernel.org/pub/scm/lin
  S:    Supported
  F:    arch/hexagon/
  
 +QUALCOMM HIDMA DRIVER
 +M:    Sinan Kaya <okaya@kernel.org>
 +L:    linux-arm-kernel@lists.infradead.org
 +L:    linux-arm-msm@vger.kernel.org
 +L:    dmaengine@vger.kernel.org
 +S:    Supported
 +F:    drivers/dma/qcom/hidma*
 +
  QUALCOMM IOMMU
  M:    Rob Clark <robdclark@gmail.com>
  L:    iommu@lists.linux-foundation.org
@@@ -12199,9 -11874,9 +12206,9 @@@ T:   git git://git.kernel.org/pub/scm/lin
  F:    Documentation/RCU/
  X:    Documentation/RCU/torture.txt
  F:    include/linux/rcu*
 -X:    include/linux/srcu.h
 +X:    include/linux/srcu*.h
  F:    kernel/rcu/
 -X:    kernel/torture.c
 +X:    kernel/rcu/srcu*.c
  
  REAL TIME CLOCK (RTC) SUBSYSTEM
  M:    Alessandro Zummo <a.zummo@towertech.it>
@@@ -12217,7 -11892,7 +12224,7 @@@ F:   include/linux/rtc.
  F:    include/uapi/linux/rtc.h
  F:    include/linux/rtc/
  F:    include/linux/platform_data/rtc-*
 -F:    tools/testing/selftests/timers/rtctest.c
 +F:    tools/testing/selftests/rtc/
  
  REALTEK AUDIO CODECS
  M:    Bard Liao <bardliao@realtek.com>
@@@ -12226,13 -11901,6 +12233,13 @@@ S: Maintaine
  F:    sound/soc/codecs/rt*
  F:    include/sound/rt*.h
  
 +REALTEK RTL83xx SMI DSA ROUTER CHIPS
 +M:    Linus Walleij <linus.walleij@linaro.org>
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/net/dsa/realtek-smi.txt
 +F:    drivers/net/dsa/realtek-smi*
 +F:    drivers/net/dsa/rtl83*
 +
  REGISTER MAP ABSTRACTION
  M:    Mark Brown <broonie@kernel.org>
  L:    linux-kernel@vger.kernel.org
@@@ -12318,18 -11986,6 +12325,18 @@@ F: include/dt-bindings/reset
  F:    include/linux/reset.h
  F:    include/linux/reset-controller.h
  
 +RESTARTABLE SEQUENCES SUPPORT
 +M:    Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
 +M:    Peter Zijlstra <peterz@infradead.org>
 +M:    "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
 +M:    Boqun Feng <boqun.feng@gmail.com>
 +L:    linux-kernel@vger.kernel.org
 +S:    Supported
 +F:    kernel/rseq.c
 +F:    include/uapi/linux/rseq.h
 +F:    include/trace/events/rseq.h
 +F:    tools/testing/selftests/rseq/
 +
  RFKILL
  M:    Johannes Berg <johannes@sipsolutions.net>
  L:    linux-wireless@vger.kernel.org
@@@ -12340,8 -11996,6 +12347,8 @@@ S:   Maintaine
  F:    Documentation/rfkill.txt
  F:    Documentation/ABI/stable/sysfs-class-rfkill
  F:    net/rfkill/
 +F:    include/linux/rfkill.h
 +F:    include/uapi/linux/rfkill.h
  
  RHASHTABLE
  M:    Thomas Graf <tgraf@suug.ch>
@@@ -12349,9 -12003,7 +12356,9 @@@ M:   Herbert Xu <herbert@gondor.apana.org
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    lib/rhashtable.c
 +F:    lib/test_rhashtable.c
  F:    include/linux/rhashtable.h
 +F:    include/linux/rhashtable-types.h
  
  RICOH R5C592 MEMORYSTICK DRIVER
  M:    Maxim Levitsky <maximlevitsky@gmail.com>
@@@ -12366,7 -12018,7 +12373,7 @@@ F:   drivers/mtd/nand/raw/r852.
  
  RISC-V ARCHITECTURE
  M:    Palmer Dabbelt <palmer@sifive.com>
 -M:    Albert Ou <albert@sifive.com>
 +M:    Albert Ou <aou@eecs.berkeley.edu>
  L:    linux-riscv@lists.infradead.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux.git
  S:    Supported
@@@ -12573,6 -12225,7 +12580,6 @@@ F:   drivers/pci/hotplug/s390_pci_hpc.
  
  S390 VFIO-CCW DRIVER
  M:    Cornelia Huck <cohuck@redhat.com>
 -M:    Dong Jia Shi <bjsdjshi@linux.ibm.com>
  M:    Halil Pasic <pasic@linux.ibm.com>
  L:    linux-s390@vger.kernel.org
  L:    kvm@vger.kernel.org
@@@ -12643,7 -12296,7 +12650,7 @@@ L:   linux-crypto@vger.kernel.or
  L:    linux-samsung-soc@vger.kernel.org
  S:    Maintained
  F:    drivers/crypto/exynos-rng.c
 -F:    Documentation/devicetree/bindings/crypto/samsung,exynos-rng4.txt
 +F:    Documentation/devicetree/bindings/rng/samsung,exynos4-rng.txt
  
  SAMSUNG EXYNOS TRUE RANDOM NUMBER GENERATOR (TRNG) DRIVER
  M:    Łukasz Stelmach <l.stelmach@samsung.com>
@@@ -12809,21 -12462,15 +12816,21 @@@ S:        Maintaine
  F:    drivers/scsi/sr*
  
  SCSI RDMA PROTOCOL (SRP) INITIATOR
 -M:    Bart Van Assche <bart.vanassche@sandisk.com>
 +M:    Bart Van Assche <bvanassche@acm.org>
  L:    linux-rdma@vger.kernel.org
  S:    Supported
 -W:    http://www.openfabrics.org
  Q:    http://patchwork.kernel.org/project/linux-rdma/list/
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/dad/srp-initiator.git
  F:    drivers/infiniband/ulp/srp/
  F:    include/scsi/srp.h
  
 +SCSI RDMA PROTOCOL (SRP) TARGET
 +M:    Bart Van Assche <bvanassche@acm.org>
 +L:    linux-rdma@vger.kernel.org
 +L:    target-devel@vger.kernel.org
 +S:    Supported
 +Q:    http://patchwork.kernel.org/project/linux-rdma/list/
 +F:    drivers/infiniband/ulp/srpt/
 +
  SCSI SG DRIVER
  M:    Doug Gilbert <dgilbert@interlog.com>
  L:    linux-scsi@vger.kernel.org
@@@ -12922,13 -12569,6 +12929,13 @@@ S: Maintaine
  F:    drivers/mmc/host/sdhci*
  F:    include/linux/mmc/sdhci*
  
 +SYNOPSYS SDHCI COMPLIANT DWC MSHC DRIVER
 +M:    Prabu Thangamuthu <prabu.t@synopsys.com>
 +M:    Manjunath M B <manjumb@synopsys.com>
 +L:    linux-mmc@vger.kernel.org
 +S:    Maintained
 +F:    drivers/mmc/host/sdhci-pci-dwc-mshc.c
 +
  SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) SAMSUNG DRIVER
  M:    Ben Dooks <ben-linux@fluff.org>
  M:    Jaehoon Chung <jh80.chung@samsung.com>
@@@ -12970,7 -12610,6 +12977,7 @@@ T:   git git://git.kernel.org/pub/scm/lin
  W:    http://kernsec.org/
  S:    Supported
  F:    security/
 +X:    security/selinux/
  
  SELINUX SECURITY MODULE
  M:    Paul Moore <paul@paul-moore.com>
@@@ -13047,14 -12686,6 +13054,14 @@@ W: http://www.ibm.com/developerworks/li
  S:    Supported
  F:    net/smc/
  
 +SHARP RJ54N1CB0C SENSOR DRIVER
 +M:    Jacopo Mondi <jacopo@jmondi.org>
 +L:    linux-media@vger.kernel.org
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Odd fixes
 +F:    drivers/media/i2c/rj54n1cb0c.c
 +F:    include/media/i2c/rj54n1cb0c.h
 +
  SH_VEU V4L2 MEM2MEM DRIVER
  L:    linux-media@vger.kernel.org
  S:    Orphan
@@@ -13147,14 -12778,6 +13154,14 @@@ F: drivers/media/usb/siano
  F:    drivers/media/usb/siano/
  F:    drivers/media/mmc/siano/
  
 +SIFIVE DRIVERS
 +M:    Palmer Dabbelt <palmer@sifive.com>
 +L:    linux-riscv@lists.infradead.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/palmer/riscv-linux.git
 +S:    Supported
 +K:    sifive
 +N:    sifive
 +
  SILEAD TOUCHSCREEN DRIVER
  M:    Hans de Goede <hdegoede@redhat.com>
  L:    linux-input@vger.kernel.org
@@@ -13270,8 -12893,8 +13277,8 @@@ L:   linux-kernel@vger.kernel.or
  W:    http://www.rdrop.com/users/paulmck/RCU/
  S:    Supported
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
 -F:    include/linux/srcu.h
 -F:    kernel/rcu/srcu.c
 +F:    include/linux/srcu*.h
 +F:    kernel/rcu/srcu*.c
  
  SERIAL LOW-POWER INTER-CHIP MEDIA BUS (SLIMbus)
  M:    Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
@@@ -13452,13 -13075,6 +13459,13 @@@ S: Maintaine
  F:    drivers/ssb/
  F:    include/linux/ssb/
  
 +SONY IMX258 SENSOR DRIVER
 +M:    Sakari Ailus <sakari.ailus@linux.intel.com>
 +L:    linux-media@vger.kernel.org
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    drivers/media/i2c/imx258.c
 +
  SONY IMX274 SENSOR DRIVER
  M:    Leon Luo <leonl@leopardimaging.com>
  L:    linux-media@vger.kernel.org
@@@ -13503,11 -13119,11 +13510,11 @@@ F:        include/uapi/sound
  F:    sound/
  
  SOUND - COMPRESSED AUDIO
 -M:    Vinod Koul <vinod.koul@intel.com>
 +M:    Vinod Koul <vkoul@kernel.org>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
  S:    Supported
 -F:    Documentation/sound/alsa/compress_offload.txt
 +F:    Documentation/sound/designs/compress-offload.rst
  F:    include/sound/compress_driver.h
  F:    include/uapi/sound/compress_*
  F:    sound/core/compress_offload.c
@@@ -13528,7 -13144,7 +13535,7 @@@ L:   alsa-devel@alsa-project.org (moderat
  W:    http://alsa-project.org/main/index.php/ASoC
  S:    Supported
  F:    Documentation/devicetree/bindings/sound/
 -F:    Documentation/sound/alsa/soc/
 +F:    Documentation/sound/soc/
  F:    sound/soc/
  F:    include/sound/soc*
  
@@@ -13675,19 -13291,19 +13682,19 @@@ L:        stable@vger.kernel.or
  S:    Supported
  F:    Documentation/process/stable-kernel-rules.rst
  
 -STAGING - ATOMISP DRIVER
 -M:    Alan Cox <alan@linux.intel.com>
 -M:    Sakari Ailus <sakari.ailus@linux.intel.com>
 -L:    linux-media@vger.kernel.org
 -S:    Maintained
 -F:    drivers/staging/media/atomisp/
 -
  STAGING - COMEDI
  M:    Ian Abbott <abbotti@mev.co.uk>
  M:    H Hartley Sweeten <hsweeten@visionengravers.com>
  S:    Odd Fixes
  F:    drivers/staging/comedi/
  
 +STAGING - EROFS FILE SYSTEM
 +M:    Gao Xiang <gaoxiang25@huawei.com>
 +M:    Chao Yu <yuchao0@huawei.com>
 +L:    linux-erofs@lists.ozlabs.org
 +S:    Maintained
 +F:    drivers/staging/erofs/
 +
  STAGING - FLARION FT1000 DRIVERS
  M:    Marek Belisko <marek.belisko@gmail.com>
  S:    Odd Fixes
@@@ -13700,6 -13316,15 +13707,6 @@@ S:  Odd Fixe
  F:    Documentation/devicetree/bindings/staging/iio/
  F:    drivers/staging/iio/
  
 -STAGING - LUSTRE PARALLEL FILESYSTEM
 -M:    Oleg Drokin <oleg.drokin@intel.com>
 -M:    Andreas Dilger <andreas.dilger@intel.com>
 -M:    James Simmons <jsimmons@infradead.org>
 -L:    lustre-devel@lists.lustre.org (moderated for non-subscribers)
 -W:    http://wiki.lustre.org/
 -S:    Maintained
 -F:    drivers/staging/lustre
 -
  STAGING - NVIDIA COMPLIANT EMBEDDED CONTROLLER INTERFACE (nvec)
  M:    Marc Dietrich <marvin24@gmx.de>
  L:    ac100@lists.launchpad.net (moderated for non-subscribers)
@@@ -13774,13 -13399,6 +13781,13 @@@ L: linux-block@vger.kernel.or
  S:    Maintained
  F:    drivers/block/skd*[ch]
  
 +STI AUDIO (ASoC) DRIVERS
 +M:    Arnaud Pouliquen <arnaud.pouliquen@st.com>
 +L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/sound/st,sti-asoc-card.txt
 +F:    sound/soc/sti/
 +
  STI CEC DRIVER
  M:    Benjamin Gaignard <benjamin.gaignard@linaro.org>
  S:    Maintained
@@@ -13794,28 -13412,9 +13801,28 @@@ T: git git://linuxtv.org/media_tree.gi
  S:    Maintained
  F:    drivers/media/usb/stk1160/
  
 +STM32 AUDIO (ASoC) DRIVERS
 +M:    Olivier Moysan <olivier.moysan@st.com>
 +M:    Arnaud Pouliquen <arnaud.pouliquen@st.com>
 +L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/sound/st,stm32-*.txt
 +F:    sound/soc/stm/
 +
 +STM32 TIMER/LPTIMER DRIVERS
 +M:    Fabrice Gasnier <fabrice.gasnier@st.com>
 +S:    Maintained
 +F:    drivers/*/stm32-*timer*
 +F:    drivers/pwm/pwm-stm32*
 +F:    include/linux/*/stm32-*tim*
 +F:    Documentation/ABI/testing/*timer-stm32
 +F:    Documentation/devicetree/bindings/*/stm32-*timer*
 +F:    Documentation/devicetree/bindings/pwm/pwm-stm32*
 +
  STMMAC ETHERNET DRIVER
  M:    Giuseppe Cavallaro <peppe.cavallaro@st.com>
  M:    Alexandre Torgue <alexandre.torgue@st.com>
 +M:    Jose Abreu <joabreu@synopsys.com>
  L:    netdev@vger.kernel.org
  W:    http://www.stlinux.com
  S:    Supported
@@@ -13880,7 -13479,7 +13887,7 @@@ M:   Konrad Rzeszutek Wilk <konrad.wilk@o
  L:    iommu@lists.linux-foundation.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb.git
  S:    Supported
 -F:    lib/swiotlb.c
 +F:    kernel/dma/swiotlb.c
  F:    arch/*/kernel/pci-swiotlb.c
  F:    include/linux/swiotlb.h
  
@@@ -13892,12 -13491,6 +13899,12 @@@ S: Supporte
  F:    net/switchdev/
  F:    include/net/switchdev.h
  
 +SY8106A REGULATOR DRIVER
 +M:    Icenowy Zheng <icenowy@aosc.io>
 +S:    Maintained
 +F:    drivers/regulator/sy8106a-regulator.c
 +F:    Documentation/devicetree/bindings/regulator/sy8106a-regulator.txt
 +
  SYNC FILE FRAMEWORK
  M:    Sumit Semwal <sumit.semwal@linaro.org>
  R:    Gustavo Padovan <gustavo@padovan.org>
@@@ -14032,7 -13625,7 +14039,7 @@@ SYSTEM TRACE MODULE CLAS
  M:    Alexander Shishkin <alexander.shishkin@linux.intel.com>
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ash/stm.git
 -F:    Documentation/trace/stm.txt
 +F:    Documentation/trace/stm.rst
  F:    drivers/hwtracing/stm/
  F:    include/linux/stm.h
  F:    include/uapi/linux/stm.h
@@@ -14078,12 -13671,6 +14085,12 @@@ F: include/uapi/linux/tc_act
  F:    include/uapi/linux/tc_ematch/
  F:    net/sched/
  
 +TC90522 MEDIA DRIVER
 +M:    Akihiro Tsukada <tskd08@gmail.com>
 +L:    linux-media@vger.kernel.org
 +S:    Odd Fixes
 +F:    drivers/media/dvb-frontends/tc90522*
 +
  TCP LOW PRIORITY MODULE
  M:    "Wong Hoi Sing, Edison" <hswong3i@gmail.com>
  M:    "Hung Hing Lun, Mike" <hlhung3i@gmail.com>
@@@ -14278,13 -13865,6 +14285,13 @@@ M: Laxman Dewangan <ldewangan@nvidia.co
  S:    Supported
  F:    drivers/input/keyboard/tegra-kbc.c
  
 +TEGRA NAND DRIVER
 +M:    Stefan Agner <stefan@agner.ch>
 +M:    Lucas Stach <dev@lynxeye.de>
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/mtd/nvidia-tegra20-nand.txt
 +F:    drivers/mtd/nand/raw/tegra_nand.c
 +
  TEGRA PWM DRIVER
  M:    Thierry Reding <thierry.reding@gmail.com>
  S:    Supported
@@@ -14665,7 -14245,6 +14672,7 @@@ T:   git git://git.kernel.org/pub/scm/lin
  F:    Documentation/RCU/torture.txt
  F:    kernel/torture.c
  F:    kernel/rcu/rcutorture.c
 +F:    kernel/rcu/rcuperf.c
  F:    kernel/locking/locktorture.c
  
  TOSHIBA ACPI EXTRAS DRIVER
@@@ -14723,7 -14302,7 +14730,7 @@@ M:   Steven Rostedt <rostedt@goodmis.org
  M:    Ingo Molnar <mingo@redhat.com>
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git perf/core
  S:    Maintained
 -F:    Documentation/trace/ftrace.txt
 +F:    Documentation/trace/ftrace.rst
  F:    arch/*/*/*/ftrace.h
  F:    arch/*/kernel/ftrace.c
  F:    include/*/ftrace.h
@@@ -14806,15 -14385,6 +14813,15 @@@ S: Maintaine
  F:    drivers/tc/
  F:    include/linux/tc.h
  
 +TURBOSTAT UTILITY
 +M:    "Len Brown" <lenb@kernel.org>
 +L:    linux-pm@vger.kernel.org
 +B:    https://bugzilla.kernel.org
 +Q:    https://patchwork.kernel.org/project/linux-pm/list/
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux.git turbostat
 +S:    Supported
 +F:    tools/power/x86/turbostat/
 +
  TW5864 VIDEO4LINUX DRIVER
  M:    Bluecherry Maintainers <maintainers@bluecherrydvr.com>
  M:    Anton Sviridenko <anton@corp.bluecherry.net>
@@@ -15061,9 -14631,7 +15068,9 @@@ M:   Woojung Huh <woojung.huh@microchip.c
  M:    Microchip Linux Driver Support <UNGLinuxDriver@microchip.com>
  L:    netdev@vger.kernel.org
  S:    Maintained
 +F:    Documentation/devicetree/bindings/net/microchip,lan78xx.txt
  F:    drivers/net/usb/lan78xx.*
 +F:    include/dt-bindings/net/microchip-lan78xx.h
  
  USB MASS STORAGE DRIVER
  M:    Alan Stern <stern@rowland.harvard.edu>
@@@ -15107,7 -14675,6 +15114,7 @@@ S:   Maintaine
  F:    Documentation/usb/usbip_protocol.txt
  F:    drivers/usb/usbip/
  F:    tools/usb/usbip/
 +F:    tools/testing/selftests/drivers/usb/usbip/
  
  USB PEGASUS DRIVER
  M:    Petko Manolov <petkan@nucleusys.com>
@@@ -15187,24 -14754,15 +15194,24 @@@ L:        linux-usb@vger.kernel.or
  S:    Maintained
  F:    drivers/usb/typec/mux/pi3usb30532.c
  
 -USB TYPEC SUBSYSTEM
 +USB TYPEC CLASS
  M:    Heikki Krogerus <heikki.krogerus@linux.intel.com>
  L:    linux-usb@vger.kernel.org
  S:    Maintained
  F:    Documentation/ABI/testing/sysfs-class-typec
 -F:    Documentation/usb/typec.rst
 +F:    Documentation/driver-api/usb/typec.rst
  F:    drivers/usb/typec/
  F:    include/linux/usb/typec.h
  
 +USB TYPEC BUS FOR ALTERNATE MODES
 +M:    Heikki Krogerus <heikki.krogerus@linux.intel.com>
 +L:    linux-usb@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/ABI/testing/sysfs-bus-typec
 +F:    Documentation/driver-api/usb/typec_bus.rst
 +F:    drivers/usb/typec/altmodes/
 +F:    include/linux/usb/typec_altmode.h
 +
  USB UHCI DRIVER
  M:    Alan Stern <stern@rowland.harvard.edu>
  L:    linux-usb@vger.kernel.org
@@@ -15235,7 -14793,6 +15242,7 @@@ L:   linux-usb@vger.kernel.or
  S:    Maintained
  F:    drivers/usb/gadget/function/*uvc*
  F:    drivers/usb/gadget/legacy/webcam.c
 +F:    include/uapi/linux/usb/g_uvc.h
  
  USB WIRELESS RNDIS DRIVER (rndis_wlan)
  M:    Jussi Kivilinna <jussi.kivilinna@iki.fi>
@@@ -15269,7 -14826,8 +15276,7 @@@ F:   drivers/media/usb/zr364xx
  USER-MODE LINUX (UML)
  M:    Jeff Dike <jdike@addtoit.com>
  M:    Richard Weinberger <richard@nod.at>
 -L:    user-mode-linux-devel@lists.sourceforge.net
 -L:    user-mode-linux-user@lists.sourceforge.net
 +L:    linux-um@lists.infradead.org
  W:    http://user-mode-linux.sourceforge.net
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml.git
  S:    Maintained
@@@ -15383,26 -14941,12 +15390,26 @@@ L:        netdev@vger.kernel.or
  S:    Maintained
  F:    drivers/net/ethernet/via/via-velocity.*
  
 +VICODEC VIRTUAL CODEC DRIVER
 +M:    Hans Verkuil <hans.verkuil@cisco.com>
 +L:    linux-media@vger.kernel.org
 +T:    git git://linuxtv.org/media_tree.git
 +W:    https://linuxtv.org
 +S:    Maintained
 +F:    drivers/media/platform/vicodec/*
 +
  VIDEO MULTIPLEXER DRIVER
  M:    Philipp Zabel <p.zabel@pengutronix.de>
  L:    linux-media@vger.kernel.org
  S:    Maintained
  F:    drivers/media/platform/video-mux.c
  
 +VIDEO I2C POLLING DRIVER
 +M:    Matt Ranostay <matt.ranostay@konsulko.com>
 +L:    linux-media@vger.kernel.org
 +S:    Maintained
 +F:    drivers/media/i2c/video-i2c.c
 +
  VIDEOBUF2 FRAMEWORK
  M:    Pawel Osciak <pawel@osciak.com>
  M:    Marek Szyprowski <m.szyprowski@samsung.com>
@@@ -15558,7 -15102,7 +15565,7 @@@ F:   include/linux/vme
  
  VMWARE BALLOON DRIVER
  M:    Xavier Deguillard <xdeguillard@vmware.com>
 -M:    Philip Moltmann <moltmann@vmware.com>
 +M:    Nadav Amit <namit@vmware.com>
  M:    "VMware, Inc." <pv-drivers@vmware.com>
  L:    linux-kernel@vger.kernel.org
  S:    Maintained
@@@ -15650,7 -15194,6 +15657,7 @@@ F:   drivers/mmc/host/vub300.
  W1 DALLAS'S 1-WIRE BUS
  M:    Evgeniy Polyakov <zbr@ioremap.net>
  S:    Maintained
 +F:    Documentation/devicetree/bindings/w1/
  F:    Documentation/w1/
  F:    drivers/w1/
  F:    include/linux/w1.h
@@@ -15837,17 -15380,9 +15844,17 @@@ M: x86@kernel.or
  L:    linux-kernel@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/core
  S:    Maintained
 +F:    Documentation/devicetree/bindings/x86/
  F:    Documentation/x86/
  F:    arch/x86/
  
 +X86 ENTRY CODE
 +M:    Andy Lutomirski <luto@kernel.org>
 +L:    linux-kernel@vger.kernel.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/asm
 +S:    Maintained
 +F:    arch/x86/entry/
 +
  X86 MCE INFRASTRUCTURE
  M:    Tony Luck <tony.luck@intel.com>
  M:    Borislav Petkov <bp@alien8.de>
@@@ -15870,7 -15405,7 +15877,7 @@@ F:   drivers/platform/x86
  F:    drivers/platform/olpc/
  
  X86 VDSO
 -M:    Andy Lutomirski <luto@amacapital.net>
 +M:    Andy Lutomirski <luto@kernel.org>
  L:    linux-kernel@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git x86/vdso
  S:    Maintained
@@@ -15884,14 -15419,6 +15891,14 @@@ T: git git://linuxtv.org/media_tree.gi
  S:    Maintained
  F:    drivers/media/tuners/tuner-xc2028.*
  
 +XDP SOCKETS (AF_XDP)
 +M:    Björn Töpel <bjorn.topel@intel.com>
 +M:    Magnus Karlsson <magnus.karlsson@intel.com>
 +L:    netdev@vger.kernel.org
 +S:    Maintained
 +F:    kernel/bpf/xskmap.c
 +F:    net/xdp/
 +
  XEN BLOCK SUBSYSTEM
  M:    Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
  M:    Roger Pau Monné <roger.pau@citrix.com>
@@@ -15962,13 -15489,6 +15969,13 @@@ S: Supporte
  F:    arch/x86/xen/*swiotlb*
  F:    drivers/xen/*swiotlb*
  
 +XEN SOUND FRONTEND DRIVER
 +M:    Oleksandr Andrushchenko <oleksandr_andrushchenko@epam.com>
 +L:    xen-devel@lists.xenproject.org (moderated for non-subscribers)
 +L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
 +S:    Supported
 +F:    sound/xen/*
 +
  XFS FILESYSTEM
  M:    Darrick J. Wong <darrick.wong@oracle.com>
  M:    linux-xfs@vger.kernel.org
@@@ -16048,7 -15568,7 +16055,7 @@@ YEALINK PHONE DRIVE
  M:    Henk Vergonet <Henk.Vergonet@gmail.com>
  L:    usbb2k-api-dev@nongnu.org
  S:    Maintained
 -F:    Documentation/input/yealink.rst
 +F:    Documentation/input/devices/yealink.rst
  F:    drivers/input/misc/yealink.*
  
  Z8530 DRIVER FOR AX.25
@@@ -16109,7 -15629,7 +16116,7 @@@ L:   linux-media@vger.kernel.or
  W:    http://mjpeg.sourceforge.net/driver-zoran/
  T:    hg https://linuxtv.org/hg/v4l-dvb
  S:    Odd Fixes
 -F:    drivers/media/pci/zoran/
 +F:    drivers/staging/media/zoran/
  
  ZRAM COMPRESSED RAM BLOCK DEVICE DRVIER
  M:    Minchan Kim <minchan@kernel.org>
@@@ -16133,7 -15653,7 +16140,7 @@@ L:   linux-mm@kvack.or
  S:    Maintained
  F:    mm/zsmalloc.c
  F:    include/linux/zsmalloc.h
 -F:    Documentation/vm/zsmalloc.txt
 +F:    Documentation/vm/zsmalloc.rst
  
  ZSWAP COMPRESSED SWAP CACHING
  M:    Seth Jennings <sjenning@redhat.com>
   * You should have received a copy of the GNU General Public License
   * along with this program; if not, write to the Free Software
   * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-  *
-  * Should you need to contact me, the author, you can do so either by
-  * e-mail - mail your message to <vojtech@ucw.cz>, or by paper mail:
-  * Vojtech Pavlik, Simunkova 1594, Prague 8, 182 00 Czech Republic
   */
  
  #include <linux/module.h>
@@@ -80,7 -76,7 +76,7 @@@ static int joydump_connect(struct gamep
  
        timeout = gameport_time(gameport, 10000); /* 10 ms */
  
 -      buf = kmalloc(BUF_SIZE * sizeof(struct joydump), GFP_KERNEL);
 +      buf = kmalloc_array(BUF_SIZE, sizeof(struct joydump), GFP_KERNEL);
        if (!buf) {
                printk(KERN_INFO "joydump: no memory for testing\n");
                goto jd_end;
@@@ -92,19 -92,6 +92,19 @@@ config TOUCHSCREEN_AD7879_SP
          To compile this driver as a module, choose M here: the
          module will be called ad7879-spi.
  
 +config TOUCHSCREEN_ADC
 +      tristate "Generic ADC based resistive touchscreen"
 +      depends on IIO
 +      select IIO_BUFFER_CB
 +      help
 +        Say Y here if you want to use the generic ADC
 +        resistive touchscreen driver.
 +
 +        If unsure, say N (but it's safe to say "Y").
 +
 +        To compile this driver as a module, choose M here: the
 +        module will be called resistive-adc-touch.ko.
 +
  config TOUCHSCREEN_AR1021_I2C
        tristate "Microchip AR1020/1021 i2c touchscreen"
        depends on I2C && OF
@@@ -164,6 -151,18 +164,18 @@@ config TOUCHSCREEN_BU2101
          To compile this driver as a module, choose M here: the
          module will be called bu21013_ts.
  
+ config TOUCHSCREEN_BU21029
+       tristate "Rohm BU21029 based touch panel controllers"
+       depends on I2C
+       help
+         Say Y here if you have a Rohm BU21029 touchscreen controller
+         connected to your system.
+         If unsure, say N.
+         To compile this driver as a module, choose M here: the
+         module will be called bu21029_ts.
  config TOUCHSCREEN_CHIPONE_ICN8318
        tristate "chipone icn8318 touchscreen controller"
        depends on GPIOLIB || COMPILE_TEST
@@@ -13,12 -13,12 +13,13 @@@ obj-$(CONFIG_TOUCHSCREEN_AD7877)   += ad7
  obj-$(CONFIG_TOUCHSCREEN_AD7879)      += ad7879.o
  obj-$(CONFIG_TOUCHSCREEN_AD7879_I2C)  += ad7879-i2c.o
  obj-$(CONFIG_TOUCHSCREEN_AD7879_SPI)  += ad7879-spi.o
 +obj-$(CONFIG_TOUCHSCREEN_ADC)         += resistive-adc-touch.o
  obj-$(CONFIG_TOUCHSCREEN_ADS7846)     += ads7846.o
  obj-$(CONFIG_TOUCHSCREEN_AR1021_I2C)  += ar1021_i2c.o
  obj-$(CONFIG_TOUCHSCREEN_ATMEL_MXT)   += atmel_mxt_ts.o
  obj-$(CONFIG_TOUCHSCREEN_AUO_PIXCIR)  += auo-pixcir-ts.o
  obj-$(CONFIG_TOUCHSCREEN_BU21013)     += bu21013_ts.o
+ obj-$(CONFIG_TOUCHSCREEN_BU21029)     += bu21029_ts.o
  obj-$(CONFIG_TOUCHSCREEN_CHIPONE_ICN8318)     += chipone_icn8318.o
  obj-$(CONFIG_TOUCHSCREEN_CHIPONE_ICN8505)     += chipone_icn8505.o
  obj-$(CONFIG_TOUCHSCREEN_CY8CTMG110)  += cy8ctmg110_ts.o
diff --combined drivers/md/dm-raid.c
@@@ -588,7 -588,7 +588,7 @@@ static const char *raid10_md_layout_to_
  }
  
  /* Return md raid10 algorithm for @name */
 -static const int raid10_name_to_format(const char *name)
 +static int raid10_name_to_format(const char *name)
  {
        if (!strcasecmp(name, "near"))
                return ALGORITHM_RAID10_NEAR;
@@@ -756,7 -756,7 +756,7 @@@ static struct raid_set *raid_set_alloc(
                return ERR_PTR(-EINVAL);
        }
  
 -      rs = kzalloc(sizeof(*rs) + raid_devs * sizeof(rs->dev[0]), GFP_KERNEL);
 +      rs = kzalloc(struct_size(rs, dev, raid_devs), GFP_KERNEL);
        if (!rs) {
                ti->error = "Cannot allocate raid context";
                return ERR_PTR(-ENOMEM);
@@@ -3859,7 -3859,7 +3859,7 @@@ static int __load_dirty_region_bitmap(s
        /* Try loading the bitmap unless "raid0", which does not have one */
        if (!rs_is_raid0(rs) &&
            !test_and_set_bit(RT_FLAG_RS_BITMAP_LOADED, &rs->runtime_flags)) {
-               r = bitmap_load(&rs->md);
+               r = md_bitmap_load(&rs->md);
                if (r)
                        DMERR("Failed to load bitmap");
        }
@@@ -3987,8 -3987,8 +3987,8 @@@ static int raid_preresume(struct dm_tar
        /* Resize bitmap to adjust to changed region size (aka MD bitmap chunksize) */
        if (test_bit(RT_FLAG_RS_BITMAP_LOADED, &rs->runtime_flags) && mddev->bitmap &&
            mddev->bitmap_info.chunksize != to_bytes(rs->requested_bitmap_chunk_sectors)) {
-               r = bitmap_resize(mddev->bitmap, mddev->dev_sectors,
-                                 to_bytes(rs->requested_bitmap_chunk_sectors), 0);
+               r = md_bitmap_resize(mddev->bitmap, mddev->dev_sectors,
+                                    to_bytes(rs->requested_bitmap_chunk_sectors), 0);
                if (r)
                        DMERR("Failed to resize bitmap");
        }
diff --combined drivers/md/md-bitmap.c
@@@ -46,8 -46,8 +46,8 @@@ static inline char *bmname(struct bitma
   * if we find our page, we increment the page's refcount so that it stays
   * allocated while we're using it
   */
- static int bitmap_checkpage(struct bitmap_counts *bitmap,
-                           unsigned long page, int create, int no_hijack)
+ static int md_bitmap_checkpage(struct bitmap_counts *bitmap,
+                              unsigned long page, int create, int no_hijack)
  __releases(bitmap->lock)
  __acquires(bitmap->lock)
  {
  /* if page is completely empty, put it back on the free list, or dealloc it */
  /* if page was hijacked, unmark the flag so it might get alloced next time */
  /* Note: lock should be held when calling this */
- static void bitmap_checkfree(struct bitmap_counts *bitmap, unsigned long page)
+ static void md_bitmap_checkfree(struct bitmap_counts *bitmap, unsigned long page)
  {
        char *ptr;
  
@@@ -280,7 -280,7 +280,7 @@@ restart
        return -EINVAL;
  }
  
- static void bitmap_file_kick(struct bitmap *bitmap);
+ static void md_bitmap_file_kick(struct bitmap *bitmap);
  /*
   * write out a page to a file
   */
@@@ -310,7 -310,7 +310,7 @@@ static void write_page(struct bitmap *b
                                   atomic_read(&bitmap->pending_writes)==0);
        }
        if (test_bit(BITMAP_WRITE_ERROR, &bitmap->flags))
-               bitmap_file_kick(bitmap);
+               md_bitmap_file_kick(bitmap);
  }
  
  static void end_bitmap_write(struct buffer_head *bh, int uptodate)
@@@ -421,11 -421,11 +421,11 @@@ out
   */
  
  /*
-  * bitmap_wait_writes() should be called before writing any bitmap
+  * md_bitmap_wait_writes() should be called before writing any bitmap
   * blocks, to ensure previous writes, particularly from
-  * bitmap_daemon_work(), have completed.
+  * md_bitmap_daemon_work(), have completed.
   */
- static void bitmap_wait_writes(struct bitmap *bitmap)
+ static void md_bitmap_wait_writes(struct bitmap *bitmap)
  {
        if (bitmap->storage.file)
                wait_event(bitmap->write_wait,
  
  
  /* update the event counter and sync the superblock to disk */
- void bitmap_update_sb(struct bitmap *bitmap)
+ void md_bitmap_update_sb(struct bitmap *bitmap)
  {
        bitmap_super_t *sb;
  
        kunmap_atomic(sb);
        write_page(bitmap, bitmap->storage.sb_page, 1);
  }
- EXPORT_SYMBOL(bitmap_update_sb);
+ EXPORT_SYMBOL(md_bitmap_update_sb);
  
  /* print out the bitmap file superblock */
- void bitmap_print_sb(struct bitmap *bitmap)
+ void md_bitmap_print_sb(struct bitmap *bitmap)
  {
        bitmap_super_t *sb;
  
   *
   * Returns: 0 on success, -Exxx on error
   */
- static int bitmap_new_disk_sb(struct bitmap *bitmap)
+ static int md_bitmap_new_disk_sb(struct bitmap *bitmap)
  {
        bitmap_super_t *sb;
        unsigned long chunksize, daemon_sleep, write_behind;
  }
  
  /* read the superblock from the bitmap file and initialize some bitmap fields */
- static int bitmap_read_sb(struct bitmap *bitmap)
+ static int md_bitmap_read_sb(struct bitmap *bitmap)
  {
        char *reason = NULL;
        bitmap_super_t *sb;
@@@ -727,7 -727,7 +727,7 @@@ out_no_sb
            bitmap->mddev->bitmap_info.space > sectors_reserved)
                bitmap->mddev->bitmap_info.space = sectors_reserved;
        if (err) {
-               bitmap_print_sb(bitmap);
+               md_bitmap_print_sb(bitmap);
                if (bitmap->cluster_slot < 0)
                        md_cluster_stop(bitmap->mddev);
        }
@@@ -774,9 -774,9 +774,9 @@@ static inline struct page *filemap_get_
        return store->filemap[file_page_index(store, chunk)];
  }
  
- static int bitmap_storage_alloc(struct bitmap_storage *store,
-                               unsigned long chunks, int with_super,
-                               int slot_number)
+ static int md_bitmap_storage_alloc(struct bitmap_storage *store,
+                                  unsigned long chunks, int with_super,
+                                  int slot_number)
  {
        int pnum, offset = 0;
        unsigned long num_pages;
        num_pages = DIV_ROUND_UP(bytes, PAGE_SIZE);
        offset = slot_number * num_pages;
  
 -      store->filemap = kmalloc(sizeof(struct page *)
 -                               * num_pages, GFP_KERNEL);
 +      store->filemap = kmalloc_array(num_pages, sizeof(struct page *),
 +                                     GFP_KERNEL);
        if (!store->filemap)
                return -ENOMEM;
  
        return 0;
  }
  
- static void bitmap_file_unmap(struct bitmap_storage *store)
+ static void md_bitmap_file_unmap(struct bitmap_storage *store)
  {
        struct page **map, *sb_page;
        int pages;
   * then it is no longer reliable, so we stop using it and we mark the file
   * as failed in the superblock
   */
- static void bitmap_file_kick(struct bitmap *bitmap)
+ static void md_bitmap_file_kick(struct bitmap *bitmap)
  {
        char *path, *ptr = NULL;
  
        if (!test_and_set_bit(BITMAP_STALE, &bitmap->flags)) {
-               bitmap_update_sb(bitmap);
+               md_bitmap_update_sb(bitmap);
  
                if (bitmap->storage.file) {
                        path = kmalloc(PAGE_SIZE, GFP_KERNEL);
@@@ -923,7 -923,7 +923,7 @@@ static inline int test_and_clear_page_a
   * we set the bit immediately, then we record the page number so that
   * when an unplug occurs, we can flush the dirty pages out to disk
   */
- static void bitmap_file_set_bit(struct bitmap *bitmap, sector_t block)
+ static void md_bitmap_file_set_bit(struct bitmap *bitmap, sector_t block)
  {
        unsigned long bit;
        struct page *page;
        set_page_attr(bitmap, page->index - node_offset, BITMAP_PAGE_DIRTY);
  }
  
- static void bitmap_file_clear_bit(struct bitmap *bitmap, sector_t block)
+ static void md_bitmap_file_clear_bit(struct bitmap *bitmap, sector_t block)
  {
        unsigned long bit;
        struct page *page;
        }
  }
  
- static int bitmap_file_test_bit(struct bitmap *bitmap, sector_t block)
+ static int md_bitmap_file_test_bit(struct bitmap *bitmap, sector_t block)
  {
        unsigned long bit;
        struct page *page;
  /* this gets called when the md device is ready to unplug its underlying
   * (slave) device queues -- before we let any writes go down, we need to
   * sync the dirty pages of the bitmap file to disk */
- void bitmap_unplug(struct bitmap *bitmap)
+ void md_bitmap_unplug(struct bitmap *bitmap)
  {
        unsigned long i;
        int dirty, need_write;
                                                      BITMAP_PAGE_NEEDWRITE);
                if (dirty || need_write) {
                        if (!writing) {
-                               bitmap_wait_writes(bitmap);
+                               md_bitmap_wait_writes(bitmap);
                                if (bitmap->mddev->queue)
                                        blk_add_trace_msg(bitmap->mddev->queue,
                                                          "md bitmap_unplug");
                }
        }
        if (writing)
-               bitmap_wait_writes(bitmap);
+               md_bitmap_wait_writes(bitmap);
  
        if (test_bit(BITMAP_WRITE_ERROR, &bitmap->flags))
-               bitmap_file_kick(bitmap);
+               md_bitmap_file_kick(bitmap);
  }
- EXPORT_SYMBOL(bitmap_unplug);
+ EXPORT_SYMBOL(md_bitmap_unplug);
  
- static void bitmap_set_memory_bits(struct bitmap *bitmap, sector_t offset, int needed);
+ static void md_bitmap_set_memory_bits(struct bitmap *bitmap, sector_t offset, int needed);
  /* * bitmap_init_from_disk -- called at bitmap_create time to initialize
   * the in-memory bitmap from the on-disk bitmap -- also, sets up the
   * memory mapping of the bitmap file
   * We ignore all bits for sectors that end earlier than 'start'.
   * This is used when reading an out-of-date bitmap...
   */
- static int bitmap_init_from_disk(struct bitmap *bitmap, sector_t start)
+ static int md_bitmap_init_from_disk(struct bitmap *bitmap, sector_t start)
  {
        unsigned long i, chunks, index, oldindex, bit, node_offset = 0;
        struct page *page = NULL;
                        /* if the disk bit is set, set the memory bit */
                        int needed = ((sector_t)(i+1) << (bitmap->counts.chunkshift)
                                      >= start);
-                       bitmap_set_memory_bits(bitmap,
-                                              (sector_t)i << bitmap->counts.chunkshift,
-                                              needed);
+                       md_bitmap_set_memory_bits(bitmap,
+                                                 (sector_t)i << bitmap->counts.chunkshift,
+                                                 needed);
                }
                return 0;
        }
                        /* if the disk bit is set, set the memory bit */
                        int needed = ((sector_t)(i+1) << bitmap->counts.chunkshift
                                      >= start);
-                       bitmap_set_memory_bits(bitmap,
-                                              (sector_t)i << bitmap->counts.chunkshift,
-                                              needed);
+                       md_bitmap_set_memory_bits(bitmap,
+                                                 (sector_t)i << bitmap->counts.chunkshift,
+                                                 needed);
                        bit_cnt++;
                }
                offset = 0;
        return ret;
  }
  
- void bitmap_write_all(struct bitmap *bitmap)
+ void md_bitmap_write_all(struct bitmap *bitmap)
  {
        /* We don't actually write all bitmap blocks here,
         * just flag them as needing to be written
        bitmap->allclean = 0;
  }
  
- static void bitmap_count_page(struct bitmap_counts *bitmap,
-                             sector_t offset, int inc)
+ static void md_bitmap_count_page(struct bitmap_counts *bitmap,
+                                sector_t offset, int inc)
  {
        sector_t chunk = offset >> bitmap->chunkshift;
        unsigned long page = chunk >> PAGE_COUNTER_SHIFT;
        bitmap->bp[page].count += inc;
-       bitmap_checkfree(bitmap, page);
+       md_bitmap_checkfree(bitmap, page);
  }
  
- static void bitmap_set_pending(struct bitmap_counts *bitmap, sector_t offset)
+ static void md_bitmap_set_pending(struct bitmap_counts *bitmap, sector_t offset)
  {
        sector_t chunk = offset >> bitmap->chunkshift;
        unsigned long page = chunk >> PAGE_COUNTER_SHIFT;
                bp->pending = 1;
  }
  
- static bitmap_counter_t *bitmap_get_counter(struct bitmap_counts *bitmap,
-                                           sector_t offset, sector_t *blocks,
-                                           int create);
+ static bitmap_counter_t *md_bitmap_get_counter(struct bitmap_counts *bitmap,
+                                              sector_t offset, sector_t *blocks,
+                                              int create);
  
  /*
   * bitmap daemon -- periodically wakes up to clean bits and flush pages
   *                    out to disk
   */
  
- void bitmap_daemon_work(struct mddev *mddev)
+ void md_bitmap_daemon_work(struct mddev *mddev)
  {
        struct bitmap *bitmap;
        unsigned long j;
                        }
                        counts->bp[j >> PAGE_COUNTER_SHIFT].pending = 0;
                }
-               bmc = bitmap_get_counter(counts,
-                                        block,
-                                        &blocks, 0);
  
+               bmc = md_bitmap_get_counter(counts, block, &blocks, 0);
                if (!bmc) {
                        j |= PAGE_COUNTER_MASK;
                        continue;
                if (*bmc == 1 && !bitmap->need_sync) {
                        /* We can clear the bit */
                        *bmc = 0;
-                       bitmap_count_page(counts, block, -1);
-                       bitmap_file_clear_bit(bitmap, block);
+                       md_bitmap_count_page(counts, block, -1);
+                       md_bitmap_file_clear_bit(bitmap, block);
                } else if (*bmc && *bmc <= 2) {
                        *bmc = 1;
-                       bitmap_set_pending(counts, block);
+                       md_bitmap_set_pending(counts, block);
                        bitmap->allclean = 0;
                }
        }
        spin_unlock_irq(&counts->lock);
  
-       bitmap_wait_writes(bitmap);
+       md_bitmap_wait_writes(bitmap);
        /* Now start writeout on any page in NEEDWRITE that isn't DIRTY.
         * DIRTY pages need to be written by bitmap_unplug so it can wait
         * for them.
        mutex_unlock(&mddev->bitmap_info.mutex);
  }
  
- static bitmap_counter_t *bitmap_get_counter(struct bitmap_counts *bitmap,
-                                           sector_t offset, sector_t *blocks,
-                                           int create)
+ static bitmap_counter_t *md_bitmap_get_counter(struct bitmap_counts *bitmap,
+                                              sector_t offset, sector_t *blocks,
+                                              int create)
  __releases(bitmap->lock)
  __acquires(bitmap->lock)
  {
        sector_t csize;
        int err;
  
-       err = bitmap_checkpage(bitmap, page, create, 0);
+       err = md_bitmap_checkpage(bitmap, page, create, 0);
  
        if (bitmap->bp[page].hijacked ||
            bitmap->bp[page].map == NULL)
                        &(bitmap->bp[page].map[pageoff]);
  }
  
- int bitmap_startwrite(struct bitmap *bitmap, sector_t offset, unsigned long sectors, int behind)
+ int md_bitmap_startwrite(struct bitmap *bitmap, sector_t offset, unsigned long sectors, int behind)
  {
        if (!bitmap)
                return 0;
                bitmap_counter_t *bmc;
  
                spin_lock_irq(&bitmap->counts.lock);
-               bmc = bitmap_get_counter(&bitmap->counts, offset, &blocks, 1);
+               bmc = md_bitmap_get_counter(&bitmap->counts, offset, &blocks, 1);
                if (!bmc) {
                        spin_unlock_irq(&bitmap->counts.lock);
                        return 0;
  
                switch (*bmc) {
                case 0:
-                       bitmap_file_set_bit(bitmap, offset);
-                       bitmap_count_page(&bitmap->counts, offset, 1);
+                       md_bitmap_file_set_bit(bitmap, offset);
+                       md_bitmap_count_page(&bitmap->counts, offset, 1);
                        /* fall through */
                case 1:
                        *bmc = 2;
        }
        return 0;
  }
- EXPORT_SYMBOL(bitmap_startwrite);
+ EXPORT_SYMBOL(md_bitmap_startwrite);
  
- void bitmap_endwrite(struct bitmap *bitmap, sector_t offset, unsigned long sectors,
-                    int success, int behind)
+ void md_bitmap_endwrite(struct bitmap *bitmap, sector_t offset,
+                       unsigned long sectors, int success, int behind)
  {
        if (!bitmap)
                return;
                bitmap_counter_t *bmc;
  
                spin_lock_irqsave(&bitmap->counts.lock, flags);
-               bmc = bitmap_get_counter(&bitmap->counts, offset, &blocks, 0);
+               bmc = md_bitmap_get_counter(&bitmap->counts, offset, &blocks, 0);
                if (!bmc) {
                        spin_unlock_irqrestore(&bitmap->counts.lock, flags);
                        return;
  
                (*bmc)--;
                if (*bmc <= 2) {
-                       bitmap_set_pending(&bitmap->counts, offset);
+                       md_bitmap_set_pending(&bitmap->counts, offset);
                        bitmap->allclean = 0;
                }
                spin_unlock_irqrestore(&bitmap->counts.lock, flags);
                        sectors = 0;
        }
  }
- EXPORT_SYMBOL(bitmap_endwrite);
+ EXPORT_SYMBOL(md_bitmap_endwrite);
  
  static int __bitmap_start_sync(struct bitmap *bitmap, sector_t offset, sector_t *blocks,
                               int degraded)
                return 1; /* always resync if no bitmap */
        }
        spin_lock_irq(&bitmap->counts.lock);
-       bmc = bitmap_get_counter(&bitmap->counts, offset, blocks, 0);
+       bmc = md_bitmap_get_counter(&bitmap->counts, offset, blocks, 0);
        rv = 0;
        if (bmc) {
                /* locked */
        return rv;
  }
  
- int bitmap_start_sync(struct bitmap *bitmap, sector_t offset, sector_t *blocks,
-                     int degraded)
+ int md_bitmap_start_sync(struct bitmap *bitmap, sector_t offset, sector_t *blocks,
+                        int degraded)
  {
        /* bitmap_start_sync must always report on multiples of whole
         * pages, otherwise resync (which is very PAGE_SIZE based) will
        }
        return rv;
  }
- EXPORT_SYMBOL(bitmap_start_sync);
+ EXPORT_SYMBOL(md_bitmap_start_sync);
  
- void bitmap_end_sync(struct bitmap *bitmap, sector_t offset, sector_t *blocks, int aborted)
+ void md_bitmap_end_sync(struct bitmap *bitmap, sector_t offset, sector_t *blocks, int aborted)
  {
        bitmap_counter_t *bmc;
        unsigned long flags;
                return;
        }
        spin_lock_irqsave(&bitmap->counts.lock, flags);
-       bmc = bitmap_get_counter(&bitmap->counts, offset, blocks, 0);
+       bmc = md_bitmap_get_counter(&bitmap->counts, offset, blocks, 0);
        if (bmc == NULL)
                goto unlock;
        /* locked */
                        *bmc |= NEEDED_MASK;
                else {
                        if (*bmc <= 2) {
-                               bitmap_set_pending(&bitmap->counts, offset);
+                               md_bitmap_set_pending(&bitmap->counts, offset);
                                bitmap->allclean = 0;
                        }
                }
   unlock:
        spin_unlock_irqrestore(&bitmap->counts.lock, flags);
  }
- EXPORT_SYMBOL(bitmap_end_sync);
+ EXPORT_SYMBOL(md_bitmap_end_sync);
  
- void bitmap_close_sync(struct bitmap *bitmap)
+ void md_bitmap_close_sync(struct bitmap *bitmap)
  {
        /* Sync has finished, and any bitmap chunks that weren't synced
         * properly have been aborted.  It remains to us to clear the
        if (!bitmap)
                return;
        while (sector < bitmap->mddev->resync_max_sectors) {
-               bitmap_end_sync(bitmap, sector, &blocks, 0);
+               md_bitmap_end_sync(bitmap, sector, &blocks, 0);
                sector += blocks;
        }
  }
- EXPORT_SYMBOL(bitmap_close_sync);
+ EXPORT_SYMBOL(md_bitmap_close_sync);
  
- void bitmap_cond_end_sync(struct bitmap *bitmap, sector_t sector, bool force)
+ void md_bitmap_cond_end_sync(struct bitmap *bitmap, sector_t sector, bool force)
  {
        sector_t s = 0;
        sector_t blocks;
        sector &= ~((1ULL << bitmap->counts.chunkshift) - 1);
        s = 0;
        while (s < sector && s < bitmap->mddev->resync_max_sectors) {
-               bitmap_end_sync(bitmap, s, &blocks, 0);
+               md_bitmap_end_sync(bitmap, s, &blocks, 0);
                s += blocks;
        }
        bitmap->last_end_sync = jiffies;
        sysfs_notify(&bitmap->mddev->kobj, NULL, "sync_completed");
  }
- EXPORT_SYMBOL(bitmap_cond_end_sync);
+ EXPORT_SYMBOL(md_bitmap_cond_end_sync);
  
- void bitmap_sync_with_cluster(struct mddev *mddev,
+ void md_bitmap_sync_with_cluster(struct mddev *mddev,
                              sector_t old_lo, sector_t old_hi,
                              sector_t new_lo, sector_t new_hi)
  {
        sector_t sector, blocks = 0;
  
        for (sector = old_lo; sector < new_lo; ) {
-               bitmap_end_sync(bitmap, sector, &blocks, 0);
+               md_bitmap_end_sync(bitmap, sector, &blocks, 0);
                sector += blocks;
        }
        WARN((blocks > new_lo) && old_lo, "alignment is not correct for lo\n");
  
        for (sector = old_hi; sector < new_hi; ) {
-               bitmap_start_sync(bitmap, sector, &blocks, 0);
+               md_bitmap_start_sync(bitmap, sector, &blocks, 0);
                sector += blocks;
        }
        WARN((blocks > new_hi) && old_hi, "alignment is not correct for hi\n");
  }
- EXPORT_SYMBOL(bitmap_sync_with_cluster);
+ EXPORT_SYMBOL(md_bitmap_sync_with_cluster);
  
- static void bitmap_set_memory_bits(struct bitmap *bitmap, sector_t offset, int needed)
+ static void md_bitmap_set_memory_bits(struct bitmap *bitmap, sector_t offset, int needed)
  {
        /* For each chunk covered by any of these sectors, set the
         * counter to 2 and possibly set resync_needed.  They should all
        sector_t secs;
        bitmap_counter_t *bmc;
        spin_lock_irq(&bitmap->counts.lock);
-       bmc = bitmap_get_counter(&bitmap->counts, offset, &secs, 1);
+       bmc = md_bitmap_get_counter(&bitmap->counts, offset, &secs, 1);
        if (!bmc) {
                spin_unlock_irq(&bitmap->counts.lock);
                return;
        }
        if (!*bmc) {
                *bmc = 2;
-               bitmap_count_page(&bitmap->counts, offset, 1);
-               bitmap_set_pending(&bitmap->counts, offset);
+               md_bitmap_count_page(&bitmap->counts, offset, 1);
+               md_bitmap_set_pending(&bitmap->counts, offset);
                bitmap->allclean = 0;
        }
        if (needed)
  }
  
  /* dirty the memory and file bits for bitmap chunks "s" to "e" */
- void bitmap_dirty_bits(struct bitmap *bitmap, unsigned long s, unsigned long e)
+ void md_bitmap_dirty_bits(struct bitmap *bitmap, unsigned long s, unsigned long e)
  {
        unsigned long chunk;
  
        for (chunk = s; chunk <= e; chunk++) {
                sector_t sec = (sector_t)chunk << bitmap->counts.chunkshift;
-               bitmap_set_memory_bits(bitmap, sec, 1);
-               bitmap_file_set_bit(bitmap, sec);
+               md_bitmap_set_memory_bits(bitmap, sec, 1);
+               md_bitmap_file_set_bit(bitmap, sec);
                if (sec < bitmap->mddev->recovery_cp)
                        /* We are asserting that the array is dirty,
                         * so move the recovery_cp address back so
  /*
   * flush out any pending updates
   */
- void bitmap_flush(struct mddev *mddev)
+ void md_bitmap_flush(struct mddev *mddev)
  {
        struct bitmap *bitmap = mddev->bitmap;
        long sleep;
         */
        sleep = mddev->bitmap_info.daemon_sleep * 2;
        bitmap->daemon_lastrun -= sleep;
-       bitmap_daemon_work(mddev);
+       md_bitmap_daemon_work(mddev);
        bitmap->daemon_lastrun -= sleep;
-       bitmap_daemon_work(mddev);
+       md_bitmap_daemon_work(mddev);
        bitmap->daemon_lastrun -= sleep;
-       bitmap_daemon_work(mddev);
-       bitmap_update_sb(bitmap);
+       md_bitmap_daemon_work(mddev);
+       md_bitmap_update_sb(bitmap);
  }
  
  /*
   * free memory that was allocated
   */
- void bitmap_free(struct bitmap *bitmap)
+ void md_bitmap_free(struct bitmap *bitmap)
  {
        unsigned long k, pages;
        struct bitmap_page *bp;
                   atomic_read(&bitmap->pending_writes) == 0);
  
        /* release the bitmap file  */
-       bitmap_file_unmap(&bitmap->storage);
+       md_bitmap_file_unmap(&bitmap->storage);
  
        bp = bitmap->counts.bp;
        pages = bitmap->counts.pages;
        kfree(bp);
        kfree(bitmap);
  }
- EXPORT_SYMBOL(bitmap_free);
+ EXPORT_SYMBOL(md_bitmap_free);
  
- void bitmap_wait_behind_writes(struct mddev *mddev)
+ void md_bitmap_wait_behind_writes(struct mddev *mddev)
  {
        struct bitmap *bitmap = mddev->bitmap;
  
        }
  }
  
- void bitmap_destroy(struct mddev *mddev)
+ void md_bitmap_destroy(struct mddev *mddev)
  {
        struct bitmap *bitmap = mddev->bitmap;
  
        if (!bitmap) /* there was no bitmap */
                return;
  
-       bitmap_wait_behind_writes(mddev);
+       md_bitmap_wait_behind_writes(mddev);
  
        mutex_lock(&mddev->bitmap_info.mutex);
        spin_lock(&mddev->lock);
        if (mddev->thread)
                mddev->thread->timeout = MAX_SCHEDULE_TIMEOUT;
  
-       bitmap_free(bitmap);
+       md_bitmap_free(bitmap);
  }
  
  /*
   * if this returns an error, bitmap_destroy must be called to do clean up
   * once mddev->bitmap is set
   */
- struct bitmap *bitmap_create(struct mddev *mddev, int slot)
+ struct bitmap *md_bitmap_create(struct mddev *mddev, int slot)
  {
        struct bitmap *bitmap;
        sector_t blocks = mddev->resync_max_sectors;
                 * instructing us to create a new on-disk bitmap instance.
                 */
                if (test_and_clear_bit(MD_ARRAY_FIRST_USE, &mddev->flags))
-                       err = bitmap_new_disk_sb(bitmap);
+                       err = md_bitmap_new_disk_sb(bitmap);
                else
-                       err = bitmap_read_sb(bitmap);
+                       err = md_bitmap_read_sb(bitmap);
        } else {
                err = 0;
                if (mddev->bitmap_info.chunksize == 0 ||
                goto error;
  
        bitmap->daemon_lastrun = jiffies;
-       err = bitmap_resize(bitmap, blocks, mddev->bitmap_info.chunksize, 1);
+       err = md_bitmap_resize(bitmap, blocks, mddev->bitmap_info.chunksize, 1);
        if (err)
                goto error;
  
  
        return bitmap;
   error:
-       bitmap_free(bitmap);
+       md_bitmap_free(bitmap);
        return ERR_PTR(err);
  }
  
- int bitmap_load(struct mddev *mddev)
+ int md_bitmap_load(struct mddev *mddev)
  {
        int err = 0;
        sector_t start = 0;
         */
        while (sector < mddev->resync_max_sectors) {
                sector_t blocks;
-               bitmap_start_sync(bitmap, sector, &blocks, 0);
+               md_bitmap_start_sync(bitmap, sector, &blocks, 0);
                sector += blocks;
        }
-       bitmap_close_sync(bitmap);
+       md_bitmap_close_sync(bitmap);
  
        if (mddev->degraded == 0
            || bitmap->events_cleared == mddev->events)
                start = mddev->recovery_cp;
  
        mutex_lock(&mddev->bitmap_info.mutex);
-       err = bitmap_init_from_disk(bitmap, start);
+       err = md_bitmap_init_from_disk(bitmap, start);
        mutex_unlock(&mddev->bitmap_info.mutex);
  
        if (err)
        mddev->thread->timeout = mddev->bitmap_info.daemon_sleep;
        md_wakeup_thread(mddev->thread);
  
-       bitmap_update_sb(bitmap);
+       md_bitmap_update_sb(bitmap);
  
        if (test_bit(BITMAP_WRITE_ERROR, &bitmap->flags))
                err = -EIO;
  out:
        return err;
  }
- EXPORT_SYMBOL_GPL(bitmap_load);
+ EXPORT_SYMBOL_GPL(md_bitmap_load);
  
  struct bitmap *get_bitmap_from_slot(struct mddev *mddev, int slot)
  {
        int rv = 0;
        struct bitmap *bitmap;
  
-       bitmap = bitmap_create(mddev, slot);
+       bitmap = md_bitmap_create(mddev, slot);
        if (IS_ERR(bitmap)) {
                rv = PTR_ERR(bitmap);
                return ERR_PTR(rv);
        }
  
-       rv = bitmap_init_from_disk(bitmap, 0);
+       rv = md_bitmap_init_from_disk(bitmap, 0);
        if (rv) {
-               bitmap_free(bitmap);
+               md_bitmap_free(bitmap);
                return ERR_PTR(rv);
        }
  
@@@ -1973,7 -1971,7 +1971,7 @@@ EXPORT_SYMBOL(get_bitmap_from_slot)
  /* Loads the bitmap associated with slot and copies the resync information
   * to our bitmap
   */
- int bitmap_copy_from_slot(struct mddev *mddev, int slot,
+ int md_bitmap_copy_from_slot(struct mddev *mddev, int slot,
                sector_t *low, sector_t *high, bool clear_bits)
  {
        int rv = 0, i, j;
        counts = &bitmap->counts;
        for (j = 0; j < counts->chunks; j++) {
                block = (sector_t)j << counts->chunkshift;
-               if (bitmap_file_test_bit(bitmap, block)) {
+               if (md_bitmap_file_test_bit(bitmap, block)) {
                        if (!lo)
                                lo = block;
                        hi = block;
-                       bitmap_file_clear_bit(bitmap, block);
-                       bitmap_set_memory_bits(mddev->bitmap, block, 1);
-                       bitmap_file_set_bit(mddev->bitmap, block);
+                       md_bitmap_file_clear_bit(bitmap, block);
+                       md_bitmap_set_memory_bits(mddev->bitmap, block, 1);
+                       md_bitmap_file_set_bit(mddev->bitmap, block);
                }
        }
  
        if (clear_bits) {
-               bitmap_update_sb(bitmap);
+               md_bitmap_update_sb(bitmap);
                /* BITMAP_PAGE_PENDING is set, but bitmap_unplug needs
                 * BITMAP_PAGE_DIRTY or _NEEDWRITE to write ... */
                for (i = 0; i < bitmap->storage.file_pages; i++)
                        if (test_page_attr(bitmap, i, BITMAP_PAGE_PENDING))
                                set_page_attr(bitmap, i, BITMAP_PAGE_NEEDWRITE);
-               bitmap_unplug(bitmap);
+               md_bitmap_unplug(bitmap);
        }
-       bitmap_unplug(mddev->bitmap);
+       md_bitmap_unplug(mddev->bitmap);
        *low = lo;
        *high = hi;
  
        return rv;
  }
- EXPORT_SYMBOL_GPL(bitmap_copy_from_slot);
+ EXPORT_SYMBOL_GPL(md_bitmap_copy_from_slot);
  
  
- void bitmap_status(struct seq_file *seq, struct bitmap *bitmap)
+ void md_bitmap_status(struct seq_file *seq, struct bitmap *bitmap)
  {
        unsigned long chunk_kb;
        struct bitmap_counts *counts;
        seq_printf(seq, "\n");
  }
  
- int bitmap_resize(struct bitmap *bitmap, sector_t blocks,
+ int md_bitmap_resize(struct bitmap *bitmap, sector_t blocks,
                  int chunksize, int init)
  {
        /* If chunk_size is 0, choose an appropriate chunk size.
        chunks = DIV_ROUND_UP_SECTOR_T(blocks, 1 << chunkshift);
        memset(&store, 0, sizeof(store));
        if (bitmap->mddev->bitmap_info.offset || bitmap->mddev->bitmap_info.file)
-               ret = bitmap_storage_alloc(&store, chunks,
-                                          !bitmap->mddev->bitmap_info.external,
-                                          mddev_is_clustered(bitmap->mddev)
-                                          ? bitmap->cluster_slot : 0);
+               ret = md_bitmap_storage_alloc(&store, chunks,
+                                             !bitmap->mddev->bitmap_info.external,
+                                             mddev_is_clustered(bitmap->mddev)
+                                             ? bitmap->cluster_slot : 0);
        if (ret) {
-               bitmap_file_unmap(&store);
+               md_bitmap_file_unmap(&store);
                goto err;
        }
  
        pages = DIV_ROUND_UP(chunks, PAGE_COUNTER_RATIO);
  
 -      new_bp = kzalloc(pages * sizeof(*new_bp), GFP_KERNEL);
 +      new_bp = kcalloc(pages, sizeof(*new_bp), GFP_KERNEL);
        ret = -ENOMEM;
        if (!new_bp) {
-               bitmap_file_unmap(&store);
+               md_bitmap_file_unmap(&store);
                goto err;
        }
  
                memcpy(page_address(store.sb_page),
                       page_address(bitmap->storage.sb_page),
                       sizeof(bitmap_super_t));
-       bitmap_file_unmap(&bitmap->storage);
+       md_bitmap_file_unmap(&bitmap->storage);
        bitmap->storage = store;
  
        old_counts = bitmap->counts;
        if (mddev_is_clustered(bitmap->mddev)) {
                unsigned long page;
                for (page = 0; page < pages; page++) {
-                       ret = bitmap_checkpage(&bitmap->counts, page, 1, 1);
+                       ret = md_bitmap_checkpage(&bitmap->counts, page, 1, 1);
                        if (ret) {
                                unsigned long k;
  
                bitmap_counter_t *bmc_old, *bmc_new;
                int set;
  
-               bmc_old = bitmap_get_counter(&old_counts, block,
-                                            &old_blocks, 0);
+               bmc_old = md_bitmap_get_counter(&old_counts, block, &old_blocks, 0);
                set = bmc_old && NEEDED(*bmc_old);
  
                if (set) {
-                       bmc_new = bitmap_get_counter(&bitmap->counts, block,
-                                                    &new_blocks, 1);
+                       bmc_new = md_bitmap_get_counter(&bitmap->counts, block, &new_blocks, 1);
                        if (*bmc_new == 0) {
                                /* need to set on-disk bits too. */
                                sector_t end = block + new_blocks;
                                sector_t start = block >> chunkshift;
                                start <<= chunkshift;
                                while (start < end) {
-                                       bitmap_file_set_bit(bitmap, block);
+                                       md_bitmap_file_set_bit(bitmap, block);
                                        start += 1 << chunkshift;
                                }
                                *bmc_new = 2;
-                               bitmap_count_page(&bitmap->counts,
-                                                 block, 1);
-                               bitmap_set_pending(&bitmap->counts,
-                                                  block);
+                               md_bitmap_count_page(&bitmap->counts, block, 1);
+                               md_bitmap_set_pending(&bitmap->counts, block);
                        }
                        *bmc_new |= NEEDED_MASK;
                        if (new_blocks < old_blocks)
                int i;
                while (block < (chunks << chunkshift)) {
                        bitmap_counter_t *bmc;
-                       bmc = bitmap_get_counter(&bitmap->counts, block,
-                                                &new_blocks, 1);
+                       bmc = md_bitmap_get_counter(&bitmap->counts, block, &new_blocks, 1);
                        if (bmc) {
                                /* new space.  It needs to be resynced, so
                                 * we set NEEDED_MASK.
                                 */
                                if (*bmc == 0) {
                                        *bmc = NEEDED_MASK | 2;
-                                       bitmap_count_page(&bitmap->counts,
-                                                         block, 1);
-                                       bitmap_set_pending(&bitmap->counts,
-                                                          block);
+                                       md_bitmap_count_page(&bitmap->counts, block, 1);
+                                       md_bitmap_set_pending(&bitmap->counts, block);
                                }
                        }
                        block += new_blocks;
        spin_unlock_irq(&bitmap->counts.lock);
  
        if (!init) {
-               bitmap_unplug(bitmap);
+               md_bitmap_unplug(bitmap);
                bitmap->mddev->pers->quiesce(bitmap->mddev, 0);
        }
        ret = 0;
  err:
        return ret;
  }
- EXPORT_SYMBOL_GPL(bitmap_resize);
+ EXPORT_SYMBOL_GPL(md_bitmap_resize);
  
  static ssize_t
  location_show(struct mddev *mddev, char *page)
@@@ -2298,7 -2289,7 +2289,7 @@@ location_store(struct mddev *mddev, con
                }
                if (mddev->pers) {
                        mddev->pers->quiesce(mddev, 1);
-                       bitmap_destroy(mddev);
+                       md_bitmap_destroy(mddev);
                        mddev->pers->quiesce(mddev, 0);
                }
                mddev->bitmap_info.offset = 0;
                        if (mddev->pers) {
                                struct bitmap *bitmap;
                                mddev->pers->quiesce(mddev, 1);
-                               bitmap = bitmap_create(mddev, -1);
+                               bitmap = md_bitmap_create(mddev, -1);
                                if (IS_ERR(bitmap))
                                        rv = PTR_ERR(bitmap);
                                else {
                                        mddev->bitmap = bitmap;
-                                       rv = bitmap_load(mddev);
+                                       rv = md_bitmap_load(mddev);
                                        if (rv)
                                                mddev->bitmap_info.offset = 0;
                                }
                                mddev->pers->quiesce(mddev, 0);
                                if (rv) {
-                                       bitmap_destroy(mddev);
+                                       md_bitmap_destroy(mddev);
                                        goto out;
                                }
                        }
diff --combined drivers/md/md-cluster.c
@@@ -304,6 -304,15 +304,6 @@@ static void recover_bitmaps(struct md_t
        while (cinfo->recovery_map) {
                slot = fls64((u64)cinfo->recovery_map) - 1;
  
 -              /* Clear suspend_area associated with the bitmap */
 -              spin_lock_irq(&cinfo->suspend_lock);
 -              list_for_each_entry_safe(s, tmp, &cinfo->suspend_list, list)
 -                      if (slot == s->slot) {
 -                              list_del(&s->list);
 -                              kfree(s);
 -                      }
 -              spin_unlock_irq(&cinfo->suspend_lock);
 -
                snprintf(str, 64, "bitmap%04d", slot);
                bm_lockres = lockres_init(mddev, str, NULL, 1);
                if (!bm_lockres) {
                                        str, ret);
                        goto clear_bit;
                }
-               ret = bitmap_copy_from_slot(mddev, slot, &lo, &hi, true);
+               ret = md_bitmap_copy_from_slot(mddev, slot, &lo, &hi, true);
                if (ret) {
                        pr_err("md-cluster: Could not copy data from bitmap %d\n", slot);
                        goto clear_bit;
                }
 +
 +              /* Clear suspend_area associated with the bitmap */
 +              spin_lock_irq(&cinfo->suspend_lock);
 +              list_for_each_entry_safe(s, tmp, &cinfo->suspend_list, list)
 +                      if (slot == s->slot) {
 +                              list_del(&s->list);
 +                              kfree(s);
 +                      }
 +              spin_unlock_irq(&cinfo->suspend_lock);
 +
                if (hi > 0) {
                        if (lo < mddev->recovery_cp)
                                mddev->recovery_cp = lo;
                        /* wake up thread to continue resync in case resync
                         * is not finished */
                        if (mddev->recovery_cp != MaxSector) {
 -                          set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
 -                          md_wakeup_thread(mddev->thread);
 +                              /*
 +                               * clear the REMOTE flag since we will launch
 +                               * resync thread in current node.
 +                               */
 +                              clear_bit(MD_RESYNCING_REMOTE,
 +                                        &mddev->recovery);
 +                              set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
 +                              md_wakeup_thread(mddev->thread);
                        }
                }
  clear_bit:
@@@ -464,11 -457,6 +464,11 @@@ static void process_suspend_info(struc
        struct suspend_info *s;
  
        if (!hi) {
 +              /*
 +               * clear the REMOTE flag since resync or recovery is finished
 +               * in remote node.
 +               */
 +              clear_bit(MD_RESYNCING_REMOTE, &mddev->recovery);
                remove_suspend_info(mddev, slot);
                set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
                md_wakeup_thread(mddev->thread);
         * resync thread is running in another node,
         * so we don't need to do the resync again
         * with the same section */
-       bitmap_sync_with_cluster(mddev, cinfo->sync_low,
-                                       cinfo->sync_hi,
-                                       lo, hi);
+       md_bitmap_sync_with_cluster(mddev, cinfo->sync_low, cinfo->sync_hi, lo, hi);
        cinfo->sync_low = lo;
        cinfo->sync_hi = hi;
  
@@@ -597,7 -583,6 +595,7 @@@ static int process_recvd_msg(struct mdd
                revalidate_disk(mddev->gendisk);
                break;
        case RESYNCING:
 +              set_bit(MD_RESYNCING_REMOTE, &mddev->recovery);
                process_suspend_info(mddev, le32_to_cpu(msg->slot),
                                     le64_to_cpu(msg->low),
                                     le64_to_cpu(msg->high));
@@@ -842,7 -827,7 +840,7 @@@ static int gather_all_resync_info(struc
                }
  
                /* Read the disk bitmap sb and check if it needs recovery */
-               ret = bitmap_copy_from_slot(mddev, i, &lo, &hi, false);
+               ret = md_bitmap_copy_from_slot(mddev, i, &lo, &hi, false);
                if (ret) {
                        pr_warn("md-cluster: Could not gather bitmaps from slot %d", i);
                        lockres_free(bm_lockres);
@@@ -1140,13 -1125,13 +1138,13 @@@ static int cluster_check_sync_size(stru
                bm_lockres = lockres_init(mddev, str, NULL, 1);
                if (!bm_lockres) {
                        pr_err("md-cluster: Cannot initialize %s\n", str);
-                       bitmap_free(bitmap);
+                       md_bitmap_free(bitmap);
                        return -1;
                }
                bm_lockres->flags |= DLM_LKF_NOQUEUE;
                rv = dlm_lock_sync(bm_lockres, DLM_LOCK_PW);
                if (!rv)
-                       bitmap_update_sb(bitmap);
+                       md_bitmap_update_sb(bitmap);
                lockres_free(bm_lockres);
  
                sb = kmap_atomic(bitmap->storage.sb_page);
                        sync_size = sb->sync_size;
                else if (sync_size != sb->sync_size) {
                        kunmap_atomic(sb);
-                       bitmap_free(bitmap);
+                       md_bitmap_free(bitmap);
                        return -1;
                }
                kunmap_atomic(sb);
-               bitmap_free(bitmap);
+               md_bitmap_free(bitmap);
        }
  
        return (my_sync_size == sync_size) ? 0 : -1;
@@@ -1278,18 -1263,8 +1276,18 @@@ static int resync_info_update(struct md
  static int resync_finish(struct mddev *mddev)
  {
        struct md_cluster_info *cinfo = mddev->cluster_info;
 +
 +      clear_bit(MD_RESYNCING_REMOTE, &mddev->recovery);
        dlm_unlock_sync(cinfo->resync_lockres);
 -      return resync_info_update(mddev, 0, 0);
 +
 +      /*
 +       * If resync thread is interrupted so we can't say resync is finished,
 +       * another node will launch resync thread to continue.
 +       */
 +      if (test_bit(MD_CLOSING, &mddev->flags))
 +              return 0;
 +      else
 +              return resync_info_update(mddev, 0, 0);
  }
  
  static int area_resyncing(struct mddev *mddev, int direction,
@@@ -1403,9 -1378,9 +1401,9 @@@ static int lock_all_bitmaps(struct mdde
        char str[64];
        struct md_cluster_info *cinfo = mddev->cluster_info;
  
 -      cinfo->other_bitmap_lockres = kzalloc((mddev->bitmap_info.nodes - 1) *
 -                                           sizeof(struct dlm_lock_resource *),
 -                                           GFP_KERNEL);
 +      cinfo->other_bitmap_lockres =
 +              kcalloc(mddev->bitmap_info.nodes - 1,
 +                      sizeof(struct dlm_lock_resource *), GFP_KERNEL);
        if (!cinfo->other_bitmap_lockres) {
                pr_err("md: can't alloc mem for other bitmap locks\n");
                return 0;
@@@ -1465,7 -1440,7 +1463,7 @@@ static int gather_bitmaps(struct md_rde
        for (sn = 0; sn < mddev->bitmap_info.nodes; sn++) {
                if (sn == (cinfo->slot_number - 1))
                        continue;
-               err = bitmap_copy_from_slot(mddev, sn, &lo, &hi, false);
+               err = md_bitmap_copy_from_slot(mddev, sn, &lo, &hi, false);
                if (err) {
                        pr_warn("md-cluster: Could not gather bitmaps from slot %d", sn);
                        goto out;
diff --combined drivers/md/md.c
@@@ -84,8 -84,6 +84,8 @@@ static void autostart_arrays(int part)
  static LIST_HEAD(pers_list);
  static DEFINE_SPINLOCK(pers_lock);
  
 +static struct kobj_type md_ktype;
 +
  struct md_cluster_operations *md_cluster_ops;
  EXPORT_SYMBOL(md_cluster_ops);
  struct module *md_cluster_mod;
@@@ -132,24 -130,6 +132,24 @@@ static inline int speed_max(struct mdde
                mddev->sync_speed_max : sysctl_speed_limit_max;
  }
  
 +static void * flush_info_alloc(gfp_t gfp_flags, void *data)
 +{
 +        return kzalloc(sizeof(struct flush_info), gfp_flags);
 +}
 +static void flush_info_free(void *flush_info, void *data)
 +{
 +        kfree(flush_info);
 +}
 +
 +static void * flush_bio_alloc(gfp_t gfp_flags, void *data)
 +{
 +      return kzalloc(sizeof(struct flush_bio), gfp_flags);
 +}
 +static void flush_bio_free(void *flush_bio, void *data)
 +{
 +      kfree(flush_bio);
 +}
 +
  static struct ctl_table_header *raid_table_header;
  
  static struct ctl_table raid_table[] = {
@@@ -204,15 -184,19 +204,15 @@@ static int start_readonly
   */
  static bool create_on_open = true;
  
 -/* bio_clone_mddev
 - * like bio_clone_bioset, but with a local bio set
 - */
 -
  struct bio *bio_alloc_mddev(gfp_t gfp_mask, int nr_iovecs,
                            struct mddev *mddev)
  {
        struct bio *b;
  
 -      if (!mddev || !mddev->bio_set)
 +      if (!mddev || !bioset_initialized(&mddev->bio_set))
                return bio_alloc(gfp_mask, nr_iovecs);
  
 -      b = bio_alloc_bioset(gfp_mask, nr_iovecs, mddev->bio_set);
 +      b = bio_alloc_bioset(gfp_mask, nr_iovecs, &mddev->bio_set);
        if (!b)
                return NULL;
        return b;
@@@ -221,10 -205,10 +221,10 @@@ EXPORT_SYMBOL_GPL(bio_alloc_mddev)
  
  static struct bio *md_bio_alloc_sync(struct mddev *mddev)
  {
 -      if (!mddev || !mddev->sync_set)
 +      if (!mddev || !bioset_initialized(&mddev->sync_set))
                return bio_alloc(GFP_NOIO, 1);
  
 -      return bio_alloc_bioset(GFP_NOIO, 1, mddev->sync_set);
 +      return bio_alloc_bioset(GFP_NOIO, 1, &mddev->sync_set);
  }
  
  /*
@@@ -331,7 -315,6 +331,7 @@@ EXPORT_SYMBOL(md_handle_request)
  static blk_qc_t md_make_request(struct request_queue *q, struct bio *bio)
  {
        const int rw = bio_data_dir(bio);
 +      const int sgrp = op_stat_group(bio_op(bio));
        struct mddev *mddev = q->queuedata;
        unsigned int sectors;
        int cpu;
        md_handle_request(mddev, bio);
  
        cpu = part_stat_lock();
 -      part_stat_inc(cpu, &mddev->gendisk->part0, ios[rw]);
 -      part_stat_add(cpu, &mddev->gendisk->part0, sectors[rw], sectors);
 +      part_stat_inc(cpu, &mddev->gendisk->part0, ios[sgrp]);
 +      part_stat_add(cpu, &mddev->gendisk->part0, sectors[sgrp], sectors);
        part_stat_unlock();
  
        return BLK_QC_T_NONE;
@@@ -429,53 -412,30 +429,53 @@@ static int md_congested(void *data, in
  /*
   * Generic flush handling for md
   */
 +static void submit_flushes(struct work_struct *ws)
 +{
 +      struct flush_info *fi = container_of(ws, struct flush_info, flush_work);
 +      struct mddev *mddev = fi->mddev;
 +      struct bio *bio = fi->bio;
 +
 +      bio->bi_opf &= ~REQ_PREFLUSH;
 +      md_handle_request(mddev, bio);
 +
 +      mempool_free(fi, mddev->flush_pool);
 +}
  
 -static void md_end_flush(struct bio *bio)
 +static void md_end_flush(struct bio *fbio)
  {
 -      struct md_rdev *rdev = bio->bi_private;
 -      struct mddev *mddev = rdev->mddev;
 +      struct flush_bio *fb = fbio->bi_private;
 +      struct md_rdev *rdev = fb->rdev;
 +      struct flush_info *fi = fb->fi;
 +      struct bio *bio = fi->bio;
 +      struct mddev *mddev = fi->mddev;
  
        rdev_dec_pending(rdev, mddev);
  
 -      if (atomic_dec_and_test(&mddev->flush_pending)) {
 -              /* The pre-request flush has finished */
 -              queue_work(md_wq, &mddev->flush_work);
 +      if (atomic_dec_and_test(&fi->flush_pending)) {
 +              if (bio->bi_iter.bi_size == 0)
 +                      /* an empty barrier - all done */
 +                      bio_endio(bio);
 +              else {
 +                      INIT_WORK(&fi->flush_work, submit_flushes);
 +                      queue_work(md_wq, &fi->flush_work);
 +              }
        }
 -      bio_put(bio);
 -}
  
 -static void md_submit_flush_data(struct work_struct *ws);
 +      mempool_free(fb, mddev->flush_bio_pool);
 +      bio_put(fbio);
 +}
  
 -static void submit_flushes(struct work_struct *ws)
 +void md_flush_request(struct mddev *mddev, struct bio *bio)
  {
 -      struct mddev *mddev = container_of(ws, struct mddev, flush_work);
        struct md_rdev *rdev;
 +      struct flush_info *fi;
 +
 +      fi = mempool_alloc(mddev->flush_pool, GFP_NOIO);
 +
 +      fi->bio = bio;
 +      fi->mddev = mddev;
 +      atomic_set(&fi->flush_pending, 1);
  
 -      INIT_WORK(&mddev->flush_work, md_submit_flush_data);
 -      atomic_set(&mddev->flush_pending, 1);
        rcu_read_lock();
        rdev_for_each_rcu(rdev, mddev)
                if (rdev->raid_disk >= 0 &&
                         * we reclaim rcu_read_lock
                         */
                        struct bio *bi;
 +                      struct flush_bio *fb;
                        atomic_inc(&rdev->nr_pending);
                        atomic_inc(&rdev->nr_pending);
                        rcu_read_unlock();
 +
 +                      fb = mempool_alloc(mddev->flush_bio_pool, GFP_NOIO);
 +                      fb->fi = fi;
 +                      fb->rdev = rdev;
 +
                        bi = bio_alloc_mddev(GFP_NOIO, 0, mddev);
 -                      bi->bi_end_io = md_end_flush;
 -                      bi->bi_private = rdev;
                        bio_set_dev(bi, rdev->bdev);
 +                      bi->bi_end_io = md_end_flush;
 +                      bi->bi_private = fb;
                        bi->bi_opf = REQ_OP_WRITE | REQ_PREFLUSH;
 -                      atomic_inc(&mddev->flush_pending);
 +
 +                      atomic_inc(&fi->flush_pending);
                        submit_bio(bi);
 +
                        rcu_read_lock();
                        rdev_dec_pending(rdev, mddev);
                }
        rcu_read_unlock();
 -      if (atomic_dec_and_test(&mddev->flush_pending))
 -              queue_work(md_wq, &mddev->flush_work);
 -}
  
 -static void md_submit_flush_data(struct work_struct *ws)
 -{
 -      struct mddev *mddev = container_of(ws, struct mddev, flush_work);
 -      struct bio *bio = mddev->flush_bio;
 -
 -      /*
 -       * must reset flush_bio before calling into md_handle_request to avoid a
 -       * deadlock, because other bios passed md_handle_request suspend check
 -       * could wait for this and below md_handle_request could wait for those
 -       * bios because of suspend check
 -       */
 -      mddev->flush_bio = NULL;
 -      wake_up(&mddev->sb_wait);
 -
 -      if (bio->bi_iter.bi_size == 0)
 -              /* an empty barrier - all done */
 -              bio_endio(bio);
 -      else {
 -              bio->bi_opf &= ~REQ_PREFLUSH;
 -              md_handle_request(mddev, bio);
 +      if (atomic_dec_and_test(&fi->flush_pending)) {
 +              if (bio->bi_iter.bi_size == 0)
 +                      /* an empty barrier - all done */
 +                      bio_endio(bio);
 +              else {
 +                      INIT_WORK(&fi->flush_work, submit_flushes);
 +                      queue_work(md_wq, &fi->flush_work);
 +              }
        }
  }
 -
 -void md_flush_request(struct mddev *mddev, struct bio *bio)
 -{
 -      spin_lock_irq(&mddev->lock);
 -      wait_event_lock_irq(mddev->sb_wait,
 -                          !mddev->flush_bio,
 -                          mddev->lock);
 -      mddev->flush_bio = bio;
 -      spin_unlock_irq(&mddev->lock);
 -
 -      INIT_WORK(&mddev->flush_work, submit_flushes);
 -      queue_work(md_wq, &mddev->flush_work);
 -}
  EXPORT_SYMBOL(md_flush_request);
  
  static inline struct mddev *mddev_get(struct mddev *mddev)
@@@ -530,6 -510,8 +530,6 @@@ static void mddev_delayed_delete(struc
  
  static void mddev_put(struct mddev *mddev)
  {
 -      struct bio_set *bs = NULL, *sync_bs = NULL;
 -
        if (!atomic_dec_and_lock(&mddev->active, &all_mddevs_lock))
                return;
        if (!mddev->raid_disks && list_empty(&mddev->disks) &&
                /* Array is not configured at all, and not held active,
                 * so destroy it */
                list_del_init(&mddev->all_mddevs);
 -              bs = mddev->bio_set;
 -              sync_bs = mddev->sync_set;
 -              mddev->bio_set = NULL;
 -              mddev->sync_set = NULL;
 -              if (mddev->gendisk) {
 -                      /* We did a probe so need to clean up.  Call
 -                       * queue_work inside the spinlock so that
 -                       * flush_workqueue() after mddev_find will
 -                       * succeed in waiting for the work to be done.
 -                       */
 -                      INIT_WORK(&mddev->del_work, mddev_delayed_delete);
 -                      queue_work(md_misc_wq, &mddev->del_work);
 -              } else
 -                      kfree(mddev);
 +
 +              /*
 +               * Call queue_work inside the spinlock so that
 +               * flush_workqueue() after mddev_find will succeed in waiting
 +               * for the work to be done.
 +               */
 +              INIT_WORK(&mddev->del_work, mddev_delayed_delete);
 +              queue_work(md_misc_wq, &mddev->del_work);
        }
        spin_unlock(&all_mddevs_lock);
 -      if (bs)
 -              bioset_free(bs);
 -      if (sync_bs)
 -              bioset_free(sync_bs);
  }
  
  static void md_safemode_timeout(struct timer_list *t);
  
  void mddev_init(struct mddev *mddev)
  {
 +      kobject_init(&mddev->kobj, &md_ktype);
        mutex_init(&mddev->open_mutex);
        mutex_init(&mddev->reconfig_mutex);
        mutex_init(&mddev->bitmap_info.mutex);
        atomic_set(&mddev->openers, 0);
        atomic_set(&mddev->active_io, 0);
        spin_lock_init(&mddev->lock);
 -      atomic_set(&mddev->flush_pending, 0);
        init_waitqueue_head(&mddev->sb_wait);
        init_waitqueue_head(&mddev->recovery_wait);
        mddev->reshape_position = MaxSector;
@@@ -2131,7 -2123,7 +2131,7 @@@ int md_integrity_register(struct mddev 
                               bdev_get_integrity(reference->bdev));
  
        pr_debug("md: data integrity enabled on %s\n", mdname(mddev));
 -      if (bioset_integrity_create(mddev->bio_set, BIO_POOL_SIZE)) {
 +      if (bioset_integrity_create(&mddev->bio_set, BIO_POOL_SIZE)) {
                pr_err("md: failed to create integrity pool for %s\n",
                       mdname(mddev));
                return -EINVAL;
@@@ -2568,7 -2560,7 +2568,7 @@@ repeat
        if (mddev->queue)
                blk_add_trace_msg(mddev->queue, "md md_update_sb");
  rewrite:
-       bitmap_update_sb(mddev->bitmap);
+       md_bitmap_update_sb(mddev->bitmap);
        rdev_for_each(rdev, mddev) {
                char b[BDEVNAME_SIZE];
  
@@@ -2861,8 -2853,7 +2861,8 @@@ state_store(struct md_rdev *rdev, cons
                        err = 0;
                }
        } else if (cmd_match(buf, "re-add")) {
 -              if (test_bit(Faulty, &rdev->flags) && (rdev->raid_disk == -1)) {
 +              if (test_bit(Faulty, &rdev->flags) && (rdev->raid_disk == -1) &&
 +                      rdev->saved_raid_disk >= 0) {
                        /* clear_bit is performed _after_ all the devices
                         * have their local Faulty bit cleared. If any writes
                         * happen in the meantime in the local node, they
@@@ -4381,10 -4372,10 +4381,10 @@@ bitmap_store(struct mddev *mddev, cons
                        if (buf == end) break;
                }
                if (*end && !isspace(*end)) break;
-               bitmap_dirty_bits(mddev->bitmap, chunk, end_chunk);
+               md_bitmap_dirty_bits(mddev->bitmap, chunk, end_chunk);
                buf = skip_spaces(end);
        }
-       bitmap_unplug(mddev->bitmap); /* flush the bits to disk */
+       md_bitmap_unplug(mddev->bitmap); /* flush the bits to disk */
  out:
        mddev_unlock(mddev);
        return len;
@@@ -5223,8 -5214,6 +5223,8 @@@ static void md_free(struct kobject *ko
                put_disk(mddev->gendisk);
        percpu_ref_exit(&mddev->writes_pending);
  
 +      bioset_exit(&mddev->bio_set);
 +      bioset_exit(&mddev->sync_set);
        kfree(mddev);
  }
  
@@@ -5358,7 -5347,8 +5358,7 @@@ static int md_alloc(dev_t dev, char *na
        mutex_lock(&mddev->open_mutex);
        add_disk(disk);
  
 -      error = kobject_init_and_add(&mddev->kobj, &md_ktype,
 -                                   &disk_to_dev(disk)->kobj, "%s", "md");
 +      error = kobject_add(&mddev->kobj, &disk_to_dev(disk)->kobj, "%s", "md");
        if (error) {
                /* This isn't possible, but as kobject_init_and_add is marked
                 * __must_check, we must do something with the result
@@@ -5507,28 -5497,14 +5507,28 @@@ int md_run(struct mddev *mddev
                sysfs_notify_dirent_safe(rdev->sysfs_state);
        }
  
 -      if (mddev->bio_set == NULL) {
 -              mddev->bio_set = bioset_create(BIO_POOL_SIZE, 0, BIOSET_NEED_BVECS);
 -              if (!mddev->bio_set)
 -                      return -ENOMEM;
 +      if (!bioset_initialized(&mddev->bio_set)) {
 +              err = bioset_init(&mddev->bio_set, BIO_POOL_SIZE, 0, BIOSET_NEED_BVECS);
 +              if (err)
 +                      return err;
 +      }
 +      if (!bioset_initialized(&mddev->sync_set)) {
 +              err = bioset_init(&mddev->sync_set, BIO_POOL_SIZE, 0, BIOSET_NEED_BVECS);
 +              if (err)
 +                      return err;
 +      }
 +      if (mddev->flush_pool == NULL) {
 +              mddev->flush_pool = mempool_create(NR_FLUSH_INFOS, flush_info_alloc,
 +                                              flush_info_free, mddev);
 +              if (!mddev->flush_pool) {
 +                      err = -ENOMEM;
 +                      goto abort;
 +              }
        }
 -      if (mddev->sync_set == NULL) {
 -              mddev->sync_set = bioset_create(BIO_POOL_SIZE, 0, BIOSET_NEED_BVECS);
 -              if (!mddev->sync_set) {
 +      if (mddev->flush_bio_pool == NULL) {
 +              mddev->flush_bio_pool = mempool_create(NR_FLUSH_BIOS, flush_bio_alloc,
 +                                              flush_bio_free, mddev);
 +              if (!mddev->flush_bio_pool) {
                        err = -ENOMEM;
                        goto abort;
                }
            (mddev->bitmap_info.file || mddev->bitmap_info.offset)) {
                struct bitmap *bitmap;
  
-               bitmap = bitmap_create(mddev, -1);
+               bitmap = md_bitmap_create(mddev, -1);
                if (IS_ERR(bitmap)) {
                        err = PTR_ERR(bitmap);
                        pr_warn("%s: failed to create bitmap (%d)\n",
                        pers->free(mddev, mddev->private);
                mddev->private = NULL;
                module_put(pers->owner);
-               bitmap_destroy(mddev);
+               md_bitmap_destroy(mddev);
                goto abort;
        }
        if (mddev->queue) {
        return 0;
  
  abort:
 -      if (mddev->bio_set) {
 -              bioset_free(mddev->bio_set);
 -              mddev->bio_set = NULL;
 +      if (mddev->flush_bio_pool) {
 +              mempool_destroy(mddev->flush_bio_pool);
 +              mddev->flush_bio_pool = NULL;
        }
 -      if (mddev->sync_set) {
 -              bioset_free(mddev->sync_set);
 -              mddev->sync_set = NULL;
 +      if (mddev->flush_pool){
 +              mempool_destroy(mddev->flush_pool);
 +              mddev->flush_pool = NULL;
        }
  
        return err;
@@@ -5712,9 -5688,9 +5712,9 @@@ static int do_md_run(struct mddev *mdde
        err = md_run(mddev);
        if (err)
                goto out;
-       err = bitmap_load(mddev);
+       err = md_bitmap_load(mddev);
        if (err) {
-               bitmap_destroy(mddev);
+               md_bitmap_destroy(mddev);
                goto out;
        }
  
@@@ -5856,7 -5832,7 +5856,7 @@@ static void __md_stop_writes(struct mdd
                mddev->pers->quiesce(mddev, 1);
                mddev->pers->quiesce(mddev, 0);
        }
-       bitmap_flush(mddev);
+       md_bitmap_flush(mddev);
  
        if (mddev->ro == 0 &&
            ((!mddev->in_sync && !mddev_is_clustered(mddev)) ||
@@@ -5878,7 -5854,7 +5878,7 @@@ EXPORT_SYMBOL_GPL(md_stop_writes)
  
  static void mddev_detach(struct mddev *mddev)
  {
-       bitmap_wait_behind_writes(mddev);
+       md_bitmap_wait_behind_writes(mddev);
        if (mddev->pers && mddev->pers->quiesce) {
                mddev->pers->quiesce(mddev, 1);
                mddev->pers->quiesce(mddev, 0);
  static void __md_stop(struct mddev *mddev)
  {
        struct md_personality *pers = mddev->pers;
-       bitmap_destroy(mddev);
+       md_bitmap_destroy(mddev);
        mddev_detach(mddev);
        /* Ensure ->event_work is done */
        flush_workqueue(md_misc_wq);
@@@ -5912,16 -5888,14 +5912,16 @@@ void md_stop(struct mddev *mddev
         * This is called from dm-raid
         */
        __md_stop(mddev);
 -      if (mddev->bio_set) {
 -              bioset_free(mddev->bio_set);
 -              mddev->bio_set = NULL;
 +      if (mddev->flush_bio_pool) {
 +              mempool_destroy(mddev->flush_bio_pool);
 +              mddev->flush_bio_pool = NULL;
        }
 -      if (mddev->sync_set) {
 -              bioset_free(mddev->sync_set);
 -              mddev->sync_set = NULL;
 +      if (mddev->flush_pool) {
 +              mempool_destroy(mddev->flush_pool);
 +              mddev->flush_pool = NULL;
        }
 +      bioset_exit(&mddev->bio_set);
 +      bioset_exit(&mddev->sync_set);
  }
  
  EXPORT_SYMBOL_GPL(md_stop);
@@@ -6550,9 -6524,6 +6550,9 @@@ static int hot_remove_disk(struct mdde
        char b[BDEVNAME_SIZE];
        struct md_rdev *rdev;
  
 +      if (!mddev->pers)
 +              return -ENODEV;
 +
        rdev = find_rdev(mddev, dev);
        if (!rdev)
                return -ENXIO;
@@@ -6710,21 -6681,21 +6710,21 @@@ static int set_bitmap_file(struct mdde
                if (fd >= 0) {
                        struct bitmap *bitmap;
  
-                       bitmap = bitmap_create(mddev, -1);
+                       bitmap = md_bitmap_create(mddev, -1);
                        mddev_suspend(mddev);
                        if (!IS_ERR(bitmap)) {
                                mddev->bitmap = bitmap;
-                               err = bitmap_load(mddev);
+                               err = md_bitmap_load(mddev);
                        } else
                                err = PTR_ERR(bitmap);
                        if (err) {
-                               bitmap_destroy(mddev);
+                               md_bitmap_destroy(mddev);
                                fd = -1;
                        }
                        mddev_resume(mddev);
                } else if (fd < 0) {
                        mddev_suspend(mddev);
-                       bitmap_destroy(mddev);
+                       md_bitmap_destroy(mddev);
                        mddev_resume(mddev);
                }
        }
@@@ -7010,15 -6981,15 +7010,15 @@@ static int update_array_info(struct mdd
                                mddev->bitmap_info.default_offset;
                        mddev->bitmap_info.space =
                                mddev->bitmap_info.default_space;
-                       bitmap = bitmap_create(mddev, -1);
+                       bitmap = md_bitmap_create(mddev, -1);
                        mddev_suspend(mddev);
                        if (!IS_ERR(bitmap)) {
                                mddev->bitmap = bitmap;
-                               rv = bitmap_load(mddev);
+                               rv = md_bitmap_load(mddev);
                        } else
                                rv = PTR_ERR(bitmap);
                        if (rv)
-                               bitmap_destroy(mddev);
+                               md_bitmap_destroy(mddev);
                        mddev_resume(mddev);
                } else {
                        /* remove the bitmap */
                                md_cluster_ops->leave(mddev);
                        }
                        mddev_suspend(mddev);
-                       bitmap_destroy(mddev);
+                       md_bitmap_destroy(mddev);
                        mddev_resume(mddev);
                        mddev->bitmap_info.offset = 0;
                }
@@@ -7677,23 -7648,6 +7677,23 @@@ static int status_resync(struct seq_fil
                resync -= atomic_read(&mddev->recovery_active);
  
        if (resync == 0) {
 +              if (test_bit(MD_RESYNCING_REMOTE, &mddev->recovery)) {
 +                      struct md_rdev *rdev;
 +
 +                      rdev_for_each(rdev, mddev)
 +                              if (rdev->raid_disk >= 0 &&
 +                                  !test_bit(Faulty, &rdev->flags) &&
 +                                  rdev->recovery_offset != MaxSector &&
 +                                  rdev->recovery_offset) {
 +                                      seq_printf(seq, "\trecover=REMOTE");
 +                                      return 1;
 +                              }
 +                      if (mddev->reshape_position != MaxSector)
 +                              seq_printf(seq, "\treshape=REMOTE");
 +                      else
 +                              seq_printf(seq, "\tresync=REMOTE");
 +                      return 1;
 +              }
                if (mddev->recovery_cp < MaxSector) {
                        seq_printf(seq, "\tresync=PENDING");
                        return 1;
@@@ -7923,7 -7877,7 +7923,7 @@@ static int md_seq_show(struct seq_file 
                } else
                        seq_printf(seq, "\n       ");
  
-               bitmap_status(seq, mddev->bitmap);
+               md_bitmap_status(seq, mddev->bitmap);
  
                seq_printf(seq, "\n");
        }
@@@ -8060,7 -8014,8 +8060,7 @@@ static int is_mddev_idle(struct mddev *
        rcu_read_lock();
        rdev_for_each_rcu(rdev, mddev) {
                struct gendisk *disk = rdev->bdev->bd_contains->bd_disk;
 -              curr_events = (int)part_stat_read(&disk->part0, sectors[0]) +
 -                            (int)part_stat_read(&disk->part0, sectors[1]) -
 +              curr_events = (int)part_stat_read_accum(&disk->part0, sectors) -
                              atomic_read(&disk->sync_io);
                /* sync IO will cause sync_io to increase before the disk_stats
                 * as sync_io is counted when a request starts, and
@@@ -8686,7 -8641,6 +8686,7 @@@ static int remove_and_add_spares(struc
                        if (mddev->pers->hot_remove_disk(
                                    mddev, rdev) == 0) {
                                sysfs_unlink_rdev(mddev, rdev);
 +                              rdev->saved_raid_disk = rdev->raid_disk;
                                rdev->raid_disk = -1;
                                removed++;
                        }
@@@ -8794,7 -8748,7 +8794,7 @@@ void md_check_recovery(struct mddev *md
                return;
  
        if (mddev->bitmap)
-               bitmap_daemon_work(mddev);
+               md_bitmap_daemon_work(mddev);
  
        if (signal_pending(current)) {
                if (mddev->pers->sync_request && !mddev->external) {
                                 * which has the bitmap stored on all devices.
                                 * So make sure all bitmap pages get written
                                 */
-                               bitmap_write_all(mddev->bitmap);
+                               md_bitmap_write_all(mddev->bitmap);
                        }
                        INIT_WORK(&mddev->del_work, md_start_sync);
                        queue_work(md_misc_wq, &mddev->del_work);
@@@ -9179,7 -9133,7 +9179,7 @@@ static void check_sb_changes(struct mdd
                if (ret)
                        pr_info("md-cluster: resize failed\n");
                else
-                       bitmap_update_sb(mddev->bitmap);
+                       md_bitmap_update_sb(mddev->bitmap);
        }
  
        /* Check for change of roles in the active devices */
diff --combined drivers/md/raid1.c
@@@ -126,8 -126,8 +126,8 @@@ static void * r1buf_pool_alloc(gfp_t gf
        if (!r1_bio)
                return NULL;
  
 -      rps = kmalloc(sizeof(struct resync_pages) * pi->raid_disks,
 -                    gfp_flags);
 +      rps = kmalloc_array(pi->raid_disks, sizeof(struct resync_pages),
 +                          gfp_flags);
        if (!rps)
                goto out_free_r1bio;
  
@@@ -221,7 -221,7 +221,7 @@@ static void free_r1bio(struct r1bio *r1
        struct r1conf *conf = r1_bio->mddev->private;
  
        put_all_bios(conf, r1_bio);
 -      mempool_free(r1_bio, conf->r1bio_pool);
 +      mempool_free(r1_bio, &conf->r1bio_pool);
  }
  
  static void put_buf(struct r1bio *r1_bio)
                        rdev_dec_pending(conf->mirrors[i].rdev, r1_bio->mddev);
        }
  
 -      mempool_free(r1_bio, conf->r1buf_pool);
 +      mempool_free(r1_bio, &conf->r1buf_pool);
  
        lower_barrier(conf, sect);
  }
@@@ -385,10 -385,10 +385,10 @@@ static void close_write(struct r1bio *r
                r1_bio->behind_master_bio = NULL;
        }
        /* clear the bitmap if all writes complete successfully */
-       bitmap_endwrite(r1_bio->mddev->bitmap, r1_bio->sector,
-                       r1_bio->sectors,
-                       !test_bit(R1BIO_Degraded, &r1_bio->state),
-                       test_bit(R1BIO_BehindIO, &r1_bio->state));
+       md_bitmap_endwrite(r1_bio->mddev->bitmap, r1_bio->sector,
+                          r1_bio->sectors,
+                          !test_bit(R1BIO_Degraded, &r1_bio->state),
+                          test_bit(R1BIO_BehindIO, &r1_bio->state));
        md_write_end(r1_bio->mddev);
  }
  
@@@ -781,7 -781,7 +781,7 @@@ static int raid1_congested(struct mdde
  static void flush_bio_list(struct r1conf *conf, struct bio *bio)
  {
        /* flush any pending bitmap writes to disk before proceeding w/ I/O */
-       bitmap_unplug(conf->mddev->bitmap);
+       md_bitmap_unplug(conf->mddev->bitmap);
        wake_up(&conf->wait_barrier);
  
        while (bio) { /* submit pending writes */
@@@ -1178,7 -1178,7 +1178,7 @@@ alloc_r1bio(struct mddev *mddev, struc
        struct r1conf *conf = mddev->private;
        struct r1bio *r1_bio;
  
 -      r1_bio = mempool_alloc(conf->r1bio_pool, GFP_NOIO);
 +      r1_bio = mempool_alloc(&conf->r1bio_pool, GFP_NOIO);
        /* Ensure no bio records IO_BLOCKED */
        memset(r1_bio->bios, 0, conf->raid_disks * sizeof(r1_bio->bios[0]));
        init_r1bio(r1_bio, mddev, bio);
@@@ -1268,7 -1268,7 +1268,7 @@@ static void raid1_read_request(struct m
  
        if (max_sectors < bio_sectors(bio)) {
                struct bio *split = bio_split(bio, max_sectors,
 -                                            gfp, conf->bio_split);
 +                                            gfp, &conf->bio_split);
                bio_chain(split, bio);
                generic_make_request(bio);
                bio = split;
  
        r1_bio->read_disk = rdisk;
  
 -      read_bio = bio_clone_fast(bio, gfp, mddev->bio_set);
 +      read_bio = bio_clone_fast(bio, gfp, &mddev->bio_set);
  
        r1_bio->bios[rdisk] = read_bio;
  
@@@ -1439,7 -1439,7 +1439,7 @@@ static void raid1_write_request(struct 
  
        if (max_sectors < bio_sectors(bio)) {
                struct bio *split = bio_split(bio, max_sectors,
 -                                            GFP_NOIO, conf->bio_split);
 +                                            GFP_NOIO, &conf->bio_split);
                bio_chain(split, bio);
                generic_make_request(bio);
                bio = split;
                                alloc_behind_master_bio(r1_bio, bio);
                        }
  
-                       bitmap_startwrite(bitmap, r1_bio->sector,
-                                         r1_bio->sectors,
-                                         test_bit(R1BIO_BehindIO,
-                                                  &r1_bio->state));
+                       md_bitmap_startwrite(bitmap, r1_bio->sector, r1_bio->sectors,
+                                            test_bit(R1BIO_BehindIO, &r1_bio->state));
                        first_clone = 0;
                }
  
                if (r1_bio->behind_master_bio)
                        mbio = bio_clone_fast(r1_bio->behind_master_bio,
 -                                            GFP_NOIO, mddev->bio_set);
 +                                            GFP_NOIO, &mddev->bio_set);
                else
 -                      mbio = bio_clone_fast(bio, GFP_NOIO, mddev->bio_set);
 +                      mbio = bio_clone_fast(bio, GFP_NOIO, &mddev->bio_set);
  
                if (r1_bio->behind_master_bio) {
                        if (test_bit(WriteMostly, &conf->mirrors[i].rdev->flags))
@@@ -1657,7 -1655,8 +1655,7 @@@ static void close_sync(struct r1conf *c
                _allow_barrier(conf, idx);
        }
  
 -      mempool_destroy(conf->r1buf_pool);
 -      conf->r1buf_pool = NULL;
 +      mempool_exit(&conf->r1buf_pool);
  }
  
  static int raid1_spare_active(struct mddev *mddev)
@@@ -1880,8 -1879,7 +1878,7 @@@ static void end_sync_write(struct bio *
                long sectors_to_go = r1_bio->sectors;
                /* make sure these bits doesn't get cleared. */
                do {
-                       bitmap_end_sync(mddev->bitmap, s,
-                                       &sync_blocks, 1);
+                       md_bitmap_end_sync(mddev->bitmap, s, &sync_blocks, 1);
                        s += sync_blocks;
                        sectors_to_go -= sync_blocks;
                } while (sectors_to_go > 0);
@@@ -2347,10 -2345,10 +2344,10 @@@ static int narrow_write_error(struct r1
                if (test_bit(R1BIO_BehindIO, &r1_bio->state)) {
                        wbio = bio_clone_fast(r1_bio->behind_master_bio,
                                              GFP_NOIO,
 -                                            mddev->bio_set);
 +                                            &mddev->bio_set);
                } else {
                        wbio = bio_clone_fast(r1_bio->master_bio, GFP_NOIO,
 -                                            mddev->bio_set);
 +                                            &mddev->bio_set);
                }
  
                bio_set_op_attrs(wbio, REQ_OP_WRITE, 0);
@@@ -2449,6 -2447,7 +2446,6 @@@ static void handle_read_error(struct r1
        struct mddev *mddev = conf->mddev;
        struct bio *bio;
        struct md_rdev *rdev;
 -      sector_t bio_sector;
  
        clear_bit(R1BIO_ReadError, &r1_bio->state);
        /* we got a read error. Maybe the drive is bad.  Maybe just
         */
  
        bio = r1_bio->bios[r1_bio->read_disk];
 -      bio_sector = conf->mirrors[r1_bio->read_disk].rdev->data_offset + r1_bio->sector;
        bio_put(bio);
        r1_bio->bios[r1_bio->read_disk] = NULL;
  
                fix_read_error(conf, r1_bio->read_disk,
                               r1_bio->sector, r1_bio->sectors);
                unfreeze_array(conf);
 +      } else if (mddev->ro == 0 && test_bit(FailFast, &rdev->flags)) {
 +              md_error(mddev, rdev);
        } else {
                r1_bio->bios[r1_bio->read_disk] = IO_BLOCKED;
        }
@@@ -2563,15 -2561,17 +2560,15 @@@ static int init_resync(struct r1conf *c
        int buffs;
  
        buffs = RESYNC_WINDOW / RESYNC_BLOCK_SIZE;
 -      BUG_ON(conf->r1buf_pool);
 -      conf->r1buf_pool = mempool_create(buffs, r1buf_pool_alloc, r1buf_pool_free,
 -                                        conf->poolinfo);
 -      if (!conf->r1buf_pool)
 -              return -ENOMEM;
 -      return 0;
 +      BUG_ON(mempool_initialized(&conf->r1buf_pool));
 +
 +      return mempool_init(&conf->r1buf_pool, buffs, r1buf_pool_alloc,
 +                          r1buf_pool_free, conf->poolinfo);
  }
  
  static struct r1bio *raid1_alloc_init_r1buf(struct r1conf *conf)
  {
 -      struct r1bio *r1bio = mempool_alloc(conf->r1buf_pool, GFP_NOIO);
 +      struct r1bio *r1bio = mempool_alloc(&conf->r1buf_pool, GFP_NOIO);
        struct resync_pages *rps;
        struct bio *bio;
        int i;
@@@ -2614,7 -2614,7 +2611,7 @@@ static sector_t raid1_sync_request(stru
        int idx = sector_to_idx(sector_nr);
        int page_idx = 0;
  
 -      if (!conf->r1buf_pool)
 +      if (!mempool_initialized(&conf->r1buf_pool))
                if (init_resync(conf))
                        return 0;
  
                 * We can find the current addess in mddev->curr_resync
                 */
                if (mddev->curr_resync < max_sector) /* aborted */
-                       bitmap_end_sync(mddev->bitmap, mddev->curr_resync,
-                                               &sync_blocks, 1);
+                       md_bitmap_end_sync(mddev->bitmap, mddev->curr_resync,
+                                          &sync_blocks, 1);
                else /* completed sync */
                        conf->fullsync = 0;
  
-               bitmap_close_sync(mddev->bitmap);
+               md_bitmap_close_sync(mddev->bitmap);
                close_sync(conf);
  
                if (mddev_is_clustered(mddev)) {
        /* before building a request, check if we can skip these blocks..
         * This call the bitmap_start_sync doesn't actually record anything
         */
-       if (!bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, 1) &&
+       if (!md_bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, 1) &&
            !conf->fullsync && !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery)) {
                /* We can skip this block, and probably several more */
                *skipped = 1;
         * sector_nr + two times RESYNC_SECTORS
         */
  
-       bitmap_cond_end_sync(mddev->bitmap, sector_nr,
+       md_bitmap_cond_end_sync(mddev->bitmap, sector_nr,
                mddev_is_clustered(mddev) && (sector_nr + 2 * RESYNC_SECTORS > conf->cluster_sync_high));
  
  
                if (len == 0)
                        break;
                if (sync_blocks == 0) {
-                       if (!bitmap_start_sync(mddev->bitmap, sector_nr,
-                                              &sync_blocks, still_degraded) &&
+                       if (!md_bitmap_start_sync(mddev->bitmap, sector_nr,
+                                                 &sync_blocks, still_degraded) &&
                            !conf->fullsync &&
                            !test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery))
                                break;
@@@ -2936,9 -2936,9 +2933,9 @@@ static struct r1conf *setup_conf(struc
        if (!conf->barrier)
                goto abort;
  
 -      conf->mirrors = kzalloc(sizeof(struct raid1_info)
 -                              * mddev->raid_disks * 2,
 -                               GFP_KERNEL);
 +      conf->mirrors = kzalloc(array3_size(sizeof(struct raid1_info),
 +                                          mddev->raid_disks, 2),
 +                              GFP_KERNEL);
        if (!conf->mirrors)
                goto abort;
  
        if (!conf->poolinfo)
                goto abort;
        conf->poolinfo->raid_disks = mddev->raid_disks * 2;
 -      conf->r1bio_pool = mempool_create(NR_RAID1_BIOS, r1bio_pool_alloc,
 -                                        r1bio_pool_free,
 -                                        conf->poolinfo);
 -      if (!conf->r1bio_pool)
 +      err = mempool_init(&conf->r1bio_pool, NR_RAID1_BIOS, r1bio_pool_alloc,
 +                         r1bio_pool_free, conf->poolinfo);
 +      if (err)
                goto abort;
  
 -      conf->bio_split = bioset_create(BIO_POOL_SIZE, 0, 0);
 -      if (!conf->bio_split)
 +      err = bioset_init(&conf->bio_split, BIO_POOL_SIZE, 0, 0);
 +      if (err)
                goto abort;
  
        conf->poolinfo->mddev = mddev;
  
   abort:
        if (conf) {
 -              mempool_destroy(conf->r1bio_pool);
 +              mempool_exit(&conf->r1bio_pool);
                kfree(conf->mirrors);
                safe_put_page(conf->tmppage);
                kfree(conf->poolinfo);
                kfree(conf->nr_waiting);
                kfree(conf->nr_queued);
                kfree(conf->barrier);
 -              if (conf->bio_split)
 -                      bioset_free(conf->bio_split);
 +              bioset_exit(&conf->bio_split);
                kfree(conf);
        }
        return ERR_PTR(err);
@@@ -3139,7 -3141,7 +3136,7 @@@ static void raid1_free(struct mddev *md
  {
        struct r1conf *conf = priv;
  
 -      mempool_destroy(conf->r1bio_pool);
 +      mempool_exit(&conf->r1bio_pool);
        kfree(conf->mirrors);
        safe_put_page(conf->tmppage);
        kfree(conf->poolinfo);
        kfree(conf->nr_waiting);
        kfree(conf->nr_queued);
        kfree(conf->barrier);
 -      if (conf->bio_split)
 -              bioset_free(conf->bio_split);
 +      bioset_exit(&conf->bio_split);
        kfree(conf);
  }
  
@@@ -3165,7 -3168,7 +3162,7 @@@ static int raid1_resize(struct mddev *m
            mddev->array_sectors > newsize)
                return -EINVAL;
        if (mddev->bitmap) {
-               int ret = bitmap_resize(mddev->bitmap, newsize, 0, 0);
+               int ret = md_bitmap_resize(mddev->bitmap, newsize, 0, 0);
                if (ret)
                        return ret;
        }
@@@ -3193,17 -3196,13 +3190,17 @@@ static int raid1_reshape(struct mddev *
         * At the same time, we "pack" the devices so that all the missing
         * devices have the higher raid_disk numbers.
         */
 -      mempool_t *newpool, *oldpool;
 +      mempool_t newpool, oldpool;
        struct pool_info *newpoolinfo;
        struct raid1_info *newmirrors;
        struct r1conf *conf = mddev->private;
        int cnt, raid_disks;
        unsigned long flags;
        int d, d2;
 +      int ret;
 +
 +      memset(&newpool, 0, sizeof(newpool));
 +      memset(&oldpool, 0, sizeof(oldpool));
  
        /* Cannot change chunk_size, layout, or level */
        if (mddev->chunk_sectors != mddev->new_chunk_sectors ||
        newpoolinfo->mddev = mddev;
        newpoolinfo->raid_disks = raid_disks * 2;
  
 -      newpool = mempool_create(NR_RAID1_BIOS, r1bio_pool_alloc,
 -                               r1bio_pool_free, newpoolinfo);
 -      if (!newpool) {
 +      ret = mempool_init(&newpool, NR_RAID1_BIOS, r1bio_pool_alloc,
 +                         r1bio_pool_free, newpoolinfo);
 +      if (ret) {
                kfree(newpoolinfo);
 -              return -ENOMEM;
 +              return ret;
        }
 -      newmirrors = kzalloc(sizeof(struct raid1_info) * raid_disks * 2,
 +      newmirrors = kzalloc(array3_size(sizeof(struct raid1_info),
 +                                       raid_disks, 2),
                             GFP_KERNEL);
        if (!newmirrors) {
                kfree(newpoolinfo);
 -              mempool_destroy(newpool);
 +              mempool_exit(&newpool);
                return -ENOMEM;
        }
  
        set_bit(MD_RECOVERY_NEEDED, &mddev->recovery);
        md_wakeup_thread(mddev->thread);
  
 -      mempool_destroy(oldpool);
 +      mempool_exit(&oldpool);
        return 0;
  }
  
diff --combined drivers/md/raid10.c
@@@ -175,7 -175,7 +175,7 @@@ static void * r10buf_pool_alloc(gfp_t g
                nalloc_rp = nalloc;
        else
                nalloc_rp = nalloc * 2;
 -      rps = kmalloc(sizeof(struct resync_pages) * nalloc_rp, gfp_flags);
 +      rps = kmalloc_array(nalloc_rp, sizeof(struct resync_pages), gfp_flags);
        if (!rps)
                goto out_free_r10bio;
  
@@@ -255,11 -255,9 +255,11 @@@ static void r10buf_pool_free(void *__r1
        for (j = conf->copies; j--; ) {
                struct bio *bio = r10bio->devs[j].bio;
  
 -              rp = get_resync_pages(bio);
 -              resync_free_pages(rp);
 -              bio_put(bio);
 +              if (bio) {
 +                      rp = get_resync_pages(bio);
 +                      resync_free_pages(rp);
 +                      bio_put(bio);
 +              }
  
                bio = r10bio->devs[j].repl_bio;
                if (bio)
@@@ -293,14 -291,14 +293,14 @@@ static void free_r10bio(struct r10bio *
        struct r10conf *conf = r10_bio->mddev->private;
  
        put_all_bios(conf, r10_bio);
 -      mempool_free(r10_bio, conf->r10bio_pool);
 +      mempool_free(r10_bio, &conf->r10bio_pool);
  }
  
  static void put_buf(struct r10bio *r10_bio)
  {
        struct r10conf *conf = r10_bio->mddev->private;
  
 -      mempool_free(r10_bio, conf->r10buf_pool);
 +      mempool_free(r10_bio, &conf->r10buf_pool);
  
        lower_barrier(conf);
  }
@@@ -440,10 -438,10 +440,10 @@@ static void raid10_end_read_request(str
  static void close_write(struct r10bio *r10_bio)
  {
        /* clear the bitmap if all writes complete successfully */
-       bitmap_endwrite(r10_bio->mddev->bitmap, r10_bio->sector,
-                       r10_bio->sectors,
-                       !test_bit(R10BIO_Degraded, &r10_bio->state),
-                       0);
+       md_bitmap_endwrite(r10_bio->mddev->bitmap, r10_bio->sector,
+                          r10_bio->sectors,
+                          !test_bit(R10BIO_Degraded, &r10_bio->state),
+                          0);
        md_write_end(r10_bio->mddev);
  }
  
@@@ -917,7 -915,7 +917,7 @@@ static void flush_pending_writes(struc
                blk_start_plug(&plug);
                /* flush any pending bitmap writes to disk
                 * before proceeding w/ I/O */
-               bitmap_unplug(conf->mddev->bitmap);
+               md_bitmap_unplug(conf->mddev->bitmap);
                wake_up(&conf->wait_barrier);
  
                while (bio) { /* submit pending writes */
@@@ -1102,7 -1100,7 +1102,7 @@@ static void raid10_unplug(struct blk_pl
  
        /* we aren't scheduling, so we can do the write-out directly. */
        bio = bio_list_get(&plug->pending);
-       bitmap_unplug(mddev->bitmap);
+       md_bitmap_unplug(mddev->bitmap);
        wake_up(&conf->wait_barrier);
  
        while (bio) { /* submit pending writes */
@@@ -1206,7 -1204,7 +1206,7 @@@ static void raid10_read_request(struct 
                                   (unsigned long long)r10_bio->sector);
        if (max_sectors < bio_sectors(bio)) {
                struct bio *split = bio_split(bio, max_sectors,
 -                                            gfp, conf->bio_split);
 +                                            gfp, &conf->bio_split);
                bio_chain(split, bio);
                generic_make_request(bio);
                bio = split;
        }
        slot = r10_bio->read_slot;
  
 -      read_bio = bio_clone_fast(bio, gfp, mddev->bio_set);
 +      read_bio = bio_clone_fast(bio, gfp, &mddev->bio_set);
  
        r10_bio->devs[slot].bio = read_bio;
        r10_bio->devs[slot].rdev = rdev;
@@@ -1263,7 -1261,7 +1263,7 @@@ static void raid10_write_one_disk(struc
        } else
                rdev = conf->mirrors[devnum].rdev;
  
 -      mbio = bio_clone_fast(bio, GFP_NOIO, mddev->bio_set);
 +      mbio = bio_clone_fast(bio, GFP_NOIO, &mddev->bio_set);
        if (replacement)
                r10_bio->devs[n_copy].repl_bio = mbio;
        else
@@@ -1511,7 -1509,7 +1511,7 @@@ retry_write
  
        if (r10_bio->sectors < bio_sectors(bio)) {
                struct bio *split = bio_split(bio, r10_bio->sectors,
 -                                            GFP_NOIO, conf->bio_split);
 +                                            GFP_NOIO, &conf->bio_split);
                bio_chain(split, bio);
                generic_make_request(bio);
                bio = split;
        }
  
        atomic_set(&r10_bio->remaining, 1);
-       bitmap_startwrite(mddev->bitmap, r10_bio->sector, r10_bio->sectors, 0);
+       md_bitmap_startwrite(mddev->bitmap, r10_bio->sector, r10_bio->sectors, 0);
  
        for (i = 0; i < conf->copies; i++) {
                if (r10_bio->devs[i].bio)
@@@ -1535,7 -1533,7 +1535,7 @@@ static void __make_request(struct mdde
        struct r10conf *conf = mddev->private;
        struct r10bio *r10_bio;
  
 -      r10_bio = mempool_alloc(conf->r10bio_pool, GFP_NOIO);
 +      r10_bio = mempool_alloc(&conf->r10bio_pool, GFP_NOIO);
  
        r10_bio->master_bio = bio;
        r10_bio->sectors = sectors;
@@@ -1734,7 -1732,8 +1734,7 @@@ static void close_sync(struct r10conf *
        wait_barrier(conf);
        allow_barrier(conf);
  
 -      mempool_destroy(conf->r10buf_pool);
 -      conf->r10buf_pool = NULL;
 +      mempool_exit(&conf->r10buf_pool);
  }
  
  static int raid10_spare_active(struct mddev *mddev)
@@@ -2364,7 -2363,7 +2364,7 @@@ static void fix_read_error(struct r10co
  {
        int sect = 0; /* Offset from r10_bio->sector */
        int sectors = r10_bio->sectors;
 -      struct md_rdev*rdev;
 +      struct md_rdev *rdev;
        int max_read_errors = atomic_read(&mddev->max_corr_read_errors);
        int d = r10_bio->devs[r10_bio->read_slot].devnum;
  
@@@ -2584,7 -2583,7 +2584,7 @@@ static int narrow_write_error(struct r1
                if (sectors > sect_to_write)
                        sectors = sect_to_write;
                /* Write at 'sector' for 'sectors' */
 -              wbio = bio_clone_fast(bio, GFP_NOIO, mddev->bio_set);
 +              wbio = bio_clone_fast(bio, GFP_NOIO, &mddev->bio_set);
                bio_trim(wbio, sector - bio->bi_iter.bi_sector, sectors);
                wsector = r10_bio->devs[i].addr + (sector - r10_bio->sector);
                wbio->bi_iter.bi_sector = wsector +
@@@ -2817,25 -2816,25 +2817,25 @@@ static void raid10d(struct md_thread *t
  
  static int init_resync(struct r10conf *conf)
  {
 -      int buffs;
 -      int i;
 +      int ret, buffs, i;
  
        buffs = RESYNC_WINDOW / RESYNC_BLOCK_SIZE;
 -      BUG_ON(conf->r10buf_pool);
 +      BUG_ON(mempool_initialized(&conf->r10buf_pool));
        conf->have_replacement = 0;
        for (i = 0; i < conf->geo.raid_disks; i++)
                if (conf->mirrors[i].replacement)
                        conf->have_replacement = 1;
 -      conf->r10buf_pool = mempool_create(buffs, r10buf_pool_alloc, r10buf_pool_free, conf);
 -      if (!conf->r10buf_pool)
 -              return -ENOMEM;
 +      ret = mempool_init(&conf->r10buf_pool, buffs,
 +                         r10buf_pool_alloc, r10buf_pool_free, conf);
 +      if (ret)
 +              return ret;
        conf->next_resync = 0;
        return 0;
  }
  
  static struct r10bio *raid10_alloc_init_r10buf(struct r10conf *conf)
  {
 -      struct r10bio *r10bio = mempool_alloc(conf->r10buf_pool, GFP_NOIO);
 +      struct r10bio *r10bio = mempool_alloc(&conf->r10buf_pool, GFP_NOIO);
        struct rsync_pages *rp;
        struct bio *bio;
        int nalloc;
@@@ -2946,7 -2945,7 +2946,7 @@@ static sector_t raid10_sync_request(str
        sector_t chunk_mask = conf->geo.chunk_mask;
        int page_idx = 0;
  
 -      if (!conf->r10buf_pool)
 +      if (!mempool_initialized(&conf->r10buf_pool))
                if (init_resync(conf))
                        return 0;
  
  
                if (mddev->curr_resync < max_sector) { /* aborted */
                        if (test_bit(MD_RECOVERY_SYNC, &mddev->recovery))
-                               bitmap_end_sync(mddev->bitmap, mddev->curr_resync,
-                                               &sync_blocks, 1);
+                               md_bitmap_end_sync(mddev->bitmap, mddev->curr_resync,
+                                                  &sync_blocks, 1);
                        else for (i = 0; i < conf->geo.raid_disks; i++) {
                                sector_t sect =
                                        raid10_find_virt(conf, mddev->curr_resync, i);
-                               bitmap_end_sync(mddev->bitmap, sect,
-                                               &sync_blocks, 1);
+                               md_bitmap_end_sync(mddev->bitmap, sect,
+                                                  &sync_blocks, 1);
                        }
                } else {
                        /* completed sync */
                        }
                        conf->fullsync = 0;
                }
-               bitmap_close_sync(mddev->bitmap);
+               md_bitmap_close_sync(mddev->bitmap);
                close_sync(conf);
                *skipped = 1;
                return sectors_skipped;
                         * we only need to recover the block if it is set in
                         * the bitmap
                         */
-                       must_sync = bitmap_start_sync(mddev->bitmap, sect,
-                                                     &sync_blocks, 1);
+                       must_sync = md_bitmap_start_sync(mddev->bitmap, sect,
+                                                        &sync_blocks, 1);
                        if (sync_blocks < max_sync)
                                max_sync = sync_blocks;
                        if (!must_sync &&
                                }
                        }
  
-                       must_sync = bitmap_start_sync(mddev->bitmap, sect,
-                                                     &sync_blocks, still_degraded);
+                       must_sync = md_bitmap_start_sync(mddev->bitmap, sect,
+                                                        &sync_blocks, still_degraded);
  
                        any_working = 0;
                        for (j=0; j<conf->copies;j++) {
                 * safety reason, which ensures curr_resync_completed is
                 * updated in bitmap_cond_end_sync.
                 */
-               bitmap_cond_end_sync(mddev->bitmap, sector_nr,
-                                    mddev_is_clustered(mddev) &&
-                                    (sector_nr + 2 * RESYNC_SECTORS >
-                                     conf->cluster_sync_high));
+               md_bitmap_cond_end_sync(mddev->bitmap, sector_nr,
+                                       mddev_is_clustered(mddev) &&
+                                       (sector_nr + 2 * RESYNC_SECTORS > conf->cluster_sync_high));
  
-               if (!bitmap_start_sync(mddev->bitmap, sector_nr,
-                                      &sync_blocks, mddev->degraded) &&
+               if (!md_bitmap_start_sync(mddev->bitmap, sector_nr,
+                                         &sync_blocks, mddev->degraded) &&
                    !conf->fullsync && !test_bit(MD_RECOVERY_REQUESTED,
                                                 &mddev->recovery)) {
                        /* We can skip this block */
@@@ -3688,8 -3686,8 +3687,8 @@@ static struct r10conf *setup_conf(struc
                goto out;
  
        /* FIXME calc properly */
 -      conf->mirrors = kzalloc(sizeof(struct raid10_info)*(mddev->raid_disks +
 -                                                          max(0,-mddev->delta_disks)),
 +      conf->mirrors = kcalloc(mddev->raid_disks + max(0, -mddev->delta_disks),
 +                              sizeof(struct raid10_info),
                                GFP_KERNEL);
        if (!conf->mirrors)
                goto out;
  
        conf->geo = geo;
        conf->copies = copies;
 -      conf->r10bio_pool = mempool_create(NR_RAID10_BIOS, r10bio_pool_alloc,
 -                                         r10bio_pool_free, conf);
 -      if (!conf->r10bio_pool)
 +      err = mempool_init(&conf->r10bio_pool, NR_RAID10_BIOS, r10bio_pool_alloc,
 +                         r10bio_pool_free, conf);
 +      if (err)
                goto out;
  
 -      conf->bio_split = bioset_create(BIO_POOL_SIZE, 0, 0);
 -      if (!conf->bio_split)
 +      err = bioset_init(&conf->bio_split, BIO_POOL_SIZE, 0, 0);
 +      if (err)
                goto out;
  
        calc_sectors(conf, mddev->dev_sectors);
        init_waitqueue_head(&conf->wait_barrier);
        atomic_set(&conf->nr_pending, 0);
  
 +      err = -ENOMEM;
        conf->thread = md_register_thread(raid10d, mddev, "raid10");
        if (!conf->thread)
                goto out;
  
   out:
        if (conf) {
 -              mempool_destroy(conf->r10bio_pool);
 +              mempool_exit(&conf->r10bio_pool);
                kfree(conf->mirrors);
                safe_put_page(conf->tmppage);
 -              if (conf->bio_split)
 -                      bioset_free(conf->bio_split);
 +              bioset_exit(&conf->bio_split);
                kfree(conf);
        }
        return ERR_PTR(err);
@@@ -3893,13 -3891,6 +3892,13 @@@ static int raid10_run(struct mddev *mdd
                            disk->rdev->saved_raid_disk < 0)
                                conf->fullsync = 1;
                }
 +
 +              if (disk->replacement &&
 +                  !test_bit(In_sync, &disk->replacement->flags) &&
 +                  disk->replacement->saved_raid_disk < 0) {
 +                      conf->fullsync = 1;
 +              }
 +
                disk->recovery_disabled = mddev->recovery_disabled - 1;
        }
  
  
  out_free_conf:
        md_unregister_thread(&mddev->thread);
 -      mempool_destroy(conf->r10bio_pool);
 +      mempool_exit(&conf->r10bio_pool);
        safe_put_page(conf->tmppage);
        kfree(conf->mirrors);
        kfree(conf);
@@@ -3974,12 -3965,13 +3973,12 @@@ static void raid10_free(struct mddev *m
  {
        struct r10conf *conf = priv;
  
 -      mempool_destroy(conf->r10bio_pool);
 +      mempool_exit(&conf->r10bio_pool);
        safe_put_page(conf->tmppage);
        kfree(conf->mirrors);
        kfree(conf->mirrors_old);
        kfree(conf->mirrors_new);
 -      if (conf->bio_split)
 -              bioset_free(conf->bio_split);
 +      bioset_exit(&conf->bio_split);
        kfree(conf);
  }
  
@@@ -4022,7 -4014,7 +4021,7 @@@ static int raid10_resize(struct mddev *
            mddev->array_sectors > size)
                return -EINVAL;
        if (mddev->bitmap) {
-               int ret = bitmap_resize(mddev->bitmap, size, 0, 0);
+               int ret = md_bitmap_resize(mddev->bitmap, size, 0, 0);
                if (ret)
                        return ret;
        }
@@@ -4136,10 -4128,11 +4135,10 @@@ static int raid10_check_reshape(struct 
        conf->mirrors_new = NULL;
        if (mddev->delta_disks > 0) {
                /* allocate new 'mirrors' list */
 -              conf->mirrors_new = kzalloc(
 -                      sizeof(struct raid10_info)
 -                      *(mddev->raid_disks +
 -                        mddev->delta_disks),
 -                      GFP_KERNEL);
 +              conf->mirrors_new =
 +                      kcalloc(mddev->raid_disks + mddev->delta_disks,
 +                              sizeof(struct raid10_info),
 +                              GFP_KERNEL);
                if (!conf->mirrors_new)
                        return -ENOMEM;
        }
@@@ -4287,10 -4280,9 +4286,9 @@@ static int raid10_start_reshape(struct 
        spin_unlock_irq(&conf->device_lock);
  
        if (mddev->delta_disks && mddev->bitmap) {
-               ret = bitmap_resize(mddev->bitmap,
-                                   raid10_size(mddev, 0,
-                                               conf->geo.raid_disks),
-                                   0, 0);
+               ret = md_bitmap_resize(mddev->bitmap,
+                                      raid10_size(mddev, 0, conf->geo.raid_disks),
+                                      0, 0);
                if (ret)
                        goto abort;
        }
@@@ -4549,7 -4541,7 +4547,7 @@@ read_more
                 * on all the target devices.
                 */
                // FIXME
 -              mempool_free(r10_bio, conf->r10buf_pool);
 +              mempool_free(r10_bio, &conf->r10buf_pool);
                set_bit(MD_RECOVERY_INTR, &mddev->recovery);
                return sectors_done;
        }
diff --combined drivers/md/raid5-cache.c
@@@ -125,9 -125,9 +125,9 @@@ struct r5l_log 
        struct list_head no_mem_stripes;   /* pending stripes, -ENOMEM */
  
        struct kmem_cache *io_kc;
 -      mempool_t *io_pool;
 -      struct bio_set *bs;
 -      mempool_t *meta_pool;
 +      mempool_t io_pool;
 +      struct bio_set bs;
 +      mempool_t meta_pool;
  
        struct md_thread *reclaim_thread;
        unsigned long reclaim_target;   /* number of space that need to be
@@@ -324,10 -324,10 +324,10 @@@ void r5c_handle_cached_data_endio(struc
                if (sh->dev[i].written) {
                        set_bit(R5_UPTODATE, &sh->dev[i].flags);
                        r5c_return_dev_pending_writes(conf, &sh->dev[i]);
-                       bitmap_endwrite(conf->mddev->bitmap, sh->sector,
-                                       STRIPE_SECTORS,
-                                       !test_bit(STRIPE_DEGRADED, &sh->state),
-                                       0);
+                       md_bitmap_endwrite(conf->mddev->bitmap, sh->sector,
+                                          STRIPE_SECTORS,
+                                          !test_bit(STRIPE_DEGRADED, &sh->state),
+                                          0);
                }
        }
  }
@@@ -579,7 -579,7 +579,7 @@@ static void r5l_log_endio(struct bio *b
                md_error(log->rdev->mddev, log->rdev);
  
        bio_put(bio);
 -      mempool_free(io->meta_page, log->meta_pool);
 +      mempool_free(io->meta_page, &log->meta_pool);
  
        spin_lock_irqsave(&log->io_list_lock, flags);
        __r5l_set_io_unit_state(io, IO_UNIT_IO_END);
@@@ -717,6 -717,7 +717,6 @@@ static void r5c_disable_writeback_async
  static void r5l_submit_current_io(struct r5l_log *log)
  {
        struct r5l_io_unit *io = log->current_io;
 -      struct bio *bio;
        struct r5l_meta_block *block;
        unsigned long flags;
        u32 crc;
        block->meta_size = cpu_to_le32(io->meta_offset);
        crc = crc32c_le(log->uuid_checksum, block, PAGE_SIZE);
        block->checksum = cpu_to_le32(crc);
 -      bio = io->current_bio;
  
        log->current_io = NULL;
        spin_lock_irqsave(&log->io_list_lock, flags);
  
  static struct bio *r5l_bio_alloc(struct r5l_log *log)
  {
 -      struct bio *bio = bio_alloc_bioset(GFP_NOIO, BIO_MAX_PAGES, log->bs);
 +      struct bio *bio = bio_alloc_bioset(GFP_NOIO, BIO_MAX_PAGES, &log->bs);
  
        bio_set_op_attrs(bio, REQ_OP_WRITE, 0);
        bio_set_dev(bio, log->rdev->bdev);
@@@ -778,7 -780,7 +778,7 @@@ static struct r5l_io_unit *r5l_new_meta
        struct r5l_io_unit *io;
        struct r5l_meta_block *block;
  
 -      io = mempool_alloc(log->io_pool, GFP_ATOMIC);
 +      io = mempool_alloc(&log->io_pool, GFP_ATOMIC);
        if (!io)
                return NULL;
        memset(io, 0, sizeof(*io));
        bio_list_init(&io->flush_barriers);
        io->state = IO_UNIT_RUNNING;
  
 -      io->meta_page = mempool_alloc(log->meta_pool, GFP_NOIO);
 +      io->meta_page = mempool_alloc(&log->meta_pool, GFP_NOIO);
        block = page_address(io->meta_page);
        clear_page(block);
        block->magic = cpu_to_le32(R5LOG_MAGIC);
@@@ -1221,7 -1223,7 +1221,7 @@@ static bool r5l_complete_finished_ios(s
                log->next_checkpoint = io->log_start;
  
                list_del(&io->log_sibling);
 -              mempool_free(io, log->io_pool);
 +              mempool_free(io, &log->io_pool);
                r5l_run_no_mem_stripe(log);
  
                found = true;
@@@ -1645,7 -1647,7 +1645,7 @@@ static int r5l_recovery_allocate_ra_poo
  {
        struct page *page;
  
 -      ctx->ra_bio = bio_alloc_bioset(GFP_KERNEL, BIO_MAX_PAGES, log->bs);
 +      ctx->ra_bio = bio_alloc_bioset(GFP_KERNEL, BIO_MAX_PAGES, &log->bs);
        if (!ctx->ra_bio)
                return -ENOMEM;
  
@@@ -3064,7 -3066,6 +3064,7 @@@ int r5l_init_log(struct r5conf *conf, s
        struct request_queue *q = bdev_get_queue(rdev->bdev);
        struct r5l_log *log;
        char b[BDEVNAME_SIZE];
 +      int ret;
  
        pr_debug("md/raid:%s: using device %s as journal\n",
                 mdname(conf->mddev), bdevname(rdev->bdev, b));
        if (!log->io_kc)
                goto io_kc;
  
 -      log->io_pool = mempool_create_slab_pool(R5L_POOL_SIZE, log->io_kc);
 -      if (!log->io_pool)
 +      ret = mempool_init_slab_pool(&log->io_pool, R5L_POOL_SIZE, log->io_kc);
 +      if (ret)
                goto io_pool;
  
 -      log->bs = bioset_create(R5L_POOL_SIZE, 0, BIOSET_NEED_BVECS);
 -      if (!log->bs)
 +      ret = bioset_init(&log->bs, R5L_POOL_SIZE, 0, BIOSET_NEED_BVECS);
 +      if (ret)
                goto io_bs;
  
 -      log->meta_pool = mempool_create_page_pool(R5L_POOL_SIZE, 0);
 -      if (!log->meta_pool)
 +      ret = mempool_init_page_pool(&log->meta_pool, R5L_POOL_SIZE, 0);
 +      if (ret)
                goto out_mempool;
  
        spin_lock_init(&log->tree_lock);
        rcu_assign_pointer(conf->log, NULL);
        md_unregister_thread(&log->reclaim_thread);
  reclaim_thread:
 -      mempool_destroy(log->meta_pool);
 +      mempool_exit(&log->meta_pool);
  out_mempool:
 -      bioset_free(log->bs);
 +      bioset_exit(&log->bs);
  io_bs:
 -      mempool_destroy(log->io_pool);
 +      mempool_exit(&log->io_pool);
  io_pool:
        kmem_cache_destroy(log->io_kc);
  io_kc:
@@@ -3177,9 -3178,9 +3177,9 @@@ void r5l_exit_log(struct r5conf *conf
        wake_up(&conf->mddev->sb_wait);
        flush_work(&log->disable_writeback_work);
        md_unregister_thread(&log->reclaim_thread);
 -      mempool_destroy(log->meta_pool);
 -      bioset_free(log->bs);
 -      mempool_destroy(log->io_pool);
 +      mempool_exit(&log->meta_pool);
 +      bioset_exit(&log->bs);
 +      mempool_exit(&log->io_pool);
        kmem_cache_destroy(log->io_kc);
        kfree(log);
  }
diff --combined drivers/md/raid5.c
@@@ -409,14 -409,16 +409,14 @@@ void raid5_release_stripe(struct stripe
                md_wakeup_thread(conf->mddev->thread);
        return;
  slow_path:
 -      local_irq_save(flags);
        /* we are ok here if STRIPE_ON_RELEASE_LIST is set or not */
 -      if (atomic_dec_and_lock(&sh->count, &conf->device_lock)) {
 +      if (atomic_dec_and_lock_irqsave(&sh->count, &conf->device_lock, flags)) {
                INIT_LIST_HEAD(&list);
                hash = sh->hash_lock_index;
                do_release_stripe(conf, sh, &list);
 -              spin_unlock(&conf->device_lock);
 +              spin_unlock_irqrestore(&conf->device_lock, flags);
                release_inactive_stripe_list(conf, &list, hash);
        }
 -      local_irq_restore(flags);
  }
  
  static inline void remove_hash(struct stripe_head *sh)
@@@ -1137,9 -1139,6 +1137,9 @@@ again
                        bi->bi_io_vec[0].bv_len = STRIPE_SIZE;
                        bi->bi_io_vec[0].bv_offset = 0;
                        bi->bi_iter.bi_size = STRIPE_SIZE;
 +                      bi->bi_write_hint = sh->dev[i].write_hint;
 +                      if (!rrdev)
 +                              sh->dev[i].write_hint = RWF_WRITE_LIFE_NOT_SET;
                        /*
                         * If this is discard request, set bi_vcnt 0. We don't
                         * want to confuse SCSI because SCSI will replace payload
                        rbi->bi_io_vec[0].bv_len = STRIPE_SIZE;
                        rbi->bi_io_vec[0].bv_offset = 0;
                        rbi->bi_iter.bi_size = STRIPE_SIZE;
 +                      rbi->bi_write_hint = sh->dev[i].write_hint;
 +                      sh->dev[i].write_hint = RWF_WRITE_LIFE_NOT_SET;
                        /*
                         * If this is discard request, set bi_vcnt 0. We don't
                         * want to confuse SCSI because SCSI will replace payload
@@@ -2394,7 -2391,7 +2394,7 @@@ static int resize_stripes(struct r5con
         * is completely stalled, so now is a good time to resize
         * conf->disks and the scribble region
         */
 -      ndisks = kzalloc(newsize * sizeof(struct disk_info), GFP_NOIO);
 +      ndisks = kcalloc(newsize, sizeof(struct disk_info), GFP_NOIO);
        if (ndisks) {
                for (i = 0; i < conf->pool_size; i++)
                        ndisks[i] = conf->disks[i];
@@@ -3207,7 -3204,6 +3207,7 @@@ static int add_stripe_bio(struct stripe
                (unsigned long long)sh->sector);
  
        spin_lock_irq(&sh->stripe_lock);
 +      sh->dev[dd_idx].write_hint = bi->bi_write_hint;
        /* Don't allow new IO added to stripes in batch list */
        if (sh->batch_head)
                goto overlap;
                 */
                set_bit(STRIPE_BITMAP_PENDING, &sh->state);
                spin_unlock_irq(&sh->stripe_lock);
-               bitmap_startwrite(conf->mddev->bitmap, sh->sector,
-                                 STRIPE_SECTORS, 0);
+               md_bitmap_startwrite(conf->mddev->bitmap, sh->sector,
+                                    STRIPE_SECTORS, 0);
                spin_lock_irq(&sh->stripe_lock);
                clear_bit(STRIPE_BITMAP_PENDING, &sh->state);
                if (!sh->batch_head) {
@@@ -3390,8 -3386,8 +3390,8 @@@ handle_failed_stripe(struct r5conf *con
                        bi = nextbi;
                }
                if (bitmap_end)
-                       bitmap_endwrite(conf->mddev->bitmap, sh->sector,
-                               STRIPE_SECTORS, 0, 0);
+                       md_bitmap_endwrite(conf->mddev->bitmap, sh->sector,
+                                          STRIPE_SECTORS, 0, 0);
                bitmap_end = 0;
                /* and fail all 'written' */
                bi = sh->dev[i].written;
                        }
                }
                if (bitmap_end)
-                       bitmap_endwrite(conf->mddev->bitmap, sh->sector,
-                                       STRIPE_SECTORS, 0, 0);
+                       md_bitmap_endwrite(conf->mddev->bitmap, sh->sector,
+                                          STRIPE_SECTORS, 0, 0);
                /* If we were in the middle of a write the parity block might
                 * still be locked - so just clear all R5_LOCKED flags
                 */
@@@ -3777,10 -3773,10 +3777,10 @@@ returnbi
                                        bio_endio(wbi);
                                        wbi = wbi2;
                                }
-                               bitmap_endwrite(conf->mddev->bitmap, sh->sector,
-                                               STRIPE_SECTORS,
-                                        !test_bit(STRIPE_DEGRADED, &sh->state),
-                                               0);
+                               md_bitmap_endwrite(conf->mddev->bitmap, sh->sector,
+                                                  STRIPE_SECTORS,
+                                                  !test_bit(STRIPE_DEGRADED, &sh->state),
+                                                  0);
                                if (head_sh->batch_head) {
                                        sh = list_first_entry(&sh->batch_list,
                                                              struct stripe_head,
@@@ -4519,12 -4515,6 +4519,12 @@@ static void analyse_stripe(struct strip
                        s->failed++;
                        if (rdev && !test_bit(Faulty, &rdev->flags))
                                do_recovery = 1;
 +                      else if (!rdev) {
 +                              rdev = rcu_dereference(
 +                                  conf->disks[i].replacement);
 +                              if (rdev && !test_bit(Faulty, &rdev->flags))
 +                                      do_recovery = 1;
 +                      }
                }
  
                if (test_bit(R5_InJournal, &dev->flags))
@@@ -4624,15 -4614,15 +4624,15 @@@ static void break_stripe_batch_list(str
  
                sh->check_state = head_sh->check_state;
                sh->reconstruct_state = head_sh->reconstruct_state;
 +              spin_lock_irq(&sh->stripe_lock);
 +              sh->batch_head = NULL;
 +              spin_unlock_irq(&sh->stripe_lock);
                for (i = 0; i < sh->disks; i++) {
                        if (test_and_clear_bit(R5_Overlap, &sh->dev[i].flags))
                                do_wakeup = 1;
                        sh->dev[i].flags = head_sh->dev[i].flags &
                                (~((1 << R5_WriteError) | (1 << R5_Overlap)));
                }
 -              spin_lock_irq(&sh->stripe_lock);
 -              sh->batch_head = NULL;
 -              spin_unlock_irq(&sh->stripe_lock);
                if (handle_flags == 0 ||
                    sh->state & handle_flags)
                        set_bit(STRIPE_HANDLE, &sh->state);
@@@ -5202,7 -5192,7 +5202,7 @@@ static int raid5_read_one_chunk(struct 
        /*
         * use bio_clone_fast to make a copy of the bio
         */
 -      align_bi = bio_clone_fast(raid_bio, GFP_NOIO, mddev->bio_set);
 +      align_bi = bio_clone_fast(raid_bio, GFP_NOIO, &mddev->bio_set);
        if (!align_bi)
                return 0;
        /*
@@@ -5287,7 -5277,7 +5287,7 @@@ static struct bio *chunk_aligned_read(s
  
        if (sectors < bio_sectors(raid_bio)) {
                struct r5conf *conf = mddev->private;
 -              split = bio_split(raid_bio, sectors, GFP_NOIO, conf->bio_split);
 +              split = bio_split(raid_bio, sectors, GFP_NOIO, &conf->bio_split);
                bio_chain(split, raid_bio);
                generic_make_request(raid_bio);
                raid_bio = split;
@@@ -5543,10 -5533,10 +5543,10 @@@ static void make_discard_request(struc
                        for (d = 0;
                             d < conf->raid_disks - conf->max_degraded;
                             d++)
-                               bitmap_startwrite(mddev->bitmap,
-                                                 sh->sector,
-                                                 STRIPE_SECTORS,
-                                                 0);
+                               md_bitmap_startwrite(mddev->bitmap,
+                                                    sh->sector,
+                                                    STRIPE_SECTORS,
+                                                    0);
                        sh->bm_seq = conf->seq_flush + 1;
                        set_bit(STRIPE_BIT_DELAY, &sh->state);
                }
@@@ -6024,11 -6014,11 +6024,11 @@@ static inline sector_t raid5_sync_reque
                }
  
                if (mddev->curr_resync < max_sector) /* aborted */
-                       bitmap_end_sync(mddev->bitmap, mddev->curr_resync,
-                                       &sync_blocks, 1);
+                       md_bitmap_end_sync(mddev->bitmap, mddev->curr_resync,
+                                          &sync_blocks, 1);
                else /* completed sync */
                        conf->fullsync = 0;
-               bitmap_close_sync(mddev->bitmap);
+               md_bitmap_close_sync(mddev->bitmap);
  
                return 0;
        }
        }
        if (!test_bit(MD_RECOVERY_REQUESTED, &mddev->recovery) &&
            !conf->fullsync &&
-           !bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, 1) &&
+           !md_bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, 1) &&
            sync_blocks >= STRIPE_SECTORS) {
                /* we can skip this block, and probably more */
                sync_blocks /= STRIPE_SECTORS;
                return sync_blocks * STRIPE_SECTORS; /* keep things rounded to whole stripes */
        }
  
-       bitmap_cond_end_sync(mddev->bitmap, sector_nr, false);
+       md_bitmap_cond_end_sync(mddev->bitmap, sector_nr, false);
  
        sh = raid5_get_active_stripe(conf, sector_nr, 0, 1, 0);
        if (sh == NULL) {
        }
        rcu_read_unlock();
  
-       bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, still_degraded);
+       md_bitmap_start_sync(mddev->bitmap, sector_nr, &sync_blocks, still_degraded);
  
        set_bit(STRIPE_SYNC_REQUESTED, &sh->state);
        set_bit(STRIPE_HANDLE, &sh->state);
@@@ -6289,7 -6279,7 +6289,7 @@@ static void raid5d(struct md_thread *th
                        /* Now is a good time to flush some bitmap updates */
                        conf->seq_flush++;
                        spin_unlock_irq(&conf->device_lock);
-                       bitmap_unplug(mddev->bitmap);
+                       md_bitmap_unplug(mddev->bitmap);
                        spin_lock_irq(&conf->device_lock);
                        conf->seq_write = conf->seq_flush;
                        activate_bit_delay(conf, conf->temp_inactive_list);
@@@ -6668,9 -6658,9 +6668,9 @@@ static int alloc_thread_groups(struct r
        }
        *group_cnt = num_possible_nodes();
        size = sizeof(struct r5worker) * cnt;
 -      workers = kzalloc(size * *group_cnt, GFP_NOIO);
 -      *worker_groups = kzalloc(sizeof(struct r5worker_group) *
 -                              *group_cnt, GFP_NOIO);
 +      workers = kcalloc(size, *group_cnt, GFP_NOIO);
 +      *worker_groups = kcalloc(*group_cnt, sizeof(struct r5worker_group),
 +                               GFP_NOIO);
        if (!*worker_groups || !workers) {
                kfree(workers);
                kfree(*worker_groups);
@@@ -6783,7 -6773,8 +6783,7 @@@ static void free_conf(struct r5conf *co
                if (conf->disks[i].extra_page)
                        put_page(conf->disks[i].extra_page);
        kfree(conf->disks);
 -      if (conf->bio_split)
 -              bioset_free(conf->bio_split);
 +      bioset_exit(&conf->bio_split);
        kfree(conf->stripe_hashtbl);
        kfree(conf->pending_data);
        kfree(conf);
@@@ -6862,7 -6853,6 +6862,7 @@@ static struct r5conf *setup_conf(struc
        int i;
        int group_cnt, worker_cnt_per_group;
        struct r5worker_group *new_group;
 +      int ret;
  
        if (mddev->new_level != 5
            && mddev->new_level != 4
                goto abort;
        INIT_LIST_HEAD(&conf->free_list);
        INIT_LIST_HEAD(&conf->pending_list);
 -      conf->pending_data = kzalloc(sizeof(struct r5pending_data) *
 -              PENDING_IO_MAX, GFP_KERNEL);
 +      conf->pending_data = kcalloc(PENDING_IO_MAX,
 +                                   sizeof(struct r5pending_data),
 +                                   GFP_KERNEL);
        if (!conf->pending_data)
                goto abort;
        for (i = 0; i < PENDING_IO_MAX; i++)
                conf->previous_raid_disks = mddev->raid_disks - mddev->delta_disks;
        max_disks = max(conf->raid_disks, conf->previous_raid_disks);
  
 -      conf->disks = kzalloc(max_disks * sizeof(struct disk_info),
 +      conf->disks = kcalloc(max_disks, sizeof(struct disk_info),
                              GFP_KERNEL);
  
        if (!conf->disks)
                        goto abort;
        }
  
 -      conf->bio_split = bioset_create(BIO_POOL_SIZE, 0, 0);
 -      if (!conf->bio_split)
 +      ret = bioset_init(&conf->bio_split, BIO_POOL_SIZE, 0, 0);
 +      if (ret)
                goto abort;
        conf->mddev = mddev;
  
@@@ -7745,7 -7734,7 +7745,7 @@@ static int raid5_resize(struct mddev *m
            mddev->array_sectors > newsize)
                return -EINVAL;
        if (mddev->bitmap) {
-               int ret = bitmap_resize(mddev->bitmap, sectors, 0, 0);
+               int ret = md_bitmap_resize(mddev->bitmap, sectors, 0, 0);
                if (ret)
                        return ret;
        }
   * corresponding entries in XenStore and puts 1 as the value of the entry.
   * If a feature is not supported then 0 must be set or feature entry omitted.
   *
+  * feature-disable-keyboard
+  *      Values:         <uint>
+  *
+  *      If there is no need to expose a virtual keyboard device by the
+  *      frontend then this must be set to 1.
+  *
+  * feature-disable-pointer
+  *      Values:         <uint>
+  *
+  *      If there is no need to expose a virtual pointer device by the
+  *      frontend then this must be set to 1.
+  *
   * feature-abs-pointer
   *      Values:         <uint>
   *
   *      Backends, which support reporting of multi-touch events
   *      should set this to 1.
   *
+  * feature-raw-pointer
+  *      Values:        <uint>
+  *
+  *      Backends, which support reporting raw (unscaled) absolute coordinates
+  *      for pointer devices should set this to 1. Raw (unscaled) values have
+  *      a range of [0, 0x7fff].
+  *
+  *-----------------------  Device Instance Parameters ------------------------
+  *
+  * unique-id
+  *      Values:         <string>
+  *
+  *      After device instance initialization it is assigned a unique ID,
+  *      so every instance of the frontend can be identified by the backend
+  *      by this ID. This can be UUID or such.
+  *
   *------------------------- Pointer Device Parameters ------------------------
   *
   * width
   *      Maximum Y coordinate (height) to be used by the frontend
   *      while reporting input events, pixels, [0; UINT32_MAX].
   *
+  *----------------------- Multi-touch Device Parameters ----------------------
+  *
+  * multi-touch-num-contacts
+  *      Values:         <uint>
+  *
+  *      Number of simultaneous touches reported.
+  *
+  * multi-touch-width
+  *      Values:         <uint>
+  *
+  *      Width of the touch area to be used by the frontend
+  *      while reporting input events, pixels, [0; UINT32_MAX].
+  *
+  * multi-touch-height
+  *      Values:         <uint>
+  *
+  *      Height of the touch area to be used by the frontend
+  *      while reporting input events, pixels, [0; UINT32_MAX].
+  *
   *****************************************************************************
   *                            Frontend XenBus Nodes
   *****************************************************************************
   *
   *      Request backend to report multi-touch events.
   *
+  * request-raw-pointer
+  *      Values:         <uint>
+  *
+  *      Request backend to report raw unscaled absolute pointer coordinates.
+  *      This option is only valid if request-abs-pointer is also set.
+  *      Raw unscaled coordinates have the range [0, 0x7fff]
+  *
   *----------------------- Request Transport Parameters -----------------------
   *
   * event-channel
   *
   *      OBSOLETE, not recommended for use.
   *      PFN of the shared page.
-  *
-  *----------------------- Multi-touch Device Parameters -----------------------
-  *
-  * multi-touch-num-contacts
-  *      Values:         <uint>
-  *
-  *      Number of simultaneous touches reported.
-  *
-  * multi-touch-width
-  *      Values:         <uint>
-  *
-  *      Width of the touch area to be used by the frontend
-  *      while reporting input events, pixels, [0; UINT32_MAX].
-  *
-  * multi-touch-height
-  *      Values:         <uint>
-  *
-  *      Height of the touch area to be used by the frontend
-  *      while reporting input events, pixels, [0; UINT32_MAX].
   */
  
  /*
  
  #define XENKBD_DRIVER_NAME            "vkbd"
  
+ #define XENKBD_FIELD_FEAT_DSBL_KEYBRD "feature-disable-keyboard"
+ #define XENKBD_FIELD_FEAT_DSBL_POINTER        "feature-disable-pointer"
  #define XENKBD_FIELD_FEAT_ABS_POINTER "feature-abs-pointer"
+ #define XENKBD_FIELD_FEAT_RAW_POINTER "feature-raw-pointer"
  #define XENKBD_FIELD_FEAT_MTOUCH      "feature-multi-touch"
  #define XENKBD_FIELD_REQ_ABS_POINTER  "request-abs-pointer"
+ #define XENKBD_FIELD_REQ_RAW_POINTER  "request-raw-pointer"
  #define XENKBD_FIELD_REQ_MTOUCH               "request-multi-touch"
  #define XENKBD_FIELD_RING_GREF                "page-gref"
  #define XENKBD_FIELD_EVT_CHANNEL      "event-channel"
  #define XENKBD_FIELD_MT_WIDTH         "multi-touch-width"
  #define XENKBD_FIELD_MT_HEIGHT                "multi-touch-height"
  #define XENKBD_FIELD_MT_NUM_CONTACTS  "multi-touch-num-contacts"
+ #define XENKBD_FIELD_UNIQUE_ID                "unique-id"
  
  /* OBSOLETE, not recommended for use */
  #define XENKBD_FIELD_RING_REF         "page-ref"
@@@ -317,7 -357,7 +357,7 @@@ struct xenkbd_position 
   * Linux [2] and Windows [3] multi-touch support.
   *
   * [1] https://cgit.freedesktop.org/wayland/wayland/tree/protocol/wayland.xml
 - * [2] https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.txt
 + * [2] https://www.kernel.org/doc/Documentation/input/multi-touch-protocol.rst
   * [3] https://msdn.microsoft.com/en-us/library/jj151564(v=vs.85).aspx
   *
   *
diff --combined lib/bitmap.c
@@@ -13,6 -13,7 +13,7 @@@
  #include <linux/bitops.h>
  #include <linux/bug.h>
  #include <linux/kernel.h>
+ #include <linux/slab.h>
  #include <linux/string.h>
  #include <linux/uaccess.h>
  
@@@ -64,9 -65,12 +65,9 @@@ EXPORT_SYMBOL(__bitmap_equal)
  
  void __bitmap_complement(unsigned long *dst, const unsigned long *src, unsigned int bits)
  {
 -      unsigned int k, lim = bits/BITS_PER_LONG;
 +      unsigned int k, lim = BITS_TO_LONGS(bits);
        for (k = 0; k < lim; ++k)
                dst[k] = ~src[k];
 -
 -      if (bits % BITS_PER_LONG)
 -              dst[k] = ~src[k];
  }
  EXPORT_SYMBOL(__bitmap_complement);
  
@@@ -1125,6 -1129,25 +1126,25 @@@ void bitmap_copy_le(unsigned long *dst
  EXPORT_SYMBOL(bitmap_copy_le);
  #endif
  
+ unsigned long *bitmap_alloc(unsigned int nbits, gfp_t flags)
+ {
+       return kmalloc_array(BITS_TO_LONGS(nbits), sizeof(unsigned long),
+                            flags);
+ }
+ EXPORT_SYMBOL(bitmap_alloc);
+ unsigned long *bitmap_zalloc(unsigned int nbits, gfp_t flags)
+ {
+       return bitmap_alloc(nbits, flags | __GFP_ZERO);
+ }
+ EXPORT_SYMBOL(bitmap_zalloc);
+ void bitmap_free(const unsigned long *bitmap)
+ {
+       kfree(bitmap);
+ }
+ EXPORT_SYMBOL(bitmap_free);
  #if BITS_PER_LONG == 64
  /**
   * bitmap_from_arr32 - copy the contents of u32 array of bits to bitmap