Skip to content
  1. Oct 08, 2015
  2. Oct 06, 2015
    • Tyler Baker's avatar
      arm64: dts: add all hi6220 uart nodes · a362ec8f
      Tyler Baker authored
      This patch adds all UART nodes for the Hi6220 SoC. Recently a board[1] has
      been developed to standardize UART access across all the 96boards consumer
      edition boards. To use this hardware on HiKey we must configure and enable
      UART3. However, to ensure backward compatibility we must keep UART0 enabled
      as well.
      
      I have removed the hard coded clock index values in favor of using the ones
      already defined in include/dt-bindings/clock/hi6220-clock.h.
      
      Since UART0 needs to be soldered, it has been suggested to use the UART3 as
      the default console.
      
      This patch was boot tested on top of next-20150930, with both UART
      configurations.
      
      [1] http://www.seeedstudio.com/depot/96Boards-UART-p-2525.html?ref=newInBazaar
      
      
      
      Signed-off-by: default avatarTyler Baker <tyler.baker@linaro.org>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      a362ec8f
    • Arnd Bergmann's avatar
      Merge tag 'socfpga_dts_for_v4.4' of... · 90656b84
      Arnd Bergmann authored
      Merge tag 'socfpga_dts_for_v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux into next/dt
      
      Merge "SoCFPGA DTS updates for v4.4" from Dinh Nguyen:
      - Add base arm64 dts for Statrix 10
      - Peripheral updates for Arria10(USB,I2C,UART)
      
      * tag 'socfpga_dts_for_v4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux:
        arm64: dts: Add base stratix 10 dtsi
        ARM: socfpga: dts: enable USB and I2C on Arria10 SoCDK
        ARM: socfpga: dts: add clock fields for I2C, UART and USB on Arria10
      90656b84
    • Arnd Bergmann's avatar
      Merge tag 'xgene-dts-for-v4.4-1' of https://github.com/AppliedMicro/xgene-next into next/dt · b8faca6a
      Arnd Bergmann authored
      Merge "X-Gene DTS changes queued for v4.4" from Duc Dang:
      
      * tag 'xgene-dts-for-v4.4-1' of https://github.com/AppliedMicro/xgene-next:
        arm64: dts: Add poweroff device nodes for APM X-Gene 2 platform
        arm64: dts: Add APM X-Gene 2 standby GPIO controller DTS entries
        arm64: dts: Add PMU node for APM X-Gene Storm SOC
        Documentation: arm: pmu: Add Potenza PMU binding
        arm64: dts: Add X-Gene v2 reboot driver dts node
        arm64: dts: add APM Merlin Board device tree
        power: reset: Add syscon poweroff device node for APM X-Gene platform
        arm64: dts: Add X-Gene reboot driver dts node
        Documentation: arm64: add SCU dts binding documentation to linux kernel
        MAINTAINERS: Add Applied Micro (APM) X-Gene Device Tree maintainer
      b8faca6a
    • Arnd Bergmann's avatar
      Merge tag 'at91-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91 into next/dt · d1176d17
      Arnd Bergmann authored
      Merge "First batch of DT changes for 4.4:" from Nicolas Ferre:
      
      - some DT fixes: dma declaration, led labels
      - disable some nodes: PMIC on sama5d3 Xplained, unused i2c1 on at91sam9n12ek
      - add some others that were missing: touchscreen, cryto nodes, LCD panels or
        image capture properties on various boards
      - as the new pinmux for sama5d2 was accepted, we can now add the definitions
        and the actual muxing for sama5d2 Xplained board
      
      * tag 'at91-dt' of git://git.kernel.org/pub/scm/linux/kernel/git/nferre/linux-at91:
        ARM: at91/dt: sama5d2 Xplained: add device pin muxing
        ARM: at91/dt: add sama5d2 pinmux
        ARM: at91/dt: ov2640: add hsync/vsync-active property
        ARM: at91/dt: sama5d4 xplained: enable the led D8
        ARM: at91/dt: sama5d4ek: Add support of QT1070 and Maxtouch
        ARM: at91/dt: sama5d4: enable crypto nodes
        ARM: at91/dt: sama5d4: add pioD pin mux mask and enable pioD
        ARM: at91/dt: sama5d3: update iio config for touchscreen
        ARM: at91/dt: sama5d3 xplained: disable pmic
        ARM: at91/dt: at91sam9x5: enable iio touchscreen for 9x5ek
        ARM: at91/dt: at91sam9n12ek: disable i2c1
        ARM: at91/dt: at91sam9n12ek: fix the led labels name
        ARM: at91/dt: corrections to i2c1 declaration to sama5d4
      d1176d17
    • Arnd Bergmann's avatar
      Merge tag 'sti-dt-for-v4.4-1' of... · 3cb06b30
      Arnd Bergmann authored
      Merge tag 'sti-dt-for-v4.4-1' of https://git.kernel.org/pub/scm/linux/kernel/git/mcoquelin/sti into next/dt
      
      Merge "STi DT changes for v4.4, round 1" from Maxime Coquelin:
      
      Highlights:
      -----------
       - Add multiple pinctrl configurations to STiH407
       - Enable devices using pins only at board level
       - Add HW RNG device nodes to STiH407 family
       - Fix MMC0 clock configuration on STiH418
       - Fix interrupt related bindings on STiH407
      
      * tag 'sti-dt-for-v4.4-1' of https://git.kernel.org/pub/scm/linux/kernel/git/mcoquelin/sti:
        ARM: STi: STiH407: Enable the 2 HW Random Number Generators for STiH4{07, 10}
        ARM: DT: STi: STiH418: Fix mmc0 clock configuration
        ARM: STi: DT: STiH407: Rename incorrect interrupt related binding
        ARM: STi: STiH407: Add spi default pinctrl groups.
        ARM: DT: STiH407: Add RMII pinctrl support
        ARM: DT: STiH407: Add pinconfig for IRB UHF and IRB TX
        ARM: DT: STiH407: Add SD pinctrl config for mmc0 controller
        ARM: DT: STiH407: Add systrace pin configuration
        ARM: DT: STiH407: Add NAND flash controller pin configuration
        ARM: DT: STiH407: Add SPI FSM (NOR Flash) Controller pin config
        ARM: DT: STiH407: Add serial3 pinctrl configuration
        ARM: DT: STiH407: Add SPI 3 wire and 4 wire pinctrl configs
        ARM: STi: DT: STiH407: Add i2c3 alternate pin configs
        ARM: STi: DT: STiH407: Add a cec0 pin definition
        ARM: dts: stih410: Enable USB2.0 and related PHY nodes at board level
        ARM: dts: stih407/410: Tidy up display nodes
        ARM: dts: stih407: Enable PWM nodes only board level
      3cb06b30
    • Arnd Bergmann's avatar
      Merge tag 'hip05-dt-for-4.3' of git://github.com/hisilicon/linux-hisi into next/dt · f85e64b5
      Arnd Bergmann authored
      Merge "ARM64: DT: Hisilicon hip05 soc and D02 board updates for 4.3" from Wei Xu:
      
      - Updated the hisilicon devicetree bindings document to support hip05-D02 board
      - Added dts files for hip05 SoC and D02 board
      
      * tag 'hip05-dt-for-4.3' of git://github.com/hisilicon/linux-hisi:
        arm64: dts: add dts files for Hisilicon Hip05-D02 Development Board
        arm64: hip05-d02: Document devicetree bindings for Hisilicon Hip05-D02 Board
      f85e64b5
    • Dinh Nguyen's avatar
      arm64: dts: Add base stratix 10 dtsi · 78cd6a9d
      Dinh Nguyen authored
      
      
      Add the base DTS for Altera's SoCFPGA Stratix 10 platform.
      
      Signed-off-by: default avatarDinh Nguyen <dinguyen@opensource.altera.com>
      ---
      v4: Add a non-zero ranges property for /soc node
      v3: change #address-cells and #size-cells to <2>
          change the GIC address to 0xfffc1000
          update the GIC virtual CPU reg length to 0x2000
      v2: use interrupt-affinity for pmu node
      78cd6a9d
    • Dinh Nguyen's avatar
      ARM: socfpga: dts: enable USB and I2C on Arria10 SoCDK · 19c21388
      Dinh Nguyen authored
      
      
      On the Arria10 Devkit, the I2C bus has a serial EEPROM and an RTC
      hanging off it. Also, enable the USB node.
      
      Signed-off-by: default avatarDinh Nguyen <dinguyen@opensource.altera.com>
      19c21388
    • Dinh Nguyen's avatar
      ARM: socfpga: dts: add clock fields for I2C, UART and USB on Arria10 · e7604ae2
      Dinh Nguyen authored
      
      
      Add the required clock fields for all the I2C nodes. Also add missing clock
      fields for UART0 and USB1.
      
      Signed-off-by: default avatarDinh Nguyen <dinguyen@opensource.altera.com>
      e7604ae2
    • Sergei Shtylyov's avatar
      ARM: shmobile: porter: add Ether DT support · 0877098d
      Sergei Shtylyov authored
      Define  the Porter board dependent part of the Ether device node.
      Enable DHCP and NFS root for the kernel booting.
      
      This  patch  is analogous to the commit 26b0d2cf
      
       ("ARM: shmobile:
      henninger: add Ether DT support") as there  are no differences between
      those boards in this respect.
      
      Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
      Signed-off-by: default avatarSimon Horman <horms+renesas@verge.net.au>
      0877098d
  3. Oct 05, 2015
  4. Oct 04, 2015
    • Linus Torvalds's avatar
      Linux 4.3-rc4 · 049e6dde
      Linus Torvalds authored
      049e6dde
    • Linus Torvalds's avatar
      Merge branch 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile · 30c44659
      Linus Torvalds authored
      Pull strscpy string copy function implementation from Chris Metcalf.
      
      Chris sent this during the merge window, but I waffled back and forth on
      the pull request, which is why it's going in only now.
      
      The new "strscpy()" function is definitely easier to use and more secure
      than either strncpy() or strlcpy(), both of which are horrible nasty
      interfaces that have serious and irredeemable problems.
      
      strncpy() has a useless return value, and doesn't NUL-terminate an
      overlong result.  To make matters worse, it pads a short result with
      zeroes, which is a performance disaster if you have big buffers.
      
      strlcpy(), by contrast, is a mis-designed "fix" for strlcpy(), lacking
      the insane NUL padding, but having a differently broken return value
      which returns the original length of the source string.  Which means
      that it will read characters past the count from the source buffer, and
      you have to trust the source to be properly terminated.  It also makes
      error handling fragile, since the test for overflow is unnecessarily
      subtle.
      
      strscpy() avoids both these problems, guaranteeing the NUL termination
      (but not excessive padding) if the destination size wasn't zero, and
      making the overflow condition very obvious by returning -E2BIG.  It also
      doesn't read past the size of the source, and can thus be used for
      untrusted source data too.
      
      So why did I waffle about this for so long?
      
      Every time we introduce a new-and-improved interface, people start doing
      these interminable series of trivial conversion patches.
      
      And every time that happens, somebody does some silly mistake, and the
      conversion patch to the improved interface actually makes things worse.
      Because the patch is mindnumbing and trivial, nobody has the attention
      span to look at it carefully, and it's usually done over large swatches
      of source code which means that not every conversion gets tested.
      
      So I'm pulling the strscpy() support because it *is* a better interface.
      But I will refuse to pull mindless conversion patches.  Use this in
      places where it makes sense, but don't do trivial patches to fix things
      that aren't actually known to be broken.
      
      * 'strscpy' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile:
        tile: use global strscpy() rather than private copy
        string: provide strscpy()
        Make asm/word-at-a-time.h available on all architectures
      30c44659
    • Linus Torvalds's avatar
      Merge tag 'md/4.3-fixes' of git://neil.brown.name/md · 15ecf9a9
      Linus Torvalds authored
      Pull md fixes from Neil Brown:
       "Assorted fixes for md in 4.3-rc.
      
        Two tagged for -stable, and one is really a cleanup to match and
        improve kmemcache interface.
      
      * tag 'md/4.3-fixes' of git://neil.brown.name/md:
        md/bitmap: don't pass -1 to bitmap_storage_alloc.
        md/raid1: Avoid raid1 resync getting stuck
        md: drop null test before destroy functions
        md: clear CHANGE_PENDING in readonly array
        md/raid0: apply base queue limits *before* disk_stack_limits
        md/raid5: don't index beyond end of array in need_this_block().
        raid5: update analysis state for failed stripe
        md: wait for pending superblock updates before switching to read-only
      15ecf9a9
    • Linus Torvalds's avatar
      Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus · 0d877081
      Linus Torvalds authored
      Pull MIPS updates from Ralf Baechle:
       "This week's round of MIPS fixes:
         - Fix JZ4740 build
         - Fix fallback to GFP_DMA
         - FP seccomp in case of ENOSYS
         - Fix bootmem panic
         - A number of FP and CPS fixes
         - Wire up new syscalls
         - Make sure BPF assembler objects can properly be disassembled
         - Fix BPF assembler code for MIPS I"
      
      * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus:
        MIPS: scall: Always run the seccomp syscall filters
        MIPS: Octeon: Fix kernel panic on startup from memory corruption
        MIPS: Fix R2300 FP context switch handling
        MIPS: Fix octeon FP context switch handling
        MIPS: BPF: Fix load delay slots.
        MIPS: BPF: Do all exports of symbols with FEXPORT().
        MIPS: Fix the build on jz4740 after removing the custom gpio.h
        MIPS: CPS: #ifdef on CONFIG_MIPS_MT_SMP rather than CONFIG_MIPS_MT
        MIPS: CPS: Don't include MT code in non-MT kernels.
        MIPS: CPS: Stop dangling delay slot from has_mt.
        MIPS: dma-default: Fix 32-bit fall back to GFP_DMA
        MIPS: Wire up userfaultfd and membarrier syscalls.
      0d877081
    • Linus Torvalds's avatar
      Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 3e519dde
      Linus Torvalds authored
      Pull irq fixes from Thomas Gleixner:
       "This update contains:
      
         - Fix for a long standing race affecting /proc/irq/NNN
      
         - One line fix for ARM GICV3-ITS counting the wrong data
      
         - Warning silencing in ARM GICV3-ITS.  Another GCC trying to be
           overly clever issue"
      
      * 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        irqchip/gic-v3-its: Count additional LPIs for the aliased devices
        irqchip/gic-v3-its: Silence warning when its_lpi_alloc_chunks gets inlined
        genirq: Fix race in register_irq_proc()
      3e519dde
    • Markos Chandras's avatar
      MIPS: scall: Always run the seccomp syscall filters · d218af78
      Markos Chandras authored
      
      
      The MIPS syscall handler code used to return -ENOSYS on invalid
      syscalls. Whilst this is expected, it caused problems for seccomp
      filters because the said filters never had the change to run since
      the code returned -ENOSYS before triggering them. This caused
      problems on the chromium testsuite for filters looking for invalid
      syscalls. This has now changed and the seccomp filters are always
      run even if the syscall is invalid. We return -ENOSYS once we
      return from the seccomp filters. Moreover, similar codepaths have
      been merged in the process which simplifies somewhat the overall
      syscall code.
      
      Signed-off-by: default avatarMarkos Chandras <markos.chandras@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Patchwork: https://patchwork.linux-mips.org/patch/11236/
      
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      d218af78
  5. Oct 03, 2015
    • Linus Torvalds's avatar
      Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 2cf30826
      Linus Torvalds authored
      Pull x86 fixes from Ingo Molnar:
       "Fixes all around the map: W+X kernel mapping fix, WCHAN fixes, two
        build failure fixes for corner case configs, x32 header fix and a
        speling fix"
      
      * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        x86/headers/uapi: Fix __BITS_PER_LONG value for x32 builds
        x86/mm: Set NX on gap between __ex_table and rodata
        x86/kexec: Fix kexec crash in syscall kexec_file_load()
        x86/process: Unify 32bit and 64bit implementations of get_wchan()
        x86/process: Add proper bound checks in 64bit get_wchan()
        x86, efi, kasan: Fix build failure on !KASAN && KMEMCHECK=y kernels
        x86/hyperv: Fix the build in the !CONFIG_KEXEC_CORE case
        x86/cpufeatures: Correct spelling of the HWP_NOTIFY flag
      2cf30826
    • Linus Torvalds's avatar
      Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · 37cc7ab1
      Linus Torvalds authored
      Pull timer fixes from Ingo Molnar:
       "An abs64() fix in the watchdog driver, and two clocksource driver
        NO_IRQ assumption fixes"
      
      * 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        clocksource: Fix abs() usage w/ 64bit values
        clocksource/drivers/keystone: Fix bad NO_IRQ usage
        clocksource/drivers/rockchip: Fix bad NO_IRQ usage
      37cc7ab1
    • Linus Torvalds's avatar
      Merge branch 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip · a758379b
      Linus Torvalds authored
      Pull EFI fixes from Ingo Molnar:
       "Two EFI fixes: one for x86, one for ARM, fixing a boot crash bug that
        can trigger under newer EFI firmware"
      
      * 'core-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
        arm64/efi: Fix boot crash by not padding between EFI_MEMORY_RUNTIME regions
        x86/efi: Fix boot crash by mapping EFI memmap entries bottom-up at runtime, instead of top-down
      a758379b
    • Linus Torvalds's avatar
      Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux · 14f97d97
      Linus Torvalds authored
      Pull drm fixes from Dave Airlie:
       "Bunch of fixes all over the place, all pretty small: amdgpu, i915,
        exynos, one qxl and one vmwgfx.
      
        There is also a bunch of mst fixes, I left some cleanups in the series
        as I didn't think it was worth splitting up the tested series"
      
      * 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (37 commits)
        drm/dp/mst: add some defines for logical/physical ports
        drm/dp/mst: drop cancel work sync in the mstb destroy path (v2)
        drm/dp/mst: split connector registration into two parts (v2)
        drm/dp/mst: update the link_address_sent before sending the link address (v3)
        drm/dp/mst: fixup handling hotplug on port removal.
        drm/dp/mst: don't pass port into the path builder function
        drm/radeon: drop radeon_fb_helper_set_par
        drm: handle cursor_set2 in restore_fbdev_mode
        drm/exynos: Staticize local function in exynos_drm_gem.c
        drm/exynos: fimd: actually disable dp clock
        drm/exynos: dp: remove suspend/resume functions
        drm/qxl: recreate the primary surface when the bo is not primary
        drm/amdgpu: only print meaningful VM faults
        drm/amdgpu/cgs: remove import_gpu_mem
        drm/i915: Call non-locking version of drm_kms_helper_poll_enable(), v2
        drm: Add a non-locking version of drm_kms_helper_poll_enable(), v2
        drm/vmwgfx: Fix a command submission hang regression
        drm/exynos: remove unused mode_fixup() code
        drm/exynos: remove decon_mode_fixup()
        drm/exynos: remove fimd_mode_fixup()
        ...
      14f97d97
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input · 978ab6a0
      Linus Torvalds authored
      Pull input layer fixes from Dmitry Torokhov:
       "Fixes for two recent regressions (in Synaptics PS/2 and uinput
        drivers) and some more driver fixups"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
        Revert "Input: synaptics - fix handling of disabling gesture mode"
        Input: psmouse - fix data race in __ps2_command
        Input: elan_i2c - add all valid ic type for i2c/smbus
        Input: zhenhua - ensure we have BITREVERSE
        Input: omap4-keypad - fix memory leak
        Input: serio - fix blocking of parport
        Input: uinput - fix crash when using ABS events
        Input: elan_i2c - expand maximum product_id form 0xFF to 0xFFFF
        Input: elan_i2c - add ic type 0x03
        Input: elan_i2c - don't require known iap version
        Input: imx6ul_tsc - fix controller name
        Input: imx6ul_tsc - use the preferred method for kzalloc()
        Input: imx6ul_tsc - check for negative return value
        Input: imx6ul_tsc - propagate the errors
        Input: walkera0701 - fix abs() calculations on 64 bit values
        Input: mms114 - remove unneded semicolons
        Input: pm8941-pwrkey - remove unneded semicolon
        Input: fix typo in MT documentation
        Input: cyapa - fix address of Gen3 devices in device tree documentation
      978ab6a0
    • John Stultz's avatar
      clocksource: Fix abs() usage w/ 64bit values · 67dfae0c
      John Stultz authored
      
      
      This patch fixes one cases where abs() was being used with 64-bit
      nanosecond values, where the result may be capped at 32-bits.
      
      This potentially could cause watchdog false negatives on 32-bit
      systems, so this patch addresses the issue by using abs64().
      
      Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
      Cc: Prarit Bhargava <prarit@redhat.com>
      Cc: Richard Cochran <richardcochran@gmail.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: stable@vger.kernel.org
      Link: http://lkml.kernel.org/r/1442279124-7309-2-git-send-email-john.stultz@linaro.org
      
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      67dfae0c
    • Linus Torvalds's avatar
      Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux · 5634347d
      Linus Torvalds authored
      Pull arm64 fixes from Catalin Marinas:
      
       - Fix for transparent huge page change_protection() logic which was
         inadvertently changing a huge pmd page into a pmd table entry.
      
       - Function graph tracer panic fix caused by the return_to_handler code
         corrupting the multi-regs function return value (composite types).
      
      * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
        arm64: ftrace: fix function_graph tracer panic
        arm64: Fix THP protection change logic
      5634347d
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k · b55a97e7
      Linus Torvalds authored
      Pull m68k updates from Geert Uytterhoeven:
       "Summary:
         - Fix for accidental modification of arguments of syscall functions
         - Wire up new syscalls
         - Update defconfigs"
      
      * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/linux-m68k:
        m68k/defconfig: Update defconfigs for v4.3-rc1
        m68k: Define asmlinkage_protect
        m68k: Wire up membarrier
        m68k: Wire up userfaultfd
        m68k: Wire up direct socket calls
      b55a97e7
    • Marc Zyngier's avatar
      irqchip/gic-v3-its: Count additional LPIs for the aliased devices · 791c76d5
      Marc Zyngier authored
      When configuring the interrupt mapping for a new device, we
      iterate over all the possible aliases to account for their
      maximum MSI allocation. This was introduced by e8137f4f
      
      
      ("irqchip: gicv3-its: Iterate over PCI aliases to generate ITS configuration").
      
      Turns out that the code doing that is a bit braindead, and repeatedly
      accounts for the same device over and over.
      
      Fix this by counting the actual alias that is passed to us by the
      core code.
      
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: Alex Shi <alex.shi@linaro.org>
      Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
      Cc: David Daney <ddaney.cavm@gmail.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Link: http://lkml.kernel.org/r/1443800646-8074-3-git-send-email-marc.zyngier@arm.com
      
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      791c76d5
    • Marc Zyngier's avatar
      irqchip/gic-v3-its: Silence warning when its_lpi_alloc_chunks gets inlined · c8415b94
      Marc Zyngier authored
      
      
      More agressive inlining in recent versions of GCC have uncovered
      a new set of warnings:
      
       drivers/irqchip/irq-gic-v3-its.c: In function its_msi_prepare:
        drivers/irqchip/irq-gic-v3-its.c:1148:26: warning: lpi_base may be used
          uninitialized in this function [-Wmaybe-uninitialized]
           dev->event_map.lpi_base = lpi_base;
                                ^
       drivers/irqchip/irq-gic-v3-its.c:1116:6: note: lpi_base was declared here
        int lpi_base;
      	      ^
       drivers/irqchip/irq-gic-v3-its.c:1149:25: warning: nr_lpis may be used
        uninitialized in this function [-Wmaybe-uninitialized]
         dev->event_map.nr_lpis = nr_lpis;
      	                         ^
       drivers/irqchip/irq-gic-v3-its.c:1117:6: note: nr_lpis was declared here
        int nr_lpis;
      	      ^
      The warning is fairly benign (there is no code path that could
      actually use uninitialized variables), but let's silence it anyway
      by zeroing the variables on the error path.
      
      Reported-by: default avatarAlex Shi <alex.shi@linaro.org>
      Tested-by: default avatarArd Biesheuvel <ard.biesheuvel@linaro.org>
      Signed-off-by: default avatarMarc Zyngier <marc.zyngier@arm.com>
      Cc: linux-arm-kernel@lists.infradead.org
      Cc: David Daney <ddaney.cavm@gmail.com>
      Cc: Jason Cooper <jason@lakedaemon.net>
      Link: http://lkml.kernel.org/r/1443800646-8074-2-git-send-email-marc.zyngier@arm.com
      
      
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      c8415b94
    • Linus Torvalds's avatar
      Merge tag 'dmaengine-fix-4.3-rc4' of git://git.infradead.org/users/vkoul/slave-dma · 83dc311c
      Linus Torvalds authored
      Pull dmaengine fixes from Vinod Koul:
       "This contains fixes spread throughout the drivers, and also fixes one
        more instance of privatecnt in dmaengine.
      
        Driver fixes summary:
         - bunch of pxa_dma fixes for reuse of descriptor issue, residue and
           no-requestor
         - odd fixes in xgene, idma, sun4i and zxdma
         - at_xdmac fixes for cleaning descriptor and block addr mode"
      
      * tag 'dmaengine-fix-4.3-rc4' of git://git.infradead.org/users/vkoul/slave-dma:
        dmaengine: pxa_dma: fix residue corner case
        dmaengine: pxa_dma: fix the no-requestor case
        dmaengine: zxdma: Fix off-by-one for testing valid pchan request
        dmaengine: at_xdmac: clean used descriptor
        dmaengine: at_xdmac: change block increment addressing mode
        dmaengine: dw: properly read DWC_PARAMS register
        dmaengine: xgene-dma: Fix overwritting DMA tx ring
        dmaengine: fix balance of privatecnt
        dmaengine: sun4i: fix unsafe list iteration
        dmaengine: idma64: improve residue estimation
        dmaengine: xgene-dma: fix handling xgene_dma_get_ring_size result
        dmaengine: pxa_dma: fix initial list move
      83dc311c
    • Linus Torvalds's avatar
      Merge branch 'for-linus' of git://git.kernel.dk/linux-block · 27728bf0
      Linus Torvalds authored
      Pull block fixes from Jens Axboe:
       "Another week, another round of fixes.
      
        These have been brewing for a bit and in various iterations, but I
        feel pretty comfortable about the quality of them.  They fix real
        issues.  The pull request is mostly blk-mq related, and the only one
        not fixing a real bug, is the tag iterator abstraction from Christoph.
        But it's pretty trivial, and we'll need it for another fix soon.
      
        Apart from the blk-mq fixes, there's an NVMe affinity fix from Keith,
        and a single fix for xen-blkback from Roger fixing failure to free
        requests on disconnect"
      
      * 'for-linus' of git://git.kernel.dk/linux-block:
        blk-mq: factor out a helper to iterate all tags for a request_queue
        blk-mq: fix racy updates of rq->errors
        blk-mq: fix deadlock when reading cpu_list
        blk-mq: avoid inserting requests before establishing new mapping
        blk-mq: fix q->mq_usage_counter access race
        blk-mq: Fix use after of free q->mq_map
        blk-mq: fix sysfs registration/unregistration race
        blk-mq: avoid setting hctx->tags->cpumask before allocation
        NVMe: Set affinity after allocating request queues
        xen/blkback: free requests on disconnection
      27728bf0
    • Dmitry Torokhov's avatar
      Revert "Input: synaptics - fix handling of disabling gesture mode" · 62d78461
      Dmitry Torokhov authored
      This reverts commit e51e3849: we
      actually do want the device to work in extended W mode, as this is the
      mode that allows us receiving multiple contact information.
      
      Cc: stable@vger.kernel.org
      62d78461
    • Matt Bennett's avatar
      MIPS: Octeon: Fix kernel panic on startup from memory corruption · 66803dd9
      Matt Bennett authored
      
      
      During development it was found that a number of builds would panic
      during the kernel init process, more specifically in 'delayed_fput()'.
      The panic showed the kernel trying to access a memory address of
      '0xb7fdc00' while traversing the 'delayed_fput_list' structure.
      Comparing this memory address to the value of the pointer used on
      builds that did not panic confirmed that the pointer on crashing
      builds must have been corrupted at some stage earlier in the init
      process.
      
      By traversing the list earlier and earlier in the code it was found
      that 'plat_mem_setup()' was responsible for corrupting the list.
      Specifically the line:
      
          memory = cvmx_bootmem_phy_alloc(mem_alloc_size,
      			__pa_symbol(&__init_end), -1,
      			0x100000,
      			CVMX_BOOTMEM_FLAG_NO_LOCKING);
      
      Which would eventually call:
      
          cvmx_bootmem_phy_set_size(new_ent_addr,
      		cvmx_bootmem_phy_get_size
      		(ent_addr) -
      		(desired_min_addr -
      			ent_addr));
      
      Where 'new_ent_addr'=0x4800000 (the address of 'delayed_fput_list')
      and the second argument (size)=0xb7fdc00 (the address causing the
      kernel panic). The job of this part of 'plat_mem_setup()' is to
      allocate chunks of memory for the kernel to use. At the start of
      each chunk of memory the size of the chunk is written, hence the
      value 0xb7fdc00 is written onto memory at 0x4800000, therefore the
      kernel panics when it goes back to access 'delayed_fput_list' later
      on in the initialisation process.
      
      On builds that were not crashing it was found that the compiler had
      placed 'delayed_fput_list' at 0x4800008, meaning it wasn't corrupted
      (but something else in memory was overwritten).
      
      As can be seen in the first function call above the code begins to
      allocate chunks of memory beginning from the symbol '__init_end'.
      The MIPS linker script (vmlinux.lds.S) however defines the .bss
      section to begin after '__init_end'. Therefore memory within the
      .bss section is allocated to the kernel to use (System.map shows
      'delayed_fput_list' and other kernel structures to be in .bss).
      
      To stop the kernel panic (and the .bss section being corrupted)
      memory should begin being allocated from the symbol '_end'.
      
      Signed-off-by: default avatarMatt Bennett <matt.bennett@alliedtelesis.co.nz>
      Acked-by: default avatarDavid Daney <david.daney@cavium.com>
      Cc: linux-mips@linux-mips.org
      Cc: aleksey.makarov@auriga.com
      Patchwork: https://patchwork.linux-mips.org/patch/11251/
      
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      66803dd9
    • Paul Burton's avatar
      MIPS: Fix R2300 FP context switch handling · 085c2f25
      Paul Burton authored
      Commit 1a3d5957 ("MIPS: Tidy up FPU context switching") removed FP
      context saving from the asm-written resume function in favour of reusing
      existing code to perform the same task. However it only removed the FP
      context saving code from the r4k_switch.S implementation of resume.
      Remove it from the r2300_switch.S implementation too in order to prevent
      attempting to save the FP context twice, which would likely lead to an
      exception from the second save because the FPU had already been disabled
      by the first save.
      
      This patch has only been build tested, using rbtx49xx_defconfig.
      
      Fixes: 1a3d5957
      
       ("MIPS: Tidy up FPU context switching")
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Maciej W. Rozycki <macro@linux-mips.org>
      Cc: linux-kernel@vger.kernel.org
      Cc: Manuel Lauss <manuel.lauss@gmail.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11167/
      
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      085c2f25
    • Paul Burton's avatar
      MIPS: Fix octeon FP context switch handling · 0fa24340
      Paul Burton authored
      Commit 1a3d5957 ("MIPS: Tidy up FPU context switching") removed FP
      context saving from the asm-written resume function in favour of reusing
      existing code to perform the same task. However it only removed the FP
      context saving code from the r4k_switch.S implementation of resume.
      Octeon uses its own implementation in octeon_switch.S, so remove FP
      context saving there too in order to prevent attempting to save context
      twice. That formerly led to an exception from the second save as follows
      because the FPU had already been disabled by the first save:
      
          do_cpu invoked from kernel context![#1]:
          CPU: 0 PID: 2 Comm: kthreadd Not tainted 4.3.0-rc2-dirty #2
          task: 800000041f84a008 ti: 800000041f864000 task.ti: 800000041f864000
          $ 0   : 0000000000000000 0000000010008ce1 0000000000100000 ffffffffbfffffff
          $ 4   : 800000041f84a008 800000041f84ac08 800000041f84c000 0000000000000004
          $ 8   : 0000000000000001 0000000000000000 0000000000000000 0000000000000001
          $12   : 0000000010008ce3 0000000000119c60 0000000000000036 800000041f864000
          $16   : 800000041f84ac08 800000000792ce80 800000041f84a008 ffffffff81758b00
          $20   : 0000000000000000 ffffffff8175ae50 0000000000000000 ffffffff8176c740
          $24   : 0000000000000006 ffffffff81170300
          $28   : 800000041f864000 800000041f867d90 0000000000000000 ffffffff815f3fa0
          Hi    : 0000000000fa8257
          Lo    : ffffffffe15cfc00
          epc   : ffffffff8112821c resume+0x9c/0x200
          ra    : ffffffff815f3fa0 __schedule+0x3f0/0x7d8
          Status: 10008ce2        KX SX UX KERNEL EXL
          Cause : 1080002c (ExcCode 0b)
          PrId  : 000d0601 (Cavium Octeon+)
          Modules linked in:
          Process kthreadd (pid: 2, threadinfo=800000041f864000, task=800000041f84a008, tls=0000000000000000)
          Stack : ffffffff81604218 ffffffff815f7e08 800000041f84a008 ffffffff811681b0
                    800000041f84a008 ffffffff817e9878 0000000000000000 ffffffff81770000
                    ffffffff81768340 ffffffff81161398 0000000000000001 0000000000000000
                    0000000000000000 ffffffff815f4424 0000000000000000 ffffffff81161d68
                    ffffffff81161be8 0000000000000000 0000000000000000 0000000000000000
                    0000000000000000 0000000000000000 0000000000000000 ffffffff8111e16c
                    0000000000000000 0000000000000000 0000000000000000 0000000000000000
                    0000000000000000 0000000000000000 0000000000000000 0000000000000000
                    0000000000000000 0000000000000000 0000000000000000 0000000000000000
                    0000000000000000 0000000000000000 0000000000000000 0000000000000000
                    ...
          Call Trace:
          [<ffffffff8112821c>] resume+0x9c/0x200
          [<ffffffff815f3fa0>] __schedule+0x3f0/0x7d8
          [<ffffffff815f4424>] schedule+0x34/0x98
          [<ffffffff81161d68>] kthreadd+0x180/0x198
          [<ffffffff8111e16c>] ret_from_kernel_thread+0x14/0x1c
      
      Tested using cavium_octeon_defconfig on an EdgeRouter Lite.
      
      Fixes: 1a3d5957
      
       ("MIPS: Tidy up FPU context switching")
      Reported-by: default avatarAaro Koskinen <aaro.koskinen@nokia.com>
      Signed-off-by: default avatarPaul Burton <paul.burton@imgtec.com>
      Cc: linux-mips@linux-mips.org
      Cc: Aleksey Makarov <aleksey.makarov@auriga.com>
      Cc: linux-kernel@vger.kernel.org
      Cc: Chandrakala Chavva <cchavva@caviumnetworks.com>
      Cc: David Daney <david.daney@cavium.com>
      Cc: Leonid Rosenboim <lrosenboim@caviumnetworks.com>
      Patchwork: https://patchwork.linux-mips.org/patch/11166/
      
      
      Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
      0fa24340
  6. Oct 02, 2015
    • Linus Torvalds's avatar
      Merge tag 'mmc-v4.3-rc3' of git://git.linaro.org/people/ulf.hansson/mmc · 36f8dafe
      Linus Torvalds authored
      Pull MMC fixes from Ulf Hansson:
       "Here are some mmc fixes intended for v4.3 rc4:
      
        MMC core:
         - Allow users of mmc_of_parse() to succeed when CONFIG_GPIOLIB is
           unset
         - Prevent infinite loop of re-tuning for CRC-errors for CMD19 and
           CMD21
      
         MMC host:
         - pxamci: Fix issues with card detect
         - sunxi: Fix clk-delay settings"
      
      * tag 'mmc-v4.3-rc3' of git://git.linaro.org/people/ulf.hansson/mmc:
        mmc: core: fix dead loop of mmc_retune
        mmc: pxamci: fix card detect with slot-gpio API
        mmc: sunxi: Fix clk-delay settings
        mmc: core: Don't return an error for CD/WP GPIOs when GPIOLIB is unset
      36f8dafe