Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Aug 2016 13:13:11 +0000 (09:13 -0400)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 6 Aug 2016 13:13:11 +0000 (09:13 -0400)
Pull MIPS updates from Ralf Baechle:
 "This is the main pull request for MIPS for 4.8.  Also includes is a
  minor SSB cleanup as SSB code traditionally is merged through the MIPS
  tree:

  ATH25:
    - MIPS: Add default configuration for ath25

  Boot:
    - For zboot, copy appended dtb to the end of the kernel
    - store the appended dtb address in a variable

  BPF:
    - Fix off by one error in offset allocation

  Cobalt code:
    - Fix typos

  Core code:
    - debugfs_create_file returns NULL on error, so don't use IS_ERR for
      testing for errors.
    - Fix double locking issue in RM7000 S-cache code.  This would only
      affect RM7000 ARC systems on reboot.
    - Fix page table corruption on THP permission changes.
    - Use compat_sys_keyctl for 32 bit userspace on 64 bit kernels.
      David says, there are no compatibility issues raised by this fix.
    - Move some signal code around.
    - Rewrite r4k count/compare clockevent device registration such that
      min_delta_ticks/max_delta_ticks files are guaranteed to be
      initialized.
    - Only register r4k count/compare as clockevent device if we can
      assume the clock to be constant.
    - Fix MSA asm warnings in control reg accessors
    - uasm and tlbex fixes and tweaking.
    - Print segment physical address when EU=1.
    - Define AT_VECTOR_SIZE_ARCH for ARCH_DLINFO.
    - CP: Allow booting by VP other than VP 0
    - Cache handling fixes and optimizations for r4k class caches
    - Add hotplug support for R6 processors
    - Cleanup hotplug bits in kconfig
    - traps: return correct si code for accessing nonmapped addresses
    - Remove cpu_has_safe_index_cacheops

  Lantiq:
    - Register IRQ handler for virtual IRQ number
    - Fix EIU interrupt loading code
    - Use the real EXIN count
    - Fix build error.

  Loongson 3:
    - Increase HPET_MIN_PROG_DELTA and decrease HPET_MIN_CYCLES

  Octeon:
    - Delete built-in DTB pruning code for D-Link DSR-1000N.
    - Clean up GPIO definitions in dlink_dsr-1000n.dts.
    - Add more LEDs to the DSR-100n DTS
    - Fix off by one in octeon_irq_gpio_map()
    - Typo fixes
    - Enable SATA by default in cavium_octeon_defconfig
    - Support readq/writeq()
    - Remove forced mappings of USB interrupts.
    - Ensure DMA descriptors are always in the low 4GB
    - Improve USB reset code for OCTEON II.

  Pistachio:
    - Add maintainers entry for pistachio SoC Support
    - Remove plat_setup_iocoherency

  Ralink:
    - Fix pwm UART in spis group pinmux.

  SSB:
    - Change bare unsigned to unsigned int to suit coding style

  Tools:
    - Fix reloc tool compiler warnings.

  Other:
    - Delete use of ARCH_WANT_OPTIONAL_GPIOLIB"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (61 commits)
  MIPS: mm: Fix definition of R6 cache instruction
  MIPS: tools: Fix relocs tool compiler warnings
  MIPS: Cobalt: Fix typo
  MIPS: Octeon: Fix typo
  MIPS: Lantiq: Fix build failure
  MIPS: Use CPHYSADDR to implement mips32 __pa
  MIPS: Octeon: Dlink_dsr-1000n.dts: add more leds.
  MIPS: Octeon: Clean up GPIO definitions in dlink_dsr-1000n.dts.
  MIPS: Octeon: Delete built-in DTB pruning code for D-Link DSR-1000N.
  MIPS: store the appended dtb address in a variable
  MIPS: ZBOOT: copy appended dtb to the end of the kernel
  MIPS: ralink: fix spis group pinmux
  MIPS: Factor o32 specific code into signal_o32.c
  MIPS: non-exec stack & heap when non-exec PT_GNU_STACK is present
  MIPS: Use per-mm page to execute branch delay slot instructions
  MIPS: Modify error handling
  MIPS: c-r4k: Use SMP calls for CM indexed cache ops
  MIPS: c-r4k: Avoid small flush_icache_range SMP calls
  MIPS: c-r4k: Local flush_icache_range cache op override
  MIPS: c-r4k: Split r4k_flush_kernel_vmap_range()
  ...

17 files changed:
1  2 
MAINTAINERS
arch/mips/Kconfig
arch/mips/ath79/setup.c
arch/mips/include/asm/signal.h
arch/mips/kernel/elf.c
arch/mips/kernel/mips-r2-to-r6-emul.c
arch/mips/kernel/signal.c
arch/mips/kernel/smp-cps.c
arch/mips/kernel/traps.c
arch/mips/math-emu/cp1emu.c
arch/mips/mm/c-r4k.c
arch/mips/mm/tlbex.c
arch/mips/mm/uasm-mips.c
arch/mips/mm/uasm.c
arch/mips/net/bpf_jit.c
arch/mips/pic32/pic32mzda/init.c
arch/mips/pistachio/init.c

diff --combined MAINTAINERS
@@@ -213,7 -213,7 +213,7 @@@ S: Maintaine
  F:    drivers/media/dvb-frontends/a8293*
  
  AACRAID SCSI RAID DRIVER
 -M:    Adaptec OEM Raid Solutions <aacraid@adaptec.com>
 +M:    Adaptec OEM Raid Solutions <aacraid@microsemi.com>
  L:    linux-scsi@vger.kernel.org
  W:    http://www.adaptec.com/
  S:    Supported
@@@ -288,7 -288,6 +288,7 @@@ F: include/linux/acpi.
  F:    include/acpi/
  F:    Documentation/acpi/
  F:    Documentation/ABI/testing/sysfs-bus-acpi
 +F:    Documentation/ABI/testing/configfs-acpi
  F:    drivers/pci/*acpi*
  F:    drivers/pci/*/*acpi*
  F:    drivers/pci/*/*/*acpi*
@@@ -612,13 -611,6 +612,13 @@@ L:       linux-gpio@vger.kernel.or
  S:    Maintained
  F:    drivers/gpio/gpio-altera.c
  
 +ALTERA SYSTEM RESOURCE DRIVER FOR ARRIA10 DEVKIT
 +M:    Thor Thayer <tthayer@opensource.altera.com>
 +S:    Maintained
 +F:    drivers/gpio/gpio-altera-a10sr.c
 +F:    drivers/mfd/altera-a10sr.c
 +F:    include/linux/mfd/altera-a10sr.h
 +
  ALTERA TRIPLE SPEED ETHERNET DRIVER
  M:    Vince Bridgers <vbridger@opensource.altera.com>
  L:    netdev@vger.kernel.org
@@@ -778,11 -770,6 +778,11 @@@ W:       http://ez.analog.com/community/linux
  S:    Supported
  F:    drivers/dma/dma-axi-dmac.c
  
 +ANDROID CONFIG FRAGMENTS
 +M:    Rob Herring <robh@kernel.org>
 +S:    Supported
 +F:    kernel/configs/android*
 +
  ANDROID DRIVERS
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  M:    Arve Hjønnevåg <arve@android.com>
@@@ -852,9 -839,7 +852,9 @@@ M: Iyappan Subramanian <isubramanian@ap
  M:    Keyur Chudgar <kchudgar@apm.com>
  S:    Supported
  F:    drivers/net/ethernet/apm/xgene/
 +F:    drivers/net/phy/mdio-xgene.c
  F:    Documentation/devicetree/bindings/net/apm-xgene-enet.txt
 +F:    Documentation/devicetree/bindings/net/apm-xgene-mdio.txt
  
  APTINA CAMERA SENSOR PLL
  M:    Laurent Pinchart <Laurent.pinchart@ideasonboard.com>
@@@ -884,17 -869,9 +884,17 @@@ F:       Documentation/devicetree/bindings/di
  ARM HDLCD DRM DRIVER
  M:    Liviu Dudau <liviu.dudau@arm.com>
  S:    Supported
 -F:    drivers/gpu/drm/arm/
 +F:    drivers/gpu/drm/arm/hdlcd_*
  F:    Documentation/devicetree/bindings/display/arm,hdlcd.txt
  
 +ARM MALI-DP DRM DRIVER
 +M:    Liviu Dudau <liviu.dudau@arm.com>
 +M:    Brian Starkey <brian.starkey@arm.com>
 +M:    Mali DP Maintainers <malidp@foss.arm.com>
 +S:    Supported
 +F:    drivers/gpu/drm/arm/
 +F:    Documentation/devicetree/bindings/display/arm,malidp.txt
 +
  ARM MFM AND FLOPPY DRIVERS
  M:    Ian Molton <spyro@f2s.com>
  S:    Maintained
@@@ -1549,7 -1526,6 +1549,7 @@@ M:      David Brown <david.brown@linaro.org
  L:    linux-arm-msm@vger.kernel.org
  L:    linux-soc@vger.kernel.org
  S:    Maintained
 +F:    Documentation/devicetree/bindings/soc/qcom/
  F:    arch/arm/boot/dts/qcom-*.dts
  F:    arch/arm/boot/dts/qcom-*.dtsi
  F:    arch/arm/mach-qcom/
@@@ -1627,13 -1603,12 +1627,13 @@@ F:   arch/arm/mach-s3c24*
  F:    arch/arm/mach-s3c64xx/
  F:    arch/arm/mach-s5p*/
  F:    arch/arm/mach-exynos*/
 -F:    drivers/*/*s3c2410*
 -F:    drivers/*/*/*s3c2410*
 +F:    drivers/*/*s3c24*
 +F:    drivers/*/*/*s3c24*
 +F:    drivers/*/*s3c64xx*
 +F:    drivers/*/*s5pv210*
  F:    drivers/memory/samsung/*
  F:    drivers/soc/samsung/*
  F:    drivers/spi/spi-s3c*
 -F:    sound/soc/samsung/*
  F:    Documentation/arm/Samsung/
  F:    Documentation/devicetree/bindings/arm/samsung/
  F:    Documentation/devicetree/bindings/sram/samsung-sram.txt
@@@ -1648,8 -1623,7 +1648,8 @@@ F:      arch/arm/mach-s5pv210
  
  ARM/SAMSUNG S5P SERIES 2D GRAPHICS ACCELERATION (G2D) SUPPORT
  M:    Kyungmin Park <kyungmin.park@samsung.com>
 -M:    Kamil Debski <k.debski@samsung.com>
 +M:    Kamil Debski <kamil@wypas.org>
 +M:    Andrzej Hajda <a.hajda@samsung.com>
  L:    linux-arm-kernel@lists.infradead.org
  L:    linux-media@vger.kernel.org
  S:    Maintained
@@@ -1657,9 -1631,8 +1657,9 @@@ F:      drivers/media/platform/s5p-g2d
  
  ARM/SAMSUNG S5P SERIES Multi Format Codec (MFC) SUPPORT
  M:    Kyungmin Park <kyungmin.park@samsung.com>
 -M:    Kamil Debski <k.debski@samsung.com>
 +M:    Kamil Debski <kamil@wypas.org>
  M:    Jeongtae Park <jtp.park@samsung.com>
 +M:    Andrzej Hajda <a.hajda@samsung.com>
  L:    linux-arm-kernel@lists.infradead.org
  L:    linux-media@vger.kernel.org
  S:    Maintained
@@@ -1674,13 -1647,6 +1674,13 @@@ L:    linux-media@vger.kernel.or
  S:    Maintained
  F:    drivers/media/platform/s5p-tv/
  
 +ARM/SAMSUNG S5P SERIES HDMI CEC SUBSYSTEM SUPPORT
 +M:    Kyungmin Park <kyungmin.park@samsung.com>
 +L:    linux-arm-kernel@lists.infradead.org
 +L:    linux-media@vger.kernel.org
 +S:    Maintained
 +F:    drivers/staging/media/platform/s5p-cec/
 +
  ARM/SAMSUNG S5P SERIES JPEG CODEC SUPPORT
  M:    Andrzej Pietrasiewicz <andrzej.p@samsung.com>
  M:    Jacek Anaszewski <j.anaszewski@samsung.com>
@@@ -1703,6 -1669,7 +1703,6 @@@ F:      arch/arm/boot/dts/sh
  F:    arch/arm/configs/shmobile_defconfig
  F:    arch/arm/include/debug/renesas-scif.S
  F:    arch/arm/mach-shmobile/
 -F:    drivers/sh/
  F:    drivers/soc/renesas/
  F:    include/linux/soc/renesas/
  
@@@ -1727,6 -1694,8 +1727,6 @@@ S:      Maintaine
  F:    drivers/edac/altera_edac.
  
  ARM/STI ARCHITECTURE
 -M:    Srinivas Kandagatla <srinivas.kandagatla@gmail.com>
 -M:    Maxime Coquelin <maxime.coquelin@st.com>
  M:    Patrice Chotard <patrice.chotard@st.com>
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
  L:    kernel@stlinux.com
@@@ -1759,7 -1728,6 +1759,7 @@@ F:      drivers/ata/ahci_st.
  
  ARM/STM32 ARCHITECTURE
  M:    Maxime Coquelin <mcoquelin.stm32@gmail.com>
 +M:    Alexandre Torgue <alexandre.torgue@st.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/mcoquelin/stm32.git
@@@ -1770,7 -1738,8 +1770,7 @@@ ARM/TANGO ARCHITECTUR
  M:    Marc Gonzalez <marc_gonzalez@sigmadesigns.com>
  L:    linux-arm-kernel@lists.infradead.org
  S:    Maintained
 -F:    arch/arm/mach-tango/
 -F:    arch/arm/boot/dts/tango*
 +N:    tango
  
  ARM/TECHNOLOGIC SYSTEMS TS7250 MACHINE SUPPORT
  M:    Lennert Buytenhek <kernel@wantstofly.org>
@@@ -1857,6 -1826,7 +1857,6 @@@ L:      linux-arm-kernel@lists.infradead.or
  T:    git git://git.linaro.org/people/ulfh/clk.git
  S:    Maintained
  F:    drivers/clk/ux500/
 -F:    include/linux/platform_data/clk-ux500.h
  
  ARM/VERSATILE EXPRESS PLATFORM
  M:    Liviu Dudau <liviu.dudau@arm.com>
@@@ -2327,7 -2297,6 +2327,7 @@@ S:      Maintaine
  F:    Documentation/ABI/testing/sysfs-class-net-batman-adv
  F:    Documentation/ABI/testing/sysfs-class-net-mesh
  F:    Documentation/networking/batman-adv.txt
 +F:    include/uapi/linux/batman_adv.h
  F:    net/batman-adv/
  
  BAYCOM/HDLCDRV DRIVERS FOR AX.25
@@@ -2353,10 -2322,7 +2353,10 @@@ S:    Supporte
  F:    drivers/media/platform/sti/bdisp
  
  BEFS FILE SYSTEM
 -S:    Orphan
 +M:    Luis de Bethencourt <luisbg@osg.samsung.com>
 +M:    Salah Triki <salah.triki@gmail.com>
 +S:    Maintained
 +T:    git git://github.com/luisbg/linux-befs.git
  F:    Documentation/filesystems/befs.txt
  F:    fs/befs/
  
@@@ -2494,14 -2460,6 +2494,14 @@@ L:    netdev@vger.kernel.or
  S:    Supported
  F:    drivers/net/ethernet/broadcom/b44.*
  
 +BROADCOM B53 ETHERNET SWITCH DRIVER
 +M:    Florian Fainelli <f.fainelli@gmail.com>
 +L:    netdev@vger.kernel.org
 +L:    openwrt-devel@lists.openwrt.org (subscribers-only)
 +S:    Supported
 +F:    drivers/net/dsa/b53/*
 +F:    include/linux/platform_data/b53.h
 +
  BROADCOM GENET ETHERNET DRIVER
  M:    Florian Fainelli <f.fainelli@gmail.com>
  L:    netdev@vger.kernel.org
@@@ -2526,14 -2484,17 +2526,14 @@@ BROADCOM BCM281XX/BCM11XXX/BCM216XX AR
  M:    Florian Fainelli <f.fainelli@gmail.com>
  M:    Ray Jui <rjui@broadcom.com>
  M:    Scott Branden <sbranden@broadcom.com>
 -L:    bcm-kernel-feedback-list@broadcom.com
 +M:    bcm-kernel-feedback-list@broadcom.com
  T:    git git://github.com/broadcom/mach-bcm
  S:    Maintained
 +N:    bcm281*
 +N:    bcm113*
 +N:    bcm216*
 +N:    kona
  F:    arch/arm/mach-bcm/
 -F:    arch/arm/boot/dts/bcm113*
 -F:    arch/arm/boot/dts/bcm216*
 -F:    arch/arm/boot/dts/bcm281*
 -F:    arch/arm64/boot/dts/broadcom/
 -F:    arch/arm/configs/bcm_defconfig
 -F:    drivers/mmc/host/sdhci-bcm-kona.c
 -F:    drivers/clocksource/bcm_kona_timer.c
  
  BROADCOM BCM2835 ARM ARCHITECTURE
  M:    Stephen Warren <swarren@wwwdotorg.org>
@@@ -2556,21 -2517,20 +2556,21 @@@ F:   arch/mips/include/asm/mach-bcm47xx/
  
  BROADCOM BCM5301X ARM ARCHITECTURE
  M:    Hauke Mehrtens <hauke@hauke-m.de>
 +M:    Rafał Miłecki <zajec5@gmail.com>
 +M:    bcm-kernel-feedback-list@broadcom.com
  L:    linux-arm-kernel@lists.infradead.org
  S:    Maintained
  F:    arch/arm/mach-bcm/bcm_5301x.c
 -F:    arch/arm/boot/dts/bcm5301x.dtsi
 +F:    arch/arm/boot/dts/bcm5301x*.dtsi
  F:    arch/arm/boot/dts/bcm470*
  
  BROADCOM BCM63XX ARM ARCHITECTURE
  M:    Florian Fainelli <f.fainelli@gmail.com>
 +M:    bcm-kernel-feedback-list@broadcom.com
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -L:    bcm-kernel-feedback-list@broadcom.com
  T:    git git://github.com/broadcom/stblinux.git
  S:    Maintained
 -F:    arch/arm/mach-bcm/bcm63xx.c
 -F:    arch/arm/include/debug/bcm63xx.S
 +N:    bcm63xx
  
  BROADCOM BCM63XX/BCM33XX UDC DRIVER
  M:    Kevin Cernekee <cernekee@gmail.com>
@@@ -2582,8 -2542,8 +2582,8 @@@ BROADCOM BCM7XXX ARM ARCHITECTUR
  M:    Brian Norris <computersforpeace@gmail.com>
  M:    Gregory Fong <gregory.0xf0@gmail.com>
  M:    Florian Fainelli <f.fainelli@gmail.com>
 +M:    bcm-kernel-feedback-list@broadcom.com
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -L:    bcm-kernel-feedback-list@broadcom.com
  T:    git git://github.com/broadcom/stblinux.git
  S:    Maintained
  F:    arch/arm/mach-bcm/*brcmstb*
@@@ -2616,11 -2576,12 +2616,11 @@@ S:   Supporte
  F:    drivers/net/ethernet/broadcom/tg3.*
  
  BROADCOM BRCM80211 IEEE802.11n WIRELESS DRIVER
 -M:    Brett Rudley <brudley@broadcom.com>
 -M:    Arend van Spriel <arend@broadcom.com>
 -M:    Franky (Zhenhui) Lin <frankyl@broadcom.com>
 -M:    Hante Meuleman <meuleman@broadcom.com>
 +M:    Arend van Spriel <arend.vanspriel@broadcom.com>
 +M:    Franky Lin <franky.lin@broadcom.com>
 +M:    Hante Meuleman <hante.meuleman@broadcom.com>
  L:    linux-wireless@vger.kernel.org
 -L:    brcm80211-dev-list@broadcom.com
 +L:    brcm80211-dev-list.pdl@broadcom.com
  S:    Supported
  F:    drivers/net/wireless/broadcom/brcm80211/
  
@@@ -2640,13 -2601,13 +2640,13 @@@ BROADCOM IPROC ARM ARCHITECTUR
  M:    Ray Jui <rjui@broadcom.com>
  M:    Scott Branden <sbranden@broadcom.com>
  M:    Jon Mason <jonmason@broadcom.com>
 +M:    bcm-kernel-feedback-list@broadcom.com
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -L:    bcm-kernel-feedback-list@broadcom.com
  T:    git git://github.com/broadcom/cygnus-linux.git
  S:    Maintained
  N:    iproc
  N:    cygnus
 -N:    nsp
 +N:    bcm[-_]nsp
  N:    bcm9113*
  N:    bcm9583*
  N:    bcm9585*
@@@ -2657,9 -2618,6 +2657,9 @@@ N:      bcm583
  N:    bcm585*
  N:    bcm586*
  N:    bcm88312
 +F:    arch/arm64/boot/dts/broadcom/ns2*
 +F:    drivers/clk/bcm/clk-ns*
 +F:    drivers/pinctrl/bcm/pinctrl-ns*
  
  BROADCOM BRCMSTB GPIO DRIVER
  M:    Gregory Fong <gregory.0xf0@gmail.com>
@@@ -2704,8 -2662,8 +2704,8 @@@ F:      drivers/net/ethernet/broadcom/bcmsys
  
  BROADCOM VULCAN ARM64 SOC
  M:    Jayachandran C. <jchandra@broadcom.com>
 +M:    bcm-kernel-feedback-list@broadcom.com
  L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 -L:    bcm-kernel-feedback-list@broadcom.com
  S:    Maintained
  F:    arch/arm64/boot/dts/broadcom/vulcan*
  
@@@ -2855,7 -2813,6 +2855,7 @@@ W:      https://github.com/linux-ca
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can.git
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mkl/linux-can-next.git
  S:    Maintained
 +F:    Documentation/devicetree/bindings/net/can/
  F:    drivers/net/can/
  F:    include/linux/can/dev.h
  F:    include/linux/can/platform/
@@@ -2863,7 -2820,7 +2863,7 @@@ F:      include/uapi/linux/can/error.
  F:    include/uapi/linux/can/netlink.h
  
  CAPABILITIES
 -M:    Serge Hallyn <serge.hallyn@canonical.com>
 +M:    Serge Hallyn <serge@hallyn.com>
  L:    linux-security-module@vger.kernel.org
  S:    Supported
  F:    include/linux/capability.h
@@@ -2895,22 -2852,6 +2895,22 @@@ F:    drivers/net/ieee802154/cc2520.
  F:    include/linux/spi/cc2520.h
  F:    Documentation/devicetree/bindings/net/ieee802154/cc2520.txt
  
 +CEC DRIVER
 +M:    Hans Verkuil <hans.verkuil@cisco.com>
 +L:    linux-media@vger.kernel.org
 +T:    git git://linuxtv.org/media_tree.git
 +W:    http://linuxtv.org
 +S:    Supported
 +F:    Documentation/cec.txt
 +F:    Documentation/DocBook/media/v4l/cec*
 +F:    drivers/staging/media/cec/
 +F:    drivers/media/cec-edid.c
 +F:    drivers/media/rc/keymaps/rc-cec.c
 +F:    include/media/cec.h
 +F:    include/media/cec-edid.h
 +F:    include/linux/cec.h
 +F:    include/linux/cec-funcs.h
 +
  CELL BROADBAND ENGINE ARCHITECTURE
  M:    Arnd Bergmann <arnd@arndb.de>
  L:    linuxppc-dev@lists.ozlabs.org
@@@ -3219,7 -3160,7 +3219,7 @@@ M:      Johannes Weiner <hannes@cmpxchg.org
  L:    cgroups@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git
  S:    Maintained
 -F:    Documentation/cgroups/
 +F:    Documentation/cgroup*
  F:    include/linux/cgroup*
  F:    kernel/cgroup*
  
@@@ -3230,7 -3171,7 +3230,7 @@@ W:      http://www.bullopensource.org/cpuset
  W:    http://oss.sgi.com/projects/cpusets/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git
  S:    Maintained
 -F:    Documentation/cgroups/cpusets.txt
 +F:    Documentation/cgroup-v1/cpusets.txt
  F:    include/linux/cpuset.h
  F:    kernel/cpuset.c
  
@@@ -3347,7 -3288,6 +3347,7 @@@ T:      git git://git.kernel.org/pub/scm/lin
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6.git
  S:    Maintained
  F:    Documentation/crypto/
 +F:    Documentation/devicetree/bindings/crypto/
  F:    Documentation/DocBook/crypto-API.tmpl
  F:    arch/*/crypto/
  F:    crypto/
@@@ -3494,7 -3434,6 +3494,7 @@@ F:      Documentation/ABI/testing/sysfs-clas
  CXLFLASH (IBM Coherent Accelerator Processor Interface CAPI Flash) SCSI DRIVER
  M:    Manoj N. Kumar <manoj@linux.vnet.ibm.com>
  M:    Matthew R. Ochs <mrochs@linux.vnet.ibm.com>
 +M:    Uma Krishnan <ukrishn@linux.vnet.ibm.com>
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  F:    drivers/scsi/cxlflash/
@@@ -3739,8 -3678,6 +3739,8 @@@ M:      Support Opensource <support.opensour
  W:    http://www.dialog-semiconductor.com/products
  S:    Supported
  F:    Documentation/hwmon/da90??
 +F:    Documentation/devicetree/bindings/mfd/da90*.txt
 +F:    Documentation/devicetree/bindings/regulator/da92*.txt
  F:    Documentation/devicetree/bindings/sound/da[79]*.txt
  F:    drivers/gpio/gpio-da90??.c
  F:    drivers/hwmon/da90??-hwmon.c
@@@ -3761,10 -3698,8 +3761,10 @@@ F:    drivers/watchdog/da90??_wdt.
  F:    include/linux/mfd/da903x.h
  F:    include/linux/mfd/da9052/
  F:    include/linux/mfd/da9055/
 +F:    include/linux/mfd/da9062/
  F:    include/linux/mfd/da9063/
  F:    include/linux/mfd/da9150/
 +F:    include/linux/regulator/da9211.h
  F:    include/sound/da[79]*.h
  F:    sound/soc/codecs/da[79]*.[ch]
  
@@@ -3840,17 -3775,6 +3840,17 @@@ F:    include/linux/*fence.
  F:    Documentation/dma-buf-sharing.txt
  T:    git git://git.linaro.org/people/sumitsemwal/linux-dma-buf.git
  
 +SYNC FILE FRAMEWORK
 +M:    Sumit Semwal <sumit.semwal@linaro.org>
 +R:    Gustavo Padovan <gustavo@padovan.org>
 +S:    Maintained
 +L:    linux-media@vger.kernel.org
 +L:    dri-devel@lists.freedesktop.org
 +F:    drivers/dma-buf/sync_file.c
 +F:    include/linux/sync_file.h
 +F:    Documentation/sync_file.txt
 +T:    git git://git.linaro.org/people/sumitsemwal/linux-dma-buf.git
 +
  DMA GENERIC OFFLOAD ENGINE SUBSYSTEM
  M:    Vinod Koul <vinod.koul@intel.com>
  L:    dmaengine@vger.kernel.org
@@@ -3940,10 -3864,7 +3940,10 @@@ T:    git git://people.freedesktop.org/~ai
  S:    Maintained
  F:    drivers/gpu/drm/
  F:    drivers/gpu/vga/
 -F:    Documentation/DocBook/gpu.*
 +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/
  
@@@ -3995,7 -3916,6 +3995,7 @@@ S:      Supporte
  F:    drivers/gpu/drm/i915/
  F:    include/drm/i915*
  F:    include/uapi/drm/i915_drm.h
 +F:    Documentation/gpu/i915.rst
  
  DRM DRIVERS FOR ATMEL HLCDC
  M:    Boris Brezillon <boris.brezillon@free-electrons.com>
@@@ -4191,21 -4111,6 +4191,21 @@@ F:    drivers/gpu/drm/vc4
  F:    include/uapi/drm/vc4_drm.h
  F:    Documentation/devicetree/bindings/display/brcm,bcm-vc4.txt
  
 +DRM DRIVERS FOR TI OMAP
 +M:    Tomi Valkeinen <tomi.valkeinen@ti.com>
 +L:    dri-devel@lists.freedesktop.org
 +S:    Maintained
 +F:    drivers/gpu/drm/omapdrm/
 +F:    Documentation/devicetree/bindings/display/ti/
 +
 +DRM DRIVERS FOR TI LCDC
 +M:    Jyri Sarha <jsarha@ti.com>
 +R:    Tomi Valkeinen <tomi.valkeinen@ti.com>
 +L:    dri-devel@lists.freedesktop.org
 +S:    Maintained
 +F:    drivers/gpu/drm/tilcdc/
 +F:    Documentation/devicetree/bindings/display/tilcdc/
 +
  DSBR100 USB FM RADIO DRIVER
  M:    Alexey Klimov <klimov.linux@gmail.com>
  L:    linux-media@vger.kernel.org
@@@ -4572,7 -4477,7 +4572,7 @@@ S:      Orpha
  F:    fs/efs/
  
  EHEA (IBM pSeries eHEA 10Gb ethernet adapter) DRIVER
 -M:    Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com>
 +M:    Douglas Miller <dougmill@linux.vnet.ibm.com>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/ethernet/ibm/ehea/
@@@ -4760,7 -4665,7 +4760,7 @@@ S:      Maintaine
  F:    drivers/staging/fbtft/
  
  FCOE SUBSYSTEM (libfc, libfcoe, fcoe)
 -M:    Vasu Dev <vasu.dev@intel.com>
 +M:    Johannes Thumshirn <jth@kernel.org>
  L:    fcoe-devel@open-fcoe.org
  W:    www.Open-FCoE.org
  S:    Supported
@@@ -4982,13 -4887,6 +4982,13 @@@ F:    drivers/net/ethernet/freescale/gianf
  X:    drivers/net/ethernet/freescale/gianfar_ptp.c
  F:    Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
  
 +FREESCALE QUICC ENGINE UCC HDLC DRIVER
 +M:    Zhao Qiang <qiang.zhao@nxp.com>
 +L:    netdev@vger.kernel.org
 +L:    linuxppc-dev@lists.ozlabs.org
 +S:    Maintained
 +F:    drivers/net/wan/fsl_ucc_hdlc*
 +
  FREESCALE QUICC ENGINE UCC UART DRIVER
  M:    Timur Tabi <timur@tabi.org>
  L:    linuxppc-dev@lists.ozlabs.org
@@@ -5044,13 -4942,6 +5044,13 @@@ F:    Documentation/filesystems/caching
  F:    fs/fscache/
  F:    include/linux/fscache*.h
  
 +FS-CRYPTO: FILE SYSTEM LEVEL ENCRYPTION SUPPORT
 +M:    Theodore Y. Ts'o <tytso@mit.edu>
 +M:    Jaegeuk Kim <jaegeuk@kernel.org>
 +S:    Supported
 +F:    fs/crypto/
 +F:    include/linux/fscrypto.h
 +
  F2FS FILE SYSTEM
  M:    Jaegeuk Kim <jaegeuk@kernel.org>
  M:    Changman Lee <cm224.lee@samsung.com>
@@@ -5105,15 -4996,6 +5105,15 @@@ L:    linux-scsi@vger.kernel.or
  S:    Odd Fixes (e.g., new signatures)
  F:    drivers/scsi/fdomain.*
  
 +GCC PLUGINS
 +M:    Kees Cook <keescook@chromium.org>
 +R:    Emese Revfy <re.emese@gmail.com>
 +L:    kernel-hardening@lists.openwall.com
 +S:    Maintained
 +F:    scripts/gcc-plugins/
 +F:    scripts/gcc-plugin.sh
 +F:    Documentation/gcc-plugins.txt
 +
  GCOV BASED KERNEL PROFILING
  M:    Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
  S:    Maintained
@@@ -5288,10 -5170,10 +5288,10 @@@ S:   Maintaine
  F:    drivers/media/usb/gspca/m5602/
  
  GSPCA PAC207 SONIXB SUBDRIVER
 -M:    Hans de Goede <hdegoede@redhat.com>
 +M:    Hans Verkuil <hverkuil@xs4all.nl>
  L:    linux-media@vger.kernel.org
  T:    git git://linuxtv.org/media_tree.git
 -S:    Maintained
 +S:    Odd Fixes
  F:    drivers/media/usb/gspca/pac207.c
  
  GSPCA SN9C20X SUBDRIVER
@@@ -5309,10 -5191,10 +5309,10 @@@ S:   Maintaine
  F:    drivers/media/usb/gspca/t613.c
  
  GSPCA USB WEBCAM DRIVER
 -M:    Hans de Goede <hdegoede@redhat.com>
 +M:    Hans Verkuil <hverkuil@xs4all.nl>
  L:    linux-media@vger.kernel.org
  T:    git git://linuxtv.org/media_tree.git
 -S:    Maintained
 +S:    Odd Fixes
  F:    drivers/media/usb/gspca/
  
  GUID PARTITION TABLE (GPT)
@@@ -5393,7 -5275,6 +5393,7 @@@ M:      Matt Mackall <mpm@selenic.com
  M:    Herbert Xu <herbert@gondor.apana.org.au>
  L:    linux-crypto@vger.kernel.org
  S:    Odd fixes
 +F:    Documentation/devicetree/bindings/rng/
  F:    Documentation/hw_random.txt
  F:    drivers/char/hw_random/
  F:    include/linux/hw_random.h
@@@ -5404,9 -5285,8 +5404,9 @@@ M:      Bjorn Andersson <bjorn.andersson@lin
  L:    linux-remoteproc@vger.kernel.org
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ohad/hwspinlock.git
 +F:    Documentation/devicetree/bindings/hwlock/
  F:    Documentation/hwspinlock.txt
 -F:    drivers/hwspinlock/hwspinlock_*
 +F:    drivers/hwspinlock/
  F:    include/linux/hwspinlock.h
  
  HARMONY SOUND DRIVER
@@@ -5424,12 -5304,6 +5424,12 @@@ T:    git git://linuxtv.org/anttip/media_t
  S:    Maintained
  F:    drivers/media/dvb-frontends/hd29l2*
  
 +HEWLETT PACKARD ENTERPRISE ILO NMI WATCHDOG DRIVER
 +M:    Brian Boylston <brian.boylston@hpe.com>
 +S:    Supported
 +F:    Documentation/watchdog/hpwdt.txt
 +F:    drivers/watchdog/hpwdt.c
 +
  HEWLETT-PACKARD SMART ARRAY RAID DRIVER (hpsa)
  M:    Don Brace <don.brace@microsemi.com>
  L:    iss_storagedev@hp.com
@@@ -5548,15 -5422,6 +5548,15 @@@ F:    include/uapi/linux/if_hippi.
  F:    net/802/hippi.c
  F:    drivers/net/hippi/
  
 +HISILICON NETWORK SUBSYSTEM DRIVER
 +M:    Yisen Zhuang <yisen.zhuang@huawei.com>
 +M:    Salil Mehta <salil.mehta@huawei.com>
 +L:    netdev@vger.kernel.org
 +W:    http://www.hisilicon.com
 +S:    Maintained
 +F:    drivers/net/ethernet/hisilicon/
 +F:    Documentation/devicetree/bindings/net/hisilicon*.txt
 +
  HISILICON SAS Controller
  M:    John Garry <john.garry@huawei.com>
  W:    http://www.hisilicon.com
@@@ -5832,15 -5697,7 +5832,15 @@@ M:    Tyrel Datwyler <tyreld@linux.vnet.ib
  L:    linux-scsi@vger.kernel.org
  S:    Supported
  F:    drivers/scsi/ibmvscsi/ibmvscsi*
 -F:    drivers/scsi/ibmvscsi/viosrp.h
 +F:    include/scsi/viosrp.h
 +
 +IBM Power Virtual SCSI Device Target Driver
 +M:    Bryant G. Ly <bryantly@linux.vnet.ibm.com>
 +M:    Michael Cyr <mikecyr@linux.vnet.ibm.com>
 +L:    linux-scsi@vger.kernel.org
 +L:    target-devel@vger.kernel.org
 +S:    Supported
 +F:    drivers/scsi/ibmvscsi_tgt/
  
  IBM Power Virtual FC Device Drivers
  M:    Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
@@@ -5932,9 -5789,7 +5932,9 @@@ R:      Hartmut Knaack <knaack.h@gmx.de
  R:    Lars-Peter Clausen <lars@metafoo.de>
  R:    Peter Meerwald-Stadler <pmeerw@pmeerw.net>
  L:    linux-iio@vger.kernel.org
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git
  S:    Maintained
 +F:    Documentation/devicetree/bindings/iio/
  F:    drivers/iio/
  F:    drivers/staging/iio/
  F:    include/linux/iio/
@@@ -6064,12 -5919,6 +6064,12 @@@ L:    platform-driver-x86@vger.kernel.or
  S:    Maintained
  F:    drivers/platform/x86/intel-hid.c
  
 +INTEL VIRTUAL BUTTON DRIVER
 +M:    AceLan Kao <acelan.kao@canonical.com>
 +L:    platform-driver-x86@vger.kernel.org
 +S:    Maintained
 +F:    drivers/platform/x86/intel-vbtn.c
 +
  INTEL IDLE DRIVER
  M:    Len Brown <lenb@kernel.org>
  L:    linux-pm@vger.kernel.org
@@@ -6172,12 -6021,6 +6172,12 @@@ L:     linux-rdma@vger.kernel.or
  S:     Supported
  F:     drivers/infiniband/hw/i40iw/
  
 +INTEL MERRIFIELD GPIO DRIVER
 +M:    Andy Shevchenko <andriy.shevchenko@linux.intel.com>
 +L:    linux-gpio@vger.kernel.org
 +S:    Maintained
 +F:    drivers/gpio/gpio-merrifield.c
 +
  INTEL-MID GPIO DRIVER
  M:    David Cohen <david.a.cohen@linux.intel.com>
  L:    linux-gpio@vger.kernel.org
@@@ -6302,7 -6145,6 +6302,7 @@@ M:      Joerg Roedel <joro@8bytes.org
  L:    iommu@lists.linux-foundation.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git
  S:    Maintained
 +F:    Documentation/devicetree/bindings/iommu/
  F:    drivers/iommu/
  
  IP MASQUERADING
@@@ -6393,6 -6235,7 +6393,6 @@@ F:      Documentation/devicetree/bindings/in
  F:    drivers/irqchip/
  
  IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY)
 -M:    Jiang Liu <jiang.liu@linux.intel.com>
  M:    Marc Zyngier <marc.zyngier@arm.com>
  S:    Maintained
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq/core
@@@ -6869,7 -6712,6 +6869,7 @@@ M:      Jacek Anaszewski <j.anaszewski@samsu
  L:    linux-leds@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/j.anaszewski/linux-leds.git
  S:    Maintained
 +F:    Documentation/devicetree/bindings/leds/
  F:    drivers/leds/
  F:    include/linux/leds.h
  
@@@ -6925,7 -6767,6 +6925,7 @@@ S:      Maintaine
  F:    drivers/ata/
  F:    include/linux/ata.h
  F:    include/linux/libata.h
 +F:    Documentation/devicetree/bindings/ata/
  
  LIBATA PATA ARASAN COMPACT FLASH CONTROLLER
  M:    Viresh Kumar <vireshk@kernel.org>
@@@ -7033,7 -6874,6 +7033,7 @@@ F:      drivers/crypto/nx
  F:    drivers/crypto/vmx/
  F:    drivers/net/ethernet/ibm/ibmveth.*
  F:    drivers/net/ethernet/ibm/ibmvnic.*
 +F:    drivers/pci/hotplug/pnv_php.c
  F:    drivers/pci/hotplug/rpa*
  F:    drivers/scsi/ibmvscsi/
  N:    opal
@@@ -7131,7 -6971,7 +7131,7 @@@ T:      git git://git.kernel.org/pub/scm/lin
  LINUX KERNEL DUMP TEST MODULE (LKDTM)
  M:    Kees Cook <keescook@chromium.org>
  S:    Maintained
 -F:    drivers/misc/lkdtm.c
 +F:    drivers/misc/lkdtm*
  
  LLC (802.2)
  M:    Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
@@@ -7184,23 -7024,15 +7184,23 @@@ Q:   http://patchwork.linuxtv.org/project
  S:    Maintained
  F:    drivers/media/usb/dvb-usb-v2/lmedm04*
  
 -LOCKDEP AND LOCKSTAT
 +LOCKING PRIMITIVES
  M:    Peter Zijlstra <peterz@infradead.org>
  M:    Ingo Molnar <mingo@redhat.com>
  L:    linux-kernel@vger.kernel.org
 -T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/locking
 +T:    git git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/core
  S:    Maintained
 -F:    Documentation/locking/lockdep*.txt
 -F:    Documentation/locking/lockstat.txt
 +F:    Documentation/locking/
  F:    include/linux/lockdep.h
 +F:    include/linux/spinlock*.h
 +F:    arch/*/include/asm/spinlock*.h
 +F:    include/linux/rwlock*.h
 +F:    include/linux/mutex*.h
 +F:    arch/*/include/asm/mutex*.h
 +F:    include/linux/rwsem*.h
 +F:    arch/*/include/asm/rwsem.h
 +F:    include/linux/seqlock.h
 +F:    lib/locking*.[ch]
  F:    kernel/locking/
  
  LOGICAL DISK MANAGER SUPPORT (LDM, Windows 2000/XP/Vista Dynamic Disks)
@@@ -7341,12 -7173,6 +7341,12 @@@ W:    http://www.kernel.org/doc/man-page
  L:    linux-man@vger.kernel.org
  S:    Maintained
  
 +MARVELL 88E6XXX ETHERNET SWITCH FABRIC DRIVER
 +M:    Andrew Lunn <andrew@lunn.ch>
 +M:    Vivien Didelot <vivien.didelot@savoirfairelinux.com>
 +S:    Maintained
 +F:    drivers/net/dsa/mv88e6xxx/
 +
  MARVELL ARMADA DRM SUPPORT
  M:    Russell King <rmk+kernel@armlinux.org.uk>
  S:    Maintained
@@@ -7354,6 -7180,11 +7354,6 @@@ F:     drivers/gpu/drm/armada
  F:    include/uapi/drm/armada_drm.h
  F:    Documentation/devicetree/bindings/display/armada/
  
 -MARVELL 88E6352 DSA support
 -M:    Guenter Roeck <linux@roeck-us.net>
 -S:    Maintained
 -F:    drivers/net/dsa/mv88e6352.c
 -
  MARVELL CRYPTO DRIVER
  M:    Boris Brezillon <boris.brezillon@free-electrons.com>
  M:    Arnaud Ebalard <arno@natisbad.org>
@@@ -7440,13 -7271,6 +7440,13 @@@ F:    Documentation/devicetree/bindings/i2
  F:    drivers/hwmon/max6697.c
  F:    include/linux/platform_data/max6697.h
  
 +MAX9860 MONO AUDIO VOICE CODEC DRIVER
 +M:    Peter Rosin <peda@axentia.se>
 +L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/sound/max9860.txt
 +F:    sound/soc/codecs/max9860.*
 +
  MAXIM MUIC CHARGER DRIVERS FOR EXYNOS BASED BOARDS
  M:    Krzysztof Kozlowski <k.kozlowski@samsung.com>
  L:    linux-pm@vger.kernel.org
@@@ -7496,16 -7320,6 +7496,16 @@@ L:    linux-iio@vger.kernel.or
  S:    Maintained
  F:    drivers/iio/potentiometer/mcp4531.c
  
 +MEDIA DRIVERS FOR RENESAS - FCP
 +M:    Laurent Pinchart <laurent.pinchart@ideasonboard.com>
 +L:    linux-media@vger.kernel.org
 +L:    linux-renesas-soc@vger.kernel.org
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Supported
 +F:    Documentation/devicetree/bindings/media/renesas,fcp.txt
 +F:    drivers/media/platform/rcar-fcp.c
 +F:    include/media/rcar-fcp.h
 +
  MEDIA DRIVERS FOR RENESAS - VSP1
  M:    Laurent Pinchart <laurent.pinchart@ideasonboard.com>
  L:    linux-media@vger.kernel.org
@@@ -7515,18 -7329,8 +7515,18 @@@ S:    Supporte
  F:    Documentation/devicetree/bindings/media/renesas,vsp1.txt
  F:    drivers/media/platform/vsp1/
  
 +MEDIA DRIVERS FOR HELENE
 +M:    Abylay Ospan <aospan@netup.ru>
 +L:    linux-media@vger.kernel.org
 +W:    https://linuxtv.org
 +W:    http://netup.tv/
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Supported
 +F:    drivers/media/dvb-frontends/helene*
 +
  MEDIA DRIVERS FOR ASCOT2E
  M:    Sergey Kozlov <serjk@netup.ru>
 +M:    Abylay Ospan <aospan@netup.ru>
  L:    linux-media@vger.kernel.org
  W:    https://linuxtv.org
  W:    http://netup.tv/
@@@ -7536,7 -7340,6 +7536,7 @@@ F:      drivers/media/dvb-frontends/ascot2e
  
  MEDIA DRIVERS FOR CXD2841ER
  M:    Sergey Kozlov <serjk@netup.ru>
 +M:    Abylay Ospan <aospan@netup.ru>
  L:    linux-media@vger.kernel.org
  W:    https://linuxtv.org
  W:    http://netup.tv/
@@@ -7546,7 -7349,6 +7546,7 @@@ F:      drivers/media/dvb-frontends/cxd2841e
  
  MEDIA DRIVERS FOR HORUS3A
  M:    Sergey Kozlov <serjk@netup.ru>
 +M:    Abylay Ospan <aospan@netup.ru>
  L:    linux-media@vger.kernel.org
  W:    https://linuxtv.org
  W:    http://netup.tv/
@@@ -7556,7 -7358,6 +7556,7 @@@ F:      drivers/media/dvb-frontends/horus3a
  
  MEDIA DRIVERS FOR LNBH25
  M:    Sergey Kozlov <serjk@netup.ru>
 +M:    Abylay Ospan <aospan@netup.ru>
  L:    linux-media@vger.kernel.org
  W:    https://linuxtv.org
  W:    http://netup.tv/
@@@ -7566,7 -7367,6 +7566,7 @@@ F:      drivers/media/dvb-frontends/lnbh25
  
  MEDIA DRIVERS FOR NETUP PCI UNIVERSAL DVB devices
  M:    Sergey Kozlov <serjk@netup.ru>
 +M:    Abylay Ospan <aospan@netup.ru>
  L:    linux-media@vger.kernel.org
  W:    https://linuxtv.org
  W:    http://netup.tv/
@@@ -7648,15 -7448,6 +7648,15 @@@ W:    http://www.mellanox.co
  Q:    http://patchwork.ozlabs.org/project/netdev/list/
  F:    drivers/net/ethernet/mellanox/mlxsw/
  
 +SOFT-ROCE DRIVER (rxe)
 +M:    Moni Shoua <monis@mellanox.com>
 +L:    linux-rdma@vger.kernel.org
 +S:    Supported
 +W:    https://github.com/SoftRoCE/rxe-dev/wiki/rxe-dev:-Home
 +Q:    http://patchwork.kernel.org/project/linux-rdma/list/
 +F:    drivers/infiniband/hw/rxe/
 +F:    include/uapi/rdma/rdma_user_rxe.h
 +
  MEMBARRIER SUPPORT
  M:    Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
  M:    "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
@@@ -7685,7 -7476,6 +7685,7 @@@ Q:      http://patchwork.ozlabs.org/project/
  T:    git git://git.infradead.org/linux-mtd.git
  T:    git git://git.infradead.org/l2-mtd.git
  S:    Maintained
 +F:    Documentation/devicetree/bindings/mtd/
  F:    drivers/mtd/
  F:    include/linux/mtd/
  F:    include/uapi/mtd/
@@@ -7825,8 -7615,10 +7825,8 @@@ L:     linux-media@vger.kernel.or
  W:    https://linuxtv.org
  W:    http://palosaari.fi/linux/
  Q:    http://patchwork.linuxtv.org/project/linux-media/list/
 -T:    git git://linuxtv.org/anttip/media_tree.git
  S:    Maintained
 -F:    drivers/staging/media/mn88472/
 -F:    drivers/media/dvb-frontends/mn88472.h
 +F:    drivers/media/dvb-frontends/mn88472*
  
  MN88473 MEDIA DRIVER
  M:    Antti Palosaari <crope@iki.fi>
@@@ -7952,7 -7744,6 +7952,7 @@@ M:      Ulf Hansson <ulf.hansson@linaro.org
  L:    linux-mmc@vger.kernel.org
  T:    git git://git.linaro.org/people/ulf.hansson/mmc.git
  S:    Maintained
 +F:    Documentation/devicetree/bindings/mmc/
  F:    drivers/mmc/
  F:    include/linux/mmc/
  F:    include/uapi/linux/mmc/
@@@ -8292,9 -8083,8 +8292,9 @@@ T:      git git://github.com/konis/nilfs2.gi
  S:    Supported
  F:    Documentation/filesystems/nilfs2.txt
  F:    fs/nilfs2/
 -F:    include/linux/nilfs2_fs.h
  F:    include/trace/events/nilfs2.h
 +F:    include/uapi/linux/nilfs2_api.h
 +F:    include/uapi/linux/nilfs2_ondisk.h
  
  NINJA SCSI-3 / NINJA SCSI-32Bi (16bit/CardBus) PCMCIA SCSI HOST ADAPTER DRIVER
  M:    YOKOTA Hiroshi <yokota@netlab.is.tsukuba.ac.jp>
@@@ -8341,7 -8131,6 +8341,7 @@@ F:      drivers/ntb
  F:    drivers/net/ntb_netdev.c
  F:    include/linux/ntb.h
  F:    include/linux/ntb_transport.h
 +F:    tools/testing/selftests/ntb/
  
  NTB INTEL DRIVER
  M:    Jon Mason <jdmason@kudzu.us>
@@@ -8384,13 -8173,6 +8384,13 @@@ S:    Supporte
  F:    drivers/nvme/host/
  F:    include/linux/nvme.h
  
 +NVM EXPRESS TARGET DRIVER
 +M:    Christoph Hellwig <hch@lst.de>
 +M:    Sagi Grimberg <sagi@grimberg.me>
 +L:    linux-nvme@lists.infradead.org
 +S:    Supported
 +F:    drivers/nvme/target/
 +
  NVMEM FRAMEWORK
  M:    Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
  M:    Maxime Ripard <maxime.ripard@free-electrons.com>
@@@ -8913,7 -8695,6 +8913,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/helgaas/pci.git
  S:    Supported
 +F:    Documentation/devicetree/bindings/pci/
  F:    Documentation/PCI/
  F:    drivers/pci/
  F:    include/linux/pci*
@@@ -8977,13 -8758,6 +8977,13 @@@ L:    linux-arm-kernel@lists.infradead.or
  S:    Maintained
  F:    drivers/pci/host/*mvebu*
  
 +PCI DRIVER FOR AARDVARK (Marvell Armada 3700)
 +M:    Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
 +L:    linux-pci@vger.kernel.org
 +L:    linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
 +S:    Maintained
 +F:    drivers/pci/host/pci-aardvark.c
 +
  PCI DRIVER FOR NVIDIA TEGRA
  M:    Thierry Reding <thierry.reding@gmail.com>
  L:    linux-tegra@vger.kernel.org
@@@ -9066,15 -8840,6 +9066,15 @@@ S:    Maintaine
  F:    Documentation/devicetree/bindings/pci/xgene-pci-msi.txt
  F:    drivers/pci/host/pci-xgene-msi.c
  
 +PCIE DRIVER FOR AXIS ARTPEC
 +M:    Niklas Cassel <niklas.cassel@axis.com>
 +M:    Jesper Nilsson <jesper.nilsson@axis.com>
 +L:    linux-arm-kernel@axis.com
 +L:    linux-pci@vger.kernel.org
 +S:    Maintained
 +F:    Documentation/devicetree/bindings/pci/axis,artpec*
 +F:    drivers/pci/host/*artpec*
 +
  PCIE DRIVER FOR HISILICON
  M:    Zhou Wang <wangzhou1@hisilicon.com>
  M:    Gabriele Paoloni <gabriele.paoloni@huawei.com>
@@@ -9252,6 -9017,16 +9252,16 @@@ W:    http://www.st.com/spea
  S:    Maintained
  F:    drivers/pinctrl/spear/
  
+ PISTACHIO SOC SUPPORT
+ M:      James Hartley <james.hartley@imgtec.com>
+ M:      Ionela Voinescu <ionela.voinescu@imgtec.com>
+ L:      linux-mips@linux-mips.org
+ S:      Maintained
+ F:      arch/mips/pistachio/
+ F:      arch/mips/include/asm/mach-pistachio/
+ F:      arch/mips/boot/dts/pistachio/
+ F:      arch/mips/configs/pistachio*_defconfig
  PKTCDVD DRIVER
  M:    Jiri Kosina <jikos@kernel.org>
  S:    Maintained
@@@ -9321,8 -9096,6 +9331,8 @@@ M:      David Woodhouse <dwmw2@infradead.org
  L:    linux-pm@vger.kernel.org
  T:    git git://git.infradead.org/battery-2.6.git
  S:    Maintained
 +F:    Documentation/devicetree/bindings/power/
 +F:    Documentation/devicetree/bindings/power_supply/
  F:    include/linux/power_supply.h
  F:    drivers/power/
  X:    drivers/power/avs/
@@@ -9336,12 -9109,6 +9346,12 @@@ F:    drivers/firmware/psci.
  F:    include/linux/psci.h
  F:    include/uapi/linux/psci.h
  
 +POWERNV OPERATOR PANEL LCD DISPLAY DRIVER
 +M:    Suraj Jitindar Singh <sjitindarsingh@gmail.com>
 +L:    linuxppc-dev@lists.ozlabs.org
 +S:    Maintained
 +F:    drivers/char/powernv-op-panel.c
 +
  PNP SUPPORT
  M:    "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
  S:    Maintained
@@@ -9466,13 -9233,6 +9476,13 @@@ F:    include/linux/tracehook.
  F:    include/uapi/linux/ptrace.h
  F:    kernel/ptrace.c
  
 +PULSE8-CEC DRIVER
 +M:    Hans Verkuil <hverkuil@xs4all.nl>
 +L:    linux-media@vger.kernel.org
 +T:    git git://linuxtv.org/media_tree.git
 +S:    Maintained
 +F:    drivers/staging/media/pulse8-cec
 +
  PVRUSB2 VIDEO4LINUX DRIVER
  M:    Mike Isely <isely@pobox.com>
  L:    pvrusb2@isely.net       (subscribers-only)
@@@ -9484,15 -9244,14 +9494,15 @@@ F:   Documentation/video4linux/README.pvr
  F:    drivers/media/usb/pvrusb2/
  
  PWC WEBCAM DRIVER
 -M:    Hans de Goede <hdegoede@redhat.com>
 +M:    Hans Verkuil <hverkuil@xs4all.nl>
  L:    linux-media@vger.kernel.org
  T:    git git://linuxtv.org/media_tree.git
 -S:    Maintained
 +S:    Odd Fixes
  F:    drivers/media/usb/pwc/*
  
  PWM FAN DRIVER
 -M:    Kamil Debski <k.debski@samsung.com>
 +M:    Kamil Debski <kamil@wypas.org>
 +M:    Lukasz Majewski <l.majewski@samsung.com>
  L:    linux-hwmon@vger.kernel.org
  S:    Supported
  F:    Documentation/devicetree/bindings/hwmon/pwm-fan.txt
@@@ -9561,8 -9320,7 +9571,8 @@@ L:      rtc-linux@googlegroups.co
  S:    Maintained
  
  QAT DRIVER
 -M:    Tadeusz Struk <tadeusz.struk@intel.com>
 +M:    Giovanni Cabiddu <giovanni.cabiddu@intel.com>
 +M:    Salvatore Benedetto <salvatore.benedetto@intel.com>
  L:    qat-linux@intel.com
  S:    Supported
  F:    drivers/crypto/qat/
@@@ -9704,14 -9462,14 +9714,14 @@@ F:   drivers/video/fbdev/aty/radeon
  F:    include/uapi/linux/radeonfb.h
  
  RADIOSHARK RADIO DRIVER
 -M:    Hans de Goede <hdegoede@redhat.com>
 +M:    Hans Verkuil <hverkuil@xs4all.nl>
  L:    linux-media@vger.kernel.org
  T:    git git://linuxtv.org/media_tree.git
  S:    Maintained
  F:    drivers/media/radio/radio-shark.c
  
  RADIOSHARK2 RADIO DRIVER
 -M:    Hans de Goede <hdegoede@redhat.com>
 +M:    Hans Verkuil <hverkuil@xs4all.nl>
  L:    linux-media@vger.kernel.org
  T:    git git://linuxtv.org/media_tree.git
  S:    Maintained
@@@ -9785,7 -9543,7 +9795,7 @@@ M:      Florian Fainelli <florian@openwrt.or
  S:    Maintained
  
  RDC R6040 FAST ETHERNET DRIVER
 -M:    Florian Fainelli <florian@openwrt.org>
 +M:    Florian Fainelli <f.fainelli@gmail.com>
  L:    netdev@vger.kernel.org
  S:    Maintained
  F:    drivers/net/ethernet/rdc/r6040.c
@@@ -9830,14 -9588,10 +9840,14 @@@ L:   rtc-linux@googlegroups.co
  Q:    http://patchwork.ozlabs.org/project/rtc-linux/list/
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git
  S:    Maintained
 +F:    Documentation/devicetree/bindings/rtc/
  F:    Documentation/rtc.txt
  F:    drivers/rtc/
  F:    include/linux/rtc.h
  F:    include/uapi/linux/rtc.h
 +F:    include/linux/rtc/
 +F:    include/linux/platform_data/rtc-*
 +F:    tools/testing/selftests/timers/rtctest.c
  
  REALTEK AUDIO CODECS
  M:    Bard Liao <bardliao@realtek.com>
@@@ -9856,7 -9610,6 +9866,7 @@@ M:      Mark Brown <broonie@kernel.org
  L:    linux-kernel@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap.git
  S:    Supported
 +F:    Documentation/devicetree/bindings/regmap/
  F:    drivers/base/regmap/
  F:    include/linux/regmap.h
  
@@@ -9866,9 -9619,8 +9876,9 @@@ M:      Bjorn Andersson <bjorn.andersson@lin
  L:    linux-remoteproc@vger.kernel.org
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/ohad/remoteproc.git
  S:    Maintained
 -F:    drivers/remoteproc/
 +F:    Documentation/devicetree/bindings/remoteproc/
  F:    Documentation/remoteproc.txt
 +F:    drivers/remoteproc/
  F:    include/linux/remoteproc.h
  
  REMOTE PROCESSOR MESSAGING (RPMSG) SUBSYSTEM
@@@ -9942,6 -9694,7 +9952,6 @@@ F:      Documentation/ABI/*/sysfs-driver-hid
  
  ROCKER DRIVER
  M:    Jiri Pirko <jiri@resnulli.us>
 -M:    Scott Feldman <sfeldma@gmail.com>
  L:    netdev@vger.kernel.org
  S:    Supported
  F:    drivers/net/ethernet/rocker/
@@@ -10153,9 -9906,7 +10163,9 @@@ S:    Maintaine
  F:    drivers/platform/x86/samsung-laptop.c
  
  SAMSUNG AUDIO (ASoC) DRIVERS
 +M:    Krzysztof Kozlowski <k.kozlowski@samsung.com>
  M:    Sangbeom Kim <sbkim73@samsung.com>
 +M:    Sylwester Nawrocki <s.nawrocki@samsung.com>
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
  S:    Supported
  F:    sound/soc/samsung/
@@@ -10244,8 -9995,7 +10254,8 @@@ T:    git https://github.com/lmajewski/lin
  F:    drivers/thermal/samsung/
  
  SAMSUNG USB2 PHY DRIVER
 -M:    Kamil Debski <k.debski@samsung.com>
 +M:    Kamil Debski <kamil@wypas.org>
 +M:    Sylwester Nawrocki <s.nawrocki@samsung.com>
  L:    linux-kernel@vger.kernel.org
  S:    Supported
  F:    Documentation/devicetree/bindings/phy/samsung-phy.txt
@@@ -10261,7 -10011,6 +10271,7 @@@ SERIAL DRIVER
  M:    Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  L:    linux-serial@vger.kernel.org
  S:    Maintained
 +F:    Documentation/devicetree/bindings/serial/
  F:    drivers/tty/serial/
  
  SYNOPSYS DESIGNWARE DMAC DRIVER
@@@ -10398,7 -10147,6 +10408,7 @@@ M:   "Martin K. Petersen" <martin.peterse
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git
  L:    linux-scsi@vger.kernel.org
  S:    Maintained
 +F:    Documentation/devicetree/bindings/scsi/
  F:    drivers/scsi/
  F:    include/scsi/
  
@@@ -10470,13 -10218,6 +10480,13 @@@ F: tools/testing/selftests/seccomp/
  K:    \bsecure_computing
  K:    \bTIF_SECCOMP\b
  
 +SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) Broadcom BRCMSTB DRIVER
 +M:    Al Cooper <alcooperx@gmail.com>
 +L:    linux-mmc@vger.kernel.org
 +L:    bcm-kernel-feedback-list@broadcom.com
 +S:    Maintained
 +F:    drivers/mmc/host/sdhci-brcmstb*
 +
  SECURE DIGITAL HOST CONTROLLER INTERFACE (SDHCI) SAMSUNG DRIVER
  M:    Ben Dooks <ben-linux@fluff.org>
  M:    Jaehoon Chung <jh80.chung@samsung.com>
@@@ -10550,9 -10291,10 +10560,9 @@@ W:  http://www.avagotech.co
  S:    Supported
  F:    drivers/scsi/be2iscsi/
  
 -Emulex 10Gbps NIC BE2, BE3-R, Lancer, Skyhawk-R DRIVER
 +Emulex 10Gbps NIC BE2, BE3-R, Lancer, Skyhawk-R DRIVER (be2net)
  M:    Sathya Perla <sathya.perla@broadcom.com>
  M:    Ajit Khaparde <ajit.khaparde@broadcom.com>
 -M:    Padmanabh Ratnakar <padmanabh.ratnakar@broadcom.com>
  M:    Sriharsha Basavapatna <sriharsha.basavapatna@broadcom.com>
  M:    Somnath Kotur <somnath.kotur@broadcom.com>
  L:    netdev@vger.kernel.org
@@@ -10818,7 -10560,7 +10828,7 @@@ SMACK SECURITY MODUL
  M:    Casey Schaufler <casey@schaufler-ca.com>
  L:    linux-security-module@vger.kernel.org
  W:    http://schaufler-ca.com
 -T:    git git://git.gitorious.org/smack-next/kernel.git
 +T:    git git://github.com/cschaufler/smack-next
  S:    Maintained
  F:    Documentation/security/Smack.txt
  F:    security/smack/
@@@ -10992,7 -10734,6 +11002,7 @@@ T:   git git://git.kernel.org/pub/scm/lin
  L:    alsa-devel@alsa-project.org (moderated for non-subscribers)
  W:    http://alsa-project.org/main/index.php/ASoC
  S:    Supported
 +F:    Documentation/devicetree/bindings/sound/
  F:    Documentation/sound/alsa/soc/
  F:    sound/soc/
  F:    include/sound/soc*
@@@ -11068,7 -10809,6 +11078,7 @@@ L:   linux-spi@vger.kernel.or
  T:    git git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git
  Q:    http://patchwork.kernel.org/project/spi-devel-general/list/
  S:    Maintained
 +F:    Documentation/devicetree/bindings/spi/
  F:    Documentation/spi/
  F:    drivers/spi/
  F:    include/linux/spi/
@@@ -11131,7 -10871,6 +11141,7 @@@ STAGING - INDUSTRIAL I
  M:    Jonathan Cameron <jic23@kernel.org>
  L:    linux-iio@vger.kernel.org
  S:    Odd Fixes
 +F:    Documentation/devicetree/bindings/staging/iio/
  F:    drivers/staging/iio/
  
  STAGING - LIRC (LINUX INFRARED REMOTE CONTROL) DRIVERS
@@@ -11586,6 -11325,11 +11596,6 @@@ F:  Documentation/thermal/cpu-cooling-ap
  F:    drivers/thermal/cpu_cooling.c
  F:    include/linux/cpu_cooling.h
  
 -THINGM BLINK(1) USB RGB LED DRIVER
 -M:    Vivien Didelot <vivien.didelot@savoirfairelinux.com>
 -S:    Maintained
 -F:    drivers/hid/hid-thingm.c
 -
  THINKPAD ACPI EXTRAS DRIVER
  M:    Henrique de Moraes Holschuh <ibm-acpi@hmh.eng.br>
  L:    ibm-acpi-devel@lists.sourceforge.net
@@@ -12036,12 -11780,6 +12046,12 @@@ S: Supporte
  F:    Documentation/scsi/ufs.txt
  F:    drivers/scsi/ufs/
  
 +UNIVERSAL FLASH STORAGE HOST CONTROLLER DRIVER DWC HOOKS
 +M:    Joao Pinto <Joao.Pinto@synopsys.com>
 +L:    linux-scsi@vger.kernel.org
 +S:    Supported
 +F:    drivers/scsi/ufs/*dwc*
 +
  UNSORTED BLOCK IMAGES (UBI)
  M:    Artem Bityutskiy <dedekind1@gmail.com>
  M:    Richard Weinberger <richard@nod.at>
@@@ -12067,7 -11805,8 +12077,7 @@@ S:   Maintaine
  F:    drivers/net/wireless/ath/ar5523/
  
  USB ATTACHED SCSI
 -M:    Hans de Goede <hdegoede@redhat.com>
 -M:    Gerd Hoffmann <kraxel@redhat.com>
 +M:    Oliver Neukum <oneukum@suse.com>
  L:    linux-usb@vger.kernel.org
  L:    linux-scsi@vger.kernel.org
  S:    Maintained
@@@ -12566,7 -12305,7 +12576,7 @@@ S:   Maintaine
  F:    drivers/net/vmxnet3/
  
  VMware PVSCSI driver
 -M:    Arvind Kumar <arvindkumar@vmware.com>
 +M:    Jim Gill <jgill@vmware.com>
  M:    VMware PV-Drivers <pv-drivers@vmware.com>
  L:    linux-scsi@vger.kernel.org
  S:    Maintained
diff --combined arch/mips/Kconfig
@@@ -64,6 -64,7 +64,7 @@@ config MIP
        select GENERIC_TIME_VSYSCALL
        select ARCH_CLOCKSOURCE_DATA
        select HANDLE_DOMAIN_IRQ
+       select HAVE_EXIT_THREAD
  
  menu "Machine selection"
  
@@@ -384,7 -385,7 +385,7 @@@ config MACH_PISTACHI
        select CLKSRC_MIPS_GIC
        select COMMON_CLK
        select CSRC_R4K
-       select DMA_MAYBE_COHERENT
+       select DMA_NONCOHERENT
        select GPIOLIB
        select IRQ_MIPS_CPU
        select LIBFDT
@@@ -880,7 -881,6 +881,6 @@@ config CAVIUM_OCTEON_SO
        select SYS_SUPPORTS_HOTPLUG_CPU if CPU_BIG_ENDIAN
        select SYS_HAS_EARLY_PRINTK
        select SYS_HAS_CPU_CAVIUM_OCTEON
-       select SWAP_IO_SPACE
        select HW_HAS_PCI
        select ZONE_DMA32
        select HOLES_IN_ZONE
@@@ -1111,16 -1111,6 +1111,6 @@@ config NEED_DMA_MAP_STAT
  config SYS_HAS_EARLY_PRINTK
        bool
  
- config HOTPLUG_CPU
-       bool "Support for hot-pluggable CPUs"
-       depends on SMP && SYS_SUPPORTS_HOTPLUG_CPU
-       help
-         Say Y here to allow turning CPUs off and on. CPUs can be
-         controlled through /sys/devices/system/cpu.
-         (Note: power management support will enable this option
-           automatically on SMP systems. )
-         Say N if you want to disable CPU hotplug.
  config SYS_SUPPORTS_HOTPLUG_CPU
        bool
  
@@@ -1406,7 -1396,6 +1396,6 @@@ config CPU_LOONGSON1
        bool "Loongson 1B"
        depends on SYS_HAS_CPU_LOONGSON1B
        select CPU_LOONGSON1
-       select ARCH_WANT_OPTIONAL_GPIOLIB
        select LEDS_GPIO_REGISTER
        help
          The Loongson 1B is a 32-bit SoC, which implements the MIPS32
@@@ -1488,7 -1477,6 +1477,7 @@@ config CPU_MIPS64_R
        select CPU_SUPPORTS_HIGHMEM
        select CPU_SUPPORTS_HUGEPAGES
        select CPU_SUPPORTS_MSA
 +      select HAVE_KVM
        help
          Choose this option to build a kernel for release 2 or later of the
          MIPS64 architecture.  Many modern embedded systems with a 64-bit
@@@ -1506,7 -1494,6 +1495,7 @@@ config CPU_MIPS64_R
        select CPU_SUPPORTS_MSA
        select GENERIC_CSUM
        select MIPS_O32_FP64_SUPPORT if MIPS32_O32
 +      select HAVE_KVM
        help
          Choose this option to build a kernel for release 6 or later of the
          MIPS64 architecture.  New MIPS processors, starting with the Warrior
@@@ -2636,6 -2623,16 +2625,16 @@@ config SM
  
          If you don't know what to do here, say N.
  
+ config HOTPLUG_CPU
+       bool "Support for hot-pluggable CPUs"
+       depends on SMP && SYS_SUPPORTS_HOTPLUG_CPU
+       help
+         Say Y here to allow turning CPUs off and on. CPUs can be
+         controlled through /sys/devices/system/cpu.
+         (Note: power management support will enable this option
+           automatically on SMP systems. )
+         Say N if you want to disable CPU hotplug.
  config SMP_UP
        bool
  
@@@ -2887,10 -2884,10 +2886,10 @@@ choic
                  the documented boot protocol using a device tree.
  
        config MIPS_RAW_APPENDED_DTB
-               bool "vmlinux.bin"
+               bool "vmlinux.bin or vmlinuz.bin"
                help
                  With this option, the boot code will look for a device tree binary
-                 DTB) appended to raw vmlinux.bin (without decompressor).
+                 DTB) appended to raw vmlinux.bin or vmlinuz.bin.
                  (e.g. cat vmlinux.bin <filename>.dtb > vmlinux_w_dtb).
  
                  This is meant as a backward compatibility convenience for those
                  look like a DTB header after a reboot if no actual DTB is appended
                  to vmlinux.bin.  Do not leave this option active in a production kernel
                  if you don't intend to always append a DTB.
-       config MIPS_ZBOOT_APPENDED_DTB
-               bool "vmlinuz.bin"
-               depends on SYS_SUPPORTS_ZBOOT
-               help
-                 With this option, the boot code will look for a device tree binary
-                 DTB) appended to raw vmlinuz.bin (with decompressor).
-                 (e.g. cat vmlinuz.bin <filename>.dtb > vmlinuz_w_dtb).
-                 This is meant as a backward compatibility convenience for those
-                 systems with a bootloader that can't be upgraded to accommodate
-                 the documented boot protocol using a device tree.
-                 Beware that there is very little in terms of protection against
-                 this option being confused by leftover garbage in memory that might
-                 look like a DTB header after a reboot if no actual DTB is appended
-                 to vmlinuz.bin.  Do not leave this option active in a production kernel
-                 if you don't intend to always append a DTB.
  endchoice
  
  choice
diff --combined arch/mips/ath79/setup.c
@@@ -18,6 -18,7 +18,6 @@@
  #include <linux/err.h>
  #include <linux/clk.h>
  #include <linux/clk-provider.h>
 -#include <linux/of_platform.h>
  #include <linux/of_fdt.h>
  
  #include <asm/bootinfo.h>
@@@ -203,8 -204,8 +203,8 @@@ void __init plat_mem_setup(void
        fdt_start = fw_getenvl("fdt_start");
        if (fdt_start)
                __dt_setup_arch((void *)KSEG0ADDR(fdt_start));
-       else if (fw_arg0 == -2)
-               __dt_setup_arch((void *)KSEG0ADDR(fw_arg1));
+       else if (fw_passed_dtb)
+               __dt_setup_arch((void *)KSEG0ADDR(fw_passed_dtb));
  
        if (mips_machtype != ATH79_MACH_GENERIC_OF) {
                ath79_reset_base = ioremap_nocache(AR71XX_RESET_BASE,
@@@ -284,6 -285,7 +284,6 @@@ void __init plat_time_init(void
  
  static int __init ath79_setup(void)
  {
 -      of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
        if  (mips_machtype == ATH79_MACH_GENERIC_OF)
                return 0;
  
@@@ -11,7 -11,7 +11,7 @@@
  
  #include <uapi/asm/signal.h>
  
- #ifdef CONFIG_MIPS32_COMPAT
+ #ifdef CONFIG_MIPS32_O32
  extern struct mips_abi mips_abi_32;
  
  #define sig_uses_siginfo(ka, abi)                               \
@@@ -19,8 -19,8 +19,8 @@@
                ((ka)->sa.sa_flags & SA_SIGINFO))
  #else
  #define sig_uses_siginfo(ka, abi)                               \
 -      (config_enabled(CONFIG_64BIT) ? 1 :                     \
 -              (config_enabled(CONFIG_TRAD_SIGNALS) ?          \
 +      (IS_ENABLED(CONFIG_64BIT) ? 1 :                     \
 +              (IS_ENABLED(CONFIG_TRAD_SIGNALS) ?          \
                        ((ka)->sa.sa_flags & SA_SIGINFO) : 1) )
  #endif
  
diff --combined arch/mips/kernel/elf.c
@@@ -8,9 -8,12 +8,12 @@@
   * option) any later version.
   */
  
+ #include <linux/binfmts.h>
  #include <linux/elf.h>
+ #include <linux/export.h>
  #include <linux/sched.h>
  
+ #include <asm/cpu-features.h>
  #include <asm/cpu-info.h>
  
  /* Whether to accept legacy-NaN and 2008-NaN user binaries.  */
@@@ -179,7 -182,7 +182,7 @@@ int arch_check_elf(void *_ehdr, bool ha
                        return -ELIBBAD;
        }
  
 -      if (!config_enabled(CONFIG_MIPS_O32_FP64_SUPPORT))
 +      if (!IS_ENABLED(CONFIG_MIPS_O32_FP64_SUPPORT))
                return 0;
  
        fp_abi = state->fp_abi;
@@@ -285,7 -288,7 +288,7 @@@ void mips_set_personality_fp(struct arc
         * not be worried about N32/N64 binaries.
         */
  
 -      if (!config_enabled(CONFIG_MIPS_O32_FP64_SUPPORT))
 +      if (!IS_ENABLED(CONFIG_MIPS_O32_FP64_SUPPORT))
                return;
  
        switch (state->overall_fp_mode) {
@@@ -326,3 -329,19 +329,19 @@@ void mips_set_personality_nan(struct ar
                BUG();
        }
  }
+ int mips_elf_read_implies_exec(void *elf_ex, int exstack)
+ {
+       if (exstack != EXSTACK_DISABLE_X) {
+               /* The binary doesn't request a non-executable stack */
+               return 1;
+       }
+       if (!cpu_has_rixi) {
+               /* The CPU doesn't support non-executable memory */
+               return 1;
+       }
+       return 0;
+ }
+ EXPORT_SYMBOL(mips_elf_read_implies_exec);
@@@ -84,7 -84,7 +84,7 @@@ static inline int mipsr6_emul(struct pt
                                (s32)MIPSInst_SIMM(ir);
                return 0;
        case daddiu_op:
 -              if (config_enabled(CONFIG_32BIT))
 +              if (IS_ENABLED(CONFIG_32BIT))
                        break;
  
                if (MIPSInst_RT(ir))
                                              (u32)regs->regs[MIPSInst_RT(ir)]);
                        return 0;
                case dsll_op:
 -                      if (config_enabled(CONFIG_32BIT) || MIPSInst_RS(ir))
 +                      if (IS_ENABLED(CONFIG_32BIT) || MIPSInst_RS(ir))
                                break;
  
                        if (MIPSInst_RD(ir))
                                                MIPSInst_FD(ir));
                        return 0;
                case dsrl_op:
 -                      if (config_enabled(CONFIG_32BIT) || MIPSInst_RS(ir))
 +                      if (IS_ENABLED(CONFIG_32BIT) || MIPSInst_RS(ir))
                                break;
  
                        if (MIPSInst_RD(ir))
                                                MIPSInst_FD(ir));
                        return 0;
                case daddu_op:
 -                      if (config_enabled(CONFIG_32BIT) || MIPSInst_FD(ir))
 +                      if (IS_ENABLED(CONFIG_32BIT) || MIPSInst_FD(ir))
                                break;
  
                        if (MIPSInst_RD(ir))
                                        (u64)regs->regs[MIPSInst_RT(ir)];
                        return 0;
                case dsubu_op:
 -                      if (config_enabled(CONFIG_32BIT) || MIPSInst_FD(ir))
 +                      if (IS_ENABLED(CONFIG_32BIT) || MIPSInst_FD(ir))
                                break;
  
                        if (MIPSInst_RD(ir))
@@@ -283,7 -283,7 +283,7 @@@ static int jr_func(struct pt_regs *regs
                err = mipsr6_emul(regs, nir);
                if (err > 0) {
                        regs->cp0_epc = nepc;
-                       err = mips_dsemul(regs, nir, cepc);
+                       err = mips_dsemul(regs, nir, epc, cepc);
                        if (err == SIGILL)
                                err = SIGEMT;
                        MIPS_R2_STATS(dsemul);
@@@ -498,7 -498,7 +498,7 @@@ static int dmult_func(struct pt_regs *r
        s64 res;
        s64 rt, rs;
  
 -      if (config_enabled(CONFIG_32BIT))
 +      if (IS_ENABLED(CONFIG_32BIT))
                return SIGILL;
  
        rt = regs->regs[MIPSInst_RT(ir)];
@@@ -530,7 -530,7 +530,7 @@@ static int dmultu_func(struct pt_regs *
        u64 res;
        u64 rt, rs;
  
 -      if (config_enabled(CONFIG_32BIT))
 +      if (IS_ENABLED(CONFIG_32BIT))
                return SIGILL;
  
        rt = regs->regs[MIPSInst_RT(ir)];
@@@ -561,7 -561,7 +561,7 @@@ static int ddiv_func(struct pt_regs *re
  {
        s64 rt, rs;
  
 -      if (config_enabled(CONFIG_32BIT))
 +      if (IS_ENABLED(CONFIG_32BIT))
                return SIGILL;
  
        rt = regs->regs[MIPSInst_RT(ir)];
@@@ -586,7 -586,7 +586,7 @@@ static int ddivu_func(struct pt_regs *r
  {
        u64 rt, rs;
  
 -      if (config_enabled(CONFIG_32BIT))
 +      if (IS_ENABLED(CONFIG_32BIT))
                return SIGILL;
  
        rt = regs->regs[MIPSInst_RT(ir)];
@@@ -825,7 -825,7 +825,7 @@@ static int dclz_func(struct pt_regs *re
        u64 res;
        u64 rs;
  
 -      if (config_enabled(CONFIG_32BIT))
 +      if (IS_ENABLED(CONFIG_32BIT))
                return SIGILL;
  
        if (!MIPSInst_RD(ir))
@@@ -852,7 -852,7 +852,7 @@@ static int dclo_func(struct pt_regs *re
        u64 res;
        u64 rs;
  
 -      if (config_enabled(CONFIG_32BIT))
 +      if (IS_ENABLED(CONFIG_32BIT))
                return SIGILL;
  
        if (!MIPSInst_RD(ir))
@@@ -1033,7 -1033,7 +1033,7 @@@ repeat
                        if (nir) {
                                err = mipsr6_emul(regs, nir);
                                if (err > 0) {
-                                       err = mips_dsemul(regs, nir, cpc);
+                                       err = mips_dsemul(regs, nir, epc, cpc);
                                        if (err == SIGILL)
                                                err = SIGEMT;
                                        MIPS_R2_STATS(dsemul);
                        if (nir) {
                                err = mipsr6_emul(regs, nir);
                                if (err > 0) {
-                                       err = mips_dsemul(regs, nir, cpc);
+                                       err = mips_dsemul(regs, nir, epc, cpc);
                                        if (err == SIGILL)
                                                err = SIGEMT;
                                        MIPS_R2_STATS(dsemul);
                if (nir) {
                        err = mipsr6_emul(regs, nir);
                        if (err > 0) {
-                               err = mips_dsemul(regs, nir, cpc);
+                               err = mips_dsemul(regs, nir, epc, cpc);
                                if (err == SIGILL)
                                        err = SIGEMT;
                                MIPS_R2_STATS(dsemul);
@@@ -1484,7 -1484,7 +1484,7 @@@ fpu_emul
                break;
  
        case ldl_op:
 -              if (config_enabled(CONFIG_32BIT)) {
 +              if (IS_ENABLED(CONFIG_32BIT)) {
                    err = SIGILL;
                    break;
                }
                break;
  
        case ldr_op:
 -              if (config_enabled(CONFIG_32BIT)) {
 +              if (IS_ENABLED(CONFIG_32BIT)) {
                    err = SIGILL;
                    break;
                }
                break;
  
        case sdl_op:
 -              if (config_enabled(CONFIG_32BIT)) {
 +              if (IS_ENABLED(CONFIG_32BIT)) {
                    err = SIGILL;
                    break;
                }
                break;
  
        case sdr_op:
 -              if (config_enabled(CONFIG_32BIT)) {
 +              if (IS_ENABLED(CONFIG_32BIT)) {
                    err = SIGILL;
                    break;
                }
                break;
  
        case lld_op:
 -              if (config_enabled(CONFIG_32BIT)) {
 +              if (IS_ENABLED(CONFIG_32BIT)) {
                    err = SIGILL;
                    break;
                }
                break;
  
        case scd_op:
 -              if (config_enabled(CONFIG_32BIT)) {
 +              if (IS_ENABLED(CONFIG_32BIT)) {
                    err = SIGILL;
                    break;
                }
@@@ -165,7 -165,7 +165,7 @@@ static int save_msa_extcontext(void __u
                 * should already have been done when handling scalar FP
                 * context.
                 */
 -              BUG_ON(config_enabled(CONFIG_EVA));
 +              BUG_ON(IS_ENABLED(CONFIG_EVA));
  
                err = __put_user(read_msa_csr(), &msa->csr);
                err |= _save_msa_all_upper(&msa->wr);
@@@ -195,7 -195,7 +195,7 @@@ static int restore_msa_extcontext(void 
        unsigned int csr;
        int i, err;
  
 -      if (!config_enabled(CONFIG_CPU_HAS_MSA))
 +      if (!IS_ENABLED(CONFIG_CPU_HAS_MSA))
                return SIGSYS;
  
        if (size != sizeof(*msa))
                 * scalar FP context, so FPU & MSA should have already been
                 * disabled whilst handling scalar FP context.
                 */
 -              BUG_ON(config_enabled(CONFIG_EVA));
 +              BUG_ON(IS_ENABLED(CONFIG_EVA));
  
                write_msa_csr(csr);
                err |= _restore_msa_all_upper(&msa->wr);
@@@ -315,7 -315,7 +315,7 @@@ int protected_save_fp_context(void __us
         * EVA does not have userland equivalents of ldc1 or sdc1, so
         * save to the kernel FP context & copy that to userland below.
         */
 -      if (config_enabled(CONFIG_EVA))
 +      if (IS_ENABLED(CONFIG_EVA))
                lose_fpu(1);
  
        while (1) {
@@@ -378,7 -378,7 +378,7 @@@ int protected_restore_fp_context(void _
         * disable the FPU here such that the code below simply copies to
         * the kernel FP context.
         */
 -      if (config_enabled(CONFIG_EVA))
 +      if (IS_ENABLED(CONFIG_EVA))
                lose_fpu(0);
  
        while (1) {
@@@ -772,6 -772,14 +772,14 @@@ static void handle_signal(struct ksigna
        struct mips_abi *abi = current->thread.abi;
        void *vdso = current->mm->context.vdso;
  
+       /*
+        * If we were emulating a delay slot instruction, exit that frame such
+        * that addresses in the sigframe are as expected for userland and we
+        * don't have a problem if we reuse the thread's frame for an
+        * instruction within the signal handler.
+        */
+       dsemul_thread_rollback(regs);
        if (regs->regs[0]) {
                switch(regs->regs[2]) {
                case ERESTART_RESTARTBLOCK:
@@@ -46,8 -46,8 +46,8 @@@ static unsigned core_vpe_count(unsigne
        if (threads_disabled)
                return 1;
  
 -      if ((!config_enabled(CONFIG_MIPS_MT_SMP) || !cpu_has_mipsmt)
 -              && (!config_enabled(CONFIG_CPU_MIPSR6) || !cpu_has_vp))
 +      if ((!IS_ENABLED(CONFIG_MIPS_MT_SMP) || !cpu_has_mipsmt)
 +              && (!IS_ENABLED(CONFIG_CPU_MIPSR6) || !cpu_has_vp))
                return 1;
  
        mips_cm_lock_other(core, 0);
@@@ -206,7 -206,7 +206,7 @@@ err_out
        }
  }
  
- static void boot_core(unsigned core)
+ static void boot_core(unsigned int core, unsigned int vpe_id)
  {
        u32 access, stat, seq_state;
        unsigned timeout;
                mips_cpc_lock_other(core);
  
                if (mips_cm_revision() >= CM_REV_CM3) {
-                       /* Run VP0 following the reset */
-                       write_cpc_co_vp_run(0x1);
+                       /* Run only the requested VP following the reset */
+                       write_cpc_co_vp_stop(0xf);
+                       write_cpc_co_vp_run(1 << vpe_id);
  
                        /*
                         * Ensure that the VP_RUN register is written before the
@@@ -306,7 -307,7 +307,7 @@@ static void cps_boot_secondary(int cpu
  
        if (!test_bit(core, core_power)) {
                /* Boot a VPE on a powered down core */
-               boot_core(core);
+               boot_core(core, vpe_id);
                goto out;
        }
  
@@@ -397,6 -398,7 +398,7 @@@ static int cps_cpu_disable(void
        atomic_sub(1 << cpu_vpe_id(&current_cpu_data), &core_cfg->vpe_mask);
        smp_mb__after_atomic();
        set_cpu_online(cpu, false);
+       calculate_cpu_foreign_map();
        cpumask_clear_cpu(cpu, &cpu_callin_map);
  
        return 0;
@@@ -411,14 -413,16 +413,16 @@@ static enum 
  
  void play_dead(void)
  {
-       unsigned cpu, core;
+       unsigned int cpu, core, vpe_id;
  
        local_irq_disable();
        idle_task_exit();
        cpu = smp_processor_id();
        cpu_death = CPU_DEATH_POWER;
  
-       if (cpu_has_mipsmt) {
+       pr_debug("CPU%d going offline\n", cpu);
+       if (cpu_has_mipsmt || cpu_has_vp) {
                core = cpu_data[cpu].core;
  
                /* Look for another online VPE within the core */
        complete(&cpu_death_chosen);
  
        if (cpu_death == CPU_DEATH_HALT) {
-               /* Halt this TC */
-               write_c0_tchalt(TCHALT_H);
-               instruction_hazard();
+               vpe_id = cpu_vpe_id(&cpu_data[cpu]);
+               pr_debug("Halting core %d VP%d\n", core, vpe_id);
+               if (cpu_has_mipsmt) {
+                       /* Halt this TC */
+                       write_c0_tchalt(TCHALT_H);
+                       instruction_hazard();
+               } else if (cpu_has_vp) {
+                       write_cpc_cl_vp_stop(1 << vpe_id);
+                       /* Ensure that the VP_STOP register is written */
+                       wmb();
+               }
        } else {
+               pr_debug("Gating power to core %d\n", core);
                /* Power down the core */
                cps_pm_enter_state(CPS_PM_POWER_GATED);
        }
@@@ -469,6 -484,7 +484,7 @@@ static void wait_for_sibling_halt(void 
  static void cps_cpu_die(unsigned int cpu)
  {
        unsigned core = cpu_data[cpu].core;
+       unsigned int vpe_id = cpu_vpe_id(&cpu_data[cpu]);
        unsigned stat;
        int err;
  
                 * in which case the CPC will refuse to power down the core.
                 */
                do {
+                       mips_cm_lock_other(core, vpe_id);
                        mips_cpc_lock_other(core);
                        stat = read_cpc_co_stat_conf();
                        stat &= CPC_Cx_STAT_CONF_SEQSTATE_MSK;
                        mips_cpc_unlock_other();
+                       mips_cm_unlock_other();
                } while (stat != CPC_Cx_STAT_CONF_SEQSTATE_D0 &&
                         stat != CPC_Cx_STAT_CONF_SEQSTATE_D2 &&
                         stat != CPC_Cx_STAT_CONF_SEQSTATE_U2);
                                               (void *)(unsigned long)cpu, 1);
                if (err)
                        panic("Failed to call remote sibling CPU\n");
+       } else if (cpu_has_vp) {
+               do {
+                       mips_cm_lock_other(core, vpe_id);
+                       stat = read_cpc_co_vp_running();
+                       mips_cm_unlock_other();
+               } while (stat & (1 << vpe_id));
        }
  }
  
diff --combined arch/mips/kernel/traps.c
@@@ -619,17 -619,17 +619,17 @@@ static int simulate_rdhwr(struct pt_reg
        perf_sw_event(PERF_COUNT_SW_EMULATION_FAULTS,
                        1, regs, 0);
        switch (rd) {
 -      case 0:         /* CPU number */
 +      case MIPS_HWR_CPUNUM:           /* CPU number */
                regs->regs[rt] = smp_processor_id();
                return 0;
 -      case 1:         /* SYNCI length */
 +      case MIPS_HWR_SYNCISTEP:        /* SYNCI length */
                regs->regs[rt] = min(current_cpu_data.dcache.linesz,
                                     current_cpu_data.icache.linesz);
                return 0;
 -      case 2:         /* Read count register */
 +      case MIPS_HWR_CC:               /* Read count register */
                regs->regs[rt] = read_c0_count();
                return 0;
 -      case 3:         /* Count register resolution */
 +      case MIPS_HWR_CCRES:            /* Count register resolution */
                switch (current_cpu_type()) {
                case CPU_20KC:
                case CPU_25KF:
                        regs->regs[rt] = 2;
                }
                return 0;
 -      case 29:
 +      case MIPS_HWR_ULR:              /* Read UserLocal register */
                regs->regs[rt] = ti->tp_value;
                return 0;
        default:
@@@ -704,6 -704,7 +704,7 @@@ asmlinkage void do_ov(struct pt_regs *r
  int process_fpemu_return(int sig, void __user *fault_addr, unsigned long fcr31)
  {
        struct siginfo si = { 0 };
+       struct vm_area_struct *vma;
  
        switch (sig) {
        case 0:
                si.si_addr = fault_addr;
                si.si_signo = sig;
                down_read(&current->mm->mmap_sem);
-               if (find_vma(current->mm, (unsigned long)fault_addr))
+               vma = find_vma(current->mm, (unsigned long)fault_addr);
+               if (vma && (vma->vm_start <= (unsigned long)fault_addr))
                        si.si_code = SEGV_ACCERR;
                else
                        si.si_code = SEGV_MAPERR;
@@@ -1859,7 -1861,6 +1861,7 @@@ void __noreturn nmi_exception_handler(s
  #define VECTORSPACING 0x100   /* for EI/VI mode */
  
  unsigned long ebase;
 +EXPORT_SYMBOL_GPL(ebase);
  unsigned long exception_handlers[32];
  unsigned long vi_handlers[64];
  
@@@ -2064,22 -2065,16 +2066,22 @@@ static void configure_status(void
                         status_set);
  }
  
 +unsigned int hwrena;
 +EXPORT_SYMBOL_GPL(hwrena);
 +
  /* configure HWRENA register */
  static void configure_hwrena(void)
  {
 -      unsigned int hwrena = cpu_hwrena_impl_bits;
 +      hwrena = cpu_hwrena_impl_bits;
  
        if (cpu_has_mips_r2_r6)
 -              hwrena |= 0x0000000f;
 +              hwrena |= MIPS_HWRENA_CPUNUM |
 +                        MIPS_HWRENA_SYNCISTEP |
 +                        MIPS_HWRENA_CC |
 +                        MIPS_HWRENA_CCRES;
  
        if (!noulri && cpu_has_userlocal)
 -              hwrena |= (1 << 29);
 +              hwrena |= MIPS_HWRENA_ULR;
  
        if (hwrena)
                write_c0_hwrena(hwrena);
@@@ -434,8 -434,8 +434,8 @@@ static int microMIPS32_to_MIPS32(union 
   * a single subroutine should be used across both
   * modules.
   */
static int isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn,
-                        unsigned long *contpc)
+ int isBranchInstr(struct pt_regs *regs, struct mm_decoded_insn dec_insn,
+                 unsigned long *contpc)
  {
        union mips_instruction insn = (union mips_instruction)dec_insn.insn;
        unsigned int fcr31;
                                dec_insn.pc_inc +
                                dec_insn.next_pc_inc;
                return 1;
 -      case cbcond0_op:
 -      case cbcond1_op:
 +      case pop10_op:
 +      case pop30_op:
                if (!cpu_has_mips_r6)
                        break;
                if (insn.i_format.rt && !insn.i_format.rs)
                        dec_insn.next_pc_inc;
  
                return 1;
 -      case beqzcjic_op:
 +      case pop66_op:
                if (!cpu_has_mips_r6)
                        break;
                *contpc = regs->cp0_epc + dec_insn.pc_inc +
                        dec_insn.next_pc_inc;
  
                return 1;
 -      case bnezcjialc_op:
 +      case pop76_op:
                if (!cpu_has_mips_r6)
                        break;
                if (!insn.i_format.rs)
   */
  static inline int cop1_64bit(struct pt_regs *xcp)
  {
 -      if (config_enabled(CONFIG_64BIT) && !config_enabled(CONFIG_MIPS32_O32))
 +      if (IS_ENABLED(CONFIG_64BIT) && !IS_ENABLED(CONFIG_MIPS32_O32))
                return 1;
 -      else if (config_enabled(CONFIG_32BIT) &&
 -               !config_enabled(CONFIG_MIPS_O32_FP64_SUPPORT))
 +      else if (IS_ENABLED(CONFIG_32BIT) &&
 +               !IS_ENABLED(CONFIG_MIPS_O32_FP64_SUPPORT))
                return 0;
  
        return !test_thread_flag(TIF_32BIT_FPREGS);
@@@ -1268,7 -1268,7 +1268,7 @@@ branch_common
                                                 * instruction in the dslot.
                                                 */
                                                sig = mips_dsemul(xcp, ir,
-                                                                 contpc);
+                                                                 bcpc, contpc);
                                                if (sig < 0)
                                                        break;
                                                if (sig)
                                 * Single step the non-cp1
                                 * instruction in the dslot
                                 */
-                               sig = mips_dsemul(xcp, ir, contpc);
+                               sig = mips_dsemul(xcp, ir, bcpc, contpc);
                                if (sig < 0)
                                        break;
                                if (sig)
diff --combined arch/mips/mm/c-r4k.c
  #include <asm/dma-coherence.h>
  #include <asm/mips-cm.h>
  
+ /*
+  * Bits describing what cache ops an SMP callback function may perform.
+  *
+  * R4K_HIT   -        Virtual user or kernel address based cache operations. The
+  *            active_mm must be checked before using user addresses, falling
+  *            back to kmap.
+  * R4K_INDEX -        Index based cache operations.
+  */
+ #define R4K_HIT               BIT(0)
+ #define R4K_INDEX     BIT(1)
+ /**
+  * r4k_op_needs_ipi() - Decide if a cache op needs to be done on every core.
+  * @type:     Type of cache operations (R4K_HIT or R4K_INDEX).
+  *
+  * Decides whether a cache op needs to be performed on every core in the system.
+  * This may change depending on the @type of cache operation, as well as the set
+  * of online CPUs, so preemption should be disabled by the caller to prevent CPU
+  * hotplug from changing the result.
+  *
+  * Returns:   1 if the cache operation @type should be done on every core in
+  *            the system.
+  *            0 if the cache operation @type is globalized and only needs to
+  *            be performed on a simple CPU.
+  */
+ static inline bool r4k_op_needs_ipi(unsigned int type)
+ {
+       /* The MIPS Coherence Manager (CM) globalizes address-based cache ops */
+       if (type == R4K_HIT && mips_cm_present())
+               return false;
+       /*
+        * Hardware doesn't globalize the required cache ops, so SMP calls may
+        * be needed, but only if there are foreign CPUs (non-siblings with
+        * separate caches).
+        */
+       /* cpu_foreign_map[] undeclared when !CONFIG_SMP */
+ #ifdef CONFIG_SMP
+       return !cpumask_empty(&cpu_foreign_map[0]);
+ #else
+       return false;
+ #endif
+ }
  /*
   * Special Variant of smp_call_function for use by cache functions:
   *
   *    primary cache.
   *  o doesn't disable interrupts on the local CPU
   */
- static inline void r4k_on_each_cpu(void (*func) (void *info), void *info)
+ static inline void r4k_on_each_cpu(unsigned int type,
+                                  void (*func)(void *info), void *info)
  {
        preempt_disable();
-       /*
-        * The Coherent Manager propagates address-based cache ops to other
-        * cores but not index-based ops. However, r4k_on_each_cpu is used
-        * in both cases so there is no easy way to tell what kind of op is
-        * executed to the other cores. The best we can probably do is
-        * to restrict that call when a CM is not present because both
-        * CM-based SMP protocols (CMP & CPS) restrict index-based cache ops.
-        */
-       if (!mips_cm_present())
-               smp_call_function_many(&cpu_foreign_map, func, info, 1);
+       if (r4k_op_needs_ipi(type))
+               smp_call_function_many(&cpu_foreign_map[smp_processor_id()],
+                                      func, info, 1);
        func(info);
        preempt_enable();
  }
  
- #if defined(CONFIG_MIPS_CMP) || defined(CONFIG_MIPS_CPS)
- #define cpu_has_safe_index_cacheops 0
- #else
- #define cpu_has_safe_index_cacheops 1
- #endif
  /*
   * Must die.
   */
@@@ -462,22 -494,44 +494,44 @@@ static inline void local_r4k___flush_ca
  
  static void r4k___flush_cache_all(void)
  {
-       r4k_on_each_cpu(local_r4k___flush_cache_all, NULL);
+       r4k_on_each_cpu(R4K_INDEX, local_r4k___flush_cache_all, NULL);
  }
  
- static inline int has_valid_asid(const struct mm_struct *mm)
+ /**
+  * has_valid_asid() - Determine if an mm already has an ASID.
+  * @mm:               Memory map.
+  * @type:     R4K_HIT or R4K_INDEX, type of cache op.
+  *
+  * Determines whether @mm already has an ASID on any of the CPUs which cache ops
+  * of type @type within an r4k_on_each_cpu() call will affect. If
+  * r4k_on_each_cpu() does an SMP call to a single VPE in each core, then the
+  * scope of the operation is confined to sibling CPUs, otherwise all online CPUs
+  * will need to be checked.
+  *
+  * Must be called in non-preemptive context.
+  *
+  * Returns:   1 if the CPUs affected by @type cache ops have an ASID for @mm.
+  *            0 otherwise.
+  */
+ static inline int has_valid_asid(const struct mm_struct *mm, unsigned int type)
  {
- #ifdef CONFIG_MIPS_MT_SMP
-       int i;
+       unsigned int i;
+       const cpumask_t *mask = cpu_present_mask;
  
-       for_each_online_cpu(i)
+       /* cpu_sibling_map[] undeclared when !CONFIG_SMP */
+ #ifdef CONFIG_SMP
+       /*
+        * If r4k_on_each_cpu does SMP calls, it does them to a single VPE in
+        * each foreign core, so we only need to worry about siblings.
+        * Otherwise we need to worry about all present CPUs.
+        */
+       if (r4k_op_needs_ipi(type))
+               mask = &cpu_sibling_map[smp_processor_id()];
+ #endif
+       for_each_cpu(i, mask)
                if (cpu_context(i, mm))
                        return 1;
        return 0;
- #else
-       return cpu_context(smp_processor_id(), mm);
- #endif
  }
  
  static void r4k__flush_cache_vmap(void)
@@@ -490,12 -544,16 +544,16 @@@ static void r4k__flush_cache_vunmap(voi
        r4k_blast_dcache();
  }
  
+ /*
+  * Note: flush_tlb_range() assumes flush_cache_range() sufficiently flushes
+  * whole caches when vma is executable.
+  */
  static inline void local_r4k_flush_cache_range(void * args)
  {
        struct vm_area_struct *vma = args;
        int exec = vma->vm_flags & VM_EXEC;
  
-       if (!(has_valid_asid(vma->vm_mm)))
+       if (!has_valid_asid(vma->vm_mm, R4K_INDEX))
                return;
  
        /*
@@@ -516,14 -574,14 +574,14 @@@ static void r4k_flush_cache_range(struc
        int exec = vma->vm_flags & VM_EXEC;
  
        if (cpu_has_dc_aliases || exec)
-               r4k_on_each_cpu(local_r4k_flush_cache_range, vma);
+               r4k_on_each_cpu(R4K_INDEX, local_r4k_flush_cache_range, vma);
  }
  
  static inline void local_r4k_flush_cache_mm(void * args)
  {
        struct mm_struct *mm = args;
  
-       if (!has_valid_asid(mm))
+       if (!has_valid_asid(mm, R4K_INDEX))
                return;
  
        /*
@@@ -548,7 -606,7 +606,7 @@@ static void r4k_flush_cache_mm(struct m
        if (!cpu_has_dc_aliases)
                return;
  
-       r4k_on_each_cpu(local_r4k_flush_cache_mm, mm);
+       r4k_on_each_cpu(R4K_INDEX, local_r4k_flush_cache_mm, mm);
  }
  
  struct flush_cache_page_args {
@@@ -573,10 -631,10 +631,10 @@@ static inline void local_r4k_flush_cach
        void *vaddr;
  
        /*
-        * If ownes no valid ASID yet, cannot possibly have gotten
+        * If owns no valid ASID yet, cannot possibly have gotten
         * this page into the cache.
         */
-       if (!has_valid_asid(mm))
+       if (!has_valid_asid(mm, R4K_HIT))
                return;
  
        addr &= PAGE_MASK;
@@@ -643,7 -701,7 +701,7 @@@ static void r4k_flush_cache_page(struc
        args.addr = addr;
        args.pfn = pfn;
  
-       r4k_on_each_cpu(local_r4k_flush_cache_page, &args);
+       r4k_on_each_cpu(R4K_HIT, local_r4k_flush_cache_page, &args);
  }
  
  static inline void local_r4k_flush_data_cache_page(void * addr)
@@@ -656,18 -714,23 +714,23 @@@ static void r4k_flush_data_cache_page(u
        if (in_atomic())
                local_r4k_flush_data_cache_page((void *)addr);
        else
-               r4k_on_each_cpu(local_r4k_flush_data_cache_page, (void *) addr);
+               r4k_on_each_cpu(R4K_HIT, local_r4k_flush_data_cache_page,
+                               (void *) addr);
  }
  
  struct flush_icache_range_args {
        unsigned long start;
        unsigned long end;
+       unsigned int type;
  };
  
- static inline void local_r4k_flush_icache_range(unsigned long start, unsigned long end)
+ static inline void __local_r4k_flush_icache_range(unsigned long start,
+                                                 unsigned long end,
+                                                 unsigned int type)
  {
        if (!cpu_has_ic_fills_f_dc) {
-               if (end - start >= dcache_size) {
+               if (type == R4K_INDEX ||
+                   (type & R4K_INDEX && end - start >= dcache_size)) {
                        r4k_blast_dcache();
                } else {
                        R4600_HIT_CACHEOP_WAR_IMPL;
                }
        }
  
-       if (end - start > icache_size)
+       if (type == R4K_INDEX ||
+           (type & R4K_INDEX && end - start > icache_size))
                r4k_blast_icache();
        else {
                switch (boot_cpu_type()) {
  #endif
  }
  
+ static inline void local_r4k_flush_icache_range(unsigned long start,
+                                               unsigned long end)
+ {
+       __local_r4k_flush_icache_range(start, end, R4K_HIT | R4K_INDEX);
+ }
  static inline void local_r4k_flush_icache_range_ipi(void *args)
  {
        struct flush_icache_range_args *fir_args = args;
        unsigned long start = fir_args->start;
        unsigned long end = fir_args->end;
+       unsigned int type = fir_args->type;
  
-       local_r4k_flush_icache_range(start, end);
+       __local_r4k_flush_icache_range(start, end, type);
  }
  
  static void r4k_flush_icache_range(unsigned long start, unsigned long end)
  {
        struct flush_icache_range_args args;
+       unsigned long size, cache_size;
  
        args.start = start;
        args.end = end;
+       args.type = R4K_HIT | R4K_INDEX;
  
-       r4k_on_each_cpu(local_r4k_flush_icache_range_ipi, &args);
+       /*
+        * Indexed cache ops require an SMP call.
+        * Consider if that can or should be avoided.
+        */
+       preempt_disable();
+       if (r4k_op_needs_ipi(R4K_INDEX) && !r4k_op_needs_ipi(R4K_HIT)) {
+               /*
+                * If address-based cache ops don't require an SMP call, then
+                * use them exclusively for small flushes.
+                */
+               size = start - end;
+               cache_size = icache_size;
+               if (!cpu_has_ic_fills_f_dc) {
+                       size *= 2;
+                       cache_size += dcache_size;
+               }
+               if (size <= cache_size)
+                       args.type &= ~R4K_INDEX;
+       }
+       r4k_on_each_cpu(args.type, local_r4k_flush_icache_range_ipi, &args);
+       preempt_enable();
        instruction_hazard();
  }
  
@@@ -744,7 -837,7 +837,7 @@@ static void r4k_dma_cache_wback_inv(uns
         * subset property so we have to flush the primary caches
         * explicitly
         */
-       if (cpu_has_safe_index_cacheops && size >= dcache_size) {
+       if (size >= dcache_size) {
                r4k_blast_dcache();
        } else {
                R4600_HIT_CACHEOP_WAR_IMPL;
@@@ -781,7 -874,7 +874,7 @@@ static void r4k_dma_cache_inv(unsigned 
                return;
        }
  
-       if (cpu_has_safe_index_cacheops && size >= dcache_size) {
+       if (size >= dcache_size) {
                r4k_blast_dcache();
        } else {
                R4600_HIT_CACHEOP_WAR_IMPL;
  }
  #endif /* CONFIG_DMA_NONCOHERENT || CONFIG_DMA_MAYBE_COHERENT */
  
+ struct flush_cache_sigtramp_args {
+       struct mm_struct *mm;
+       struct page *page;
+       unsigned long addr;
+ };
  /*
   * While we're protected against bad userland addresses we don't care
   * very much about what happens in that case.  Usually a segmentation
   * fault will dump the process later on anyway ...
   */
- static void local_r4k_flush_cache_sigtramp(void * arg)
+ static void local_r4k_flush_cache_sigtramp(void *args)
  {
+       struct flush_cache_sigtramp_args *fcs_args = args;
+       unsigned long addr = fcs_args->addr;
+       struct page *page = fcs_args->page;
+       struct mm_struct *mm = fcs_args->mm;
+       int map_coherent = 0;
+       void *vaddr;
        unsigned long ic_lsize = cpu_icache_line_size();
        unsigned long dc_lsize = cpu_dcache_line_size();
        unsigned long sc_lsize = cpu_scache_line_size();
-       unsigned long addr = (unsigned long) arg;
+       /*
+        * If owns no valid ASID yet, cannot possibly have gotten
+        * this page into the cache.
+        */
+       if (!has_valid_asid(mm, R4K_HIT))
+               return;
+       if (mm == current->active_mm) {
+               vaddr = NULL;
+       } else {
+               /*
+                * Use kmap_coherent or kmap_atomic to do flushes for
+                * another ASID than the current one.
+                */
+               map_coherent = (cpu_has_dc_aliases &&
+                               page_mapcount(page) &&
+                               !Page_dcache_dirty(page));
+               if (map_coherent)
+                       vaddr = kmap_coherent(page, addr);
+               else
+                       vaddr = kmap_atomic(page);
+               addr = (unsigned long)vaddr + (addr & ~PAGE_MASK);
+       }
  
        R4600_HIT_CACHEOP_WAR_IMPL;
-       if (dc_lsize)
-               protected_writeback_dcache_line(addr & ~(dc_lsize - 1));
-       if (!cpu_icache_snoops_remote_store && scache_size)
-               protected_writeback_scache_line(addr & ~(sc_lsize - 1));
+       if (!cpu_has_ic_fills_f_dc) {
+               if (dc_lsize)
+                       vaddr ? flush_dcache_line(addr & ~(dc_lsize - 1))
+                             : protected_writeback_dcache_line(
+                                                       addr & ~(dc_lsize - 1));
+               if (!cpu_icache_snoops_remote_store && scache_size)
+                       vaddr ? flush_scache_line(addr & ~(sc_lsize - 1))
+                             : protected_writeback_scache_line(
+                                                       addr & ~(sc_lsize - 1));
+       }
        if (ic_lsize)
-               protected_flush_icache_line(addr & ~(ic_lsize - 1));
+               vaddr ? flush_icache_line(addr & ~(ic_lsize - 1))
+                     : protected_flush_icache_line(addr & ~(ic_lsize - 1));
+       if (vaddr) {
+               if (map_coherent)
+                       kunmap_coherent();
+               else
+                       kunmap_atomic(vaddr);
+       }
        if (MIPS4K_ICACHE_REFILL_WAR) {
                __asm__ __volatile__ (
                        ".set push\n\t"
  
  static void r4k_flush_cache_sigtramp(unsigned long addr)
  {
-       r4k_on_each_cpu(local_r4k_flush_cache_sigtramp, (void *) addr);
+       struct flush_cache_sigtramp_args args;
+       int npages;
+       down_read(&current->mm->mmap_sem);
+       npages = get_user_pages_fast(addr, 1, 0, &args.page);
+       if (npages < 1)
+               goto out;
+       args.mm = current->mm;
+       args.addr = addr;
+       r4k_on_each_cpu(R4K_HIT, local_r4k_flush_cache_sigtramp, &args);
+       put_page(args.page);
+ out:
+       up_read(&current->mm->mmap_sem);
  }
  
  static void r4k_flush_icache_all(void)
@@@ -851,6 -1011,15 +1011,15 @@@ struct flush_kernel_vmap_range_args 
        int             size;
  };
  
+ static inline void local_r4k_flush_kernel_vmap_range_index(void *args)
+ {
+       /*
+        * Aliases only affect the primary caches so don't bother with
+        * S-caches or T-caches.
+        */
+       r4k_blast_dcache();
+ }
  static inline void local_r4k_flush_kernel_vmap_range(void *args)
  {
        struct flush_kernel_vmap_range_args *vmra = args;
         * Aliases only affect the primary caches so don't bother with
         * S-caches or T-caches.
         */
-       if (cpu_has_safe_index_cacheops && size >= dcache_size)
-               r4k_blast_dcache();
-       else {
-               R4600_HIT_CACHEOP_WAR_IMPL;
-               blast_dcache_range(vaddr, vaddr + size);
-       }
+       R4600_HIT_CACHEOP_WAR_IMPL;
+       blast_dcache_range(vaddr, vaddr + size);
  }
  
  static void r4k_flush_kernel_vmap_range(unsigned long vaddr, int size)
        args.vaddr = (unsigned long) vaddr;
        args.size = size;
  
-       r4k_on_each_cpu(local_r4k_flush_kernel_vmap_range, &args);
+       if (size >= dcache_size)
+               r4k_on_each_cpu(R4K_INDEX,
+                               local_r4k_flush_kernel_vmap_range_index, NULL);
+       else
+               r4k_on_each_cpu(R4K_HIT, local_r4k_flush_kernel_vmap_range,
+                               &args);
  }
  
  static inline void rm7k_erratum31(void)
@@@ -1206,7 -1376,7 +1376,7 @@@ static void probe_pcache(void
                              c->icache.linesz;
                c->icache.waybit = __ffs(icache_size/c->icache.ways);
  
 -              if (config & 0x8)               /* VI bit */
 +              if (config & MIPS_CONF_VI)
                        c->icache.flags |= MIPS_CACHE_VTAG;
  
                /*
diff --combined arch/mips/mm/tlbex.c
@@@ -888,7 -888,7 +888,7 @@@ build_get_pgd_vmalloc64(u32 **p, struc
                }
        }
        if (!did_vmalloc_branch) {
-               if (uasm_in_compat_space_p(swpd) && !uasm_rel_lo(swpd)) {
+               if (single_insn_swpd) {
                        uasm_il_b(p, r, label_vmalloc_done);
                        uasm_i_lui(p, ptr, uasm_rel_hi(swpd));
                } else {
@@@ -1025,7 -1025,7 +1025,7 @@@ static void build_update_entries(u32 **
        pte_off_odd += offsetof(pte_t, pte_high);
  #endif
  
 -      if (config_enabled(CONFIG_XPA)) {
 +      if (IS_ENABLED(CONFIG_XPA)) {
                uasm_i_lw(p, tmp, pte_off_even, ptep); /* even pte */
                UASM_i_ROTR(p, tmp, tmp, ilog2(_PAGE_GLOBAL));
                UASM_i_MTC0(p, tmp, C0_ENTRYLO0);
@@@ -1643,7 -1643,7 +1643,7 @@@ iPTE_SW(u32 **p, struct uasm_reloc **r
        unsigned int hwmode = mode & (_PAGE_VALID | _PAGE_DIRTY);
        unsigned int swmode = mode & ~hwmode;
  
 -      if (config_enabled(CONFIG_XPA) && !cpu_has_64bits) {
 +      if (IS_ENABLED(CONFIG_XPA) && !cpu_has_64bits) {
                uasm_i_lui(p, scratch, swmode >> 16);
                uasm_i_or(p, pte, pte, scratch);
                BUG_ON(swmode & 0xffff);
@@@ -2432,7 -2432,7 +2432,7 @@@ static void config_htw_params(void
                pwsize |= ilog2(PTRS_PER_PMD) << MIPS_PWSIZE_MDW_SHIFT;
  
        /* Set pointer size to size of directory pointers */
 -      if (config_enabled(CONFIG_64BIT))
 +      if (IS_ENABLED(CONFIG_64BIT))
                pwsize |= MIPS_PWSIZE_PS_MASK;
        /* PTEs may be multiple pointers long (e.g. with XPA) */
        pwsize |= ((PTE_T_LOG2 - PGD_T_LOG2) << MIPS_PWSIZE_PTEW_SHIFT)
         * the pwctl fields.
         */
        config = 1 << MIPS_PWCTL_PWEN_SHIFT;
 -      if (config_enabled(CONFIG_64BIT))
 +      if (IS_ENABLED(CONFIG_64BIT))
                config |= MIPS_PWCTL_XU_MASK;
        write_c0_pwctl(config);
        pr_info("Hardware Page Table Walker enabled\n");
@@@ -2522,7 -2522,7 +2522,7 @@@ void build_tlb_refill_handler(void
         */
        static int run_once = 0;
  
 -      if (config_enabled(CONFIG_XPA) && !cpu_has_rixi)
 +      if (IS_ENABLED(CONFIG_XPA) && !cpu_has_rixi)
                panic("Kernels supporting XPA currently require CPUs with RIXI");
  
        output_pgtable_bits_defines();
diff --combined arch/mips/mm/uasm-mips.c
@@@ -65,16 -65,11 +65,16 @@@ static struct insn insn_table[] = 
  #ifndef CONFIG_CPU_MIPSR6
        { insn_cache,  M(cache_op, 0, 0, 0, 0, 0),  RS | RT | SIMM },
  #else
-       { insn_cache,  M6(cache_op, 0, 0, 0, cache6_op),  RS | RT | SIMM9 },
+       { insn_cache,  M6(spec3_op, 0, 0, 0, cache6_op),  RS | RT | SIMM9 },
  #endif
 +      { insn_cfc1, M(cop1_op, cfc_op, 0, 0, 0, 0), RT | RD },
 +      { insn_cfcmsa, M(msa_op, 0, msa_cfc_op, 0, 0, msa_elm_op), RD | RE },
 +      { insn_ctc1, M(cop1_op, ctc_op, 0, 0, 0, 0), RT | RD },
 +      { insn_ctcmsa, M(msa_op, 0, msa_ctc_op, 0, 0, msa_elm_op), RD | RE },
        { insn_daddiu, M(daddiu_op, 0, 0, 0, 0, 0), RS | RT | SIMM },
        { insn_daddu, M(spec_op, 0, 0, 0, 0, daddu_op), RS | RT | RD },
        { insn_dinsm, M(spec3_op, 0, 0, 0, 0, dinsm_op), RS | RT | RD | RE },
 +      { insn_di, M(cop0_op, mfmc0_op, 0, 12, 0, 0), RT },
        { insn_dins, M(spec3_op, 0, 0, 0, 0, dins_op), RS | RT | RD | RE },
        { insn_divu, M(spec_op, 0, 0, 0, 0, divu_op), RS | RT },
        { insn_dmfc0, M(cop0_op, dmfc_op, 0, 0, 0, 0), RT | RD | SET},
        { insn_mflo,  M(spec_op, 0, 0, 0, 0, mflo_op), RD },
        { insn_mtc0,  M(cop0_op, mtc_op, 0, 0, 0, 0),  RT | RD | SET},
        { insn_mthc0,  M(cop0_op, mthc0_op, 0, 0, 0, 0),  RT | RD | SET},
 +      { insn_mthi,  M(spec_op, 0, 0, 0, 0, mthi_op), RS },
 +      { insn_mtlo,  M(spec_op, 0, 0, 0, 0, mtlo_op), RS },
 +#ifndef CONFIG_CPU_MIPSR6
        { insn_mul, M(spec2_op, 0, 0, 0, 0, mul_op), RS | RT | RD},
 +#else
 +      { insn_mul, M(spec_op, 0, 0, 0, mult_mul_op, mult_op), RS | RT | RD},
 +#endif
        { insn_ori,  M(ori_op, 0, 0, 0, 0, 0),  RS | RT | UIMM },
        { insn_or,  M(spec_op, 0, 0, 0, 0, or_op),  RS | RT | RD },
  #ifndef CONFIG_CPU_MIPSR6
diff --combined arch/mips/mm/uasm.c
@@@ -49,19 -49,18 +49,19 @@@ enum opcode 
        insn_invalid,
        insn_addiu, insn_addu, insn_and, insn_andi, insn_bbit0, insn_bbit1,
        insn_beq, insn_beql, insn_bgez, insn_bgezl, insn_bltz, insn_bltzl,
 -      insn_bne, insn_cache, insn_daddiu, insn_daddu, insn_dins, insn_dinsm,
 -      insn_divu, insn_dmfc0, insn_dmtc0, insn_drotr, insn_drotr32, insn_dsll,
 +      insn_bne, insn_cache, insn_cfc1, insn_cfcmsa, insn_ctc1, insn_ctcmsa,
 +      insn_daddiu, insn_daddu, insn_di, insn_dins, insn_dinsm, insn_divu,
 +      insn_dmfc0, insn_dmtc0, insn_drotr, insn_drotr32, insn_dsll,
        insn_dsll32, insn_dsra, insn_dsrl, insn_dsrl32, insn_dsubu, insn_eret,
        insn_ext, insn_ins, insn_j, insn_jal, insn_jalr, insn_jr, insn_lb,
        insn_ld, insn_ldx, insn_lh, insn_ll, insn_lld, insn_lui, insn_lw,
        insn_lwx, insn_mfc0, insn_mfhc0, insn_mfhi, insn_mflo, insn_mtc0,
 -      insn_mthc0, insn_mul, insn_or, insn_ori, insn_pref, insn_rfe,
 -      insn_rotr, insn_sc, insn_scd, insn_sd, insn_sll, insn_sllv, insn_slt,
 -      insn_sltiu, insn_sltu, insn_sra, insn_srl, insn_srlv, insn_subu,
 -      insn_sw, insn_sync, insn_syscall, insn_tlbp, insn_tlbr, insn_tlbwi,
 -      insn_tlbwr, insn_wait, insn_wsbh, insn_xor, insn_xori, insn_yield,
 -      insn_lddir, insn_ldpte,
 +      insn_mthc0, insn_mthi, insn_mtlo, insn_mul, insn_or, insn_ori,
 +      insn_pref, insn_rfe, insn_rotr, insn_sc, insn_scd, insn_sd, insn_sll,
 +      insn_sllv, insn_slt, insn_sltiu, insn_sltu, insn_sra, insn_srl,
 +      insn_srlv, insn_subu, insn_sw, insn_sync, insn_syscall, insn_tlbp,
 +      insn_tlbr, insn_tlbwi, insn_tlbwr, insn_wait, insn_wsbh, insn_xor,
 +      insn_xori, insn_yield, insn_lddir, insn_ldpte,
  };
  
  struct insn {
@@@ -269,15 -268,10 +269,15 @@@ I_u1s2(_bltz
  I_u1s2(_bltzl)
  I_u1u2s3(_bne)
  I_u2s3u1(_cache)
 +I_u1u2(_cfc1)
 +I_u2u1(_cfcmsa)
 +I_u1u2(_ctc1)
 +I_u2u1(_ctcmsa)
  I_u1u2u3(_dmfc0)
  I_u1u2u3(_dmtc0)
  I_u2u1s3(_daddiu)
  I_u3u1u2(_daddu)
 +I_u1(_di);
  I_u1u2(_divu)
  I_u2u1u3(_dsll)
  I_u2u1u3(_dsll32)
@@@ -307,8 -301,6 +307,8 @@@ I_u1(_mfhi
  I_u1(_mflo)
  I_u1u2u3(_mtc0)
  I_u1u2u3(_mthc0)
 +I_u1(_mthi)
 +I_u1(_mtlo)
  I_u3u1u2(_mul)
  I_u2u1u3(_ori)
  I_u3u1u2(_or)
@@@ -378,11 -370,7 +378,7 @@@ UASM_EXPORT_SYMBOL(ISAFUNC(uasm_build_l
  int ISAFUNC(uasm_in_compat_space_p)(long addr)
  {
        /* Is this address in 32bit compat space? */
- #ifdef CONFIG_64BIT
-       return (((addr) & 0xffffffff00000000L) == 0xffffffff00000000L);
- #else
-       return 1;
- #endif
+       return addr == (int)addr;
  }
  UASM_EXPORT_SYMBOL(ISAFUNC(uasm_in_compat_space_p));
  
diff --combined arch/mips/net/bpf_jit.c
@@@ -426,7 -426,7 +426,7 @@@ static inline void emit_load_ptr(unsign
  static inline void emit_load_func(unsigned int reg, ptr imm,
                                  struct jit_ctx *ctx)
  {
 -      if (config_enabled(CONFIG_64BIT)) {
 +      if (IS_ENABLED(CONFIG_64BIT)) {
                /* At this point imm is always 64-bit */
                emit_load_imm(r_tmp, (u64)imm >> 32, ctx);
                emit_dsll(r_tmp_imm, r_tmp, 16, ctx); /* left shift by 16 */
@@@ -516,7 -516,7 +516,7 @@@ static inline void emit_jr(unsigned in
  static inline u16 align_sp(unsigned int num)
  {
        /* Double word alignment for 32-bit, quadword for 64-bit */
 -      unsigned int align = config_enabled(CONFIG_64BIT) ? 16 : 8;
 +      unsigned int align = IS_ENABLED(CONFIG_64BIT) ? 16 : 8;
        num = (num + (align - 1)) & -align;
        return num;
  }
@@@ -1199,7 -1199,7 +1199,7 @@@ void bpf_jit_compile(struct bpf_prog *f
  
        memset(&ctx, 0, sizeof(ctx));
  
-       ctx.offsets = kcalloc(fp->len, sizeof(*ctx.offsets), GFP_KERNEL);
+       ctx.offsets = kcalloc(fp->len + 1, sizeof(*ctx.offsets), GFP_KERNEL);
        if (ctx.offsets == NULL)
                return;
  
@@@ -33,8 -33,8 +33,8 @@@ static ulong get_fdtaddr(void
  {
        ulong ftaddr = 0;
  
-       if ((fw_arg0 == -2) && fw_arg1 && !fw_arg2 && !fw_arg3)
-               return (ulong)fw_arg1;
+       if (fw_passed_dtb && !fw_arg2 && !fw_arg3)
+               return (ulong)fw_passed_dtb;
  
        if (__dtb_start < __dtb_end)
                ftaddr = (ulong)__dtb_start;
@@@ -147,7 -147,8 +147,7 @@@ static int __init plat_of_setup(void
                panic("Device tree not present");
  
        pic32_of_prepare_platform_data(pic32_auxdata_lookup);
 -      if (of_platform_populate(NULL, of_default_bus_match_table,
 -                               pic32_auxdata_lookup, NULL))
 +      if (of_platform_default_populate(NULL, pic32_auxdata_lookup, NULL))
                panic("Failed to populate DT");
  
        return 0;
@@@ -14,6 -14,7 +14,6 @@@
  #include <linux/kernel.h>
  #include <linux/of_address.h>
  #include <linux/of_fdt.h>
 -#include <linux/of_platform.h>
  
  #include <asm/cacheflush.h>
  #include <asm/dma-coherence.h>
@@@ -59,29 -60,6 +59,6 @@@ const char *get_system_type(void
        return sys_type;
  }
  
- static void __init plat_setup_iocoherency(void)
- {
-       /*
-        * Kernel has been configured with software coherency
-        * but we might choose to turn it off and use hardware
-        * coherency instead.
-        */
-       if (mips_cm_numiocu() != 0) {
-               /* Nothing special needs to be done to enable coherency */
-               pr_info("CMP IOCU detected\n");
-               hw_coherentio = 1;
-               if (coherentio == 0)
-                       pr_info("Hardware DMA cache coherency disabled\n");
-               else
-                       pr_info("Hardware DMA cache coherency enabled\n");
-       } else {
-               if (coherentio == 1)
-                       pr_info("Hardware DMA cache coherency unsupported, but enabled from command line!\n");
-               else
-                       pr_info("Software DMA cache coherency enabled\n");
-       }
- }
  void __init *plat_get_fdt(void)
  {
        if (fw_arg0 != -2)
@@@ -92,8 -70,6 +69,6 @@@
  void __init plat_mem_setup(void)
  {
        __dt_setup_arch(plat_get_fdt());
-       plat_setup_iocoherency();
  }
  
  #define DEFAULT_CPC_BASE_ADDR 0x1bde0000
@@@ -158,3 -134,15 +133,3 @@@ void __init device_tree_init(void
  
        unflatten_and_copy_device_tree();
  }
 -
 -static int __init plat_of_setup(void)
 -{
 -      if (!of_have_populated_dt())
 -              panic("Device tree not present");
 -
 -      if (of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL))
 -              panic("Failed to populate DT");
 -
 -      return 0;
 -}
 -arch_initcall(plat_of_setup);