1. 04 Aug, 2017 27 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 69995074
      Linus Torvalds authored
      Pull KVM fixes from Radim Krčmář:
       "ARM:
      
         - Yet another race with VM destruction plugged
      
         - A set of small vgic fixes
      
        x86:
      
         - Preserve pending INIT
      
         - RCU fixes in paravirtual async pf, VM teardown, and VMXOFF
           emulation
      
         - nVMX interrupt injection and dirty tracking fixes
      
         - initialize to make UBSAN happy"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        KVM: arm/arm64: vgic: Use READ_ONCE fo cmpxchg
        KVM: nVMX: Fix interrupt window request with "Acknowledge interrupt on exit"
        KVM: nVMX: mark vmcs12 pages dirty on L2 exit
        kvm: nVMX: don't flush VMCS12 during VMXOFF or VCPU teardown
        KVM: nVMX: do not pin the VMCS12
        KVM: avoid using rcu_dereference_protected
        KVM: X86: init irq->level in kvm_pv_kick_cpu_op
        KVM: X86: Fix loss of pending INIT due to race
        KVM: async_pf: make rcu irq exit if not triggered from idle task
        KVM: nVMX: fixes to nested virt interrupt injection
        KVM: nVMX: do not fill vm_exit_intr_error_code in prepare_vmcs12
        KVM: arm/arm64: Handle hva aging while destroying the vm
        KVM: arm/arm64: PMU: Fix overflow interrupt injection
        KVM: arm/arm64: Fix bug in advertising KVM_CAP_MSI_DEVID capability
      69995074
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 0d5b9944
      Linus Torvalds authored
      Pull x86 fix from Thomas Gleixner:
       "The recent irq core changes unearthed API abuse in the HPET code,
        which manifested itself in a suspend/resume regression.
      
        The fix replaces the cruft with the proper function calls and cures
        the regression"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/hpet: Cure interface abuse in the resume path
      0d5b9944
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · d1faa3e7
      Linus Torvalds authored
      Pull timer fix from Thomas Gleixner:
       "A single fix for a multiplication overflow in the timer code on 32bit
        systems"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        timers: Fix overflow in get_next_timer_interrupt
      d1faa3e7
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · 65f4740e
      Linus Torvalds authored
      Pull ARM SoC fixes from Arnd Bergmann:
       "This comes a bit later than I planned, and as a consequence is a
        larger than it should be.
      
        Most of the changes are devicetree fixes, across lots of platforms:
        Renesas, Samsung Exynos, Marvell EBU, TI OMAP, Rockchips, Amlogic
        Meson, Sigma Desings Tango, Allwinner SUNxi and TI Davinci.
      
        Also across many platforms, I applied an older series of simple
        randconfig build fixes. This includes making the CONFIG_MTD_XIP option
        compile again, which had been broken for many years and probably has
        not been missed, but it felt wrong to just remove it completely.
      
        The only other changes are:
      
         - We enable HWSPINLOCK in defconfig to get some Qualcomm boards to
           work out of the box.
      
         - A few regression fixes for Texas Instruments OMAP2+.
      
         - A boot regression fix for the Renesas regulator quirk.
      
         - A suspend/resume fix for Uniphier SoCs, fixing the resume of the
           system bus"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (43 commits)
        ARM: dts: tango4: Request RGMII RX and TX clock delays
        bus: uniphier-system-bus: set up registers when resuming
        ARM64: dts: marvell: armada-37xx: Fix the number of GPIO on south bridge
        ARM: shmobile: rcar-gen2: Fix deadlock in regulator quirk
        arm64: defconfig: enable missing HWSPINLOCK
        ARM: pxa: select both FB and FB_W100 for eseries
        ARM: ixp4xx: fix ioport_unmap definition
        ARM: ep93xx: use ARM_PATCH_PHYS_VIRT correctly
        ARM: mmp: mark usb_dma_mask as __maybe_unused
        ARM: omap2: mark unused functions as __maybe_unused
        ARM: omap1: avoid unused variable warning
        ARM: sirf: mark sirfsoc_init_late as __maybe_unused
        ARM: ixp4xx: use normal prototype for {read,write}s{b,w,l}
        ARM: omap1/ams-delta: warn about failed regulator enable
        ARM: rpc: rename RAM_SIZE macro
        ARM: w90x900: normalize clk API
        ARM: ep93xx: normalize clk API
        ARM: dts: sun8i: a83t: Switch to CCU device tree binding macros
        arm64: allwinner: sun50i-a64: Correct emac register size
        ARM: dts: sunxi: h3/h5: Correct emac register size
        ...
      65f4740e
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · b3c6858f
      Linus Torvalds authored
      Pull arm64 fixes from Will Deacon:
       "Here are some more arm64 fixes for 4.13. The main one is the PTE race
        with the hardware walker, but there are a couple of other things too.
      
         - Report correct timer frequency to userspace when trapping
           CNTFRQ_EL0
      
         - Fix race with hardware page table updates when updating access
           flags
      
         - Silence clang overflow warning in VA_START and PAGE_OFFSET
           calculations"
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: avoid overflow in VA_START and PAGE_OFFSET
        arm64: Fix potential race with hardware DBM in ptep_set_access_flags()
        arm64: Use arch_timer_get_rate when trapping CNTFRQ_EL0
      b3c6858f
    • Linus Torvalds's avatar
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc · 0a23ea65
      Linus Torvalds authored
      Pull sparc fixes from David Miller:
      
       - block interrupts properly across the entire MMU context change (both
         the hw MMU context change and the TSB table change) so that we don't
         get a perf event interrupt in the middle. From Rob Gardner.
      
       - be sure to register hugepages early enough, from Nitin Gupta.
      
       - UltraSPARC-III user copy exception handling would return garbage for
         the copied length in some circumstances.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
        sparc64: Fix exception handling in UltraSPARC-III memcpy.
        sbus: Convert to using %pOF instead of full_name
        sparc: defconfig: Cleanup from old Kconfig options
        sparc64: Register hugepages during arch init
        sparc64: Prevent perf from running during super critical sections
      0a23ea65
    • Linus Torvalds's avatar
      Merge tag 'ceph-for-4.13-rc4' of git://github.com/ceph/ceph-client · c63716ab
      Linus Torvalds authored
      Pull ceph fixes from Ilya Dryomov:
       "A bunch of fixes and follow-ups for -rc1 Luminous patches: issues with
        ->reencode_message() and last minute RADOS semantic changes in
        v12.1.2"
      
      * tag 'ceph-for-4.13-rc4' of git://github.com/ceph/ceph-client:
        libceph: make RECOVERY_DELETES feature create a new interval
        libceph: upmap semantic changes
        crush: assume weight_set != null imples weight_set_size > 0
        libceph: fallback for when there isn't a pool-specific choose_arg
        libceph: don't call ->reencode_message() more than once per message
        libceph: make encode_request_*() work with r_mempool requests
      c63716ab
    • Linus Torvalds's avatar
      Merge tag 'sound-4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound · a64c40e7
      Linus Torvalds authored
      Pull sound fixes from Takashi Iwai:
       "Now we hit the usual ASoC-fix-flood in the middle of release.
      
        Most of the changes are trivial and device-specific, while one
        significant change is the fix for unbalanced of_graph_*() refcounts.
        This involved a change in the graph API itself that had been a bit
        messy"
      
      * tag 'sound-4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
        ALSA: hda - Fix speaker output from VAIO VPCL14M1R
        device property: Fix usecount for of_graph_get_port_parent()
        ASoC: rt5665: fix wrong register for bclk ratio control
        ASoC: Intel: Use MCLK instead of BLCK as the sysclock for RT5514 codec on kabylake platform
        ASoC: Intel: Enabling ASRC for RT5663 codec on kabylake platform
        ASoC: codecs: msm8916-analog: fix DIG_CLK_CTL_RXD3_CLK_EN define
        ASoC: Intel: Skylake: Fix missing sentinels in sst_acpi_mach
        ASoC: sh: hac: add missing "int ret"
        ASoC: samsung: odroid: Fix EPLL frequency values
        ASoC: sgtl5000: Use snd_soc_kcontrol_codec()
        ASoC: rt5665: fix GPIO6 pin function define
        ASoC: ux500: Restore platform DAI assignments
        ASoC: fix pcm-creation regression
        ASoC: do not close shared backend dailink
        ASoC: pxa: SND_PXA2XX_SOC should depend on HAS_DMA
        ASoC: Intel: Skylake: Fix default dma_buffer_size
        ASoC: rt5663: Update the HW default values based on the shipping version
        ASoC: imx-ssi: add check on platform_get_irq return value
      a64c40e7
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · 83b89ea4
      Linus Torvalds authored
      Pull IOMMU fixes from Joerg Roedel:
      
       - fix a scheduling-while-atomic bug in the AMD IOMMU driver. It was
         found after the checker was enabled earlier.
      
       - a fix for the virtual APIC code in the AMD IOMMU driver which
         delivers device interrupts directly into KVM guests for assigned
         devices.
      
       - fixes for the recently merged lock-less page-table code for ARM. The
         redundant TLB syncs got reverted and locks added again around the TLB
         sync code.
      
       - fix for error handling in arm_smmu_add_device()
      
       - address sanitization fix for arm io-pgtable code
      
      * tag 'iommu-fixes-v4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/amd: Fix schedule-while-atomic BUG in initialization code
        iommu/amd: Enable ga_log_intr when enabling guest_mode
        iommu/io-pgtable: Sanitise map/unmap addresses
        iommu/arm-smmu: Fix the error path in arm_smmu_add_device
        Revert "iommu/io-pgtable: Avoid redundant TLB syncs"
        iommu/mtk: Avoid redundant TLB syncs locally
        iommu/arm-smmu: Reintroduce locking around TLB sync operations
      83b89ea4
    • Linus Torvalds's avatar
      Merge tag 'mmc-v4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc · 8145f373
      Linus Torvalds authored
      Pull MMC fixes from Ulf Hansson:
       "A couple of mmc fixes intended for v4.13-rc4.
      
        MMC core:
         - Fix NULL pointer dereference for block I/O during hotplug
      
        MMC host:
         - sdhci-of-at91: Fix card detect for non-removable cards"
      
      * tag 'mmc-v4.13-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/mmc:
        mmc: block: bypass the queue even if usage is present for hotplug
        mmc: sdhci-of-at91: force card detect value for non removable devices
      8145f373
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-for-v4.13-rc4' of git://people.freedesktop.org/~airlied/linux · 47d47585
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Either my email ate everything or everyone is on holidays, either way
        all I can find is some lonely AMD fixes"
      
      [ Europe might be on vacation, and the Pacific NW is too hot for work. ]
      
      * tag 'drm-fixes-for-v4.13-rc4' of git://people.freedesktop.org/~airlied/linux:
        drm/amdgpu: Use list_del_init in amdgpu_mn_unregister
        drm/amdgpu: Fix undue fallthroughs in golden registers initialization
        drm/amdgpu: fix header on gfx9 clear state
      47d47585
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.13-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · 841fe953
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "Fixes for recently merged code:
         - a fix for the _PAGE_DEVMAP support, which was breaking KVM on
           Power9 radix
         - avoid a (harmless) lockdep warning in the early SMP code
         - return failure for some uses of dma_set_mask() rather than falling
           back to 32-bits
         - fix stack setup in watchdog soft_nmi_common() to use emergency
           stack
         - fix of_irq_to_resource() error check in of_fsl_spi_probe()
      
        Two fixes going to stable:
         - fix saving of Transactional Memory SPRs in core dump
         - fix __check_irq_replay missing decrementer interrupt
      
        And two misc:
         - fix 64-bit boot wrapper build with non-biarch compiler
         - work around a POWER9 PMU hang after state-loss idle
      
        Thanks to: Alistair Popple, Aneesh Kumar K.V, Cyril Bur, Gustavo
        Romero, Jose Ricardo Ziviani, Laurent Vivier, Nicholas Piggin, Oliver
        O'Halloran, Sergei Shtylyov, Suraj Jitindar Singh, Thomas Gleixner"
      
      * tag 'powerpc-4.13-5' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/64: Fix __check_irq_replay missing decrementer interrupt
        powerpc/perf: POWER9 PMU stops after idle workaround
        powerpc/83xx/mpc832x_rdb: fix of_irq_to_resource() error check
        powerpc/64s: Fix stack setup in watchdog soft_nmi_common()
        powerpc/powernv/pci: Return failure for some uses of dma_set_mask()
        powerpc/boot: Fix 64-bit boot wrapper build with non-biarch compiler
        powerpc/smp: Call smp_ops->setup_cpu() directly on the boot CPU
        powerpc/tm: Fix saving of TM SPRs in core dump
        powerpc/mm: Fix pmd/pte_devmap() on non-leaf entries
      841fe953
    • David S. Miller's avatar
      sparc64: Fix exception handling in UltraSPARC-III memcpy. · 0ede1c40
      David S. Miller authored
      Mikael Pettersson reported that some test programs in the strace-4.18
      testsuite cause an OOPS.
      
      After some debugging it turns out that garbage values are returned
      when an exception occurs, causing the fixup memset() to be run with
      bogus arguments.
      
      The problem is that two of the exception handler stubs write the
      successfully copied length into the wrong register.
      
      Fixes: ee841d0a ("sparc64: Convert U3copy_{from,to}_user to accurate exception reporting.")
      Reported-by: default avatarMikael Pettersson <mikpelinux@gmail.com>
      Tested-by: default avatarMikael Pettersson <mikpelinux@gmail.com>
      Reviewed-by: default avatarSam Ravnborg <sam@ravnborg.org>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      0ede1c40
    • Nick Desaulniers's avatar
      arm64: avoid overflow in VA_START and PAGE_OFFSET · 82cd5880
      Nick Desaulniers authored
      The bitmask used to define these values produces overflow, as seen by
      this compiler warning:
      
      arch/arm64/kernel/head.S:47:8: warning:
            integer overflow in preprocessor expression
        #elif (PAGE_OFFSET & 0x1fffff) != 0
               ^~~~~~~~~~~
      arch/arm64/include/asm/memory.h:52:46: note:
            expanded from macro 'PAGE_OFFSET'
        #define PAGE_OFFSET             (UL(0xffffffffffffffff) << (VA_BITS -
      1))
                                            ~~~~~~~~~~~~~~~~~~  ^
      
      It would be preferrable to use GENMASK_ULL() instead, but it's not set
      up to be used from assembly (the UL() macro token pastes UL suffixes
      when not included in assembly sources).
      Suggested-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Suggested-by: default avatarYury Norov <ynorov@caviumnetworks.com>
      Suggested-by: default avatarMatthias Kaehlcke <mka@chromium.org>
      Signed-off-by: default avatarNick Desaulniers <ndesaulniers@google.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      82cd5880
    • Catalin Marinas's avatar
      arm64: Fix potential race with hardware DBM in ptep_set_access_flags() · 6d332747
      Catalin Marinas authored
      In a system with DBM (dirty bit management) capable agents there is a
      possible race between a CPU executing ptep_set_access_flags() (maybe
      non-DBM capable) and a hardware update of the dirty state (clearing of
      PTE_RDONLY). The scenario:
      
      a) the pte is writable (PTE_WRITE set), clean (PTE_RDONLY set) and old
         (PTE_AF clear)
      b) ptep_set_access_flags() is called as a result of a read access and it
         needs to set the pte to writable, clean and young (PTE_AF set)
      c) a DBM-capable agent, as a result of a different write access, is
         marking the entry as young (setting PTE_AF) and dirty (clearing
         PTE_RDONLY)
      
      The current ptep_set_access_flags() implementation would set the
      PTE_RDONLY bit in the resulting value overriding the DBM update and
      losing the dirty state.
      
      This patch fixes such race by setting PTE_RDONLY to the most permissive
      (lowest value) of the current entry and the new one.
      
      Fixes: 66dbd6e6 ("arm64: Implement ptep_set_access_flags() for hardware AF/DBM")
      Cc: Will Deacon <will.deacon@arm.com>
      Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
      Acked-by: default avatarSteve Capper <steve.capper@arm.com>
      Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarWill Deacon <will.deacon@arm.com>
      6d332747
    • Arnd Bergmann's avatar
      Merge tag 'davinci-fixes-for-v4.13' of... · 41c454fa
      Arnd Bergmann authored
      Merge tag 'davinci-fixes-for-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci into fixes
      
      Pull "DaVinci fixes for v4.13" from Sekhar Nori:
      
      Drop unused VPIF endpoints from device-tree.
      They should be used only when an actual
      remote-endpoint is connected.
      
      * tag 'davinci-fixes-for-v4.13' of git://git.kernel.org/pub/scm/linux/kernel/git/nsekhar/linux-davinci:
        ARM: dts: da850-lcdk: drop unused VPIF endpoints
        ARM: dts: da850-evm: drop unused VPIF endpoints
      41c454fa
    • Arnd Bergmann's avatar
      Merge tag 'sunxi-fixes-for-4.13' of... · ae119859
      Arnd Bergmann authored
      Merge tag 'sunxi-fixes-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux into fixes
      
      Pull "Allwinner fixes for 4.13" from Chen-Yu Tsai:
      
      Two fixes to correct the EMAC blocks memory region size to match the
      datasheet. One that converts raw A83T clock indices to macros from the
      clk dt-binding header, completing the A83T sunxi-ng clk driver.
      
      * tag 'sunxi-fixes-for-4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux:
        ARM: dts: sun8i: a83t: Switch to CCU device tree binding macros
        arm64: allwinner: sun50i-a64: Correct emac register size
        ARM: dts: sunxi: h3/h5: Correct emac register size
      ae119859
    • Arnd Bergmann's avatar
      Merge tag 'qcom-arm64-defconfig-fixes-for-4.13-rc2' of... · 3d8db0a8
      Arnd Bergmann authored
      Merge tag 'qcom-arm64-defconfig-fixes-for-4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux into fixes
      
      Pull "Qualcomm ARM64 based defconfig Fixes for v4.13-rc2" from Andy Gross:
      
      * Enable missing HWSPINLOCK
      
      * tag 'qcom-arm64-defconfig-fixes-for-4.13-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/agross/linux:
        arm64: defconfig: enable missing HWSPINLOCK
      3d8db0a8
    • Marc Gonzalez's avatar
      ARM: dts: tango4: Request RGMII RX and TX clock delays · 985333b0
      Marc Gonzalez authored
      RX and TX clock delays are required. Request them explicitly.
      
      Fixes: cad008b8 ("ARM: dts: tango4: Initial device trees")
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarMarc Gonzalez <marc_gonzalez@sigmadesigns.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      985333b0
    • Masahiro Yamada's avatar
      bus: uniphier-system-bus: set up registers when resuming · 2f4233ee
      Masahiro Yamada authored
      When resuming, set up registers that have been lost in the sleep state.
      Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      2f4233ee
    • Arnd Bergmann's avatar
      Merge tag 'renesas-fixes3-for-v4.13' of... · 264e22af
      Arnd Bergmann authored
      Merge tag 'renesas-fixes3-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas into fixes
      
      Pull "Third Round of Renesas ARM Based SoC Fixes for v4.13" from Simon Horman:
      
      Fix deadlock in regulator quirk for R-Car Gen 2 SoCs
      
      The da9063/da9210 regulator quirk for R-Car Gen2 boards uses a bus
      notifier, and unregisters the notifier when it is no longer needed.
      However, a notifier must not be unregistered from within the call chain.
      
      This bug went unnoticed, as blocking_notifier_chain_unregister() didn't
      take the semaphore during early boot. This is no longer the case as of
      upstream commit 1c3c5eab ("sched/core: Enable might_sleep() and
      smp_processor_id() checks early") and a deadlock occurs.
      
      * tag 'renesas-fixes3-for-v4.13' of https://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
        ARM: shmobile: rcar-gen2: Fix deadlock in regulator quirk
      264e22af
    • Arnd Bergmann's avatar
      Merge tag 'mvebu-fixes-4.13-2' of git://git.infradead.org/linux-mvebu into fixes · 48cb953e
      Arnd Bergmann authored
      Pull "mvebu fixes for 4.13 (part 2)" from Gregory CLEMENT:
      
      All the fixes are for ARM64 mvebu:
      
       - Fix the RTC interrupt on A7K/A8K which was missed when switching
         from GIC to ICU
       - Mark the A7K/A8K crypto engine as dma coherent
       - Fix the number of GPIO on south bridge on Armada 3700
      
      * tag 'mvebu-fixes-4.13-2' of git://git.infradead.org/linux-mvebu:
        ARM64: dts: marvell: armada-37xx: Fix the number of GPIO on south bridge
        arm64: dts: marvell: mark the cp110 crypto engine as dma coherent
        arm64: dts: marvell: use ICU for the CP110 slave RTC
      48cb953e
    • Arnd Bergmann's avatar
      Merge tag 'amlogic-fixes' of... · b99bba09
      Arnd Bergmann authored
      Merge tag 'amlogic-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic into fixes
      
      Pull "Amlogic fixes for v4.13-rc" from Kevin Hilman:
      
      - 2 minor DT fixes
      
      * tag 'amlogic-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/khilman/linux-amlogic:
        ARM64: dts: meson-gxl-s905x-libretech-cc: fixup board definition
        ARM64: dts: meson-gx: use specific compatible for the AO pwms
      b99bba09
    • Arnd Bergmann's avatar
      Merge tag 'v4.13-rockchip-dts32fixes-1' of... · e86c86bc
      Arnd Bergmann authored
      Merge tag 'v4.13-rockchip-dts32fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip into fixes
      
      Pull "Rockchip dts32 fixes for 4.13" from Heiko Stübner:
      
      Fix for the recently added mali dt support. The example
      showed a wrong value, so fix it before it gets copy-pasted
      to much.
      
      * tag 'v4.13-rockchip-dts32fixes-1' of git://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip:
        ARM: dts: rockchip: fix mali gpu node on rk3288
        dt-bindings: gpu: drop wrong compatible from midgard binding example
      e86c86bc
    • Nicholas Piggin's avatar
      powerpc/64: Fix __check_irq_replay missing decrementer interrupt · 3db40c31
      Nicholas Piggin authored
      If the decrementer wraps again and de-asserts the decrementer
      exception while hard-disabled, __check_irq_replay() has a test to
      notice the wrap when interrupts are re-enabled.
      
      The decrementer check must be done when clearing the PACA_IRQ_HARD_DIS
      flag, not when the PACA_IRQ_DEC flag is tested. Previously this worked
      because the decrementer interrupt was always the first one checked
      after clearing the hard disable flag, but HMI check was moved ahead of
      that, which introduced this bug.
      
      This can cause a missed decrementer interrupt if we soft-disable
      interrupts then take an HMI which is recorded in irq_happened, then
      hard-disable interrupts for > 4s to wrap the decrementer.
      
      Fixes: e0e0d6b7 ("powerpc/64: Replay hypervisor maintenance interrupt first")
      Cc: stable@vger.kernel.org # v4.9+
      Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      3db40c31
    • Nicholas Piggin's avatar
      powerpc/perf: POWER9 PMU stops after idle workaround · 09539f9b
      Nicholas Piggin authored
      POWER9 DD2 PMU can stop after a state-loss idle in some conditions.
      
      A solution is to set then clear MMCRA[60] after wake from state-loss
      idle. MMCRA[60] is a non-architected bit, see the user manual for
      details.
      Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Acked-by: default avatarMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
      Reviewed-by: default avatarVaidyanathan Srinivasan <svaidy@linux.vnet.ibm.com>
      Acked-by: default avatarAnton Blanchard <anton@samba.org>
      Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
      09539f9b
    • Dave Airlie's avatar
      Merge branch 'drm-fixes-4.13' of git://people.freedesktop.org/~agd5f/linux into drm-fixes · 5669b998
      Dave Airlie authored
      Just a few small fixes for 4.13.
      
      * 'drm-fixes-4.13' of git://people.freedesktop.org/~agd5f/linux:
        drm/amdgpu: Use list_del_init in amdgpu_mn_unregister
        drm/amdgpu: Fix undue fallthroughs in golden registers initialization
        drm/amdgpu: fix header on gfx9 clear state
      5669b998
  2. 03 Aug, 2017 13 commits
    • Linus Torvalds's avatar
      Merge tag 'vfio-v4.13-rc4' of git://github.com/awilliam/linux-vfio · 869c058f
      Linus Torvalds authored
      Pull VFIO fixes from Alex Williamson:
      
       - SPAPR/EEH config build fix (Murilo Opsfelder Araujo)
      
       - Fix possible device lock deadlock (Alex Williamson)
      
       - Correctly size integrated endpoint PCIe capabilities (Alex
         Williamson)
      
      * tag 'vfio-v4.13-rc4' of git://github.com/awilliam/linux-vfio:
        vfio/pci: Fix handling of RC integrated endpoint PCIe capability size
        vfio/pci: Use pci_try_reset_function() on initial open
        include/linux/vfio.h: Guard powerpc-specific functions with CONFIG_VFIO_SPAPR_EEH
      869c058f
    • Linus Torvalds's avatar
      Merge branch 'akpm' (patches from Andrew) · 995d03ae
      Linus Torvalds authored
      Merge misc fixes from Andrew Morton:
       "15 fixes"
      
      [ This does not merge the "fortify: use WARN instead of BUG for now"
        patch, which needs a bit of extra work to build cleanly with all
        configurations. Arnd is on it.   - Linus ]
      
      * emailed patches from Andrew Morton <akpm@linux-foundation.org>:
        ocfs2: don't clear SGID when inheriting ACLs
        mm: allow page_cache_get_speculative in interrupt context
        userfaultfd: non-cooperative: flush event_wqh at release time
        ipc: add missing container_of()s for randstruct
        cpuset: fix a deadlock due to incomplete patching of cpusets_enabled()
        userfaultfd_zeropage: return -ENOSPC in case mm has gone
        mm: take memory hotplug lock within numa_zonelist_order_handler()
        mm/page_io.c: fix oops during block io poll in swapin path
        zram: do not free pool->size_class
        kthread: fix documentation build warning
        kasan: avoid -Wmaybe-uninitialized warning
        userfaultfd: non-cooperative: notify about unmap of destination during mremap
        mm, mprotect: flush TLB if potentially racing with a parallel reclaim leaving stale TLB entries
        pid: kill pidhash_size in pidhash_init()
        mm/hugetlb.c: __get_user_pages ignores certain follow_hugetlb_page errors
      995d03ae
    • Linus Torvalds's avatar
      Merge tag 'acpi-4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 8d3fe85f
      Linus Torvalds authored
      Pull ACPI fixes from Rafael Wysocki:
       "These fix two issues in the ACPI SoC drivers (Intel LPSS and AMD APD),
        a crash in the PCC mailbox initialization code and a WDAT watchdog
        initialization failure.
      
        Specifics:
      
         - Fix a device ID of Hisilicon Hip07/08 in the ACPI APD (AMD SoC)
           driver (Hanjun Guo).
      
         - Fix list corruption (introduced during the 4.11 cycle) in the ACPI
           LPSS (Intel SoC) driver (Hans de Goede).
      
         - Fix PCC mailbox handling code crash during initialization when PCCT
           is not present and PCC channel 0 is requested (Hoan Tran).
      
         - Fix a WDAT watchdog initialization issue causing platform device
           creation to fail due to partially overlapping address ranges in
           resources (Ryan Kennedy)"
      
      * tag 'acpi-4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        ACPI: APD: Fix HID for Hisilicon Hip07/08
        mailbox: pcc: Fix crash when request PCC channel 0
        ACPI / watchdog: Fix init failure with overlapping register regions
        ACPI / LPSS: Only call pwm_add_table() for the first PWM controller
      8d3fe85f
    • Linus Torvalds's avatar
      Merge tag 'pm-4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm · 73784fb7
      Linus Torvalds authored
      Pull power management fixes from Rafael Wysocki:
       "These fix two cpufreq issues, one introduced recently and one related
        to recent changes, fix cpufreq documentation, fix up recently added
        code in the Thunderbolt driver and update runtime PM framework
        documentation.
      
        Specifics:
      
         - Fix the handling of the scaling_cur_freq cpufreq policy attribute
           on x86 systems with the MPERF/APERF registers present to make it
           behave more as expected after recent changes (Rafael Wysocki).
      
         - Drop a leftover callback from the intel_pstate driver which also
           prevents the cpuinfo_cur_freq cpufreq policy attribute from being
           incorrectly exposed when intel_pstate works in the active mode
           (Rafael Wysocki).
      
         - Add a missing piece describing the cpuinfo_cur_freq policy
           attribute to cpufreq documentation (Rafael Wysocki).
      
         - Fix up a recently added part of the Thunderbolt driver to avoid
           aborting system suspends if its mailbox commands time out (Rafael
           Wysocki).
      
         - Update device runtime PM framework documentation to reflect the
           current behavior of the code (Johan Hovold)"
      
      * tag 'pm-4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
        thunderbolt: icm: Ignore mailbox errors in icm_suspend()
        cpufreq: x86: Make scaling_cur_freq behave more as expected
        PM / runtime: Document new pm_runtime_set_suspended() constraint
        cpufreq: docs: Add missing cpuinfo_cur_freq description
        cpufreq: intel_pstate: Drop ->get from intel_pstate structure
      73784fb7
    • Rafael J. Wysocki's avatar
      Merge branches 'acpi-soc', 'acpi-wdat' and 'acpi-cppc' · 3de559d4
      Rafael J. Wysocki authored
      * acpi-soc:
        ACPI: APD: Fix HID for Hisilicon Hip07/08
        ACPI / LPSS: Only call pwm_add_table() for the first PWM controller
      
      * acpi-wdat:
        ACPI / watchdog: Fix init failure with overlapping register regions
      
      * acpi-cppc:
        mailbox: pcc: Fix crash when request PCC channel 0
      3de559d4
    • Rafael J. Wysocki's avatar
      Merge branches 'pm-core' and 'pm-misc' · 78aa904a
      Rafael J. Wysocki authored
      * pm-core:
        PM / runtime: Document new pm_runtime_set_suspended() constraint
      
      * pm-misc:
        thunderbolt: icm: Ignore mailbox errors in icm_suspend()
      78aa904a
    • Rafael J. Wysocki's avatar
      Merge branches 'pm-cpufreq-x86', 'pm-cpufreq-docs' and 'intel_pstate' · 8a05c311
      Rafael J. Wysocki authored
      * pm-cpufreq-x86:
        cpufreq: x86: Make scaling_cur_freq behave more as expected
      
      * pm-cpufreq-docs:
        cpufreq: docs: Add missing cpuinfo_cur_freq description
      
      * intel_pstate:
        cpufreq: intel_pstate: Drop ->get from intel_pstate structure
      8a05c311
    • Radim Krčmář's avatar
      Merge tag 'kvm-arm-for-v4.13-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/kvmarm/kvmarm · 53a5abd8
      Radim Krčmář authored
      KVM/ARM Fixes for v4.13-rc4
      
      - Yet another race with VM destruction plugged
      - A set of small vgic fixes
      53a5abd8
    • Christoffer Dall's avatar
      KVM: arm/arm64: vgic: Use READ_ONCE fo cmpxchg · 3af4e414
      Christoffer Dall authored
      There is a small chance that the compiler could generate separate loads
      for the dist->propbaser which could be modified from another CPU.  As we
      want to make sure we atomically update the entire value, and don't race
      with other updates, guarantee that the cmpxchg operation compares
      against the original value.
      Acked-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
      Signed-off-by: default avatarChristoffer Dall <cdall@linaro.org>
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      3af4e414
    • Wanpeng Li's avatar
      KVM: nVMX: Fix interrupt window request with "Acknowledge interrupt on exit" · 6550c4df
      Wanpeng Li authored
      ------------[ cut here ]------------
       WARNING: CPU: 5 PID: 2288 at arch/x86/kvm/vmx.c:11124 nested_vmx_vmexit+0xd64/0xd70 [kvm_intel]
       CPU: 5 PID: 2288 Comm: qemu-system-x86 Not tainted 4.13.0-rc2+ #7
       RIP: 0010:nested_vmx_vmexit+0xd64/0xd70 [kvm_intel]
      Call Trace:
        vmx_check_nested_events+0x131/0x1f0 [kvm_intel]
        ? vmx_check_nested_events+0x131/0x1f0 [kvm_intel]
        kvm_arch_vcpu_ioctl_run+0x5dd/0x1be0 [kvm]
        ? vmx_vcpu_load+0x1be/0x220 [kvm_intel]
        ? kvm_arch_vcpu_load+0x62/0x230 [kvm]
        kvm_vcpu_ioctl+0x340/0x700 [kvm]
        ? kvm_vcpu_ioctl+0x340/0x700 [kvm]
        ? __fget+0xfc/0x210
        do_vfs_ioctl+0xa4/0x6a0
        ? __fget+0x11d/0x210
        SyS_ioctl+0x79/0x90
        do_syscall_64+0x8f/0x750
        ? trace_hardirqs_on_thunk+0x1a/0x1c
        entry_SYSCALL64_slow_path+0x25/0x25
      
      This can be reproduced by booting L1 guest w/ 'noapic' grub parameter, which
      means that tells the kernel to not make use of any IOAPICs that may be present
      in the system.
      
      Actually external_intr variable in nested_vmx_vmexit() is the req_int_win
      variable passed from vcpu_enter_guest() which means that the L0's userspace
      requests an irq window. I observed the scenario (!kvm_cpu_has_interrupt(vcpu) &&
      L0's userspace reqeusts an irq window) is true, so there is no interrupt which
      L1 requires to inject to L2, we should not attempt to emualte "Acknowledge
      interrupt on exit" for the irq window requirement in this scenario.
      
      This patch fixes it by not attempt to emulate "Acknowledge interrupt on exit"
      if there is no L1 requirement to inject an interrupt to L2.
      
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Signed-off-by: default avatarWanpeng Li <wanpeng.li@hotmail.com>
      [Added code comment to make it obvious that the behavior is not correct.
       We should do a userspace exit with open interrupt window instead of the
       nested VM exit.  This patch still improves the behavior, so it was
       accepted as a (temporary) workaround.]
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      6550c4df
    • Shawn Lin's avatar
      mmc: block: bypass the queue even if usage is present for hotplug · 7c84b8b4
      Shawn Lin authored
      The commit 304419d8 ("mmc: core: Allocate per-request data using the
      block layer core") refactored mechanism of queue handling caused
      mmc_init_request() can be called just after mmc_cleanup_queue() caused null
      pointer dereference.
      
      Another commit bbdc74dc ("mmc: block: Prevent new req entering queue
      after its cleanup") tried to fix the problem. However it actually miss one
      corner case.
      
      We could still reproduce the issue mentioned with these steps:
      (1) insert a SD card and mount it
      (2) hotplug it, so it will leave md->usage still be counted
      (3) reboot the system which will sync data and umount the card
      
      [Unable to handle kernel NULL pointer dereference at virtual address
      00000000
      [user pgtable: 4k pages, 48-bit VAs, pgd = ffff80007bab3000
      [[0000000000000000] *pgd=000000007a828003, *pud=0000000078dce003,
      *pmd=000000007aab6003, *pte=0000000000000000
      [Internal error: Oops: 96000007 [#1] PREEMPT SMP
      [Modules linked in:
      [CPU: 3 PID: 3507 Comm: umount Tainted: G        W
      4.13.0-rc1-next-20170720-00012-g9d9bf45 #33
      [Hardware name: Firefly-RK3399 Board (DT)
      [task: ffff80007a1de200 task.stack: ffff80007a01c000
      [PC is at mmc_init_request+0x14/0xc4
      [LR is at alloc_request_size+0x4c/0x74
      [pc : [<ffff0000087d7150>] lr : [<ffff000008378fe0>] pstate: 600001c5
      [sp : ffff80007a01f8f0
      
      ....
      
      [[<ffff0000087d7150>] mmc_init_request+0x14/0xc4
      [[<ffff000008378fe0>] alloc_request_size+0x4c/0x74
      [[<ffff00000817ac28>] mempool_create_node+0xb8/0x17c
      [[<ffff00000837aadc>] blk_init_rl+0x9c/0x120
      [[<ffff000008396580>] blkg_alloc+0x110/0x234
      [[<ffff000008396ac8>] blkg_create+0x424/0x468
      [[<ffff00000839877c>] blkg_lookup_create+0xd8/0x14c
      [[<ffff0000083796bc>] generic_make_request_checks+0x368/0x3b0
      [[<ffff00000837b050>] generic_make_request+0x1c/0x240
      
      So mmc_blk_put wouldn't calling blk_cleanup_queue which actually the
      QUEUE_FLAG_DYING and QUEUE_FLAG_BYPASS should stay. Block core expect
      blk_queue_bypass_{start, end} internally to bypass/drain the queue before
      actually dying the queue, so it didn't expose API to set the queue bypass.
      I think we should set QUEUE_FLAG_BYPASS whenever queue is removed, although
      the md->usage is still counted, as no dispatch queue could be found then.
      
      Fixes: 304419d8 ("mmc: core: Allocate per-request data using the block layer core")
      Signed-off-by: default avatarShawn Lin <shawn.lin@rock-chips.com>
      Reviewed-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      7c84b8b4
    • Ludovic Desroches's avatar
      mmc: sdhci-of-at91: force card detect value for non removable devices · 7a1e3f14
      Ludovic Desroches authored
      When the device is non removable, the card detect signal is often used
      for another purpose i.e. muxed to another SoC peripheral or used as a
      GPIO. It could lead to wrong behaviors depending the default value of
      this signal if not muxed to the SDHCI controller.
      
      Fixes: bb5f8ea4 ("mmc: sdhci-of-at91: introduce driver for the Atmel SDMMC")
      Signed-off-by: default avatarLudovic Desroches <ludovic.desroches@microchip.com>
      Acked-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
      7a1e3f14
    • Linus Torvalds's avatar
      Merge tag 'nfs-for-4.13-4' of git://git.linux-nfs.org/projects/anna/linux-nfs · 19ec50a4
      Linus Torvalds authored
      Pull NFS client fixes from Anna Schumaker:
       "Two fixes from Trond this time, now that he's back from his vacation.
        The first is a stable fix for the EXCHANGE_ID issue on the mailing
        list, and the other fixes a double-free situation that he found at the
        same time.
      
        Stable fix:
         - Fix EXCHANGE_ID corrupt verifier issue
      
        Other fix:
         - Fix double frees in nfs4_test_session_trunk()"
      
      * tag 'nfs-for-4.13-4' of git://git.linux-nfs.org/projects/anna/linux-nfs:
        NFSv4: Fix double frees in nfs4_test_session_trunk()
        NFSv4: Fix EXCHANGE_ID corrupt verifier issue
      19ec50a4