cascardo/linux.git
9 years agoMerge tag 'renesas-cpufreq2-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel...
Olof Johansson [Sun, 13 Jul 2014 04:46:48 +0000 (21:46 -0700)]
Merge tag 'renesas-cpufreq2-for-v3.17' of git://git./linux/kernel/git/horms/renesas into next/soc

Merge "Second Round of Renesas ARM Based SoC CPUFreq Updates for v3.17" from
Simon Horman:

- Remove opps table check for cpufreq as this is already handled
  by the driver

* tag 'renesas-cpufreq2-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: Remove opps table check for cpufreq

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoMerge tag 'renesas-soc3-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git...
Olof Johansson [Sun, 13 Jul 2014 04:23:07 +0000 (21:23 -0700)]
Merge tag 'renesas-soc3-for-v3.17' of git://git./linux/kernel/git/horms/renesas into next/soc

Merge "Third Round of Renesas ARM Based SoC Updates for v3.17" from Simon
Horman:

- Correct build failure in APMU code in the case of !SUSPEND

* tag 'renesas-soc3-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: fix shmobile_smp_apmu_suspend_init build failure for !SUSPEND

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoMerge tag 'renesas-soc2-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git...
Olof Johansson [Sat, 12 Jul 2014 16:44:52 +0000 (09:44 -0700)]
Merge tag 'renesas-soc2-for-v3.17' of git://git./linux/kernel/git/horms/renesas into next/soc

Merge "Second Round of Renesas ARM Based SoC Updates for v3.17" from Simon
Horman:

* Suspend on non-SMP update for r8a7790
* Move r8a7791.h out of mach directory.
  This is part of a multi-stage effort to move headers
  out of that directory.

* tag 'renesas-soc2-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: Allow r8a7791 to build non-SMP APMU code
  ARM: shmobile: Move r8a7791 reset code to pm-r8a7791.c
  ARM: shmobile: Allow r8a7790 to build non-SMP APMU code
  ARM: shmobile: Move r8a7790 reset code to pm-r8a7790.c
  ARM: shmobile: Use __init for APMU suspend init function
  ARM: shmobile: Adjust APMU code to build for non-SMP
  ARM: shmobile: Allow use of boot code for non-SMP case
  ARM: shmobile: Move r8a7791.h

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoMerge branch 'renesas/cleanup2' into next/soc
Olof Johansson [Sat, 12 Jul 2014 16:43:40 +0000 (09:43 -0700)]
Merge branch 'renesas/cleanup2' into next/soc

Merging in as base to resolve a merge conflict with later soc branch
locally.

9 years agoMerge tag 'renesas-r8a7779-multiplatform2-for-v3.17' of git://git.kernel.org/pub...
Olof Johansson [Sat, 12 Jul 2014 16:35:40 +0000 (09:35 -0700)]
Merge tag 'renesas-r8a7779-multiplatform2-for-v3.17' of git://git./linux/kernel/git/horms/renesas into next/soc

Merge "Second Round of Renesas ARM Based SoC r8a7779-multiplatform
Updates for v3.17" from Simon Horman:

- Move r8a7779.h out of mach directory.
  This is part of a multi-stage effort to move headers
  out of that directory.

* tag 'renesas-r8a7779-multiplatform2-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: Move r8a7779.h

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoARM: shmobile: Remove opps table check for cpufreq
Gaku Inami [Wed, 25 Jun 2014 07:58:40 +0000 (16:58 +0900)]
ARM: shmobile: Remove opps table check for cpufreq

This patch is based on feedback from Viresh Kumar.
Since cpufreq-cpu0 driver has already check opp table, there is no
need to same check in mach-shmobile.

Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoMerge tag 'berlin-soc-3.17-1' of git://git.infradead.org/users/hesselba/linux-berlin...
Olof Johansson [Tue, 8 Jul 2014 05:41:47 +0000 (22:41 -0700)]
Merge tag 'berlin-soc-3.17-1' of git://git.infradead.org/users/hesselba/linux-berlin into next/soc

Merge "Berlin SoC changes for v3.17" from Sebastian Hesselbarth:

- SMP support for BG2 and BG2Q

* tag 'berlin-soc-3.17-1' of git://git.infradead.org/users/hesselba/linux-berlin:
  ARM: berlin: add SMP support

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoMerge tag 'mvebu-soc-3.17' of git://git.infradead.org/linux-mvebu into next/soc
Olof Johansson [Tue, 8 Jul 2014 05:27:00 +0000 (22:27 -0700)]
Merge tag 'mvebu-soc-3.17' of git://git.infradead.org/linux-mvebu into next/soc

Merge "mvebu SoC changes for v3.17" from Jason Cooper:

- kirkwood
  * add setup file for netxbig LEDs (non-trivial DT binding doesn't exist yet)

- mvebu
  * staticize where needed
  * add CPU hotplug for Armada XP
  * add public datasheet for Armada 370
  * don't apply thermal quirk by default
  * get SoC ID from the system controller when possible

* tag 'mvebu-soc-3.17' of git://git.infradead.org/linux-mvebu:
  ARM: mvebu: Staticize mvebu_cpu_reset_init
  ARM: mvebu: Staticize armada_370_xp_cpu_pm_init
  ARM: mvebu: Staticize armada_375_smp_cpu1_enable_wa
  ARM: mvebu: Use system controller to get the soc id when possible
  ARM: mvebu: Use the a standard errno in mvebu_get_soc_id
  ARM: mvebu: Don't apply the thermal quirk if the SoC revision is unknown
  Documentation: arm: add URLs to public datasheets for the Marvell Armada 370 SoC
  ARM: mvebu: implement CPU hotplug support for Armada XP
  ARM: mvebu: export PMSU idle enter/exit functions
  ARM: mvebu: slightly refactor/rename PMSU idle related functions
  ARM: mvebu: remove stub implementation of CPU hotplug on Armada 375/38x
  ARM: Kirkwood: Add setup file for netxbig LEDs
  ARM: mvebu: mark armada_370_xp_pmsu_idle_prepare() as static

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoMerge tag 'renesas-soc-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git...
Olof Johansson [Tue, 8 Jul 2014 05:07:14 +0000 (22:07 -0700)]
Merge tag 'renesas-soc-for-v3.17' of git://git./linux/kernel/git/horms/renesas into next/soc

Merge "Renesas ARM Based SoC Updates for v3.17" from Simon Horman:

- Use shmobile_init_late on r8a7791 and r8a7790 whien booting using DT-only
- Support Core-Standby for Suspend to RAM on r8a7791 and r8a7790 SoCs
- Shared CMA reservation for R-Car Gen2 SoCs
- Add r8a7791 SYSC power management support

* tag 'renesas-soc-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: Remove ARCH_HAS_CPUFREQ config for shmobile
  ARM: shmobile: rcar-gen2: update call to dma_contiguous_reserve_area
  ARM: shmobile: rcar-gen2: correct return value of shmobile_smp_apmu_suspend_init
  ARM: shmobile: rcar-gen2: Remove useless copied section for LongTrail
  ARM: shmobile: rcar-gen2: Use "1ULL" instead of "(u64)1"
  ARM: shmobile: rcar-gen2: Update for of_get_flat_dt_prop() update
  ARM: shmobile: Add shared R-Car Gen2 CMA reservation code
  ARM: shmobile: Use shmobile_init_late() on r8a7791 DT-only
  ARM: shmobile: Use shmobile_init_late() on r8a7790 DT-only
  ARM: shmobile: Mark all SoCs in shmobile as CPUFreq, capable
  ARM: shmobile: r8a7791: Support Core-Standby for Suspend to RAM
  ARM: shmobile: r8a7790: Support Core-Standby for Suspend to RAM
  ARM: shmobile: APMU: Add Core-Standby-state for Suspend to RAM
  ARM: shmobile: r8a7791 SYSC setup code

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoMerge tag 'versatile-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/robh...
Olof Johansson [Tue, 8 Jul 2014 04:47:03 +0000 (21:47 -0700)]
Merge tag 'versatile-for-3.17' of git://git./linux/kernel/git/robh/linux into next/soc

Merge "DT IRQ and clock support for Versatile platforms" from Rob Herring.

This branch moves IRQ and clock support over to DT for the versatile
platforms.

* tag 'versatile-for-3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux:
  clk: versatile: add versatile OSC support
  dts: versatile: add clock tree
  ARM: timer-sp: allow getting timer1 clock from DT to fallback to legacy clock
  dt/bindings: add compatible string for versatile osc clock
  dt/bindings: arm-boards: add binding for Versatile core module
  dts: versatile: add pl180 compatible strings
  ARM: versatile: remove init_irq hook for DT boot
  ARM: integrator: convert to use irqchip_init
  irqchip: versatile-fpga: add support for arm,versatile-sic
  irqchip: versatile-fpga: Add IRQCHIP_DECLARE support
  dts: versatile: add missing irq controller properties

Tested-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Jason Cooper <jason@lakedaemon.net>
Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoMerge tag 'tegra-for-3.17-delay-timer' of git://git.kernel.org/pub/scm/linux/kernel...
Olof Johansson [Mon, 7 Jul 2014 00:47:28 +0000 (17:47 -0700)]
Merge tag 'tegra-for-3.17-delay-timer' of git://git./linux/kernel/git/tegra/linux into next/soc

Merge "ARM: tegra: use us counter as delay timer" from Stephen Warren:

Tegra has a micro-second counter whose rate doesn't vary with cpufreq
changes. Register it so it can be used as the delay timer, so delays
aren't influenced by cpufreq.

* tag 'tegra-for-3.17-delay-timer' of git://git.kernel.org/pub/scm/linux/kernel/git/tegra/linux:
  clocksource: tegra: Use us counter as delay timer
  ARM: choose highest resolution delay timer
  kernel: add calibration_delay_done()

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoMerge tag 'renesas-r8a7779-multiplatform-for-v3.17' of git://git.kernel.org/pub/scm...
Olof Johansson [Mon, 7 Jul 2014 00:15:48 +0000 (17:15 -0700)]
Merge tag 'renesas-r8a7779-multiplatform-for-v3.17' of git://git./linux/kernel/git/horms/renesas into next/soc

Pull "Renesas ARM Based SoC r8a7779-multiplatform Updates for v3.17" from
Simon Horman:

Move r8a7779 SoC and its Marzen board to use common clocks,
multiplatform and initialise SCIF (serial) devices using DT.

* tag 'renesas-r8a7779-multiplatform-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas: (32 commits)
  ARM: shmobile: marzen: Do not use workaround for scif devices
  ARM: shmobile: marzen: Initialise SCIF devices using DT
  ARM: shmobile: marzen: Remove early_printk from command line
  ARM: shmobile: r8a7779: Add scif nodes to dtsi
  ARM: shmobile: r8a7779 dtsi: Correct #address-cells/#size-cells for clocks
  ARM: shmobile: r8a7779 dtsi: Update unit-addresses for clocks
  ARM: shmobile: r8a7779: Remove unused r8a7779_init_delay()
  ARM: shmobile: marzen-reference: Use DT CPU Frequency
  ARM: shmobile: r8a7779: Use DT CPU Frequency in common case
  ARM: shmobile: r8a7779: Add Maximum CPU Frequency to DTS
  ARM: shmobile: marzen-reference: Remove legacy clock support
  ARM: shmobile: Remove Marzen reference DTS
  ARM: shmobile: Let Marzen multiplatform boot with Marzen DTB
  ARM: shmobile: Remove non-multiplatform Marzen reference support
  ARM: shmobile: marzen-reference: Instantiate clkdevs for SCIF and TMU
  ARM: shmobile: marzen-reference: Initialize CPG device
  ARM: shmobile: r8a7779: Initial multiplatform support
  ARM: shmobile: marzen-reference: Move clock and OF device initialisation into board code
  ARM: shmobile: r8a7779: Move r8a7779_earlytimer_init to clock-r8a7779.c
  ARM: shmobile: r8a7779: Add helper to read mode pins
  ...

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoMerge tag 'renesas-cpufreq-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel...
Olof Johansson [Mon, 7 Jul 2014 00:08:18 +0000 (17:08 -0700)]
Merge tag 'renesas-cpufreq-for-v3.17' of git://git./linux/kernel/git/horms/renesas into next/soc

Merge "Renesas ARM Based SoC Cpufreq Updates for v3.17" from Simon Horman

* Add cpufreq-cpu0 device registration

* tag 'renesas-cpufreq-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: add cpufreq-cpu0 driver for common SH-Mobile

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoMerge tag 'renesas-clock-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel...
Olof Johansson [Mon, 7 Jul 2014 00:05:25 +0000 (17:05 -0700)]
Merge tag 'renesas-clock-for-v3.17' of git://git./linux/kernel/git/horms/renesas into next/soc

Merge "Renesas ARM Based SoC Clock Updates for v3.17" from Simon Horman:

- Fix device node reference leakage in shmobile_init_delay

* tag 'renesas-clock-for-v3.17' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: Fix device node reference leakage in shmobile_init_delay

Signed-off-by: Olof Johansson <olof@lixom.net>
9 years agoARM: shmobile: fix shmobile_smp_apmu_suspend_init build failure for !SUSPEND
Arnd Bergmann [Thu, 3 Jul 2014 14:08:30 +0000 (16:08 +0200)]
ARM: shmobile: fix shmobile_smp_apmu_suspend_init build failure for !SUSPEND

Patch d6d757c9a4e ("ARM: shmobile: APMU: Add Core-Standby-state for
Suspend to RAM") added both an inline wrapper for shmobile_smp_apmu_suspend_init
and an empty function in arch/arm/mach-shmobile/platsmp-apmu.c. We get a
build failure when both are present, so this patch removes the one in the .c
file and keeps the inline version.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: mvebu: Staticize mvebu_cpu_reset_init
Sachin Kamat [Tue, 24 Jun 2014 11:43:51 +0000 (17:13 +0530)]
ARM: mvebu: Staticize mvebu_cpu_reset_init

'mvebu_cpu_reset_init' is local to this file.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Link: https://lkml.kernel.org/r/1403610235-22654-4-git-send-email-sachin.kamat@samsung.com
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoARM: mvebu: Staticize armada_370_xp_cpu_pm_init
Sachin Kamat [Tue, 24 Jun 2014 11:43:50 +0000 (17:13 +0530)]
ARM: mvebu: Staticize armada_370_xp_cpu_pm_init

'armada_370_xp_cpu_pm_init' is local to this file.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Link: https://lkml.kernel.org/r/1403610235-22654-3-git-send-email-sachin.kamat@samsung.com
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoARM: mvebu: Staticize armada_375_smp_cpu1_enable_wa
Sachin Kamat [Tue, 24 Jun 2014 11:43:49 +0000 (17:13 +0530)]
ARM: mvebu: Staticize armada_375_smp_cpu1_enable_wa

'armada_375_smp_cpu1_enable_wa' is local to this file.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Link: https://lkml.kernel.org/r/1403610235-22654-2-git-send-email-sachin.kamat@samsung.com
Signed-off-by: Sachin Kamat <sachin.kamat@samsung.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoARM: mvebu: Use system controller to get the soc id when possible
Gregory CLEMENT [Mon, 23 Jun 2014 15:42:08 +0000 (17:42 +0200)]
ARM: mvebu: Use system controller to get the soc id when possible

On Armada 38x it is possible to get the SoC Id and the revision
without using the PCI register. Accessing the PCI registers implies
enabling its clock and, because of the initialization issue, not
keeping them enable. So if possible it is better to avoid it.

Armada 370 and Armada XP provides the SoC ID values from the system
controller but not the revision.

Armada 375 provides both but the SoC ID value looks buggy (0x6660
instead of 0x6720).

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Link: https://lkml.kernel.org/r/1403538128-27859-1-git-send-email-gregory.clement@free-electrons.com
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoARM: mvebu: Use the a standard errno in mvebu_get_soc_id
Gregory CLEMENT [Fri, 20 Jun 2014 14:35:52 +0000 (16:35 +0200)]
ARM: mvebu: Use the a standard errno in mvebu_get_soc_id

Instead of using -1 as error value, use a standard errno.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
Link: https://lkml.kernel.org/r/1403274953-21790-2-git-send-email-gregory.clement@free-electrons.com
Acked-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
9 years agoLinux 3.16-rc3 v3.16-rc3
Linus Torvalds [Sun, 29 Jun 2014 21:11:36 +0000 (14:11 -0700)]
Linux 3.16-rc3

9 years agoMerge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm
Linus Torvalds [Sun, 29 Jun 2014 20:40:08 +0000 (13:40 -0700)]
Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm

Pull ARM fixes from Russell King:
 "Another round of ARM fixes.  The largest change here is the L2 changes
  to work around problems for the Armada 37x/380 devices, where most of
  the size comes down to comments rather than code.

  The other significant fix here is for the ptrace code, to ensure that
  rewritten syscalls work as intended.  This was pointed out by Kees
  Cook, but Will Deacon reworked the patch to be more elegant.

  The remainder are fairly trivial changes"

* 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm:
  ARM: 8087/1: ptrace: reload syscall number after secure_computing() check
  ARM: 8086/1: Set memblock limit for nommu
  ARM: 8085/1: sa1100: collie: add top boot mtd partition
  ARM: 8084/1: sa1100: collie: revert back to cfi_probe
  ARM: 8080/1: mcpm.h: remove unused variable declaration
  ARM: 8076/1: mm: add support for HW coherent systems in PL310 cache

9 years agoMAINTAINERS: exceptions for Documentation maintainer
Randy Dunlap [Sat, 28 Jun 2014 01:28:56 +0000 (18:28 -0700)]
MAINTAINERS: exceptions for Documentation maintainer

Note that I don't maintain Documentation/ABI/,
Documentation/devicetree/, or the language translation files.

Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoDocumentation: add section about git to email-clients.txt
Dan Carpenter [Sat, 28 Jun 2014 01:28:46 +0000 (18:28 -0700)]
Documentation: add section about git to email-clients.txt

These days most people use git to send patches so I have added a section
about that.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoARM: 8087/1: ptrace: reload syscall number after secure_computing() check
Will Deacon [Fri, 27 Jun 2014 16:01:47 +0000 (17:01 +0100)]
ARM: 8087/1: ptrace: reload syscall number after secure_computing() check

On the syscall tracing path, we call out to secure_computing() to allow
seccomp to check the syscall number being attempted. As part of this, a
SIGTRAP may be sent to the tracer and the syscall could be re-written by
a subsequent SET_SYSCALL ptrace request. Unfortunately, this new syscall
is ignored by the current code unless TIF_SYSCALL_TRACE is also set on
the current thread.

This patch slightly reworks the enter path of the syscall tracing code
so that we always reload the syscall number from
current_thread_info()->syscall after the potential ptrace traps.

Acked-by: Kees Cook <keescook@chromium.org>
Tested-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
9 years agoARM: 8086/1: Set memblock limit for nommu
Laura Abbott [Fri, 27 Jun 2014 09:17:27 +0000 (10:17 +0100)]
ARM: 8086/1: Set memblock limit for nommu

Commit 1c2f87c (ARM: 8025/1: Get rid of meminfo) changed find_limits
to use memblock_get_current_limit for calculating the max_low pfn.
nommu targets never actually set a limit on memblock though which
means memblock_get_current_limit will just return the default
value. Set the memblock_limit to be the end of DDR to make sure
bounds are calculated correctly.

Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
9 years agoARM: 8085/1: sa1100: collie: add top boot mtd partition
Andrea Adami [Wed, 25 Jun 2014 21:32:26 +0000 (22:32 +0100)]
ARM: 8085/1: sa1100: collie: add top boot mtd partition

The CFI mapping is now perfect so we can expose the top block, read only.
There isn't much to read, though, just the sharpsl_params values.

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
9 years agoARM: 8084/1: sa1100: collie: revert back to cfi_probe
Andrea Adami [Wed, 25 Jun 2014 21:31:15 +0000 (22:31 +0100)]
ARM: 8084/1: sa1100: collie: revert back to cfi_probe

Reverts commit d26b17edafc45187c30cae134a5e5429d58ad676
ARM: sa1100: collie.c: fall back to jedec_probe flash detection

Unfortunately the detection was challenged on the defective unit used for tests:
one of the NOR chips did not respond to the CFI query.
Moreover that bad device needed extra delays on erase-suspend/resume cycles.

Tested personally on 3 different units and with feedback of two other users.

Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
9 years agoARM: 8080/1: mcpm.h: remove unused variable declaration
Nicolas Pitre [Thu, 19 Jun 2014 21:57:01 +0000 (22:57 +0100)]
ARM: 8080/1: mcpm.h: remove unused variable declaration

The sync_phys variable has been replaced by link time computation in
mcpm_head.S before the code was submitted upstream.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
9 years agoARM: 8076/1: mm: add support for HW coherent systems in PL310 cache
Thomas Petazzoni [Fri, 13 Jun 2014 09:58:38 +0000 (10:58 +0100)]
ARM: 8076/1: mm: add support for HW coherent systems in PL310 cache

When a PL310 cache is used on a system that provides hardware
coherency, the outer cache sync operation is useless, and can be
skipped. Moreover, on some systems, it is harmful as it causes
deadlocks between the Marvell coherency mechanism, the Marvell PCIe
controller and the Cortex-A9.

To avoid this, this commit introduces a new Device Tree property
'arm,io-coherent' for the L2 cache controller node, valid only for the
PL310 cache. It identifies the usage of the PL310 cache in an I/O
coherent configuration. Internally, it makes the driver disable the
outer cache sync operation.

Note that technically speaking, a fully coherent system wouldn't
require any of the other .outer_cache operations. However, in
practice, when booting secondary CPUs, these are not yet coherent, and
therefore a set of cache maintenance operations are necessary at this
point. This explains why we keep the other .outer_cache operations and
only ->sync is disabled.

While in theory any write to a PL310 register could cause the
deadlock, in practice, disabling ->sync is sufficient to workaround
the deadlock, since the other cache maintenance operations are only
used in very specific situations.

Contrary to previous versions of this patch, this new version does not
simply NULL-ify the ->sync member, because the l2c_init_data
structures are now 'const' and therefore cannot be modified, which is
a good thing. Therefore, this patch introduces a separate
l2c_init_data instance, called of_l2c310_coherent_data.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
9 years agoMerge tag 'spi-v3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi
Linus Torvalds [Sat, 28 Jun 2014 18:32:32 +0000 (11:32 -0700)]
Merge tag 'spi-v3.16-rc2' of git://git./linux/kernel/git/broonie/spi

Pull spi fixes from Mark Brown:
 "A few driver specific fixes, the biggest one being a fix for the newly
  added Qualcomm SPI controller driver to make it not use its internal
  chip select due to hardware bugs, replacing it with GPIOs"

* tag 'spi-v3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi:
  spi: qup: Remove chip select function
  spi: qup: Fix order of spi_register_master
  spi: sh-sci: fix use-after-free in sh_sci_spi_remove()
  spi/pxa2xx: fix incorrect SW mode chipselect setting for BayTrail LPSS SPI

9 years agoMerge tag 'regulator-v3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 28 Jun 2014 18:31:58 +0000 (11:31 -0700)]
Merge tag 'regulator-v3.16-rc2' of git://git./linux/kernel/git/broonie/regulator

Pull regulator fixes from Mark Brown:
 "Several driver specific fixes here, the palmas fixes being especially
  important for a range of boards - the recent updates to support new
  devices have introduced several regressions"

* tag 'regulator-v3.16-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regulator:
  regulator: tps65218: Correct the the config register for LDO1
  regulator: tps65218: Add the missing of_node assignment in probe
  regulator: palmas: fix typo in enable_reg calculation
  regulator: bcm590xx: fix vbus name
  regulator: palmas: Fix SMPS enable/disable/is_enabled

9 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending
Linus Torvalds [Sat, 28 Jun 2014 16:43:58 +0000 (09:43 -0700)]
Merge git://git./linux/kernel/git/nab/target-pending

Pull SCSI target fixes from Nicholas Bellinger:
 "Mostly minor fixes this time around.  The highlights include:

   - iscsi-target CHAP authentication fixes to enforce explicit key
     values (Tejas Vaykole + rahul.rane)
   - fix a long-standing OOPs in target-core when a alua configfs
     attribute is accessed after port symlink has been removed.
     (Sebastian Herbszt)
   - fix a v3.10.y iscsi-target regression causing the login reject
     status class/detail to be ignored (Christoph Vu-Brugier)
   - fix a v3.10.y iscsi-target regression to avoid rejecting an
     existing ITT during Data-Out when data-direction is wrong (Santosh
     Kulkarni + Arshad Hussain)
   - fix a iscsi-target related shutdown deadlock on UP kernels (Mikulas
     Patocka)
   - fix a v3.16-rc1 build issue with vhost-scsi + !CONFIG_NET (MST)"

* git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending:
  iscsi-target: fix iscsit_del_np deadlock on unload
  iovec: move memcpy_from/toiovecend to lib/iovec.c
  iscsi-target: Avoid rejecting incorrect ITT for Data-Out
  tcm_loop: Fix memory leak in tcm_loop_submission_work error path
  iscsi-target: Explicily clear login response PDU in exception path
  target: Fix left-over se_lun->lun_sep pointer OOPs
  iscsi-target; Enforce 1024 byte maximum for CHAP_C key value
  iscsi-target: Convert chap_server_compute_md5 to use kstrtoul

9 years agoMerge remote-tracking branches 'spi/fix/pxa2xx', 'spi/fix/qup' and 'spi/fix/sh-sci...
Mark Brown [Sat, 28 Jun 2014 13:01:23 +0000 (14:01 +0100)]
Merge remote-tracking branches 'spi/fix/pxa2xx', 'spi/fix/qup' and 'spi/fix/sh-sci' into spi-linus

9 years agoMerge remote-tracking branches 'regulator/fix/bcm590xx', 'regulator/fix/palmas' and...
Mark Brown [Sat, 28 Jun 2014 13:01:04 +0000 (14:01 +0100)]
Merge remote-tracking branches 'regulator/fix/bcm590xx', 'regulator/fix/palmas' and 'regulator/fix/tps65218' into regulator-linus

9 years agoiscsi-target: fix iscsit_del_np deadlock on unload
Mikulas Patocka [Mon, 23 Jun 2014 17:42:37 +0000 (13:42 -0400)]
iscsi-target: fix iscsit_del_np deadlock on unload

On uniprocessor preemptible kernel, target core deadlocks on unload. The
following events happen:
* iscsit_del_np is called
* it calls send_sig(SIGINT, np->np_thread, 1);
* the scheduler switches to the np_thread
* the np_thread is woken up, it sees that kthread_should_stop() returns
  false, so it doesn't terminate
* the np_thread clears signals with flush_signals(current); and goes back
  to sleep in iscsit_accept_np
* the scheduler switches back to iscsit_del_np
* iscsit_del_np calls kthread_stop(np->np_thread);
* the np_thread is waiting in iscsit_accept_np and it doesn't respond to
  kthread_stop

The deadlock could be resolved if the administrator sends SIGINT signal to
the np_thread with killall -INT iscsi_np

The reproducible deadlock was introduced in commit
db6077fd0b7dd41dc6ff18329cec979379071f87, but the thread-stopping code was
racy even before.

This patch fixes the problem. Using kthread_should_stop to stop the
np_thread is unreliable, so we test np_thread_state instead. If
np_thread_state equals ISCSI_NP_THREAD_SHUTDOWN, the thread exits.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
9 years agoMerge tag 'iommu-fixes-v3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 28 Jun 2014 02:00:45 +0000 (19:00 -0700)]
Merge tag 'iommu-fixes-v3.16-rc1' of git://git./linux/kernel/git/joro/iommu

Pull IOMMU fixes from Joerg Roedel:

 - fix VT-d regression with handling multiple RMRR entries per device

 - fix a small race that was left in the mmu_notifier handling in the
   AMD IOMMUv2 driver

* tag 'iommu-fixes-v3.16-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/amd: Fix small race between invalidate_range_end/start
  iommu/vt-d: fix bug in handling multiple RMRRs for the same PCI device

9 years agoMerge branch 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Linus Torvalds [Sat, 28 Jun 2014 01:43:03 +0000 (18:43 -0700)]
Merge branch 'x86/urgent' of git://git./linux/kernel/git/tip/tip

Pull x86 fixes from Peter Anvin:
 "A pile of fixes related to the VDSO, EFI and 32-bit badsys handling.

  It turns out that removing the section headers from the VDSO breaks
  gdb, so this puts back most of them.  A very simple typo broke
  rt_sigreturn on some versions of glibc, with obviously disastrous
  results.  The rest is pretty much fixes for the corresponding fallout.

  The EFI fixes fixes an arithmetic overflow on 32-bit systems and
  quiets some build warnings.

  Finally, when invoking an invalid system call number on x86-32, we
  bypass a bunch of handling, which can make the audit code oops"

* 'x86/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  efi-pstore: Fix an overflow on 32-bit builds
  x86/vdso: Error out in vdso2c if DT_RELA is present
  x86/vdso: Move DISABLE_BRANCH_PROFILING into the vdso makefile
  x86_32, signal: Fix vdso rt_sigreturn
  x86_32, entry: Do syscall exit work on badsys (CVE-2014-4508)
  x86/vdso: Create .build-id links for unstripped vdso files
  x86/vdso: Remove some redundant in-memory section headers
  x86/vdso: Improve the fake section headers
  x86/vdso2c: Use better macros for ELF bitness
  x86/vdso: Discard the __bug_table section
  efi: Fix compiler warnings (unused, const, type)

9 years agoMerge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus
Linus Torvalds [Sat, 28 Jun 2014 01:37:56 +0000 (18:37 -0700)]
Merge branch 'upstream' of git://git.linux-mips.org/ralf/upstream-linus

Pull MIPS fixes from Ralf Baechle:
 "This is dominated by a large number of changes necessary for the MIPS
  BPF code.  code.  Aside of that there are

   - a fix for the MSC system controller support code.
   - a Turbochannel fix.
   - a recordmcount fix that's MIPS-specific.
   - barrier fixes to smp-cps / pm-cps after unrelated changes elsewhere
     in the kernel.
   - revert support for MSA registers in the signal frames.  The
     reverted patch did modify the signal stack frame which of course is
     inacceptable.
   - fix math-emu build breakage with older compilers.
   - some related cleanup.
   - fix Lasat build error if CONFIG_CRC32 isn't set to y by the user"

* 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (27 commits)
  MIPS: Lasat: Fix build error if CRC32 is not enabled.
  TC: Handle device_register() errors.
  MIPS: MSC: Prevent out-of-bounds writes to MIPS SC ioremap'd region
  MIPS: bpf: Fix stack space allocation for BPF memwords on MIPS64
  MIPS: BPF: Use 32 or 64-bit load instruction to load an address to register
  MIPS: bpf: Fix PKT_TYPE case for big-endian cores
  MIPS: BPF: Prevent kernel fall over for >=32bit shifts
  MIPS: bpf: Drop update_on_xread and always initialize the X register
  MIPS: bpf: Fix is_range() semantics
  MIPS: bpf: Use pr_debug instead of pr_warn for unhandled opcodes
  MIPS: bpf: Fix return values for VLAN_TAG_PRESENT case
  MIPS: bpf: Use correct mask for VLAN_TAG case
  MIPS: bpf: Fix branch conditional for BPF_J{GT/GE} cases
  MIPS: bpf: Add SEEN_SKB to flags when looking for the PKT_TYPE
  MIPS: bpf: Use 'andi' instead of 'and' for the VLAN cases
  MIPS: bpf: Return error code if the offset is a negative number
  MIPS: bpf: Use the LO register to get division's quotient
  MIPS: mm: uasm: Fix lh micro-assembler instruction
  MIPS: uasm: Add SLT uasm instruction
  MIPS: uasm: Add s3s1s2 instruction builder
  ...

9 years agoMerge tag 'arc-fixes-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupt...
Linus Torvalds [Sat, 28 Jun 2014 01:36:50 +0000 (18:36 -0700)]
Merge tag 'arc-fixes-for-3.16' of git://git./linux/kernel/git/vgupta/arc

Pull ARC fixes from Vineet Gupta:
 "Some SMP changes, a ptrace request for NPTL debugging, bunch of build
  breakages/warnings"

* tag 'arc-fixes-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/vgupta/arc:
  ARC: [SMP] Enable icache coherency
  ARC: [SMP] Fix IPI IRQ registration
  ARC: Implement ptrace(PTRACE_GET_THREAD_AREA)
  ARC: optimize kernel bss clearing in early boot code
  ARC: Fix build breakage for !CONFIG_ARC_DW2_UNWIND
  ARC: fix build warning in devtree
  ARC: remove checks for CONFIG_ARC_MMU_V4

9 years agoMerge tag 'compress-3.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh...
Linus Torvalds [Sat, 28 Jun 2014 01:33:49 +0000 (18:33 -0700)]
Merge tag 'compress-3.16-rc3' of git://git./linux/kernel/git/gregkh/driver-core

Pull compress bugfix from Greg KH:
 "Here is another lz4 bugfix for 3.16-rc3 that resolves a reported issue
  with that compression algorithm"

* tag 'compress-3.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
  lz4: fix another possible overrun

9 years agoMerge tag 'stable/for-linus-3.16-rc1-tag' of git://git.kernel.org/pub/scm/linux/kerne...
Linus Torvalds [Sat, 28 Jun 2014 01:04:22 +0000 (18:04 -0700)]
Merge tag 'stable/for-linus-3.16-rc1-tag' of git://git./linux/kernel/git/konrad/swiotlb

Pull swiotlb bugfix from Konrad Rzeszutek Wilk:
 "One bug-fix that had been in tree for quite some time.  We had assumed
  that the physical address zero was invalid and would fail it.  But
  that is not true and on some architectures it is not reserved and
  valid.  This fixes it"

* tag 'stable/for-linus-3.16-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb:
  swiotlb: don't assume PA 0 is invalid

9 years agoMerge tag 'sound-3.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai...
Linus Torvalds [Sat, 28 Jun 2014 00:21:36 +0000 (17:21 -0700)]
Merge tag 'sound-3.16-rc3' of git://git./linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "Here includes a few patchset for fixing mostly HD-audio issues in
  addition to a patch assuring the compress API bytes alignment and a
  fix for the die-hard existing race condition at USB-audio
  disconnection.  The volume looks big in Realtek HD-audio code, but
  it's just a translation of the fixup tables, and the actual changes
  are rather trivial"

* tag 'sound-3.16-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ALSA: hda - restore BCLK M/N values when resuming HSW/BDW display controller
  ALSA: usb-audio: Fix races at disconnection and PCM closing
  ALSA: hda - Adjust speaker HPF and add LED support for HP Spectre 13
  ALSA: hda - Make the pin quirk tables use the SND_HDA_PIN_QUIRK macro
  ALSA: hda - Make a SND_HDA_PIN_QUIRK macro
  ALSA: hda - Add pin quirk for Dell XPS 15
  ALSA: hda - hdmi: call overridden init on resume
  ALSA: hda - Fix usage of "model" module parameter
  ALSA: compress: fix the struct alignment to 4 bytes

9 years agoMerge tag 'mfd-fixes-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd
Linus Torvalds [Sat, 28 Jun 2014 00:20:48 +0000 (17:20 -0700)]
Merge tag 'mfd-fixes-3.16' of git://git./linux/kernel/git/lee/mfd

Pull MFD fixes from Lee Jones:
 "Couple of simple fixes due for the v3.16 -rcs"

* tag 'mfd-fixes-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd:
  mfd: ab8500: Fix dt irq mapping
  mfd: davinci: Voicecodec needs regmap_mmio
  mfd: STw481x: Allow modular build
  mfd: UCB1x00: Enable modular build

9 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Sat, 28 Jun 2014 00:05:39 +0000 (17:05 -0700)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm fixes from Dave Airlie:
 "Exynos, i915 and msm fixes and one core fix.

  exynos:
     hdmi power off and mixer issues

  msm:
     iommu, build fixes,

  i915:
     regression races and warning fixes"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux: (22 commits)
  drm/i915: vlv_prepare_pll is only needed in case of non DSI interfaces
  drm: fix NULL pointer access by wrong ioctl
  drm/exynos: enable vsync interrupt while waiting for vblank
  drm/exynos: soft reset mixer before reconfigure after power-on
  drm/exynos: allow multiple layer updates per vsync for mixer
  drm/i915: Hold the table lock whilst walking the file's idr and counting the objects in debugfs
  drm/i915: BDW: Adding Reserved PCI IDs.
  drm/i915: Only mark the ctx as initialised after a SET_CONTEXT operation
  drm/exynos: stop mixer before gating clocks during poweroff
  drm/exynos: set power state variable after enabling clocks and power
  drm/exynos: disable unused windows on apply
  drm/exynos: Fix de-registration ordering
  drm/exynos: change zero to NULL for sparse
  drm/exynos: dpi: Fix NULL pointer dereference with legacy bindings
  drm/exynos: hdmi: fix power order issue
  drm/i915: default to having backlight if VBT not available
  drm/i915: cache hw power well enabled state
  drm/msm: fix IOMMU cleanup for -EPROBE_DEFER
  drm/msm: use PAGE_ALIGNED instead of IS_ALIGNED(PAGE_SIZE)
  drm/msm/hdmi: set hdp clock rate before prepare_enable
  ...

9 years agoiovec: move memcpy_from/toiovecend to lib/iovec.c
Michael S. Tsirkin [Thu, 19 Jun 2014 18:22:56 +0000 (21:22 +0300)]
iovec: move memcpy_from/toiovecend to lib/iovec.c

ERROR: "memcpy_fromiovecend" [drivers/vhost/vhost_scsi.ko] undefined!

commit 9f977ef7b671f6169eca78bf40f230fe84b7c7e5
    vhost-scsi: Include prot_bytes into expected data transfer length
in target-pending makes drivers/vhost/scsi.c call memcpy_fromiovecend().
This function is not available when CONFIG_NET is not enabled.

socket.h already includes uio.h, so no callers need updating.

Reported-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
9 years agoiscsi-target: Avoid rejecting incorrect ITT for Data-Out
Nicholas Bellinger [Fri, 20 Jun 2014 17:59:57 +0000 (10:59 -0700)]
iscsi-target: Avoid rejecting incorrect ITT for Data-Out

This patch changes iscsit_check_dataout_hdr() to dump the incoming
Data-Out payload when the received ITT is not associated with a
WRITE, instead of calling iscsit_reject_cmd() for the non WRITE
ITT descriptor.

This addresses a bug where an initiator sending an Data-Out for
an ITT associated with a READ would end up generating a reject
for the READ, eventually resulting in list corruption.

Reported-by: Santosh Kulkarni <santosh.kulkarni@calsoftinc.com>
Reported-by: Arshad Hussain <arshad.hussain@calsoftinc.com>
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
9 years agolz4: fix another possible overrun
Greg Kroah-Hartman [Tue, 24 Jun 2014 20:59:01 +0000 (16:59 -0400)]
lz4: fix another possible overrun

There is one other possible overrun in the lz4 code as implemented by
Linux at this point in time (which differs from the upstream lz4
codebase, but will get synced at in a future kernel release.)  As
pointed out by Don, we also need to check the overflow in the data
itself.

While we are at it, replace the odd error return value with just a
"simple" -1 value as the return value is never used for anything other
than a basic "did this work or not" check.

Reported-by: "Don A. Bailey" <donb@securitymouse.com>
Reported-by: Willy Tarreau <w@1wt.eu>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9 years agoMerge tag 'efi-urgent' into x86/urgent
H. Peter Anvin [Fri, 27 Jun 2014 14:55:24 +0000 (07:55 -0700)]
Merge tag 'efi-urgent' into x86/urgent

 * Fix a few compiler warnings (one being a real bug) in the arm64 EFI
   code that lots of people are running into and reporting - Catalin Marinas

 * Use a cast to avoid a 32-bit overflow issue when generating pstore
   filenames - Andrzej Zaborowski

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
9 years agoefi-pstore: Fix an overflow on 32-bit builds
Andrzej Zaborowski [Mon, 9 Jun 2014 14:50:40 +0000 (16:50 +0200)]
efi-pstore: Fix an overflow on 32-bit builds

In generic_id the long int timestamp is multiplied by 100000 and needs
an explicit cast to u64.

Without that the id in the resulting pstore filename is wrong and
userspace may have problems parsing it, but more importantly files in
pstore can never be deleted and may fill the EFI flash (brick device?).
This happens because when generic pstore code wants to delete a file,
it passes the id to the EFI backend which reinterpretes it and a wrong
variable name is attempted to be deleted.  There's no error message but
after remounting pstore, deleted files would reappear.

Signed-off-by: Andrew Zaborowski <andrew.zaborowski@intel.com>
Acked-by: David Rientjes <rientjes@google.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Matt Fleming <matt.fleming@intel.com>
9 years agoMerge tag 'drm-intel-fixes-2014-06-26' of git://anongit.freedesktop.org/drm-intel...
Dave Airlie [Fri, 27 Jun 2014 05:04:06 +0000 (15:04 +1000)]
Merge tag 'drm-intel-fixes-2014-06-26' of git://anongit.freedesktop.org/drm-intel into drm-fixes

Fixes for 3.16-rc2; regressions, races, and warns; Broadwell PCI IDs.

* tag 'drm-intel-fixes-2014-06-26' of git://anongit.freedesktop.org/drm-intel:
  drm/i915: vlv_prepare_pll is only needed in case of non DSI interfaces
  drm/i915: Hold the table lock whilst walking the file's idr and counting the objects in debugfs
  drm/i915: BDW: Adding Reserved PCI IDs.
  drm/i915: Only mark the ctx as initialised after a SET_CONTEXT operation
  drm/i915: default to having backlight if VBT not available
  drm/i915: cache hw power well enabled state

9 years agotcm_loop: Fix memory leak in tcm_loop_submission_work error path
Nicholas Bellinger [Tue, 17 Jun 2014 22:23:03 +0000 (22:23 +0000)]
tcm_loop: Fix memory leak in tcm_loop_submission_work error path

This patch fixes a tcm_loop_cmd descriptor memory leak in the
tcm_loop_submission_work() error path, and would result in
warnings about leaked tcm_loop_cmd_cache objects at module
unload time.

Go ahead and invoke kmem_cache_free() to release tl_cmd back to
tcm_loop_cmd_cache before calling sc->scsi_done().

Reported-by: Sebastian Herbszt <herbszt@gmx.de>
Tested-by: Sebastian Herbszt <herbszt@gmx.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
9 years agoiscsi-target: Explicily clear login response PDU in exception path
Nicholas Bellinger [Tue, 17 Jun 2014 21:54:38 +0000 (21:54 +0000)]
iscsi-target: Explicily clear login response PDU in exception path

This patch adds a explicit memset to the login response PDU
exception path in iscsit_tx_login_rsp().

This addresses a regression bug introduced in commit baa4d64b
where the initiator would end up not receiving the login
response and associated status class + detail, before closing
the login connection.

Reported-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Tested-by: Christophe Vu-Brugier <cvubrugier@yahoo.fr>
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
9 years agotarget: Fix left-over se_lun->lun_sep pointer OOPs
Nicholas Bellinger [Mon, 16 Jun 2014 20:25:54 +0000 (20:25 +0000)]
target: Fix left-over se_lun->lun_sep pointer OOPs

This patch fixes a left-over se_lun->lun_sep pointer OOPs when one
of the /sys/kernel/config/target/$FABRIC/$WWPN/$TPGT/lun/$LUN/alua*
attributes is accessed after the $DEVICE symlink has been removed.

To address this bug, go ahead and clear se_lun->lun_sep memory in
core_dev_unexport(), so that the existing checks for show/store
ALUA attributes in target_core_fabric_configfs.c work as expected.

Reported-by: Sebastian Herbszt <herbszt@gmx.de>
Tested-by: Sebastian Herbszt <herbszt@gmx.de>
Cc: stable@vger.kernel.org
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
9 years agoiscsi-target; Enforce 1024 byte maximum for CHAP_C key value
Nicholas Bellinger [Fri, 13 Jun 2014 04:28:31 +0000 (04:28 +0000)]
iscsi-target; Enforce 1024 byte maximum for CHAP_C key value

This patch adds a check in chap_server_compute_md5() to enforce a
1024 byte maximum for the CHAP_C key value following the requirement
in RFC-3720 Section 11.1.4:

   "..., C and R are large-binary-values and their binary length (not
   the length of the character string that represents them in encoded
   form) MUST not exceed 1024 bytes."

Reported-by: rahul.rane <rahul.rane@calsoftinc.com>
Tested-by: rahul.rane <rahul.rane@calsoftinc.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
9 years agoiscsi-target: Convert chap_server_compute_md5 to use kstrtoul
Nicholas Bellinger [Fri, 13 Jun 2014 04:05:16 +0000 (04:05 +0000)]
iscsi-target: Convert chap_server_compute_md5 to use kstrtoul

This patch converts chap_server_compute_md5() from simple_strtoul() to
kstrtoul usage().

This addresses the case where a empty 'CHAP_I=' key value received during
mutual authentication would be converted to a '0' by simple_strtoul(),
instead of failing the login attempt.

Reported-by: Tejas Vaykole <tejas.vaykole@calsoftinc.com>
Tested-by: Tejas Vaykole <tejas.vaykole@calsoftinc.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
9 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-block
Linus Torvalds [Thu, 26 Jun 2014 20:06:13 +0000 (13:06 -0700)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

Pull block fixes from Jens Axboe:
 "A small collection of fixes/changes for the current series.  This
  contains:

   - Removal of dead code from Gu Zheng.

   - Revert of two bad fixes that went in earlier in this round, marking
     things as __init that were not purely used from init.

   - A fix for blk_mq_start_hw_queue() using the __blk_mq_run_hw_queue(),
     which could place us wrongly.  Make it use the non __ variant,
     which handles cases where we are called from the wrong CPU set.
     From me.

   - A fix for drbd, which allocates discard requests without room for
     the SCSI payload.  From Lars Ellenberg.

   - A fix for user-after-free in the blkcg code from Tejun.

   - Addition of limiting gaps in SG lists, if the hardware needs it.
     This is the last pre-req patch for blk-mq to enable the full NVMe
     conversion.  Could wait until 3.17, but it's simple enough so would
     be nice to have everything we need for the NVMe port in the 3.17
     release.  From me"

* 'for-linus' of git://git.kernel.dk/linux-block:
  drbd: fix NULL pointer deref in blk_add_request_payload
  blk-mq: blk_mq_start_hw_queue() should use blk_mq_run_hw_queue()
  block: add support for limiting gaps in SG lists
  bio: remove unused macro bip_vec_idx()
  Revert "block: add __init to elv_register"
  Revert "block: add __init to blkcg_policy_register"
  blkcg: fix use-after-free in __blkg_release_rcu() by making blkcg_gq refcnt an atomic_t
  floppy: format block0 read error message properly

9 years agoFix 32-bit regression in block device read(2)
Al Viro [Mon, 23 Jun 2014 07:44:40 +0000 (08:44 +0100)]
Fix 32-bit regression in block device read(2)

blkdev_read_iter() wants to cap the iov_iter by the amount of data
remaining to the end of device.  That's what iov_iter_truncate() is for
(trim iter->count if it's above the given limit).  So far, so good, but
the argument of iov_iter_truncate() is size_t, so on 32bit boxen (in
case of a large device) we end up with that upper limit truncated down
to 32 bits *before* comparing it with iter->count.

Easily fixed by making iov_iter_truncate() take 64bit argument - it does
the right thing after such change (we only reach the assignment in there
when the current value of iter->count is greater than the limit, i.e.
for anything that would get truncated we don't reach the assignment at
all) and that argument is not the new value of iter->count - it's an
upper limit for such.

The overhead of passing u64 is not an issue - the thing is inlined, so
callers passing size_t won't pay any penalty.

Reported-and-tested-by: Theodore Tso <tytso@mit.edu>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Tested-by: Alan Cox <gnomes@lxorguk.ukuu.org.uk>
Tested-by: Bruno Wolff III <bruno@wolff.to>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
9 years agoALSA: hda - restore BCLK M/N values when resuming HSW/BDW display controller
Mengdong Lin [Thu, 26 Jun 2014 10:45:16 +0000 (18:45 +0800)]
ALSA: hda - restore BCLK M/N values when resuming HSW/BDW display controller

For Intel Haswell/Broadwell display HD-A controller, the 24MHz HD-A link BCLK
is converted from Core Display Clock (CDCLK): BCLK = CDCLK * M / N
And there are two registers EM4 and EM5 to program M, N value respectively.
The EM4/EM5 values will be lost and when the display power well is disabled.

BIOS programs CDCLK selected by OEM and EM4/EM5, but BIOS has no idea about
display power well on/off at runtime. So the M/N can be wrong if non-default
CDCLK is used when the audio controller resumes, which results in an invalid
BCLK and abnormal audio playback rate. So this patch saves and restores valid
M/N values on controller suspend/resume.

And 'struct hda_intel' is defined to contain standard HD-A 'struct azx' and
Intel specific fields, as Takashi suggested.

Signed-off-by: Mengdong Lin <mengdong.lin@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoMIPS: Lasat: Fix build error if CRC32 is not enabled.
Ralf Baechle [Thu, 26 Jun 2014 13:43:01 +0000 (14:43 +0100)]
MIPS: Lasat: Fix build error if CRC32 is not enabled.

Kconfig doesn't select CRC32 so it's possible to build a Lasat kernel
without CONFIG_CRC32 resulting in a build error:

  LD      vmlinux
arch/mips/built-in.o: In function `lasat_init_board_info':
(.text+0x22c): undefined reference to `crc32_le'
arch/mips/built-in.o: In function `lasat_write_eeprom_info':
(.text+0x7fc): undefined reference to `crc32_le'
make: *** [vmlinux] Error 1

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agomfd: ab8500: Fix dt irq mapping
Grygorii Strashko [Mon, 2 Jun 2014 16:27:58 +0000 (19:27 +0300)]
mfd: ab8500: Fix dt irq mapping

The AD8500 defines itself as interrupt-controller in DT,
but it doesn't assign DT node to IRQ domain when creates it.
As result, of_irq_xx() helpers don't work because they can't
find necessary IRQ domain.

Hence, fix it by assigning AD8500 core device DT node to IRQ
domain when it's created.

This patch fixes STE u8500 Snowball boot failure reported by Kevin Hilman
https://lkml.org/lkml/2014/5/27/624

Reported-and-tested-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: davinci: Voicecodec needs regmap_mmio
Arnd Bergmann [Thu, 5 Jun 2014 21:24:13 +0000 (23:24 +0200)]
mfd: davinci: Voicecodec needs regmap_mmio

Without REGMAP_MMIO, building that driver results in a link error:

drivers/built-in.o: In function `davinci_vc_probe':
:(.init.text+0x3c1c): undefined reference to `devm_regmap_init_mmio_clk'

This adds a Kconfig 'select' statement as the usual way to ensure
that REGMAP_MMIO is enabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: STw481x: Allow modular build
Arnd Bergmann [Thu, 5 Jun 2014 21:24:14 +0000 (23:24 +0200)]
mfd: STw481x: Allow modular build

This driver depends on I2C, which may be a loadable module.
While you'd probably want both to be built-in in practice,
allowing a modular build avoids possible randconfig link
errors.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agomfd: UCB1x00: Enable modular build
Arnd Bergmann [Thu, 5 Jun 2014 21:24:12 +0000 (23:24 +0200)]
mfd: UCB1x00: Enable modular build

The UCB1200 / UCB1300 driver uses the MCP_SA11X0 driver, which
can be a loadable module, but this results in a link error
when UCB1200 itself is built-in:

drivers/built-in.o: In function `ucb1x00_io_set_dir':
:(.text+0x4a364): undefined reference to `mcp_reg_write'
drivers/built-in.o: In function `ucb1x00_io_write':
:(.text+0x4a3dc): undefined reference to `mcp_reg_write'
drivers/built-in.o: In function `ucb1x00_io_read':
:(.text+0x4a400): undefined reference to `mcp_reg_read'
drivers/built-in.o: In function `ucb1x00_adc_enable':
:(.text+0x4a460): undefined reference to `mcp_enable'
...

This can easily be resolved by making CONFIG_MCP_UCB1200 itself
a tristate option, since that causes Kconfig to track the
dependency correctly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
9 years agoTC: Handle device_register() errors.
Levente Kurusa [Wed, 2 Apr 2014 10:00:37 +0000 (12:00 +0200)]
TC: Handle device_register() errors.

Make the TURBOchannel driver bail out if the call to device_register()
failed.

Signed-off-by: Levente Kurusa <levex@linux.com>
Acked-by: Maciej W. Rozycki <macro@linux-mips.org>
Cc: LKML <linux-kernel@vger.kernel.org>
Cc: Linux MIPS <linux-mips@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/6673/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMIPS: MSC: Prevent out-of-bounds writes to MIPS SC ioremap'd region
Markos Chandras [Mon, 23 Jun 2014 08:48:51 +0000 (09:48 +0100)]
MIPS: MSC: Prevent out-of-bounds writes to MIPS SC ioremap'd region

Previously, the lower limit for the MIPS SC initialization loop was
set incorrectly allowing one extra loop leading to writes
beyond the MSC ioremap'd space. More precisely, the value of the 'imp'
in the last loop increased beyond the msc_irqmap_t boundaries and
as a result of which, the 'n' variable was loaded with an incorrect
value. This value was used later on to calculate the offset in the
MSC01_IC_SUP which led to random crashes like the following one:

CPU 0 Unable to handle kernel paging request at virtual address e75c0200,
epc == 8058dba4, ra == 8058db90
[...]
Call Trace:
[<8058dba4>] init_msc_irqs+0x104/0x154
[<8058b5bc>] arch_init_irq+0xd8/0x154
[<805897b0>] start_kernel+0x220/0x36c

Kernel panic - not syncing: Attempted to kill the idle task!

This patch fixes the problem

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Reviewed-by: James Hogan <james.hogan@imgtec.com>
Cc: stable@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7118/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMIPS: bpf: Fix stack space allocation for BPF memwords on MIPS64
Markos Chandras [Mon, 23 Jun 2014 09:39:00 +0000 (10:39 +0100)]
MIPS: bpf: Fix stack space allocation for BPF memwords on MIPS64

When allocating stack space for BPF memwords we need to use the
appropriate 32 or 64-bit instruction to avoid losing the top 32 bits
of the stack pointer.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Daniel Borkmann <dborkman@redhat.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: netdev@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7135/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMIPS: BPF: Use 32 or 64-bit load instruction to load an address to register
Markos Chandras [Wed, 25 Jun 2014 08:39:38 +0000 (09:39 +0100)]
MIPS: BPF: Use 32 or 64-bit load instruction to load an address to register

When loading a pointer to register we need to use the appropriate
32 or 64bit instruction to preserve the pointers' top 32bits.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Daniel Borkmann <dborkman@redhat.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: netdev@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7180/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMIPS: bpf: Fix PKT_TYPE case for big-endian cores
Markos Chandras [Mon, 23 Jun 2014 09:38:58 +0000 (10:38 +0100)]
MIPS: bpf: Fix PKT_TYPE case for big-endian cores

The skb->pkt_type field is defined as follows:

u8 pkt_type:3,
   fclone:2,
   ipvs_property:1,
   peeked:1,
   nf_trace:1

resulting to the following layout in big-endian systems

[pkt_type][fclone][ipvs_propery][peeked][nf_trace]
^                                                ^
|                                                |
LSB                                             MSB

As a result, the existing code did not work because it was trying to
match pkt_type == 7 whereas in reality it is 7<<5 on big-endian
systems.

This has been fixed in the interpreter in
0dcceabb0c1bf2d4c12a748df9933fad303072a7
"net: filter: fix SKF_AD_PKTTYPE extension on big-endian"

The fix is to look for 7<<5 on big-endian systems for the pkt_type
field, and shift by 5 so the packet type will be at the lower 3 bits
of the A register.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Daniel Borkmann <dborkman@redhat.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: netdev@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7132/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMIPS: BPF: Prevent kernel fall over for >=32bit shifts
Markos Chandras [Wed, 25 Jun 2014 08:37:21 +0000 (09:37 +0100)]
MIPS: BPF: Prevent kernel fall over for >=32bit shifts

Remove BUG_ON() if the shift immediate is >=32 to avoid kernel crashes
due to malicious user input. If the shift immediate is >= 32,
we simply load the destination register with 0 since only
32-bit instructions are used by JIT so this will do the
correct thing even on MIPS64.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Daniel Borkmann <dborkman@redhat.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: netdev@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7179/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMIPS: bpf: Drop update_on_xread and always initialize the X register
Markos Chandras [Mon, 23 Jun 2014 09:38:56 +0000 (10:38 +0100)]
MIPS: bpf: Drop update_on_xread and always initialize the X register

Previously, update_on_xread() only set the reset flag if SEEN_X hasn't
been set already. However, SEEN_X is used to indicate that X is used
as destination or source register so there are some cases where X
is only used as source register and we really need to make sure that it
has been initialized in time. As a result of which, drop this function and
always set X to zero if it's used in any of the opcodes.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Daniel Borkmann <dborkman@redhat.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: netdev@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7133/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMIPS: bpf: Fix is_range() semantics
Markos Chandras [Mon, 23 Jun 2014 09:38:55 +0000 (10:38 +0100)]
MIPS: bpf: Fix is_range() semantics

is_range() was meant to check whether the number is within
the s16 range or not. However the return values and consumers expected
the exact opposite. We fix that by inverting the logic in the function
to return 'true' for < s16 and 'false' for > s16.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Reported-by: Alexei Starovoitov <ast@plumgrid.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Daniel Borkmann <dborkman@redhat.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: netdev@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7131/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMIPS: bpf: Use pr_debug instead of pr_warn for unhandled opcodes
Markos Chandras [Mon, 23 Jun 2014 09:38:54 +0000 (10:38 +0100)]
MIPS: bpf: Use pr_debug instead of pr_warn for unhandled opcodes

We should prevent spamming the logs during normal execution of bpf-jit.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Suggested-by: Alexei Starovoitov <ast@plumgrid.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Daniel Borkmann <dborkman@redhat.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: netdev@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7129/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMIPS: bpf: Fix return values for VLAN_TAG_PRESENT case
Markos Chandras [Mon, 23 Jun 2014 09:38:53 +0000 (10:38 +0100)]
MIPS: bpf: Fix return values for VLAN_TAG_PRESENT case

If VLAN_TAG_PRESENT is not zero, then return 1 as expected by
classic BPF. Otherwise return 0.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Daniel Borkmann <dborkman@redhat.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: netdev@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7128/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMIPS: bpf: Use correct mask for VLAN_TAG case
Markos Chandras [Mon, 23 Jun 2014 09:38:52 +0000 (10:38 +0100)]
MIPS: bpf: Use correct mask for VLAN_TAG case

Using VLAN_VID_MASK is not correct to get the vlan tag. Use
~VLAN_PRESENT_MASK instead and make sure it's u16 so the top 16-bits
will be removed. This will ensure that the emit_andi() code will not
treat this as a big 32-bit unsigned value.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Daniel Borkmann <dborkman@redhat.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: netdev@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7127/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMIPS: bpf: Fix branch conditional for BPF_J{GT/GE} cases
Markos Chandras [Mon, 23 Jun 2014 09:38:51 +0000 (10:38 +0100)]
MIPS: bpf: Fix branch conditional for BPF_J{GT/GE} cases

The sltiu and sltu instructions will set the scratch register
to 1 if A <= X|K so fix the emitted branch conditional to check
for scratch != zero rather than scratch >= zero which would complicate
the resuling branch logic given that MIPS does not have a BGT or BGET
instructions to compare general purpose registers directly.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Daniel Borkmann <dborkman@redhat.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: netdev@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7126/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMIPS: bpf: Add SEEN_SKB to flags when looking for the PKT_TYPE
Markos Chandras [Mon, 23 Jun 2014 09:38:50 +0000 (10:38 +0100)]
MIPS: bpf: Add SEEN_SKB to flags when looking for the PKT_TYPE

The SKF_AD_PKTTYPE uses the skb pointer so make sure it's in the
flags so it will be initialized in time.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Daniel Borkmann <dborkman@redhat.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: netdev@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7125/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMIPS: bpf: Use 'andi' instead of 'and' for the VLAN cases
Markos Chandras [Mon, 23 Jun 2014 09:38:49 +0000 (10:38 +0100)]
MIPS: bpf: Use 'andi' instead of 'and' for the VLAN cases

The VLAN_VID_MASK and VLAN_TAG_PRESENT are immediates, so using
'and' which expects 3 registers will produce wrong results. Fix
this by using the 'andi' instruction.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Daniel Borkmann <dborkman@redhat.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: netdev@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7124/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMIPS: bpf: Return error code if the offset is a negative number
Markos Chandras [Mon, 23 Jun 2014 09:38:48 +0000 (10:38 +0100)]
MIPS: bpf: Return error code if the offset is a negative number

Previously, the negative offset was not checked leading to failures
due to trying to load data beyond the skb struct boundaries. Until we
have proper asm helpers in place, it's best if we return ENOSUPP if K
is negative when trying to JIT the filter or 0 during runtime if we
do an indirect load where the value of X is unknown during build time.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: Daniel Borkmann <dborkman@redhat.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: netdev@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7123/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMIPS: bpf: Use the LO register to get division's quotient
Markos Chandras [Mon, 23 Jun 2014 09:38:47 +0000 (10:38 +0100)]
MIPS: bpf: Use the LO register to get division's quotient

Reading from the HI register to get the division result is wrong.
The quotient is placed in the LO register.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Daniel Borkmann <dborkman@redhat.com>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: netdev@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7122/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMIPS: mm: uasm: Fix lh micro-assembler instruction
Markos Chandras [Mon, 23 Jun 2014 09:38:46 +0000 (10:38 +0100)]
MIPS: mm: uasm: Fix lh micro-assembler instruction

Commit d6b3314b49e12e8c349deb4ca28e7028db00728f "MIPS: uasm: Add lh uam
instruction" added the 'lh' micro-assembler instruction but it used the
'lw' opcode for it. Fix it by using the correct 'lh' opcode.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7121/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMIPS: uasm: Add SLT uasm instruction
Markos Chandras [Mon, 23 Jun 2014 09:38:45 +0000 (10:38 +0100)]
MIPS: uasm: Add SLT uasm instruction

It will be used later on by bpf-jit

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: Markos Chandras <markos.chandras@imgtec.com>
Patchwork: https://patchwork.linux-mips.org/patch/7120/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMIPS: uasm: Add s3s1s2 instruction builder
Markos Chandras [Mon, 23 Jun 2014 09:38:44 +0000 (10:38 +0100)]
MIPS: uasm: Add s3s1s2 instruction builder

It will be used later on by the SLT instruction.

Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7119/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agorecordmcount/MIPS: Fix possible incorrect mcount_loc table entries in modules
Alex Smith [Tue, 17 Jun 2014 09:39:53 +0000 (10:39 +0100)]
recordmcount/MIPS: Fix possible incorrect mcount_loc table entries in modules

On MIPS calls to _mcount in modules generate 2 instructions to load
the _mcount address (and therefore 2 relocations). The mcount_loc
table should only reference the first of these, so the second is
filtered out by checking the relocation offset and ignoring ones that
immediately follow the previous one seen.

However if a module has an _mcount call at offset 0, the second
relocation would not be filtered out due to old_r_offset == 0
being taken to mean that the current relocation is the first one
seen, and both would end up in the mcount_loc table.

This results in ftrace_make_nop() patching both (adjacent)
instructions to branches over the _mcount call sequence like so:

  0xffffffffc08a8000:  04 00 00 10     b       0xffffffffc08a8014
  0xffffffffc08a8004:  04 00 00 10     b       0xffffffffc08a8018
  0xffffffffc08a8008:  2d 08 e0 03     move    at,ra
  ...

The second branch is in the delay slot of the first, which is
defined to be unpredictable - on the platform on which this bug was
encountered, it triggers a reserved instruction exception.

Fix by initializing old_r_offset to ~0 and using that instead of 0
to determine whether the current relocation is the first seen.

Signed-off-by: Alex Smith <alex.smith@imgtec.com>
Cc: linux-kernel@vger.kernel.org
Cc: stable@vger.kernel.org
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/7098/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMIPS: BPF JIT: Fix build error.
Daniel Borkmann [Tue, 17 Jun 2014 10:16:18 +0000 (12:16 +0200)]
MIPS: BPF JIT: Fix build error.

  mips: allmodconfig fails in 3.16-rc1 with lots of undefined symbols.

  arch/mips/net/bpf_jit.c: In function 'is_load_to_a':
  arch/mips/net/bpf_jit.c:559:7: error: 'BPF_S_LD_W_LEN' undeclared (first use in this function)
  arch/mips/net/bpf_jit.c:559:7: note: each undeclared identifier is reported only once for each function it appears in
  arch/mips/net/bpf_jit.c:560:7: error: 'BPF_S_LD_W_ABS' undeclared (first use in this function)
  [...]

The reason behind this is that 3480593131e0 ("net: filter: get rid of
BPF_S_* enum") was routed via net-next tree, that takes all BPF-related
changes, at a time where MIPS BPF JIT was not part of net-next, while
c6610de353da ("MIPS: net: Add BPF JIT") was routed via mips arch tree
and went into mainline within the same merge window. Thus, fix it up by
converting BPF_S_* in a similar fashion as in 3480593131e0 for MIPS.

Reported-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Alexei Starovoitov <ast@plumgrid.com>
Cc: Markos Chandras <markos.chandras@imgtec.com>
Cc: linux-kernel@vger.kernel.org <linux-kernel@vger.kernel.org>
Cc: Linux MIPS Mailing List <linux-mips@linux-mips.org>
Patchwork: https://patchwork.linux-mips.org/patch/7099/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoRevert "MIPS: Save/restore MSA context around signals"
Paul Burton [Wed, 18 Jun 2014 14:00:46 +0000 (15:00 +0100)]
Revert "MIPS: Save/restore MSA context around signals"

This reverts commit eec43a224cf1 "MIPS: Save/restore MSA context around
signals" and the MSA parts of ca750649e08c "MIPS: kernel: signal:
Prevent save/restore FPU context in user memory" (the restore path of
which appears incorrect anyway...).

The reverted patch took care not to break compatibility with userland
users of struct sigcontext, but inadvertantly changed the offset of the
uc_sigmask field of struct ucontext. Thus Linux v3.15 breaks the
userland ABI. The MSA context will need to be saved via some other
opt-in mechanism, but for now revert the change to reduce the fallout.

This will have minimal impact upon use of MSA since the only supported
CPU which includes it (the P5600) is 32-bit and therefore requires that
the experimental CONFIG_MIPS_O32_FP64_SUPPORT Kconfig option be selected
before the kernel will set FR=1 for a task, a requirement for MSA use.
Thus the users of MSA are limited to known small groups of people & this
patch won't be breaking any previously working MSA-using userland
outside of experimental settings.

[ralf@linux-mips.org: Fixed rejects.]

Cc: stable@vger.kernel.org
Reported-by: Joseph S. Myers <joseph@codesourcery.com>
Signed-off-by: Paul Burton <paul.burton@imgtec.com>
Cc: linux-mips@linux-mips.org
Cc: stable@vger.kernel.org
Patchwork: https://patchwork.linux-mips.org/patch/7107/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoMIPS: math-emu: Reduce code duplication.
Ralf Baechle [Fri, 13 Jun 2014 14:36:45 +0000 (15:36 +0100)]
MIPS: math-emu: Reduce code duplication.

The fix in the preceeding commit did do exactly the same thing in two
places showing some code cleanup was due.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
9 years agoALSA: usb-audio: Fix races at disconnection and PCM closing
Takashi Iwai [Wed, 25 Jun 2014 12:24:47 +0000 (14:24 +0200)]
ALSA: usb-audio: Fix races at disconnection and PCM closing

When a USB-audio device is disconnected while PCM is still running, we
still see some race: the disconnect callback calls
snd_usb_endpoint_free() that calls release_urbs() and then kfree()
while a PCM stream would be closed at the same time and calls
stop_endpoints() that leads to wait_clear_urbs().  That is, the EP
object might be deallocated while a PCM stream is syncing with
wait_clear_urbs() with the same EP.

Basically calling multiple wait_clear_urbs() would work fine, also
calling wait_clear_urbs() and release_urbs() would work, too, as
wait_clear_urbs() just reads some fields in ep.  The problem is the
succeeding kfree() in snd_pcm_endpoint_free().

This patch moves out the EP deallocation into the later point, the
destructor callback.  At this stage, all PCMs must have been already
closed, so it's safe to free the objects.

Reported-by: Alan Stern <stern@rowland.harvard.edu>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
9 years agoARM: shmobile: Allow r8a7791 to build non-SMP APMU code
Magnus Damm [Fri, 6 Jun 2014 07:21:19 +0000 (16:21 +0900)]
ARM: shmobile: Allow r8a7791 to build non-SMP APMU code

Build the APMU for r8a7791 even though SMP is
disabled in the kernel config. Also initialize
Suspend-to-RAM from pm-r8a7791.c to in the future
cover both UP and SMP use cases of the APMU.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: Move r8a7791 reset code to pm-r8a7791.c
Magnus Damm [Fri, 6 Jun 2014 07:21:11 +0000 (16:21 +0900)]
ARM: shmobile: Move r8a7791 reset code to pm-r8a7791.c

Move r8a7791 specific reset vector setup code from the
SMP glue code to PM code. This makes the code one step
closer to allow PM operations such as Suspend-to-RAM
in the case when SMP is disabled in the kernel config.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
[horms+renesas@verge.net.au: updated for recent header file changes]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: Allow r8a7790 to build non-SMP APMU code
Magnus Damm [Fri, 6 Jun 2014 07:21:03 +0000 (16:21 +0900)]
ARM: shmobile: Allow r8a7790 to build non-SMP APMU code

Build the APMU for r8a7790 even though SMP is
disabled in the kernel config. Also initialize
Suspend-to-RAM from pm-r8a7790.c to in the future
cover both UP and SMP use cases of the APMU.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: Move r8a7790 reset code to pm-r8a7790.c
Magnus Damm [Fri, 6 Jun 2014 07:20:54 +0000 (16:20 +0900)]
ARM: shmobile: Move r8a7790 reset code to pm-r8a7790.c

Move r8a7790 specific reset vector setup code from the
SMP glue code to PM code. This makes the code one step
closer to allow PM operations such as Suspend-to-RAM
in the case when SMP is disabled in the kernel config.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
[horms+renesas@verge.net.au: updated for recent #include changes]
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: Use __init for APMU suspend init function
Magnus Damm [Fri, 6 Jun 2014 07:20:46 +0000 (16:20 +0900)]
ARM: shmobile: Use __init for APMU suspend init function

The function shmobile_smp_apmu_suspend_init() should
be put into the init section to not trigger section
mismatch warnings.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: Adjust APMU code to build for non-SMP
Magnus Damm [Fri, 6 Jun 2014 07:20:18 +0000 (16:20 +0900)]
ARM: shmobile: Adjust APMU code to build for non-SMP

Adjust the APMU code to allow build when CONFIG_SMP=n.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARM: shmobile: Allow use of boot code for non-SMP case
Magnus Damm [Fri, 6 Jun 2014 07:20:10 +0000 (16:20 +0900)]
ARM: shmobile: Allow use of boot code for non-SMP case

Allow build of platsmp.c and headsmp.S even though
SMP is disabled in the kernel configuration. With
this in place it is possible to share the reset
vector setup code with power management code that
needs to be built even though SMP is disabled.

Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
9 years agoARC: [SMP] Enable icache coherency
Vineet Gupta [Sun, 17 Feb 2013 10:51:42 +0000 (12:51 +0200)]
ARC: [SMP] Enable icache coherency

icaches are not snooped hence not cohrent in SMP setups which means
kernel has to do cross core calls to ensure the same.

The leaf routine __ic_line_inv_vaddr() now does cross core calls.

__sync_icache_dcache() is affected due to this:

* local dcache line flushed ahead of remote icache inv requests
* can't disable interrupts anymore, since
      __ic_line_inv_vaddr()->on_each_cpu() can deadlock.

| WARNING: CPU: 0 PID: 1 at kernel/smp.c:374
| smp_call_function_many+0x25a/0x2c4()
|
|  init_kprobes+0x90/0xc8
|     register_kprobe+0x1d6/0x510
| __sync_icache_dcache+0x28/0x80
|
|     DISABLE IRQ
|
|     __ic_line_inv_vaddr
| on_each_cpu
|      smp_call_function_many+0x25a/0x2c4   --> WARN
| __ic_line_inv_vaddr_local
|     __dc_line_op

* TODO: Needs to use mask of relevant CPUs to avoid broadcasting

Signed-off-by: Noam Camus <noamc@ezchip.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: [SMP] Fix IPI IRQ registration
Noam Camus [Thu, 28 Feb 2013 09:07:06 +0000 (11:07 +0200)]
ARC: [SMP] Fix IPI IRQ registration

Handle it just like timer. Current request_percpu_irq() would fail on
non-boot cpus and thus IRQ will remian unmasked on those cpus.

[vgupta: fix changelong]
Signed-off-by: Noam Camus <noamc@ezchip.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoMerge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6
Linus Torvalds [Thu, 26 Jun 2014 04:47:28 +0000 (21:47 -0700)]
Merge branch 'for-next' of git://git.samba.org/sfrench/cifs-2.6

Pull CIFS fixes from Steve French:
 "Small set of misc cifs/smb3 fixes"

* 'for-next' of git://git.samba.org/sfrench/cifs-2.6:
  [CIFS] fix mount failure with broken pathnames when smb3 mount with mapchars option
  cifs: revalidate mapping prior to satisfying read_iter request with cache=loose
  fs/cifs: fix regression in cifs_create_mf_symlink()

9 years agoARC: Implement ptrace(PTRACE_GET_THREAD_AREA)
Anton Kolesov [Fri, 20 Jun 2014 16:28:39 +0000 (20:28 +0400)]
ARC: Implement ptrace(PTRACE_GET_THREAD_AREA)

This patch adds implementation of GET_THREAD_AREA ptrace request type. This
is required by GDB to debug NPTL applications.

Signed-off-by: Anton Kolesov <Anton.Kolesov@synopsys.com>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
9 years agoARC: optimize kernel bss clearing in early boot code
Vineet Gupta [Thu, 17 Apr 2014 11:43:26 +0000 (17:13 +0530)]
ARC: optimize kernel bss clearing in early boot code

using ARC ZOL which reduces tot num of instructions by half

Signed-off-by: Vineet Gupta <vgupta@synopsys.com>