1. 20 May, 2017 9 commits
    • Linus Torvalds's avatar
      Merge tag 'staging-4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging · ef82f1ad
      Linus Torvalds authored
      Pull staging driver fixes from Greg KH:
       "Here are a number of staging driver fixes for 4.12-rc2
      
        Most of them are typec driver fixes found by reviewers and users of
        the code. There are also some removals of files no longer needed in
        the tree due to the ion driver rewrite in 4.12-rc1, as well as some
        wifi driver fixes. And to round it out, a MAINTAINERS file update.
      
        All have been in linux-next with no reported issues"
      
      * tag 'staging-4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging: (22 commits)
        MAINTAINERS: greybus-dev list is members-only
        staging: fsl-dpaa2/eth: add ETHERNET dependency
        staging: typec: fusb302: refactor resume retry mechanism
        staging: typec: fusb302: reset i2c_busy state in error
        staging: rtl8723bs: remove re-positioned call to kfree in os_dep/ioctl_cfg80211.c
        staging: rtl8192e: GetTs Fix invalid TID 7 warning.
        staging: rtl8192e: rtl92e_get_eeprom_size Fix read size of EPROM_CMD.
        staging: rtl8192e: fix 2 byte alignment of register BSSIDR.
        staging: rtl8192e: rtl92e_fill_tx_desc fix write to mapped out memory.
        staging: vc04_services: Fix bulk cache maintenance
        staging: ccree: remove extraneous spin_unlock_bh() in error handler
        staging: typec: Fix sparse warnings about incorrect types
        staging: typec: fusb302: do not free gpio from managed resource
        staging: typec: tcpm: Fix Port Power Role field in PS_RDY messages
        staging: typec: tcpm: Respond to Discover Identity commands
        staging: typec: tcpm: Set correct flags in PD request messages
        staging: typec: tcpm: Drop duplicate PD messages
        staging: typec: fusb302: Fix chip->vbus_present init value
        staging: typec: fusb302: Fix module autoload
        staging: typec: tcpci: declare private structure as static
        ...
      ef82f1ad
    • Linus Torvalds's avatar
      Merge tag 'usb-4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb · 32026293
      Linus Torvalds authored
      Pull USB fixes from Greg KH:
       "Here are a number of small USB fixes for 4.12-rc2
      
        Most of them come from Johan, in his valiant quest to fix up all
        drivers that could be affected by "malicious" USB devices. There's
        also some fixes for more "obscure" drivers to handle some of the
        vmalloc stack fallout (which for USB drivers, was always the case, but
        very few people actually ran those systems...)
      
        Other than that, the normal set of xhci and gadget and musb driver
        fixes as well.
      
        All have been in linux-next with no reported issues"
      
      * tag 'usb-4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (42 commits)
        usb: musb: tusb6010_omap: Do not reset the other direction's packet size
        usb: musb: Fix trying to suspend while active for OTG configurations
        usb: host: xhci-plat: propagate return value of platform_get_irq()
        xhci: Fix command ring stop regression in 4.11
        xhci: remove GFP_DMA flag from allocation
        USB: xhci: fix lock-inversion problem
        usb: host: xhci-ring: don't need to clear interrupt pending for MSI enabled hcd
        usb: host: xhci-mem: allocate zeroed Scratchpad Buffer
        xhci: apply PME_STUCK_QUIRK and MISSING_CAS quirk for Denverton
        usb: xhci: trace URB before giving it back instead of after
        USB: serial: qcserial: add more Lenovo EM74xx device IDs
        USB: host: xhci: use max-port define
        USB: hub: fix SS max number of ports
        USB: hub: fix non-SS hub-descriptor handling
        USB: hub: fix SS hub-descriptor handling
        USB: usbip: fix nonconforming hub descriptor
        USB: gadget: dummy_hcd: fix hub-descriptor removable fields
        doc-rst: fixed kernel-doc directives in usb/typec.rst
        USB: core: of: document reference taken by companion helper
        USB: ehci-platform: fix companion-device leak
        ...
      32026293
    • Linus Torvalds's avatar
      Merge tag 'char-misc-4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc · 331da109
      Linus Torvalds authored
      Pull char/misc driver fixes from Greg KH:
       "Here are five small bugfixes for reported issues with 4.12-rc1 and
        earlier kernels. Nothing huge here, just a lp, mem, vpd, and uio
        driver fix, along with a Kconfig fixup for one of the misc drivers.
      
        All of these have been in linux-next with no reported issues"
      
      * tag 'char-misc-4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
        firmware: Google VPD: Fix memory allocation error handling
        drivers: char: mem: Check for address space wraparound with mmap()
        uio: fix incorrect memory leak cleanup
        misc: pci_endpoint_test: select CRC32
        char: lp: fix possible integer overflow in lp_setup()
      331da109
    • Linus Torvalds's avatar
      Merge git://www.linux-watchdog.org/linux-watchdog · ec53c027
      Linus Torvalds authored
      Pull watchdog fixes from Wim Van Sebroeck:
       - orion_wdt compile-test dependencies
       - sama5d4_wdt: WDDIS handling and a race confition
       - pcwd_usb: fix NULL-deref at probe
       - cadence_wdt: fix timeout setting
       - wdt_pci: fix build error if SOFTWARE_REBOOT is defined
       - iTCO_wdt: all versions count down twice
       - zx2967: remove redundant dev_err call in zx2967_wdt_probe()
       - bcm281xx: Fix use of uninitialized spinlock
      
      * git://www.linux-watchdog.org/linux-watchdog:
        watchdog: bcm281xx: Fix use of uninitialized spinlock.
        watchdog: zx2967: remove redundant dev_err call in zx2967_wdt_probe()
        iTCO_wdt: all versions count down twice
        watchdog: wdt_pci: fix build error if define SOFTWARE_REBOOT
        watchdog: cadence_wdt: fix timeout setting
        watchdog: pcwd_usb: fix NULL-deref at probe
        watchdog: sama5d4: fix race condition
        watchdog: sama5d4: fix WDDIS handling
        watchdog: orion: fix compile-test dependencies
      ec53c027
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-for-v4.12-rc2' of git://people.freedesktop.org/~airlied/linux · cf80a6fb
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Mostly nouveau and i915, fairly quiet as usual for rc2"
      
      * tag 'drm-fixes-for-v4.12-rc2' of git://people.freedesktop.org/~airlied/linux:
        drm/atmel-hlcdc: Fix output initialization
        gpu: host1x: select IOMMU_IOVA
        drm/nouveau/fifo/gk104-: Silence a locking warning
        drm/nouveau/secboot: plug memory leak in ls_ucode_img_load_gr() error path
        drm/nouveau: Fix drm poll_helper handling
        drm/i915: don't do allocate_va_range again on PIN_UPDATE
        drm/i915: Fix rawclk readout for g4x
        drm/i915: Fix runtime PM for LPE audio
        drm/i915/glk: Fix DSI "*ERROR* ULPS is still active" messages
        drm/i915/gvt: avoid unnecessary vgpu switch
        drm/i915/gvt: not to restore in-context mmio
        drm/etnaviv: don't put fence in case of submit failure
        drm/i915/gvt: fix typo: "supporte" -> "support"
        drm: hdlcd: Fix the calculation of the scanout start address
      cf80a6fb
    • Linus Torvalds's avatar
      Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi · 6fe1de43
      Linus Torvalds authored
      Pull SCSI fixes from James Bottomley:
       "This is the first sweep of mostly minor fixes. There's one security
        one: the read past the end of a buffer in qedf, and a panic fix for
        lpfc SLI-3 adapters, but the rest are a set of include and build
        dependency tidy ups and assorted other small fixes and updates"
      
      * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
        scsi: pmcraid: remove redundant check to see if request_size is less than zero
        scsi: lpfc: ensure els_wq is being checked before destroying it
        scsi: cxlflash: Select IRQ_POLL
        scsi: qedf: Avoid reading past end of buffer
        scsi: qedf: Cleanup the type of io_log->op
        scsi: lpfc: double lock typo in lpfc_ns_rsp()
        scsi: qedf: properly update arguments position in function call
        scsi: scsi_lib: Add #include <scsi/scsi_transport.h>
        scsi: MAINTAINERS: update OSD entries
        scsi: Skip deleted devices in __scsi_device_lookup
        scsi: lpfc: Fix panic on BFS configuration
        scsi: libfc: do not flood console with messages 'libfc: queue full ...'
      6fe1de43
    • Linus Torvalds's avatar
      Merge branch 'libnvdimm-for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm · 8c3fc164
      Linus Torvalds authored
      Pull libnvdimm fixes from Dan Williams:
       "A couple of compile fixes.
      
        With the removal of the ->direct_access() method from
        block_device_operations in favor of a new dax_device + dax_operations
        we broke two configurations.
      
        The CONFIG_BLOCK=n case is fixed by compiling out the block+dax
        helpers in the dax core. Configurations with FS_DAX=n EXT4=y / XFS=y
        and DAX=m fail due to the helpers the builtin filesystem needs being
        in a module, so we stub out the helpers in the FS_DAX=n case."
      
      * 'libnvdimm-for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
        dax, xfs, ext4: compile out iomap-dax paths in the FS_DAX=n case
        dax: fix false CONFIG_BLOCK dependency
      8c3fc164
    • Linus Torvalds's avatar
      Merge branch 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux · 0bdc6fd2
      Linus Torvalds authored
      Pull i2c fix from Wolfram Sang:
       "A regression fix for I2C that would be great to have in rc2"
      
      * 'i2c/for-current' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux:
        i2c: designware: don't infer timings described by ACPI from clock rate
      0bdc6fd2
    • Linus Torvalds's avatar
      Merge tag 'iommu-fixes-v4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu · d4c6cd15
      Linus Torvalds authored
      Pull IOMMU fixes from Joerg Roedel:
      
       - another compile-fix as a fallout of the recent header-file cleanup
      
       - add a missing IO/TLB flush to the Intel VT-d kdump code path
      
       - a fix for ARM64 dma code to only access initialized iova_domain
         members
      
      * tag 'iommu-fixes-v4.12-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
        iommu/mediatek: Include linux/dma-mapping.h
        iommu/vt-d: Flush the IOTLB to get rid of the initial kdump mappings
        iommu/dma: Don't touch invalid iova_domain members
      d4c6cd15
  2. 19 May, 2017 31 commits
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 4217fdde
      Linus Torvalds authored
      Pull KVM fixes from Radim Krčmář:
       "ARM:
         - a fix for a build failure introduced in -rc1 when tracepoints are
           enabled on 32-bit ARM.
      
         - disable use of stack pointer protection in the hyp code which can
           cause panics.
      
         - a handful of VGIC fixes.
      
         - a fix to the init of the redistributors on GICv3 systems that
           prevented boot with kvmtool on GICv3 systems introduced in -rc1.
      
         - a number of race conditions fixed in our MMU handling code.
      
         - a fix for the guest being able to program the debug extensions for
           the host on the 32-bit side.
      
        PPC:
         - fixes for build failures with PR KVM configurations.
      
         - a fix for a host crash that can occur on POWER9 with radix guests.
      
        x86:
         - fixes for nested PML and nested EPT.
      
         - a fix for crashes caused by reserved bits in SSE MXCSR that could
           have been set by userspace.
      
         - an optimization of halt polling that fixes high CPU overhead.
      
         - fixes for four reports from Dan Carpenter's static checker.
      
         - a protection around code that shouldn't have been preemptible.
      
         - a fix for port IO emulation"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: (27 commits)
        KVM: x86: prevent uninitialized variable warning in check_svme()
        KVM: x86/vPMU: fix undefined shift in intel_pmu_refresh()
        KVM: x86: zero base3 of unusable segments
        KVM: X86: Fix read out-of-bounds vulnerability in kvm pio emulation
        KVM: x86: Fix potential preemption when get the current kvmclock timestamp
        KVM: Silence underflow warning in avic_get_physical_id_entry()
        KVM: arm/arm64: Hold slots_lock when unregistering kvm io bus devices
        KVM: arm/arm64: Fix bug when registering redist iodevs
        KVM: x86: lower default for halt_poll_ns
        kvm: arm/arm64: Fix use after free of stage2 page table
        kvm: arm/arm64: Force reading uncached stage2 PGD
        KVM: nVMX: fix EPT permissions as reported in exit qualification
        KVM: VMX: Don't enable EPT A/D feature if EPT feature is disabled
        KVM: x86: Fix load damaged SSEx MXCSR register
        kvm: nVMX: off by one in vmx_write_pml_buffer()
        KVM: arm: rename pm_fake handler to trap_raz_wi
        KVM: arm: plug potential guest hardware debug leakage
        kvm: arm/arm64: Fix race in resetting stage2 PGD
        KVM: arm/arm64: vgic-v3: Use PREbits to infer the number of ICH_APxRn_EL2 registers
        KVM: arm/arm64: vgic-v3: Do not use Active+Pending state for a HW interrupt
        ...
      4217fdde
    • Linus Torvalds's avatar
      Merge tag 'for-linus-4.12b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip · 9e856e4b
      Linus Torvalds authored
      Pull xen fixes from Juergen Gross:
       "Some fixes for the new Xen 9pfs frontend and some minor cleanups"
      
      * tag 'for-linus-4.12b-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
        xen: make xen_flush_tlb_all() static
        xen: cleanup pvh leftovers from pv-only sources
        xen/9pfs: p9_trans_xen_init and p9_trans_xen_exit can be static
        xen/9pfs: fix return value check in xen_9pfs_front_probe()
      9e856e4b
    • Linus Torvalds's avatar
      Merge tag 'devicetree-fixes-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux · 1fbbed41
      Linus Torvalds authored
      Pull DeviceTree fixes from Rob Herring:
      
       - fix missing allocation failure handling in fdt code
      
       - fix dtc compile error on 32-bit hosts
      
       - revert bad sparse changes causing GCC7 warnings
      
      * tag 'devicetree-fixes-for-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
        of: fdt: add missing allocation-failure check
        dtc: check.c fix compile error
        Partially Revert "of: fix sparse warnings in fdt, irq, reserved mem, and resolver code"
      1fbbed41
    • Linus Torvalds's avatar
      Merge tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc · f538a82c
      Linus Torvalds authored
      Pull ARM SoC fixes from Olof Johansson:
       "We had a small batch of fixes before -rc1, but here is a larger one.
        It contains a backmerge of 4.12-rc1 since some of the downstream
        branches we merge had that as base; at the same time we already had
        merged contents before -rc1 and rebase wasn't the right solution.
      
        A mix of random smaller fixes and a few things worth pointing out:
      
         - We've started telling people to avoid cross-tree shared branches if
           all they're doing is picking up one or two DT-used constants from a
           shared include file, and instead to use the numeric values on first
           submission. Follow-up moving over to symbolic names are sent in
           right after -rc1, i.e. here. It's only a few minor patches of this
           type.
      
         - Linus Walleij and others are resurrecting the 'Gemini' platform,
           and wanted a cut-down platform-specific defconfig for it. So I
           picked that up for them.
      
         - Rob Herring ran 'savedefconfig' on arm64, it's a bit churny but it
           helps people to prepare patches since it's a pain when defconfig
           and current savedefconfig contents differs too much.
      
         - Devicetree additions for some pinctrl drivers for Armada that were
           merged this window. I'd have preferred to see those earlier but
           it's not a huge deail.
      
        The biggest change worth pointing out though since it's touching other
        parts of the tree: We added prefixes to be used when cross-including
        DT contents between arm64 and arm, allowing someone to #include
        <arm/foo.dtsi> from arm64, and likewise. As part of that, we needed
        arm/foo.dtsi to work on arm as well. The way I suggested this to Heiko
        resulted in a recursive symlink.
      
        Instead, I've now moved it out of arch/*/boot/dts/include, into a
        shared location under scripts/dtc. While I was at it, I consolidated
        so all architectures now behave the same way in this manner.
      
        Rob Herring (DT maintainer) has acked it. I cc:d most other arch
        maintainers but nobody seems to care much; it doesn't really affect
        them since functionality is unchanged for them by default"
      
      * tag 'armsoc-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (29 commits)
        arm64: dts: rockchip: fix include reference
        firmware: ti_sci: fix strncat length check
        ARM: remove duplicate 'const' annotations'
        arm64: defconfig: enable options needed for QCom DB410c board
        arm64: defconfig: sync with savedefconfig
        ARM: configs: add a gemini defconfig
        devicetree: Move include prefixes from arch to separate directory
        ARM: dts: dra7: Reduce cpu thermal shutdown temperature
        memory: omap-gpmc: Fix debug output for access width
        ARM: dts: LogicPD Torpedo: Fix camera pin mux
        ARM: dts: omap4: enable CEC pin for Pandaboard A4 and ES
        ARM: dts: gta04: fix polarity of clocks for mcbsp4
        ARM: dts: dra7: Add power hold and power controller properties to palmas
        soc: imx: add PM dependency for IMX7_PM_DOMAINS
        ARM: dts: imx6sx-sdb: Remove OPP override
        ARM: dts: imx53-qsrb: Pulldown PMIC IRQ pin
        soc: bcm: brcmstb: Correctly match 7435 SoC
        tee: add ARM_SMCCC dependency
        ARM: omap2+: make omap4_get_cpu1_ns_pa_addr declaration usable
        ARM64: dts: mediatek: configure some fixed mmc parameters
        ...
      f538a82c
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 2fe296a6
      Linus Torvalds authored
      Pull arm64 fixes/cleanups from Catalin Marinas:
      
       - Avoid taking a mutex in the secondary CPU bring-up path when
         interrupts are disabled
      
       - Ignore perf exclude_hv when the kernel is running in Hyp mode
      
       - Remove redundant instruction in cmpxchg
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64/cpufeature: don't use mutex in bringup path
        arm64: perf: Ignore exclude_hv when kernel is running in HYP
        arm64: Remove redundant mov from LL/SC cmpxchg
      2fe296a6
    • Dave Airlie's avatar
      Merge branch 'for-upstream/hdlcd' of git://linux-arm.org/linux-ld into drm-fixes · d51aff16
      Dave Airlie authored
      single hdlcd fix
      * 'for-upstream/hdlcd' of git://linux-arm.org/linux-ld:
        drm: hdlcd: Fix the calculation of the scanout start address
      d51aff16
    • Linus Torvalds's avatar
      Merge tag 'powerpc-4.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux · e5a489ab
      Linus Torvalds authored
      Pull powerpc fixes from Michael Ellerman:
       "The headliner is a fix for FP/VMX register corruption when using
        transactional memory, and a new selftest to go with it.
      
        Then there's the virt_addr_valid() fix, currently HARDENDED_USERCOPY
        is tripping on that causing some machines to crash.
      
        A few other fairly minor fixes for long tail things, and a couple of
        fixes for code we just merged.
      
        Thanks to: Breno Leitao, Gautham Shenoy, Michael Neuling, Naveen Rao.
        Nicholas Piggin, Paul Mackerras"
      
      * tag 'powerpc-4.12-3' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux:
        powerpc/mm: Fix virt_addr_valid() etc. on 64-bit hash
        powerpc/mm: Fix crash in page table dump with huge pages
        powerpc/kprobes: Fix handling of instruction emulation on probe re-entry
        powerpc/powernv: Set NAPSTATELOST after recovering paca on P9 DD1
        selftests/powerpc: Test TM and VMX register state
        powerpc/tm: Fix FP and VMX register corruption
        powerpc/modules: If mprofile-kernel is enabled add it to vermagic
      e5a489ab
    • Radim Krčmář's avatar
      KVM: x86: prevent uninitialized variable warning in check_svme() · 92ceb767
      Radim Krčmář authored
      get_msr() of MSR_EFER is currently always going to succeed, but static
      checker doesn't see that far.
      
      Don't complicate stuff and just use 0 for the fallback -- it means that
      the feature is not present.
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      92ceb767
    • Radim Krčmář's avatar
      KVM: x86/vPMU: fix undefined shift in intel_pmu_refresh() · 34b0dadb
      Radim Krčmář authored
      Static analysis noticed that pmu->nr_arch_gp_counters can be 32
      (INTEL_PMC_MAX_GENERIC) and therefore cannot be used to shift 'int'.
      
      I didn't add BUILD_BUG_ON for it as we have a better checker.
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Fixes: 25462f7f ("KVM: x86/vPMU: Define kvm_pmu_ops to support vPMU function dispatch")
      Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      34b0dadb
    • Radim Krčmář's avatar
      KVM: x86: zero base3 of unusable segments · f0367ee1
      Radim Krčmář authored
      Static checker noticed that base3 could be used uninitialized if the
      segment was not present (useable).  Random stack values probably would
      not pass VMCS entry checks.
      Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
      Fixes: 1aa36616 ("KVM: x86 emulator: consolidate segment accessors")
      Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: default avatarDavid Hildenbrand <david@redhat.com>
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      f0367ee1
    • Wanpeng Li's avatar
      KVM: X86: Fix read out-of-bounds vulnerability in kvm pio emulation · cbfc6c91
      Wanpeng Li authored
      Huawei folks reported a read out-of-bounds vulnerability in kvm pio emulation.
      
      - "inb" instruction to access PIT Mod/Command register (ioport 0x43, write only,
        a read should be ignored) in guest can get a random number.
      - "rep insb" instruction to access PIT register port 0x43 can control memcpy()
        in emulator_pio_in_emulated() to copy max 0x400 bytes but only read 1 bytes,
        which will disclose the unimportant kernel memory in host but no crash.
      
      The similar test program below can reproduce the read out-of-bounds vulnerability:
      
      void hexdump(void *mem, unsigned int len)
      {
              unsigned int i, j;
      
              for(i = 0; i < len + ((len % HEXDUMP_COLS) ? (HEXDUMP_COLS - len % HEXDUMP_COLS) : 0); i++)
              {
                      /* print offset */
                      if(i % HEXDUMP_COLS == 0)
                      {
                              printf("0x%06x: ", i);
                      }
      
                      /* print hex data */
                      if(i < len)
                      {
                              printf("%02x ", 0xFF & ((char*)mem)[i]);
                      }
                      else /* end of block, just aligning for ASCII dump */
                      {
                              printf("   ");
                      }
      
                      /* print ASCII dump */
                      if(i % HEXDUMP_COLS == (HEXDUMP_COLS - 1))
                      {
                              for(j = i - (HEXDUMP_COLS - 1); j <= i; j++)
                              {
                                      if(j >= len) /* end of block, not really printing */
                                      {
                                              putchar(' ');
                                      }
                                      else if(isprint(((char*)mem)[j])) /* printable char */
                                      {
                                              putchar(0xFF & ((char*)mem)[j]);
                                      }
                                      else /* other char */
                                      {
                                              putchar('.');
                                      }
                              }
                              putchar('\n');
                      }
              }
      }
      
      int main(void)
      {
      	int i;
      	if (iopl(3))
      	{
      		err(1, "set iopl unsuccessfully\n");
      		return -1;
      	}
      	static char buf[0x40];
      
      	/* test ioport 0x40,0x41,0x42,0x43,0x44,0x45 */
      
      	memset(buf, 0xab, sizeof(buf));
      
      	asm volatile("push %rdi;");
      	asm volatile("mov %0, %%rdi;"::"q"(buf));
      
      	asm volatile ("mov $0x40, %rdx;");
      	asm volatile ("in %dx,%al;");
      	asm volatile ("stosb;");
      
      	asm volatile ("mov $0x41, %rdx;");
      	asm volatile ("in %dx,%al;");
      	asm volatile ("stosb;");
      
      	asm volatile ("mov $0x42, %rdx;");
      	asm volatile ("in %dx,%al;");
      	asm volatile ("stosb;");
      
      	asm volatile ("mov $0x43, %rdx;");
      	asm volatile ("in %dx,%al;");
      	asm volatile ("stosb;");
      
      	asm volatile ("mov $0x44, %rdx;");
      	asm volatile ("in %dx,%al;");
      	asm volatile ("stosb;");
      
      	asm volatile ("mov $0x45, %rdx;");
      	asm volatile ("in %dx,%al;");
      	asm volatile ("stosb;");
      
      	asm volatile ("pop %rdi;");
      	hexdump(buf, 0x40);
      
      	printf("\n");
      
      	/* ins port 0x40 */
      
      	memset(buf, 0xab, sizeof(buf));
      
      	asm volatile("push %rdi;");
      	asm volatile("mov %0, %%rdi;"::"q"(buf));
      
      	asm volatile ("mov $0x20, %rcx;");
      	asm volatile ("mov $0x40, %rdx;");
      	asm volatile ("rep insb;");
      
      	asm volatile ("pop %rdi;");
      	hexdump(buf, 0x40);
      
      	printf("\n");
      
      	/* ins port 0x43 */
      
      	memset(buf, 0xab, sizeof(buf));
      
      	asm volatile("push %rdi;");
      	asm volatile("mov %0, %%rdi;"::"q"(buf));
      
      	asm volatile ("mov $0x20, %rcx;");
      	asm volatile ("mov $0x43, %rdx;");
      	asm volatile ("rep insb;");
      
      	asm volatile ("pop %rdi;");
      	hexdump(buf, 0x40);
      
      	printf("\n");
      	return 0;
      }
      
      The vcpu->arch.pio_data buffer is used by both in/out instrutions emulation
      w/o clear after using which results in some random datas are left over in
      the buffer. Guest reads port 0x43 will be ignored since it is write only,
      however, the function kernel_pio() can't distigush this ignore from successfully
      reads data from device's ioport. There is no new data fill the buffer from
      port 0x43, however, emulator_pio_in_emulated() will copy the stale data in
      the buffer to the guest unconditionally. This patch fixes it by clearing the
      buffer before in instruction emulation to avoid to grant guest the stale data
      in the buffer.
      
      In addition, string I/O is not supported for in kernel device. So there is no
      iteration to read ioport %RCX times for string I/O. The function kernel_pio()
      just reads one round, and then copy the io size * %RCX to the guest unconditionally,
      actually it copies the one round ioport data w/ other random datas which are left
      over in the vcpu->arch.pio_data buffer to the guest. This patch fixes it by
      introducing the string I/O support for in kernel device in order to grant the right
      ioport datas to the guest.
      
      Before the patch:
      
      0x000000: fe 38 93 93 ff ff ab ab .8......
      0x000008: ab ab ab ab ab ab ab ab ........
      0x000010: ab ab ab ab ab ab ab ab ........
      0x000018: ab ab ab ab ab ab ab ab ........
      0x000020: ab ab ab ab ab ab ab ab ........
      0x000028: ab ab ab ab ab ab ab ab ........
      0x000030: ab ab ab ab ab ab ab ab ........
      0x000038: ab ab ab ab ab ab ab ab ........
      
      0x000000: f6 00 00 00 00 00 00 00 ........
      0x000008: 00 00 00 00 00 00 00 00 ........
      0x000010: 00 00 00 00 4d 51 30 30 ....MQ00
      0x000018: 30 30 20 33 20 20 20 20 00 3
      0x000020: ab ab ab ab ab ab ab ab ........
      0x000028: ab ab ab ab ab ab ab ab ........
      0x000030: ab ab ab ab ab ab ab ab ........
      0x000038: ab ab ab ab ab ab ab ab ........
      
      0x000000: f6 00 00 00 00 00 00 00 ........
      0x000008: 00 00 00 00 00 00 00 00 ........
      0x000010: 00 00 00 00 4d 51 30 30 ....MQ00
      0x000018: 30 30 20 33 20 20 20 20 00 3
      0x000020: ab ab ab ab ab ab ab ab ........
      0x000028: ab ab ab ab ab ab ab ab ........
      0x000030: ab ab ab ab ab ab ab ab ........
      0x000038: ab ab ab ab ab ab ab ab ........
      
      After the patch:
      
      0x000000: 1e 02 f8 00 ff ff ab ab ........
      0x000008: ab ab ab ab ab ab ab ab ........
      0x000010: ab ab ab ab ab ab ab ab ........
      0x000018: ab ab ab ab ab ab ab ab ........
      0x000020: ab ab ab ab ab ab ab ab ........
      0x000028: ab ab ab ab ab ab ab ab ........
      0x000030: ab ab ab ab ab ab ab ab ........
      0x000038: ab ab ab ab ab ab ab ab ........
      
      0x000000: d2 e2 d2 df d2 db d2 d7 ........
      0x000008: d2 d3 d2 cf d2 cb d2 c7 ........
      0x000010: d2 c4 d2 c0 d2 bc d2 b8 ........
      0x000018: d2 b4 d2 b0 d2 ac d2 a8 ........
      0x000020: ab ab ab ab ab ab ab ab ........
      0x000028: ab ab ab ab ab ab ab ab ........
      0x000030: ab ab ab ab ab ab ab ab ........
      0x000038: ab ab ab ab ab ab ab ab ........
      
      0x000000: 00 00 00 00 00 00 00 00 ........
      0x000008: 00 00 00 00 00 00 00 00 ........
      0x000010: 00 00 00 00 00 00 00 00 ........
      0x000018: 00 00 00 00 00 00 00 00 ........
      0x000020: ab ab ab ab ab ab ab ab ........
      0x000028: ab ab ab ab ab ab ab ab ........
      0x000030: ab ab ab ab ab ab ab ab ........
      0x000038: ab ab ab ab ab ab ab ab ........
      Reported-by: default avatarMoguofang <moguofang@huawei.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Cc: Moguofang <moguofang@huawei.com>
      Signed-off-by: default avatarWanpeng Li <wanpeng.li@hotmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      cbfc6c91
    • Wanpeng Li's avatar
      KVM: x86: Fix potential preemption when get the current kvmclock timestamp · e2c2206a
      Wanpeng Li authored
       BUG: using __this_cpu_read() in preemptible [00000000] code: qemu-system-x86/2809
       caller is __this_cpu_preempt_check+0x13/0x20
       CPU: 2 PID: 2809 Comm: qemu-system-x86 Not tainted 4.11.0+ #13
       Call Trace:
        dump_stack+0x99/0xce
        check_preemption_disabled+0xf5/0x100
        __this_cpu_preempt_check+0x13/0x20
        get_kvmclock_ns+0x6f/0x110 [kvm]
        get_time_ref_counter+0x5d/0x80 [kvm]
        kvm_hv_process_stimers+0x2a1/0x8a0 [kvm]
        ? kvm_hv_process_stimers+0x2a1/0x8a0 [kvm]
        ? kvm_arch_vcpu_ioctl_run+0xac9/0x1ce0 [kvm]
        kvm_arch_vcpu_ioctl_run+0x5bf/0x1ce0 [kvm]
        kvm_vcpu_ioctl+0x384/0x7b0 [kvm]
        ? kvm_vcpu_ioctl+0x384/0x7b0 [kvm]
        ? __fget+0xf3/0x210
        do_vfs_ioctl+0xa4/0x700
        ? __fget+0x114/0x210
        SyS_ioctl+0x79/0x90
        entry_SYSCALL_64_fastpath+0x23/0xc2
       RIP: 0033:0x7f9d164ed357
        ? __this_cpu_preempt_check+0x13/0x20
      
      This can be reproduced by run kvm-unit-tests/hyperv_stimer.flat w/
      CONFIG_PREEMPT and CONFIG_DEBUG_PREEMPT enabled.
      
      Safe access to per-CPU data requires a couple of constraints, though: the
      thread working with the data cannot be preempted and it cannot be migrated
      while it manipulates per-CPU variables. If the thread is preempted, the
      thread that replaces it could try to work with the same variables; migration
      to another CPU could also cause confusion. However there is no preemption
      disable when reads host per-CPU tsc rate to calculate the current kvmclock
      timestamp.
      
      This patch fixes it by utilizing get_cpu/put_cpu pair to guarantee both
      __this_cpu_read() and rdtsc() are not preempted.
      
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Radim Krčmář <rkrcmar@redhat.com>
      Signed-off-by: default avatarWanpeng Li <wanpeng.li@hotmail.com>
      Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarRadim Krčmář <rkrcmar@redhat.com>
      e2c2206a
    • Ard Biesheuvel's avatar
      i2c: designware: don't infer timings described by ACPI from clock rate · 9d640843
      Ard Biesheuvel authored
      Commit bd698d24 ("i2c: designware: Get selected speed mode
      sda-hold-time via ACPI") updated the logic that reads the timing
      parameters for various I2C bus rates from the DSDT, to only read
      the timing parameters for the currently selected mode.
      
      This causes a WARN_ON() splat on platforms that legally omit the clock
      frequency from the ACPI description, because in the new situation, the
      core I2C designware driver still accesses the fields in the driver
      struct that we no longer populate, and proceeds to calculate them from
      the clock frequency. Since the clock frequency is unspecified, the
      driver complains loudly using a WARN_ON().
      
      So revert back to the old situation, where the struct fields for all
      timings are populated, but retain the new logic which chooses the SDA
      hold time from the timing mode that is currently in use.
      
      Fixes: bd698d24 ("i2c: designware: Get selected speed mode ...")
      Signed-off-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Reported-by: default avatarLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
      Acked-by: default avatarJarkko Nikula <jarkko.nikula@linux.intel.com>
      Signed-off-by: default avatarWolfram Sang <wsa@the-dreams.de>
      9d640843
    • Arnd Bergmann's avatar
      arm64: dts: rockchip: fix include reference · 6bf1c2d2
      Arnd Bergmann authored
      The way we handle include paths for DT has changed a bit, which
      broke a file that had an unconventional way to reference a common
      header file:
      
      arch/arm64/boot/dts/rockchip/rk3399-gru-kevin.dts:47:10: fatal error: include/dt-bindings/input/linux-event-codes.h: No such file or directory
      
      This removes the leading "include/" from the path name, which fixes it.
      
      Fixes: d5d332d3 ("devicetree: Move include prefixes from arch to separate directory")
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      6bf1c2d2
    • Eric Anholt's avatar
      watchdog: bcm281xx: Fix use of uninitialized spinlock. · fedf266f
      Eric Anholt authored
      The bcm_kona_wdt_set_resolution_reg() call takes the spinlock, so
      initialize it earlier.  Fixes a warning at boot with lock debugging
      enabled.
      
      Fixes: 6adb730d ("watchdog: bcm281xx: Watchdog Driver")
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      fedf266f
    • Wei Yongjun's avatar
      watchdog: zx2967: remove redundant dev_err call in zx2967_wdt_probe() · 07441a7d
      Wei Yongjun authored
      There is a error message within devm_ioremap_resource
      already, so remove the dev_err call to avoid redundant
      error message.
      Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      07441a7d
    • Paolo Bonzini's avatar
      iTCO_wdt: all versions count down twice · 1fccb730
      Paolo Bonzini authored
      The ICH9 is listed as having TCO v2, and indeed the behavior in the
      datasheet corresponds to v2 (for example the NO_REBOOT flag is
      accessible via the 16KiB-aligned Root Complex Base Address).
      
      However, the TCO counts twice just like in v1; the documentation
      of the SECOND_TO_STS bit says: "ICH9 sets this bit to 1 to indicate
      that the TIMEOUT bit had been (or is currently) set and a second
      timeout occurred before the TCO_RLD register was written. If this
      bit is set and the NO_REBOOT config bit is 0, then the ICH9 will
      reboot the system after the second timeout.  The same can be found
      in the BayTrail (Atom E3800) datasheet, and even HOWTOs around
      the Internet say that it will reboot after _twice_ the specified
      heartbeat.
      
      I did not find the Apollo Lake datasheet, but because v4/v5 has
      a SECOND_TO_STS bit just like the previous version I'm enabling
      this for Apollo Lake as well.
      
      Cc: linux-watchdog@vger.kernel.org
      Reviewed-by: default avatarAndy Shevchenko <andy.shevchenko@gmail.com>
      Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
      Reviewed-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Signed-off-by: default avatarWim Van Sebroeck <wim@iguana.be>
      1fccb730
    • Arnd Bergmann's avatar
      firmware: ti_sci: fix strncat length check · 76cefef8
      Arnd Bergmann authored
      gcc-7 notices that the length we pass to strncat is wrong:
      
      drivers/firmware/ti_sci.c: In function 'ti_sci_probe':
      drivers/firmware/ti_sci.c:204:32: error: specified bound 50 equals the size of the destination [-Werror=stringop-overflow=]
      
      Instead of the total length, we must pass the length of the
      remaining space here.
      
      Fixes: aa276781 ("firmware: Add basic support for TI System Control Interface (TI-SCI) protocol")
      Cc: stable@vger.kernel.org
      Acked-by: default avatarNishanth Menon <nm@ti.com>
      Acked-by: default avatarSantosh Shilimkar <ssantosh@kernel.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      76cefef8
    • Arnd Bergmann's avatar
      ARM: remove duplicate 'const' annotations' · 0527873b
      Arnd Bergmann authored
      gcc-7 warns about some declarations that are more 'const' than necessary:
      
      arch/arm/mach-at91/pm.c:338:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
       static const struct of_device_id const ramc_ids[] __initconst = {
      arch/arm/mach-bcm/bcm_kona_smc.c:36:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
       static const struct of_device_id const bcm_kona_smc_ids[] __initconst = {
      arch/arm/mach-spear/time.c:207:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
       static const struct of_device_id const timer_of_match[] __initconst = {
      arch/arm/mach-omap2/prm_common.c:714:34: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
       static const struct of_device_id const omap_prcm_dt_match_table[] __initconst = {
      arch/arm/mach-omap2/vc.c:562:35: error: duplicate 'const' declaration specifier [-Werror=duplicate-decl-specifier]
       static const struct i2c_init_data const omap4_i2c_timing_data[] __initconst = {
      
      The ones in arch/arm were apparently all introduced accidentally by one
      commit that correctly marked a lot of variables as __initconst.
      
      Fixes: 19c233b7 ("ARM: appropriate __init annotation for const data")
      Acked-by: default avatarAlexandre Belloni <alexandre.belloni@free-electrons.com>
      Acked-by: default avatarTony Lindgren <tony@atomide.com>
      Acked-by: default avatarNicolas Pitre <nico@linaro.org>
      Acked-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Acked-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
      Acked-by: default avatarKrzysztof Hałasa <khalasa@piap.pl>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      0527873b
    • Greg Kroah-Hartman's avatar
      Merge tag 'usb-serial-4.12-rc2' of... · b51e0cee
      Greg Kroah-Hartman authored
      Merge tag 'usb-serial-4.12-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus
      
      Johan writes:
      
      USB-serial fixes for v4.12-rc2
      
      Here's a fix for a long-standing issue in the ftdi_sio driver that
      prevented unprivileged users from updating the low-latency flag,
      something which became apparent after a recent change that restored the
      older setting of not using low-latency mode by default.
      
      A run of sparse revealed a couple of endianness issues that are now
      fixed, and addressed is also a user-triggerable division-by-zero in
      io_ti when debugging is enabled.
      
      Finally there are some new device ids, including a simplification of how
      we deal with a couple of older Olimex JTAG adapters.
      
      All have been in linux-next with no reported issues.
      Signed-off-by: default avatarJohan Hovold <johan@kernel.org>
      b51e0cee
    • Olof Johansson's avatar
      Merge tag 'omap-for-v4.12/fixes-v2-signed' of... · ec16187a
      Olof Johansson authored
      Merge tag 'omap-for-v4.12/fixes-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes
      
      Fixes for omaps for v4.12-rc cycle most consisting of few minor dts fixes
      for various devices. Also included is a memory controller (GPMC) debug output
      fix as without that the shown bootloader configured GPMC bus width will
      be wrong and won't work for kernel timings:
      
      - Add dra7 powerhold configuration to be able to shut down pmic correctly
      - Fix polarity for gta04 mcbsp4 clocks for modem
      - Fix Pandaboard CEC pin pull making it usable
      - Fix LogicPD Torpedo camera pin mux
      - Fix GPMC debug bus width
      - Reduce cpu thermal shutdown temperature
      
      * tag 'omap-for-v4.12/fixes-v2-signed' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
        ARM: dts: dra7: Reduce cpu thermal shutdown temperature
        memory: omap-gpmc: Fix debug output for access width
        ARM: dts: LogicPD Torpedo: Fix camera pin mux
        ARM: dts: omap4: enable CEC pin for Pandaboard A4 and ES
        ARM: dts: gta04: fix polarity of clocks for mcbsp4
        ARM: dts: dra7: Add power hold and power controller properties to palmas
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      ec16187a
    • Olof Johansson's avatar
      Merge tag 'imx-fixes-4.12' of... · 6a3538c1
      Olof Johansson authored
      Merge tag 'imx-fixes-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux into fixes
      
      i.MX fixes for 4.12:
       - A fix on GPCv2 power domain driver Kconfig which causes a build
         failure when CONFIG_PM is not set.
       - Pull down PMIC IRQ pin for imx53-qsrb board to prevent spurious
         PMIC interrupts from happening.
       - Remove board level OPP override for imx6sx-sdb to fix a boot crash
         seen on Rev.C boards.
      
      * tag 'imx-fixes-4.12' of git://git.kernel.org/pub/scm/linux/kernel/git/shawnguo/linux:
        soc: imx: add PM dependency for IMX7_PM_DOMAINS
        ARM: dts: imx6sx-sdb: Remove OPP override
        ARM: dts: imx53-qsrb: Pulldown PMIC IRQ pin
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      6a3538c1
    • Rob Herring's avatar
      arm64: defconfig: enable options needed for QCom DB410c board · f4e506c5
      Rob Herring authored
      Enable Qualcomm drivers needed to boot Dragonboard 410c with HDMI. This
      enables support for clocks, regulators, and USB PHY.
      
      Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
      Cc: John Stultz <john.stultz@linaro.org>
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      [Olof: Turned off _RPM configs per follow-up email]
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      f4e506c5
    • Rob Herring's avatar
      arm64: defconfig: sync with savedefconfig · eb1e6716
      Rob Herring authored
      Sync the defconfig with savedefconfig as config options change/move over
      time.
      
      Generated with the following commands:
      make defconfig
      make savedefconfig
      cp defconfig arch/arm64/configs/defconfig
      Signed-off-by: default avatarRob Herring <robh@kernel.org>
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      eb1e6716
    • Linus Walleij's avatar
      ARM: configs: add a gemini defconfig · 877dd4b1
      Linus Walleij authored
      It makes sense to have a stripped-down defconfig for just Gemini, as
      it is a pretty small platform used in NAS etc, and will use appended
      device tree. It is also quick to compile and test. Hopefully this
      defconfig can be a good base for distributions such as OpenWRT.
      
      I plan to add in the config options needed for the different
      variants of Gemini as we go along.
      
      Cc: Janos Laube <janos.dev@gmail.com>
      Cc: Paulius Zaleckas <paulius.zaleckas@gmail.com>
      Cc: Hans Ulli Kroll <ulli.kroll@googlemail.com>
      Cc: Florian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      877dd4b1
    • Olof Johansson's avatar
      Merge tag 'arm-soc/for-4.12/drivers-fixes' of http://github.com/Broadcom/stblinux into fixes · 3d2ba3fb
      Olof Johansson authored
      This pull request contains Broadcom SoC drivers fixes for 4.12, please
      pull the following:
      
      - Florian removes the duplicate compatible string matched by the
        SUN_TOP_CTRL driver and instead uses the correct one for 7435
      
      * tag 'arm-soc/for-4.12/drivers-fixes' of http://github.com/Broadcom/stblinux:
        soc: bcm: brcmstb: Correctly match 7435 SoC
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      3d2ba3fb
    • Olof Johansson's avatar
      Merge tag 'arm-soc/for-4.12/devicetree-fixes' of http://github.com/Broadcom/stblinux into fixes · 5cb1ac0f
      Olof Johansson authored
      This pull request contains Broadcom ARM-based SoC Device Tree fixes for
      4.12, please pull the following:
      
      - Baruch provides several fixes for the Raspberry Pi (BCM2835) Device
        Tree source include file: uart0 pinctrl node names, pin number for
        i2c0, uart0 rts/cts pins and invalid uart1 pin, missing numbers for
        ethernet aliases
      
      * tag 'arm-soc/for-4.12/devicetree-fixes' of http://github.com/Broadcom/stblinux:
        ARM: dts: bcm2835: add index to the ethernet alias
        ARM: dts: bcm2835: fix uart0/uart1 pins
        ARM: dts: bcm2835: fix i2c0 pins
        ARM: dts: bcm2835: fix uart0 pinctrl node names
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      5cb1ac0f
    • Olof Johansson's avatar
      devicetree: Move include prefixes from arch to separate directory · d5d332d3
      Olof Johansson authored
      We use a directory under arch/$ARCH/boot/dts as an include path
      that has links outside of the subtree to find dt-bindings from under
      include/dt-bindings. That's been working well, but new DT architectures
      haven't been adding them by default.
      
      Recently there's been a desire to share some of the DT material between
      arm and arm64, which originally caused developers to create symlinks or
      relative includes between the subtrees. This isn't ideal -- it breaks
      if the DT files aren't stored in the exact same hierarchy as the kernel
      tree, and generally it's just icky.
      
      As a somewhat cleaner solution we decided to add a $ARCH/ prefix link
      once, and allow DTS files to reference dtsi (and dts) files in other
      architectures that way.
      
      Original approach was to create these links under each architecture,
      but it lead to the problem of recursive symlinks.
      
      As a remedy, move the include link directories out of the architecture
      trees into a common location. At the same time, they can now share one
      directory and one dt-bindings/ link as well.
      
      Fixes: 4027494a ('ARM: dts: add arm/arm64 include symlinks')
      Reported-by: default avatarRussell King <linux@armlinux.org.uk>
      Reported-by: default avatarOmar Sandoval <osandov@osandov.com>
      Reviewed-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Reviewed-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
      Tested-by: default avatarHeiko Stuebner <heiko@sntech.de>
      Acked-by: default avatarRob Herring <robh@kernel.org>
      Cc: Heiko Stuebner <heiko@sntech.de>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Russell King <linux@armlinux.org.uk>
      Cc: Catalin Marinas <catalin.marinas@arm.com>
      Cc: Will Deacon <will.deacon@arm.com>
      Cc: Mikael Starvik <starvik@axis.com>
      Cc: Jesper Nilsson <jesper.nilsson@axis.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Paul Mackerras <paulus@samba.org>
      Cc: Michael Ellerman <mpe@ellerman.id.au>
      Cc: Frank Rowand <frowand.list@gmail.com>
      Cc: linux-arch <linux-arch@vger.kernel.org>
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      d5d332d3
    • Olof Johansson's avatar
      Merge tag 'v4.12-rc1' into fixes · 5252d737
      Olof Johansson authored
      We've received a few fixes branches with -rc1 as base, but our contents was
      still at pre-rc1. Merge it in expliticly to make 'git merge --log' clear on
      hat was actually merged.
      Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
      5252d737
    • Juergen Gross's avatar
      xen: make xen_flush_tlb_all() static · c71e6d80
      Juergen Gross authored
      xen_flush_tlb_all() is used in arch/x86/xen/mmu.c only. Make it static.
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      Reviewed-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      c71e6d80
    • Juergen Gross's avatar
      xen: cleanup pvh leftovers from pv-only sources · 989513a7
      Juergen Gross authored
      There are some leftovers testing for pvh guest mode in pv-only source
      files. Remove them.
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      Reviewed-by: default avatarBoris Ostrovsky <boris.ostrovsky@oracle.com>
      Signed-off-by: default avatarJuergen Gross <jgross@suse.com>
      989513a7