1. 05 Nov, 2016 11 commits
  2. 04 Nov, 2016 15 commits
    • Linus Torvalds's avatar
      Merge tag 'drm-fixes-for-v4.9-rc4' of git://people.freedesktop.org/~airlied/linux · d4c5f43d
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Fixes for amdgpu, radeon, intel, imx and virtio-gpu.
      
        This is a bit larger than I'd like, but I had some stuff I meant to
        send for -rc3 but was waiting for the PAT regression fix to land. So
        this is really fixes for rc3 and rc4 in one go.
      
        There are a set of fixes for an oops we've been seeing around MST
        display unplug, along with more suspend/resume and shutdown fixes for
        amdgpu, one power management follow on fix for nouveau, and set of imx
        fixes, and a single virtio-gpu regression fix"
      
      * tag 'drm-fixes-for-v4.9-rc4' of git://people.freedesktop.org/~airlied/linux: (54 commits)
        virtio-gpu: fix vblank events
        drm/nouveau/acpi: fix check for power resources support
        drm/i915: Fix SKL+ 90/270 degree rotated plane coordinate computation
        drm/i915: Remove two invalid warns
        drm/i915: Rotated view does not need a fence
        drm/i915/fbc: fix CFB size calculation for gen8+
        drm: i915: Wait for fences on new fb, not old
        drm/i915: Clean up DDI DDC/AUX CH sanitation
        drm/i915: Respect alternate_aux_channel for all DDI ports
        drm/i915/gen9: fix watermarks when using the pipe scaler
        drm/i915: Fix mismatched INIT power domain disabling during suspend
        drm/i915: fix a read size argument
        drm/i915: Use fence_write() from rpm resume
        drm/i915/gen9: fix DDB partitioning for multi-screen cases
        drm/i915: workaround sparse warning on variable length arrays
        drm/i915: keep declarations in i915_drv.h
        drm/amd/powerplay: fix bug get wrong evv voltage of Polaris.
        drm/amdgpu/si_dpm: workaround for SI kickers
        drm/radeon/si_dpm: workaround for SI kickers
        drm/amdgpu: fix s3 resume back, uvd dpm randomly can't disable.
        ...
      d4c5f43d
    • Niklas Cassel's avatar
      PCI: designware: Check for iATU unroll support after initializing host · 416379f9
      Niklas Cassel authored
      dw_pcie_iatu_unroll_enabled() reads a dbi_base register.  Reading any
      dbi_base register before pp->ops->host_init has been called causes
      "imprecise external abort" on platforms like ARTPEC-6, where the PCIe
      module is disabled at boot and first enabled in pp->ops->host_init.  Move
      dw_pcie_iatu_unroll_enabled() to dw_pcie_setup_rc(), since it is after
      pp->ops->host_init, but before pp->iatu_unroll_enabled is actually used.
      
      Fixes: a0601a47 ("PCI: designware: Add iATU Unroll feature")
      Tested-by: default avatarJames Le Cuirot <chewi@gentoo.org>
      Signed-off-by: default avatarNiklas Cassel <niklas.cassel@axis.com>
      Signed-off-by: default avatarBjorn Helgaas <bhelgaas@google.com>
      Acked-by: default avatarJoao Pinto <jpinto@synopsys.com>
      Acked-by: default avatarOlof Johansson <olof@lixom.net>
      416379f9
    • Linus Torvalds's avatar
      Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm · 66cecb67
      Linus Torvalds authored
      Pull KVM updates from Paolo Bonzini:
       "One NULL pointer dereference, and two fixes for regressions introduced
        during the merge window.
      
        The rest are fixes for MIPS, s390 and nested VMX"
      
      * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
        kvm: x86: Check memopp before dereference (CVE-2016-8630)
        kvm: nVMX: VMCLEAR an active shadow VMCS after last use
        KVM: x86: drop TSC offsetting kvm_x86_ops to fix KVM_GET/SET_CLOCK
        KVM: x86: fix wbinvd_dirty_mask use-after-free
        kvm/x86: Show WRMSR data is in hex
        kvm: nVMX: Fix kernel panics induced by illegal INVEPT/INVVPID types
        KVM: document lock orders
        KVM: fix OOPS on flush_work
        KVM: s390: Fix STHYI buffer alignment for diag224
        KVM: MIPS: Precalculate MMIO load resume PC
        KVM: MIPS: Make ERET handle ERL before EXL
        KVM: MIPS: Fix lazy user ASID regenerate for SMP
      66cecb67
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 34c510b2
      Linus Torvalds authored
      Pull MIPS fixes from Ralf Baechle:
       "A set of MIPS fixes for 4.9:
      
         - lots of fixes for printk continuations
         - six fixes for FP related code.
         - fix max_low_pfn with disabled highmem
         - fix KASLR handling of NULL FDT and KASLR for generic kernels
         - fix build of compressed image
         - provide default mips_cpc_default_phys_base to ignore CPC
         - fix reboot on Malta"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: Fix max_low_pfn with disabled highmem
        MIPS: Correct MIPS I FP sigcontext layout
        MIPS: Fix ISA I/II FP signal context offsets
        MIPS: Remove FIR from ISA I FP signal context
        MIPS: Fix ISA I FP sigcontext access violation handling
        MIPS: Fix FCSR Cause bit handling for correct SIGFPE issue
        MIPS: ptrace: Also initialize the FP context on individual FCSR writes
        MIPS: dump_tlb: Fix printk continuations
        MIPS: Fix __show_regs() output
        MIPS: traps: Fix output of show_code
        MIPS: traps: Fix output of show_stacktrace
        MIPS: traps: Fix output of show_backtrace
        MIPS: Fix build of compressed image
        MIPS: generic: Fix KASLR for generic kernel.
        MIPS: KASLR: Fix handling of NULL FDT
        MIPS: Malta: Fixup reboot
        MIPS: CPC: Provide default mips_cpc_default_phys_base to ignore CPC
      34c510b2
    • Linus Torvalds's avatar
      Merge branch 'parisc-4.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux · f7df76e6
      Linus Torvalds authored
      Pull parisc updates from Helge Deller:
       "The first three patches are trivial and add some required KERN_CONT,
        ignore the new pkey syscalls on parisc and use the LINUX_GATEWAY_ADDR
        define instead of hardcoded values.
      
        The two patches from Dave Anglin are important.
      
        The first one avoids trashing the sr2 and sr3 space registers in the
        Light-weight syscall path. Especially the usage of sr3 is critical
        since it may get trashed by the interrupt handler.
      
        The second patch is even more important and tagged for stable series.
        It protects one critical section in the syscall entry path by
        disabling local interrupts. Without disabling interrupts, the sr7
        space register may not be in sync with the current stack setup and
        thus an incoming hardware interrupt may destroy memory in random
        userspace areas"
      
      * 'parisc-4.9-3' of git://git.kernel.org/pub/scm/linux/kernel/git/deller/parisc-linux:
        parisc: Ignore the pkey system calls for now
        parisc: Use LINUX_GATEWAY_ADDR define instead of hardcoded value
        parisc: Ensure consistent state when switching to kernel stack at syscall entry
        parisc: Avoid trashing sr2 and sr3 in LWS code
        parisc: use KERN_CONT when printing device inventory
      f7df76e6
    • James Hogan's avatar
      MIPS: Fix max_low_pfn with disabled highmem · 16a767ec
      James Hogan authored
      When low memory doesn't reach HIGHMEM_START (e.g. up to 256MB at PA=0 is
      common) and highmem is present above HIGHMEM_START (e.g. on Malta the
      RAM overlayed by the IO region is aliased at PA=0x90000000), max_low_pfn
      will be initially calculated very large and then clipped down to
      HIGHMEM_START.
      
      This causes crashes when reading /sys/kernel/mm/page_idle/bitmap
      (i.e. CONFIG_IDLE_PAGE_TRACKING=y) when highmem is disabled. pfn_valid()
      will compare against max_mapnr which is derived from max_low_pfn when
      there is no highend_pfn set up, and will return true for PFNs right up
      to HIGHMEM_START, even though they are beyond the end of low memory and
      no page structs will actually exist for these PFNs.
      
      This is fixed by skipping high memory regions when initially calculating
      max_low_pfn if highmem is disabled, so it doesn't get clipped too high.
      We also clip regions which overlap the highmem boundary when highmem is
      disabled, so that max_pfn doesn't extend into highmem either.
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/14490/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      16a767ec
    • Maciej W. Rozycki's avatar
      MIPS: Correct MIPS I FP sigcontext layout · f92722dc
      Maciej W. Rozycki authored
      Complement commit 80cbfad7 ("MIPS: Correct MIPS I FP context
      layout") and correct the way Floating Point General registers are stored
      in a signal context with MIPS I hardware.
      
      Use the S.D and L.D assembly macros to have pairs of SWC1 instructions
      and pairs of LWC1 instructions produced, respectively, in an arrangement
      which makes the memory representation of floating-point data passed
      compatible with that used by hardware SDC1 and LDC1 instructions, where
      available, regardless of the hardware endianness used.  This matches the
      layout used by r4k_fpu.S, ensuring run-time compatibility for MIPS I
      software across all o32 hardware platforms.
      
      Define an EX2 macro to handle exceptions from both hardware instructions
      implicitly produced from S.D and L.D assembly macros.
      Signed-off-by: default avatarMaciej W. Rozycki <macro@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14477/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      f92722dc
    • Maciej W. Rozycki's avatar
      MIPS: Fix ISA I/II FP signal context offsets · 758ef0a9
      Maciej W. Rozycki authored
      Fix a regression introduced with commit 2db9ca0a ("MIPS: Use struct
      mips_abi offsets to save FP context") for MIPS I/I FP signal contexts,
      by converting save/restore code to the updated internal API.  Start FGR
      offsets from 0 rather than SC_FPREGS from $a0 and use $a1 rather than
      the offset of SC_FPC_CSR from $a0 for the Floating Point Control/Status
      Register (FCSR).
      
      Document the new internal API and adjust assembly code formatting for
      consistency.
      Signed-off-by: default avatarMaciej W. Rozycki <macro@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14476/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      758ef0a9
    • Maciej W. Rozycki's avatar
      MIPS: Remove FIR from ISA I FP signal context · 6daaa326
      Maciej W. Rozycki authored
      Complement commit e50c0a8f ("Support the MIPS32 / MIPS64 DSP ASE.")
      and remove the Floating Point Implementation Register (FIR) from the FP
      register set recorded in a signal context with MIPS I processors too, in
      line with the change applied to r4k_fpu.S.
      
      The `sc_fpc_eir' slot is unused according to our current ABI and the FIR
      register is read-only and always directly accessible from user software.
      
      [ralf@linux-mips.org: This is also required because the next commit depends
      on it.]
      Signed-off-by: default avatarMaciej W. Rozycki <macro@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14475/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      6daaa326
    • Maciej W. Rozycki's avatar
      MIPS: Fix ISA I FP sigcontext access violation handling · 35938a00
      Maciej W. Rozycki authored
      Complement commit 0ae8dceaebe3 ("Merge with 2.3.10.") and use the local
      `fault' handler to recover from FP sigcontext access violation faults,
      like corresponding code does in r4k_fpu.S.  The `bad_stack' handler is
      in syscall.c and is not suitable here as we want to propagate the error
      condition up through the caller rather than killing the thread outright.
      Signed-off-by: default avatarMaciej W. Rozycki <macro@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14474/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      35938a00
    • Maciej W. Rozycki's avatar
      MIPS: Fix FCSR Cause bit handling for correct SIGFPE issue · 5a1aca44
      Maciej W. Rozycki authored
      Sanitize FCSR Cause bit handling, following a trail of past attempts:
      
      * commit 42495484 ("MIPS: ptrace: Fix FP context restoration FCSR
      regression"),
      
      * commit 443c4403 ("MIPS: Always clear FCSR cause bits after
      emulation"),
      
      * commit 64bedffe ("MIPS: Clear [MSA]FPE CSR.Cause after
      notify_die()"),
      
      * commit b1442d39 ("MIPS: Prevent user from setting FCSR cause
      bits"),
      
      * commit b54d2901517d ("Properly handle branch delay slots in connection
      with signals.").
      
      Specifically do not mask these bits out in ptrace(2) processing and send
      a SIGFPE signal instead whenever a matching pair of an FCSR Cause and
      Enable bit is seen as execution of an affected context is about to
      resume.  Only then clear Cause bits, and even then do not clear any bits
      that are set but masked with the respective Enable bits.  Adjust Cause
      bit clearing throughout code likewise, except within the FPU emulator
      proper where they are set according to IEEE 754 exceptions raised as the
      operation emulated executed.  Do so so that any IEEE 754 exceptions
      subject to their default handling are recorded like with operations
      executed by FPU hardware.
      Signed-off-by: default avatarMaciej W. Rozycki <macro@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14460/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      5a1aca44
    • Maciej W. Rozycki's avatar
      MIPS: ptrace: Also initialize the FP context on individual FCSR writes · c9e56039
      Maciej W. Rozycki authored
      Complement commit ac9ad83b ("MIPS: prevent FP context set via ptrace
      being discarded") and also initialize the FP context whenever FCSR alone
      is written with a PTRACE_POKEUSR request addressing FPC_CSR, rather than
      along with the full FPU register set in the case of the PTRACE_SETFPREGS
      request.
      Signed-off-by: default avatarMaciej W. Rozycki <macro@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14459/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      c9e56039
    • James Hogan's avatar
      MIPS: dump_tlb: Fix printk continuations · 8a98495c
      James Hogan authored
      Since commit 4bcc595c ("printk: reinstate KERN_CONT for printing
      continuation lines") the output from TLB dumps on MIPS has been
      pretty unreadable due to the lack of KERN_CONT markers. Use pr_cont to
      provide the appropriate markers & restore the expected output.
      
      Continuation is also used for the second line of each TLB entry printed
      in dump_tlb.c even though it has a newline, since it is a continuation
      of the interpretation of the same TLB entry. For example:
      
      [   46.371884] Index:  0 pgmask=16kb va=77654000 asid=73 gid=00
              [ri=0 xi=0 pa=ffc18000 c=5 d=0 v=1 g=0] [ri=0 xi=0 pa=ffc1c000 c=5 d=0 v=1 g=0]
      [   46.385380] Index: 12 pgmask=16kb va=004b4000 asid=73 gid=00
              [ri=0 xi=0 pa=00000000 c=0 d=0 v=0 g=0] [ri=0 xi=0 pa=ffb00000 c=5 d=1 v=1 g=0]
      Signed-off-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Cc: Maciej W. Rozycki <macro@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/14444/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      8a98495c
    • Paul Burton's avatar
      MIPS: Fix __show_regs() output · 752f5499
      Paul Burton authored
      Since commit 4bcc595c ("printk: reinstate KERN_CONT for printing
      continuation lines") the output from __show_regs() on MIPS has been
      pretty unreadable due to the lack of KERN_CONT markers. Use pr_cont to
      provide the appropriate markers & restore the expected register output.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Signed-off-by: default avatarMatt Redfearn <matt.redfearn@imgtec.com>
      Cc: Maciej W. Rozycki <macro@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14432/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      752f5499
    • Matt Redfearn's avatar
      MIPS: traps: Fix output of show_code · 41000c58
      Matt Redfearn authored
      Since commit 4bcc595c ("printk: reinstate KERN_CONT for printing
      continuation lines") the output from show_code on MIPS has been
      pretty unreadable due to the lack of KERN_CONT markers. Use pr_cont to
      provide the appropriate markers & restore the expected output.
      Signed-off-by: default avatarMatt Redfearn <matt.redfearn@imgtec.com>
      Cc: Maciej W. Rozycki <macro@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14431/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      41000c58
  3. 03 Nov, 2016 12 commits
    • Matt Redfearn's avatar
      MIPS: traps: Fix output of show_stacktrace · fe4e09e7
      Matt Redfearn authored
      Since commit 4bcc595c ("printk: reinstate KERN_CONT for printing
      continuation lines") the output from show_stacktrace on MIPS has been
      pretty unreadable due to the lack of KERN_CONT markers. Use pr_cont to
      provide the appropriate markers & restore the expected output. Also
      start a new line with printk such that the presence of timing
      information does not interfere with output.
      Signed-off-by: default avatarMatt Redfearn <matt.redfearn@imgtec.com>
      Cc: Maciej W. Rozycki <macro@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14430/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      fe4e09e7
    • Matt Redfearn's avatar
      MIPS: traps: Fix output of show_backtrace · bcf084de
      Matt Redfearn authored
      Since commit 4bcc595c ("printk: reinstate KERN_CONT for printing
      continuation lines") the output from show_backtrace on MIPS has been
      pretty unreadable due to the lack of KERN_CONT markers. Use pr_cont to
      provide the appropriate markers & restore the expected output.
      Signed-off-by: default avatarMatt Redfearn <matt.redfearn@imgtec.com>
      Cc: Maciej W. Rozycki <macro@imgtec.com>
      Cc: James Hogan <james.hogan@imgtec.com>
      Cc: Paul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14429/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      bcf084de
    • Matt Redfearn's avatar
      MIPS: Fix build of compressed image · 818f38c5
      Matt Redfearn authored
      Changes introduced to arch/mips/Makefile for the generic kernel resulted
      in build errors when making a compressed image if platform-y has multiple
      values, like this:
      
      make[2]: *** No rule to make target `alchemy/'.
      make[1]: *** [vmlinuz] Error 2
      make[1]: Target `_all' not remade because of errors.
      make: *** [sub-make] Error 2
      make: Target `_all' not remade because of errors.
      
      Fix this by quoting $(platform-y) as it is passed to the Makefile in
      arch/mips/boot/compressed/Makefile
      Reported-by: default avatarkernelci.org bot <bot@kernelci.org>
      Link: https://storage.kernelci.org/next/next-20161017/mips-gpr_defconfig/build.logSigned-off-by: default avatarMatt Redfearn <matt.redfearn@imgtec.com>
      Reviewed-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14405/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      818f38c5
    • Matt Redfearn's avatar
      MIPS: generic: Fix KASLR for generic kernel. · 9a59061c
      Matt Redfearn authored
      The KASLR code requires that the plat_get_fdt() function return the
      address of the device tree, and it must be available early in the boot,
      before prom_init() is called. Move the code determining the address of
      the device tree into plat_get_fdt, and call that from prom_init().
      
      The fdt pointer will be set up by plat_get_fdt() called from
      relocate_kernel initially and once the relocated kernel has started,
      prom_init() will use it again to determine the address in the relocated
      image.
      
      Fixes: eed0eabd ("MIPS: generic: Introduce generic DT-based board support")
      Signed-off-by: default avatarMatt Redfearn <matt.redfearn@imgtec.com>
      Reviewed-by: default avatarJames Hogan <james.hogan@imgtec.com>
      Reviewed-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14415/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      9a59061c
    • Matt Redfearn's avatar
      MIPS: KASLR: Fix handling of NULL FDT · 47366979
      Matt Redfearn authored
      If platform code returns a NULL pointer to the FDT, initial_boot_params
      will not get set to a valid pointer and attempting to find the /chosen
      node in it will cause a NULL pointer dereference and the kernel to crash
      immediately on startup - with no output to the console.
      
      Fix this by checking that initial_boot_params is valid before using it.
      
      Fixes: 405bc8fd ("MIPS: Kernel: Implement KASLR using CONFIG_RELOCATABLE")
      Cc: stable@vger.kernel.org # 4.7+
      Signed-off-by: default avatarMatt Redfearn <matt.redfearn@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: linux-kernel@vger.kernel.org
      Patchwork: https://patchwork.linux-mips.org/patch/14414/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      47366979
    • Paul Burton's avatar
      MIPS: Malta: Fixup reboot · 93032e31
      Paul Burton authored
      Commit 10b6ea09 ("MIPS: Malta: Use syscon-reboot driver to reboot")
      converted the Malta board to use the generic syscon-reboot driver to
      handle reboots, but incorrectly used the value 0x4d rather than 0x42 as
      the magic to write to the reboot register.
      
      I also incorrectly believed that syscon/regmap would default to native
      endianness, but this isn't the case. Force this by specifying with a
      native-endian property in the devicetree.
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Fixes: 10b6ea09 ("MIPS: Malta: Use syscon-reboot driver to reboot")
      Reported-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Cc: linux-mips@linux-mips.org
      Tested-by: default avatarGuenter Roeck <linux@roeck-us.net>
      Tested-by: default avatarMaciej W. Rozycki <macro@imgtec.com>
      Patchwork: https://patchwork.linux-mips.org/patch/14396/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      93032e31
    • Paul Burton's avatar
      MIPS: CPC: Provide default mips_cpc_default_phys_base to ignore CPC · 682c1e52
      Paul Burton authored
      Provide a default implementation of mips_cpc_default_phys_base() which
      simply returns 0, and adjust mips_cpc_phys_base() to allow for
      mips_cpc_default_phys_base() returning 0. This allows kernels which
      include CPC support to be built without platform code & simply ignore
      the CPC if it wasn't already enabled by the bootloader.
      
      This fixes link failures such as the following from generic defconfigs:
      
         arch/mips/built-in.o: In function `mips_cpc_phys_base':
         arch/mips/kernel/mips-cpc.c:47: undefined reference to `mips_cpc_default_phys_base'
      
      [ralf@linux-mips.org: changed prototype for coding style compliance.]
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Reported-by: default avatarkbuild test robot <fengguang.wu@intel.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/14401/Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      682c1e52
    • Stefan Richter's avatar
      firewire: net: fix fragmented datagram_size off-by-one · e9300a4b
      Stefan Richter authored
      RFC 2734 defines the datagram_size field in fragment encapsulation
      headers thus:
      
          datagram_size:  The encoded size of the entire IP datagram.  The
          value of datagram_size [...] SHALL be one less than the value of
          Total Length in the datagram's IP header (see STD 5, RFC 791).
      
      Accordingly, the eth1394 driver of Linux 2.6.36 and older set and got
      this field with a -/+1 offset:
      
          ether1394_tx() /* transmit */
              ether1394_encapsulate_prep()
                  hdr->ff.dg_size = dg_size - 1;
      
          ether1394_data_handler() /* receive */
              if (hdr->common.lf == ETH1394_HDR_LF_FF)
                  dg_size = hdr->ff.dg_size + 1;
              else
                  dg_size = hdr->sf.dg_size + 1;
      
      Likewise, I observe OS X 10.4 and Windows XP Pro SP3 to transmit 1500
      byte sized datagrams in fragments with datagram_size=1499 if link
      fragmentation is required.
      
      Only firewire-net sets and gets datagram_size without this offset.  The
      result is lacking interoperability of firewire-net with OS X, Windows
      XP, and presumably Linux' eth1394.  (I did not test with the latter.)
      For example, FTP data transfers to a Linux firewire-net box with max_rec
      smaller than the 1500 bytes MTU
        - from OS X fail entirely,
        - from Win XP start out with a bunch of fragmented datagrams which
          time out, then continue with unfragmented datagrams because Win XP
          temporarily reduces the MTU to 576 bytes.
      
      So let's fix firewire-net's datagram_size accessors.
      
      Note that firewire-net thereby loses interoperability with unpatched
      firewire-net, but only if link fragmentation is employed.  (This happens
      with large broadcast datagrams, and with large datagrams on several
      FireWire CardBus cards with smaller max_rec than equivalent PCI cards,
      and it can be worked around by setting a small enough MTU.)
      
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      e9300a4b
    • Stefan Richter's avatar
      firewire: net: guard against rx buffer overflows · 667121ac
      Stefan Richter authored
      The IP-over-1394 driver firewire-net lacked input validation when
      handling incoming fragmented datagrams.  A maliciously formed fragment
      with a respectively large datagram_offset would cause a memcpy past the
      datagram buffer.
      
      So, drop any packets carrying a fragment with offset + length larger
      than datagram_size.
      
      In addition, ensure that
        - GASP header, unfragmented encapsulation header, or fragment
          encapsulation header actually exists before we access it,
        - the encapsulated datagram or fragment is of nonzero size.
      Reported-by: default avatarEyal Itkin <eyal.itkin@gmail.com>
      Reviewed-by: default avatarEyal Itkin <eyal.itkin@gmail.com>
      Fixes: CVE 2016-8633
      Cc: stable@vger.kernel.org
      Signed-off-by: default avatarStefan Richter <stefanr@s5r6.in-berlin.de>
      667121ac
    • Dave Airlie's avatar
      Merge tag 'drm-intel-fixes-2016-11-01' of git://anongit.freedesktop.org/drm-intel into drm-fixes · 7ec30fca
      Dave Airlie authored
      batch of scattered i915 fixes.
      
      * tag 'drm-intel-fixes-2016-11-01' of git://anongit.freedesktop.org/drm-intel:
        drm/i915: Fix SKL+ 90/270 degree rotated plane coordinate computation
        drm/i915: Remove two invalid warns
        drm/i915: Rotated view does not need a fence
        drm/i915/fbc: fix CFB size calculation for gen8+
        drm: i915: Wait for fences on new fb, not old
        drm/i915: Clean up DDI DDC/AUX CH sanitation
        drm/i915: Respect alternate_aux_channel for all DDI ports
        drm/i915/gen9: fix watermarks when using the pipe scaler
        drm/i915: Fix mismatched INIT power domain disabling during suspend
        drm/i915: fix a read size argument
        drm/i915: Use fence_write() from rpm resume
        drm/i915/gen9: fix DDB partitioning for multi-screen cases
        drm/i915: workaround sparse warning on variable length arrays
        drm/i915: keep declarations in i915_drv.h
      7ec30fca
    • Dave Airlie's avatar
      Merge tag 'imx-drm-fixes-20161021' of git://git.pengutronix.de/pza/linux into drm-fixes · e676717a
      Dave Airlie authored
      imx-drm plane, build warning, and error handling fixes
      
      - some fixes for active plane reconfiguration support
      - hide unused label in case of disabled CONFIG_DRM_FBDEV_EMULATION,
        which caused a build warning
      - fixed error handling in imx_drm_bind
      - disallow odd x/y plane offsets for chroma subsampled formats
      - disable local alpha when switching from a format with alpha
        channel to an opaque format
      
      * tag 'imx-drm-fixes-20161021' of git://git.pengutronix.de/pza/linux:
        drm/imx: ipuv3-plane: disable local alpha for planes without alpha channel
        drm/imx: ipuv3-plane: make sure x/y offsets are even in case of chroma subsampling
        drm/imx: ipuv3-plane: Access old u/vbo properly in ->atomic_check for YU12/YV12
        drm/imx: drm_dev_alloc() returns error pointers
        drm/imx: ipuv3-plane: Skip setting u/vbo only when we don't need modeset
        drm/imx: ipuv3-plane: Switch EBA buffer only when we don't need modeset
        gpu: ipu-v3: Use ERR_CAST instead of ERR_PTR(PTR_ERR())
        drm/imx: hide an unused label
      e676717a
    • Gerd Hoffmann's avatar
      virtio-gpu: fix vblank events · eed6f0ed
      Gerd Hoffmann authored
      virtio-gpu sends vblank events in virtio_gpu_crtc_atomic_flush, and
      because of that it must be called for disabled planes too.  Ask
      drm_atomic_helper_commit_planes to do that.
      
      v2: update to use new drm_atomic_helper_commit_planes() API.
      Signed-off-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Signed-off-by: default avatarGustavo Padovan <gustavo.padovan@collabora.co.uk>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      eed6f0ed
  4. 02 Nov, 2016 2 commits