]> git.kernelconcepts.de Git - karo-tx-linux.git/log
karo-tx-linux.git
8 years agoMove to new qcom_smem_get() api
Srinivas Kandagatla [Fri, 8 Jan 2016 18:04:15 +0000 (18:04 +0000)]
Move to new qcom_smem_get() api

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agoFix: Make it buildable on v4.3
Srinivas Kandagatla [Tue, 8 Dec 2015 11:38:31 +0000 (11:38 +0000)]
Fix: Make it buildable on v4.3

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agosoc: qcom: Stub IPCRTR client driver
Bjorn Andersson [Wed, 10 Dec 2014 19:27:51 +0000 (11:27 -0800)]
soc: qcom: Stub IPCRTR client driver

The IPCRTR channel needs to come up for the pronto block to be happy and
continue communication, so this driver does just that (and dumps
incoming data in the log).

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Conflicts:
drivers/soc/qcom/Kconfig
drivers/soc/qcom/Makefile

8 years agosoc: qcom: rpm_log: Add rpm log driver
Andy Gross [Tue, 3 Nov 2015 21:02:23 +0000 (15:02 -0600)]
soc: qcom: rpm_log: Add rpm log driver

Signed-off-by: Andy Gross <agross@codeaurora.org>
8 years agosoc: qcom: Add msm_bus driver
Andy Gross [Tue, 13 Oct 2015 03:59:55 +0000 (22:59 -0500)]
soc: qcom: Add msm_bus driver

Signed-off-by: Andy Gross <agross@codeaurora.org>
8 years agoremoteproc: tz: Allow no scm clocks support
Srinivas Kandagatla [Mon, 7 Dec 2015 11:56:24 +0000 (11:56 +0000)]
remoteproc: tz: Allow no scm clocks support

On APQ8064 I could not find any scm clocks related to scm and Q6, so
this patch is a temporary workaround to get the q6 loading working on
ifc6410.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agoWIP: remoteproc: HACK to get it working on DB410c
Srinivas Kandagatla [Thu, 26 Nov 2015 13:11:41 +0000 (13:11 +0000)]
WIP: remoteproc: HACK to get it working on  DB410c

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agoWIP: remoteproc: q6: add support to scm restart
Srinivas Kandagatla [Tue, 24 Nov 2015 17:47:45 +0000 (17:47 +0000)]
WIP: remoteproc: q6: add support to scm restart

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agoWIP: remoteproc: q6: add support to memory-region
Srinivas Kandagatla [Tue, 24 Nov 2015 17:46:09 +0000 (17:46 +0000)]
WIP: remoteproc: q6: add support to memory-region

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agoWIP:remoteproc:q6pil: add segment_is_loadable and segment_is_relocatable macros
Srinivas Kandagatla [Tue, 24 Nov 2015 17:30:25 +0000 (17:30 +0000)]
WIP:remoteproc:q6pil: add segment_is_loadable and segment_is_relocatable macros

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agoWIP: remoteproc: q6: remove some commented out code
Srinivas Kandagatla [Tue, 24 Nov 2015 17:18:16 +0000 (17:18 +0000)]
WIP: remoteproc: q6: remove some commented out code

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agosoc: qcom: smd: Support opening additional channels
Bjorn Andersson [Tue, 20 Oct 2015 02:46:15 +0000 (10:46 +0800)]
soc: qcom: smd: Support opening additional channels

With the qcom_smd_open_channel() API we allow SMD devices to open
additional SMD channels, to allow implementation of multi-channel SMD
devices - like Bluetooth.

Channels are opened from the same edge as the calling SMD device is tied
to.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agosoc: qcom: smd: Support multiple channels per sdev
Bjorn Andersson [Tue, 20 Oct 2015 02:45:43 +0000 (10:45 +0800)]
soc: qcom: smd: Support multiple channels per sdev

This patch allows chaining additional channels to a SMD device, enabling
implementation of multi-channel SMD devies - like Bluetooth.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agosoc: qcom: smd: Refactor channel open and close handling
Bjorn Andersson [Tue, 20 Oct 2015 02:44:16 +0000 (10:44 +0800)]
soc: qcom: smd: Refactor channel open and close handling

Refactor opening and closing of channels into two separate functions
instead of open coding this in the various places.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agosoc: qcom: smd: Split discovery and state change work
Bjorn Andersson [Tue, 20 Oct 2015 02:43:44 +0000 (10:43 +0800)]
soc: qcom: smd: Split discovery and state change work

Split the two steps of channel discovery and state change handling into
two different workers. This allows for new channels to be found while
we're are probing, which is required as we introduce multi-channel
support.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agosoc: qcom: smd: Introduce callback setter
Bjorn Andersson [Tue, 20 Oct 2015 02:42:56 +0000 (10:42 +0800)]
soc: qcom: smd: Introduce callback setter

Introduce a setter for the callback function pointer to clarify the
locking around the operation and to reduce some duplication.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agosoc: smd: Migrate the wifi driver from old smd driver to new smd driver.
Yin, Fengwei [Tue, 17 Nov 2015 16:51:01 +0000 (16:51 +0000)]
soc: smd: Migrate the wifi driver from old smd driver to new smd driver.

Signed-off-by: Yin, Fengwei <fengwei.yin@linaro.org>
8 years agoqcom-smd-rpm: Add MSM8916 support
Andy Gross [Wed, 22 Apr 2015 20:35:39 +0000 (15:35 -0500)]
qcom-smd-rpm: Add MSM8916 support

This patch adds SMD/RPM support for the MSM8916.

Signed-off-by: Andy Gross <agross@codeaurora.org>
8 years agogpio:smp2p:qcom: kill set_irq_flags and use genirq
Srinivas Kandagatla [Thu, 24 Sep 2015 18:01:47 +0000 (19:01 +0100)]
gpio:smp2p:qcom: kill set_irq_flags and use genirq

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agoremoteproc: tz_pil: skip waiting ready irq if it not provided
Stanimir Varbanov [Fri, 21 Aug 2015 14:34:05 +0000 (17:34 +0300)]
remoteproc: tz_pil: skip waiting ready irq if it not provided

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
8 years agoremoteproc: tz_pil: take relocation flag into account
Stanimir Varbanov [Fri, 21 Aug 2015 13:37:57 +0000 (16:37 +0300)]
remoteproc: tz_pil: take relocation flag into account

when setup memory by scm call

Signed-off-by: Andy Gross <agross@codeaurora.org>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
8 years agoremoteproc: tz_pil: make irqs, smd edge & crash-reason optional properties
Stanimir Varbanov [Wed, 19 Aug 2015 13:54:46 +0000 (16:54 +0300)]
remoteproc: tz_pil: make irqs, smd edge & crash-reason optional properties

the wdog, fatal, ready, handover and stop-ack irqs does not
exist for vidc (venus) remote processor, so make them optional.

Also crash-reason id and smd edge ditto.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
8 years agoregulator: smd: remove left over debug statement
Nicolas Dechesne [Mon, 7 Sep 2015 08:56:03 +0000 (10:56 +0200)]
regulator: smd: remove left over debug statement

Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
8 years agoregulator: smd: Add correct ifdef flag for stubs
Srinivas Kandagatla [Wed, 22 Jul 2015 14:30:02 +0000 (15:30 +0100)]
regulator: smd: Add correct ifdef flag for stubs

If built as module would throw up with
drivers/regulator/qcom_smd-regulator.c:67:5: error: redefinition of 'qcom_rpm_set_floor'
drivers/regulator/qcom_smd-regulator.c:89:5: error: redefinition of 'qcom_rpm_set_corner'

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
8 years agoregulator: smd: Make set_{corner,floor} work with regulator struct
Georgi Djakov [Mon, 1 Jun 2015 16:23:00 +0000 (19:23 +0300)]
regulator: smd: Make set_{corner,floor} work with regulator struct

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
8 years agoregulator: smd: Add floor and corner operations
Andy Gross [Tue, 19 May 2015 06:44:28 +0000 (01:44 -0500)]
regulator: smd: Add floor and corner operations

This patch addes the Qualcomm specific functions for setting the floor and
corner voltages on the regulators.

Signed-off-by: Andy Gross <agross@codeaurora.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Conflicts:
drivers/regulator/qcom_smd-regulator.c

8 years agoHACK: soc: qcom: smd: Add debug to fix timing
Andy Gross [Wed, 15 Jul 2015 03:54:43 +0000 (22:54 -0500)]
HACK: soc: qcom: smd: Add debug to fix timing

Hack to fix crashes

Signed-off-by: Andy Gross <agross@codeaurora.org>
8 years agoremoteproc: tz_pil: Fixes to support 8916
Andy Gross [Wed, 15 Jul 2015 03:03:52 +0000 (22:03 -0500)]
remoteproc: tz_pil: Fixes to support 8916

This patch adds a few things to support the MSM8916 PIL.

Signed-off-by: Andy Gross <agross@codeaurora.org>
8 years agogpio: qcom-smp2p: Fix compile issues
Andy Gross [Tue, 14 Jul 2015 03:48:17 +0000 (22:48 -0500)]
gpio: qcom-smp2p: Fix compile issues

This patch fixes 64 bit compile issues

Signed-off-by: Andy Gross <agross@codeaurora.org>
8 years agodt-binding: gpio: Introduce qcom,smp2p binding documentation
Bjorn Andersson [Tue, 30 Jun 2015 01:06:42 +0000 (18:06 -0700)]
dt-binding: gpio: Introduce qcom,smp2p binding documentation

Introduce binding documentation for the Qualcomm Shared Memory Point 2 Point
protocol implemented as gpio and interrupt controllers.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agogpio: qcom-smp2p: Qualcomm Shared Memory Point to Point
Bjorn Andersson [Thu, 25 Sep 2014 23:03:26 +0000 (16:03 -0700)]
gpio: qcom-smp2p: Qualcomm Shared Memory Point to Point

Introduce the Qualcomm Shard Memory Point to Point driver, exposing bits
from the SMP2P protocol as gpio and interrupt controllers.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Conflicts:

drivers/gpio/Kconfig
drivers/gpio/Makefile

8 years agosoc: qcom: smd: Use correct smem id
Andy Gross [Mon, 13 Jul 2015 21:35:56 +0000 (16:35 -0500)]
soc: qcom: smd: Use correct smem id

This patch fixes the incorrect table and smem id usage

Signed-off-by: Andy Gross <agross@codeaurora.org>
8 years agogpio: smsm: Fix compiler warnings
Andy Gross [Wed, 15 Jul 2015 04:24:13 +0000 (23:24 -0500)]
gpio: smsm: Fix compiler warnings

Signed-off-by: Andy Gross <agross@codeaurora.org>
8 years agogpio: smsm: Update smem prototypes
Bjorn Andersson [Fri, 3 Apr 2015 20:24:54 +0000 (13:24 -0700)]
gpio: smsm: Update smem prototypes

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agogpio: qcom-smsm: Add driver for Qualcomm SMSM
Bjorn Andersson [Thu, 25 Sep 2014 22:59:58 +0000 (15:59 -0700)]
gpio: qcom-smsm: Add driver for Qualcomm SMSM

This driver exposed the Qualcomm Shared Memory State Machine bits as
GPIOs to the system.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agoregulator: qcom: smd: Regulator driver for the Qualcomm RPM
Bjorn Andersson [Mon, 13 Apr 2015 21:58:02 +0000 (14:58 -0700)]
regulator: qcom: smd: Regulator driver for the Qualcomm RPM

Driver for regulators exposed by the Resource Power Manager (RPM) found
in devices based on Qualcomm 8974 and newer platforms.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agoremoteproc: qcom_q6v5_pil: Fix 64 bit
Andy Gross [Fri, 3 Jul 2015 23:48:06 +0000 (18:48 -0500)]
remoteproc: qcom_q6v5_pil: Fix 64 bit

This patch fixes some 64 bit issues with compilation.

Signed-off-by: Andy Gross <agross@codeaurora.org>
8 years agoremoteproc: qcom_tz_pil: Fix compiler issues
Andy Gross [Fri, 3 Jul 2015 21:33:01 +0000 (16:33 -0500)]
remoteproc: qcom_tz_pil: Fix compiler issues

Signed-off-by: Andy Gross <agross@codeaurora.org>
8 years agoremoteproc: qcom: Extract PAS and fix compilation for 4.1
Bjorn Andersson [Tue, 30 Jun 2015 18:26:23 +0000 (11:26 -0700)]
remoteproc: qcom: Extract PAS and fix compilation for 4.1

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agoremoteproc: qcom-tz: Drop smd reset stuff for now
Bjorn Andersson [Wed, 8 Apr 2015 21:25:31 +0000 (14:25 -0700)]
remoteproc: qcom-tz: Drop smd reset stuff for now

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agoremoteproc: qcom-tz: Update smem prototypes
Bjorn Andersson [Fri, 3 Apr 2015 20:25:39 +0000 (13:25 -0700)]
remoteproc: qcom-tz: Update smem prototypes

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agoremoteproc: qcom-tz: Update to match smem api changes
Bjorn Andersson [Tue, 17 Feb 2015 20:50:20 +0000 (12:50 -0800)]
remoteproc: qcom-tz: Update to match smem api changes

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agoremoteproc: qcom: q6v5 pil: Initial hack to boot mss
Bjorn Andersson [Mon, 5 Jan 2015 18:10:08 +0000 (10:10 -0800)]
remoteproc: qcom: q6v5 pil: Initial hack to boot mss

This initial hack powers the q6v5, boots and authenticate the mba and
use that to load the mdt and subsequent bXX files.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agoremoteproc: Support loading firmware from lately mounted fs (HACK)
Courtney Cavin [Mon, 5 Jan 2015 18:07:57 +0000 (10:07 -0800)]
remoteproc: Support loading firmware from lately mounted fs (HACK)

If the firmware isn't available during boot then table_ptr will be NULL
and subsequent attempts to load the firmware will fail. Move things
around and reattempt the load upon trying to boot the rproc.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agoremoteproc: qcom: tz-pil: Round up max address
Bjorn Andersson [Mon, 5 Jan 2015 18:07:02 +0000 (10:07 -0800)]
remoteproc: qcom: tz-pil: Round up max address

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agoremoteproc: qcom-tz: Finish shutdown on timeout
Bjorn Andersson [Wed, 10 Dec 2014 19:42:18 +0000 (11:42 -0800)]
remoteproc: qcom-tz: Finish shutdown on timeout

When the remote processor have hit an fatal error, it will not perform
the stop-ack handshake. So we have to finish the shutdown process to not
leave the remote processor in a dangling state (stopping us from
bringing it up again).

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agoremoteproc: qcom-tz: Inform SMD about crashing remotes
Bjorn Andersson [Wed, 10 Dec 2014 19:41:12 +0000 (11:41 -0800)]
remoteproc: qcom-tz: Inform SMD about crashing remotes

When a remote processor crashes there is no indication in SMD, so we
need to inform the SMD driver that it should reset all open channels
associated with the remote processor.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agoremoteproc: qcom-tz-pil: Add interrupts and gpio hooks
Bjorn Andersson [Fri, 21 Nov 2014 18:34:02 +0000 (10:34 -0800)]
remoteproc: qcom-tz-pil: Add interrupts and gpio hooks

Add the necessary interrupt and gpio hooks to be informed about events
on the remote processor as well as being able to shut it down
gracefully.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agoremoteproc: Add additional crash reasons
Bjorn Andersson [Fri, 21 Nov 2014 18:33:30 +0000 (10:33 -0800)]
remoteproc: Add additional crash reasons

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agoremoteproc: qcom-pil: Implementation of Qualcomm TZ backed PIL
Bjorn Andersson [Thu, 27 Feb 2014 23:52:47 +0000 (15:52 -0800)]
remoteproc: qcom-pil: Implementation of Qualcomm TZ backed PIL

This implements the TrustZone based Peripheral Image Loader used in
Qualcomm platforms for loading and boot audio, video and wifi/bt remote
processors.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agoremoteproc: core: Make the loaded resource table optional
Bjorn Andersson [Tue, 11 Nov 2014 01:25:53 +0000 (17:25 -0800)]
remoteproc: core: Make the loaded resource table optional

Remote processors like the ones found in the Qualcomm SoCs does not have
a resource table passed to them, so make it optional and only populate
it if it exists.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
8 years agosoc: qcom: smem: Add debugfs
Andy Gross [Fri, 10 Jul 2015 17:36:46 +0000 (12:36 -0500)]
soc: qcom: smem: Add debugfs

Signed-off-by: Andy Gross <agross@codeaurora.org>
8 years agoarm64: add qcom_defconfig
Kumar Gala [Tue, 20 Jan 2015 19:36:03 +0000 (13:36 -0600)]
arm64: add qcom_defconfig

8 years agodevicetree: bindings: Document qcom,msm-id and qcom,board-id
Kumar Gala [Tue, 3 Mar 2015 21:39:07 +0000 (15:39 -0600)]
devicetree: bindings: Document qcom,msm-id and qcom,board-id

The top level qcom,msm-id and qcom,board-id are utilized by bootloaders
on Qualcomm MSM platforms to determine which device tree should be
utilized and passed to the kernel.

Cc: <devicetree@vger.kernel.org>
Signed-off-by: Kumar Gala <galak@codeaurora.org>
8 years agoregulator: qcom-smd: Add support for PMA8084
Andy Gross [Tue, 15 Dec 2015 05:30:45 +0000 (23:30 -0600)]
regulator: qcom-smd: Add support for PMA8084

This patch adds support and documentation for the PMA8084 regulators
found on APQ8084 platforms.

Signed-off-by: Andy Gross <agross@codeaurora.org>
Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agoregulator: qcom-smd: Add PM8916 support
Andy Gross [Tue, 15 Dec 2015 05:30:44 +0000 (23:30 -0600)]
regulator: qcom-smd: Add PM8916 support

This patch adds support and documentation for the PM8916 regulators
found on MSM8916 platforms.

Acked-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Andy Gross <agross@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
8 years agodrivers/soc/qcom/smd.c: use __ioread32_copy() instead of open-coding it
Stephen Boyd [Tue, 5 Jan 2016 23:49:31 +0000 (10:49 +1100)]
drivers/soc/qcom/smd.c: use __ioread32_copy() instead of open-coding it

Now that we have a generic library function for this, replace the
open-coded instance.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Cc: <zajec5@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>
Cc: Paul Walmsley <paul@pwsan.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
8 years agoARM: 8485/1: cpuidle: remove cpu parameter from the cpuidle_ops suspend hook
Lorenzo Pieralisi [Thu, 17 Dec 2015 10:22:45 +0000 (11:22 +0100)]
ARM: 8485/1: cpuidle: remove cpu parameter from the cpuidle_ops suspend hook

The suspend() hook in the cpuidle_ops struct is always called on
the cpu entering idle, which means that the cpu parameter passed
to the suspend hook always corresponds to the local cpu, making
it somewhat redundant.

This patch removes the logical cpu parameter from the ARM
cpuidle_ops.suspend hook and updates all the existing kernel
implementations to reflect this change.

Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Lina Iyer <lina.iyer@linaro.org>
Tested-by: Lina Iyer <lina.iyer@linaro.org>
Tested-by: Jisheng Zhang <jszhang@marvell.com> [psci]
Cc: Lina Iyer <lina.iyer@linaro.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
8 years agosoc: qcom: smd-rpm: Add existing platform support
Andy Gross [Thu, 24 Sep 2015 19:18:51 +0000 (14:18 -0500)]
soc: qcom: smd-rpm: Add existing platform support

This patch adds support for all current Qualcomm platforms which utilize
RPM over SMD.  This includes both MSM8916 and APQ8084.

Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Andy Gross <agross@codeaurora.org>
8 years agosoc: qcom: Introduce WCNSS_CTRL SMD client
Bjorn Andersson [Mon, 21 Sep 2015 17:52:55 +0000 (10:52 -0700)]
soc: qcom: Introduce WCNSS_CTRL SMD client

The WCNSS_CTRL SMD client is used for among other things upload nv
firmware to a newly booted WCNSS chip.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Andy Gross <agross@codeaurora.org>
8 years agoARM: qcom: select ARM_CPU_SUSPEND for power management
Arnd Bergmann [Tue, 24 Nov 2015 22:13:09 +0000 (23:13 +0100)]
ARM: qcom: select ARM_CPU_SUSPEND for power management

The qcom spm driver uses cpu_resume_arm(), which is not included
in the kernel in all configurations:

drivers/built-in.o: In function `qcom_cpu_spc':
:(.text+0xbc022): undefined reference to `cpu_suspend'
drivers/built-in.o: In function `qcom_cpuidle_init':
:(.init.text+0x610c): undefined reference to `cpu_resume_arm'

This adds a 'select' Kconfig statement to ensure it's always
enabled.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Andy Gross <agross@codeaurora.org>
8 years agosoc: qcom: enable smsm/smp2p modular build
Arnd Bergmann [Fri, 20 Nov 2015 10:32:21 +0000 (11:32 +0100)]
soc: qcom: enable smsm/smp2p modular build

The newly added smp2p and smsm drivers cannot be loadable modules
but depend on smem, which can be, and that causes a link error:

drivers/built-in.o: In function `qcom_smp2p_intr':
:(.text+0xa6e68): undefined reference to `qcom_smem_get'
drivers/built-in.o: In function `qcom_smp2p_probe':
:(.text+0xa7320): undefined reference to `qcom_smem_alloc'
:(.text+0xa736c): undefined reference to `qcom_smem_get'
drivers/built-in.o: In function `qcom_smsm_probe':
:(.text+0xa7b34): undefined reference to `qcom_smem_get'

This marks all the drivers as 'tristate' to make the Kconfig
dependency resolution work properly.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: dbb04bd7122f ("soc: qcom: smp2p: Qualcomm Shared Memory Point to Point")
Fixes: d7387fc6add4 ("soc: qcom: smsm: Add driver for Qualcomm SMSM")
Signed-off-by: Andy Gross <agross@codeaurora.org>
8 years agosoc: qcom: smp2p: Qualcomm Shared Memory Point to Point
Bjorn Andersson [Fri, 25 Sep 2015 01:25:03 +0000 (18:25 -0700)]
soc: qcom: smp2p: Qualcomm Shared Memory Point to Point

Introduce the Qualcomm Shard Memory Point to Point driver.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Andy Gross <agross@codeaurora.org>
8 years agosoc: qcom: smsm: Add driver for Qualcomm SMSM
Bjorn Andersson [Fri, 25 Sep 2015 01:25:02 +0000 (18:25 -0700)]
soc: qcom: smsm: Add driver for Qualcomm SMSM

This driver exposed the Qualcomm Shared Memory State Machine bits.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Andy Gross <agross@codeaurora.org>
8 years agosoc: qcom: Introduce common SMEM state machine code
Bjorn Andersson [Fri, 25 Sep 2015 01:25:01 +0000 (18:25 -0700)]
soc: qcom: Introduce common SMEM state machine code

This implements a common API for handling and exposing SMP2P and SMSM
state information.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Andy Gross <agross@codeaurora.org>
8 years agoLinux 4.4 v4.4
Linus Torvalds [Sun, 10 Jan 2016 23:01:32 +0000 (15:01 -0800)]
Linux 4.4

8 years agoMerge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi
Linus Torvalds [Sat, 9 Jan 2016 22:53:48 +0000 (14:53 -0800)]
Merge tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI fix from James Bottomley:
 "A single fix for machines with pages > 4k (PPC mostly).

  There's a bug in our optimal transfer size code where we don't account
  for pages > 4k and can set the transfer size to be less than the page
  size causing nasty failures"

* tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi:
  sd: Reject optimal transfer length smaller than page size

8 years agoMerge tag 'pci-v4.4-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci
Linus Torvalds [Sat, 9 Jan 2016 22:44:44 +0000 (14:44 -0800)]
Merge tag 'pci-v4.4-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci

Pull PCI fixlet from Bjorn Helgaas:
 "This marks the TI DRA7xx host bridge driver as broken.  Apparently it
  has never worked without some additional out-of-tree code, so I'm
  going to mark it broken now and remove it completely next cycle unless
  it's fixed"

* tag 'pci-v4.4-fixes-4' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI: dra7xx: Mark driver as broken

8 years agovmstat: allocate vmstat_wq before it is used
Michal Hocko [Fri, 8 Jan 2016 10:18:29 +0000 (11:18 +0100)]
vmstat: allocate vmstat_wq before it is used

kernel test robot has reported the following crash:

  BUG: unable to handle kernel NULL pointer dereference at 00000100
  IP: [<c1074df6>] __queue_work+0x26/0x390
  *pdpt = 0000000000000000 *pde = f000ff53f000ff53 *pde = f000ff53f000ff53
  Oops: 0000 [#1] PREEMPT PREEMPT SMP SMP
  CPU: 0 PID: 24 Comm: kworker/0:1 Not tainted 4.4.0-rc4-00139-g373ccbe #1
  Workqueue: events vmstat_shepherd
  task: cb684600 ti: cb7ba000 task.ti: cb7ba000
  EIP: 0060:[<c1074df6>] EFLAGS: 00010046 CPU: 0
  EIP is at __queue_work+0x26/0x390
  EAX: 00000046 EBX: cbb37800 ECX: cbb37800 EDX: 00000000
  ESI: 00000000 EDI: 00000000 EBP: cb7bbe68 ESP: cb7bbe38
   DS: 007b ES: 007b FS: 00d8 GS: 00e0 SS: 0068
  CR0: 8005003b CR2: 00000100 CR3: 01fd5000 CR4: 000006b0
  Stack:
  Call Trace:
    __queue_delayed_work+0xa1/0x160
    queue_delayed_work_on+0x36/0x60
    vmstat_shepherd+0xad/0xf0
    process_one_work+0x1aa/0x4c0
    worker_thread+0x41/0x440
    kthread+0xb0/0xd0
    ret_from_kernel_thread+0x21/0x40

The reason is that start_shepherd_timer schedules the shepherd work item
which uses vmstat_wq (vmstat_shepherd) before setup_vmstat allocates
that workqueue so if the further initialization takes more than HZ we
might end up scheduling on a NULL vmstat_wq.  This is really unlikely
but not impossible.

Fixes: 373ccbe59270 ("mm, vmstat: allow WQ concurrency to discover memory reclaim doesn't make any progress")
Reported-by: kernel test robot <ying.huang@linux.intel.com>
Signed-off-by: Michal Hocko <mhocko@suse.com>
Tested-by: Tetsuo Handa <penguin-kernel@i-love.sakura.ne.jp>
Cc: stable@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
8 years agoMerge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
Linus Torvalds [Sat, 9 Jan 2016 00:11:05 +0000 (16:11 -0800)]
Merge tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc

Pull ARM SoC fixes from Arnd Bergmann:
 "This is the final small set of ARM SoC bug fixes for linux-4.4, almost
  all regressions:

  OMAP:
   - data corruption on the Nokia N900 flash

  Allwinner:
   - Two defconfig change to get USB working again

  ARM Versatile:
   - Interrupt numbers gone bad after an older bug fix

  Nomadik:
   - Crashes from incorrect L2 cache settings

  VIA vt8500:
   - SD/MMC support on WM8650 never worked"

* tag 'fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc:
  dts: vt8500: Add SDHC node to DTS file for WM8650
  ARM: Fix broken USB support in multi_v7_defconfig for sunxi devices
  ARM: versatile: fix MMC/SD interrupt assignment
  ARM: nomadik: set latencies to 8 cycles
  ARM: OMAP2+: Fix onenand rate detection to avoid filesystem corruption
  ARM: Fix broken USB support in sunxi_defconfig

8 years agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Linus Torvalds [Fri, 8 Jan 2016 23:58:14 +0000 (15:58 -0800)]
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm

Pull KVM fix from Paolo Bonzini:
 "A simple fix.  I'm sending it before the merge window, because it
  refines a patch found in your master branch but not yet in the
  kvm/next branch that is destined for 4.5"

* tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm:
  kvm: x86: only channel 0 of the i8254 is linked to the HPET

8 years agoMerge tag 'pm+acpi-4.4-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael...
Linus Torvalds [Fri, 8 Jan 2016 23:50:59 +0000 (15:50 -0800)]
Merge tag 'pm+acpi-4.4-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm

Pull ACPI fix from Rafael Wysocki:
 "Just one obvious fix that adds a missing function argument in ACPI
  code introduced recently (Kees Cook)"

* tag 'pm+acpi-4.4-final' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
  ACPI / property: avoid leaking format string into kobject name

8 years agoMerge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 8 Jan 2016 23:21:48 +0000 (15:21 -0800)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull x86 fixes from Ingo Molnar:
 "A handful of x86 fixes:

   - a syscall ABI fix, fixing an Android breakage
   - a Xen PV guest fix relating to the RTC device, causing a
     non-working console
   - a Xen guest syscall stack frame fix
   - an MCE hotplug CPU crash fix"

* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  x86/numachip: Fix NumaConnect2 MMCFG PCI access
  x86/entry: Restore traditional SYSENTER calling convention
  x86/entry: Fix some comments
  x86/paravirt: Prevent rtc_cmos platform device init on PV guests
  x86/xen: Avoid fast syscall path for Xen PV guests
  x86/mce: Ensure offline CPUs don't participate in rendezvous process

8 years agoMerge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 8 Jan 2016 21:57:13 +0000 (13:57 -0800)]
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull scheduler fixes from Ingo Molnar:
 "Misc scheduler fixes"

* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  sched/core: Reset task's lockless wake-queues on fork()
  sched/core: Fix unserialized r-m-w scribbling stuff
  sched/core: Check tgid in is_global_init()
  sched/fair: Fix multiplication overflow on 32-bit systems

8 years agoMerge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 8 Jan 2016 21:52:59 +0000 (13:52 -0800)]
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull perf fixes from Ingo Molnar:
 "Two core subsystem fixes, plus a handful of tooling fixes"

* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  perf: Fix race in swevent hash
  perf: Fix race in perf_event_exec()
  perf list: Robustify event printing routine
  perf list: Add support for PERF_COUNT_SW_BPF_OUT
  perf hists browser: Fix segfault if use symbol filter in cmdline
  perf hists browser: Reset selection when refresh
  perf hists browser: Add NULL pointer check to prevent crash
  perf buildid-list: Fix return value of perf buildid-list -k
  perf buildid-list: Show running kernel build id fix

8 years agoMerge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
Linus Torvalds [Fri, 8 Jan 2016 21:46:59 +0000 (13:46 -0800)]
Merge branch 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

Pull irq fix from Ingo Molnar:
 "Fixes a core IRQ subsystem deadlock"

* 'irq-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  genirq: Prevent chip buslock deadlock

8 years agoMerge branch 'for-linus' of git://git.kernel.dk/linux-block
Linus Torvalds [Fri, 8 Jan 2016 21:39:09 +0000 (13:39 -0800)]
Merge branch 'for-linus' of git://git.kernel.dk/linux-block

Pull block revert from Jens Axboe:
 "The previous pull request had a split fix for NVMe, however there are
  corner cases where that ends up blowing up.

  So let's revert it for 4.4.  The regression isn't introduced in this
  cycle, and it's "just" a performance regression, not a
  stability/integrity issue"

* 'for-linus' of git://git.kernel.dk/linux-block:
  Revert "block: Split bios on chunk boundaries"

8 years agoMerge tag 'dmaengine-fix-4.4' of git://git.infradead.org/users/vkoul/slave-dma
Linus Torvalds [Fri, 8 Jan 2016 20:23:00 +0000 (12:23 -0800)]
Merge tag 'dmaengine-fix-4.4' of git://git.infradead.org/users/vkoul/slave-dma

Pull dmaengine fixes from Vinod Koul:
 "Late fixes for 4.4 are three fixes for drivers which include a revert
  of mic-x100 fix which is causing regression, xgene fix for double IRQ
  and async_tx fix to use GFP_NOWAIT"

* tag 'dmaengine-fix-4.4' of git://git.infradead.org/users/vkoul/slave-dma:
  dmaengine: xgene-dma: Fix double IRQ issue by setting IRQ_DISABLE_UNLAZY flag
  async_tx: use GFP_NOWAIT rather than GFP_IO
  dmaengine: Revert "dmaengine: mic_x100: add missing spin_unlock"

8 years agoMerge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvar...
Linus Torvalds [Fri, 8 Jan 2016 20:18:45 +0000 (12:18 -0800)]
Merge branch 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

Pull dmi fix from Jean Delvare.

* 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  firmware: dmi_scan: Fix UUID endianness for SMBIOS >= 2.6

8 years agoMerge tag 'sound-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound
Linus Torvalds [Fri, 8 Jan 2016 19:52:18 +0000 (11:52 -0800)]
Merge tag 'sound-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound

Pull sound fixes from Takashi Iwai:
 "A slightly higher volume than a new year's wish, but not too
  worrisome: a large LOC is only for HD-audio device-specific quirks, so
  fairly safe to apply.  The rest ASoC fixes are all trivial and small;
  a simple replacement of mutex call with nested lock version, a few
  Arizona and Realtek codec fixes, and a regression fix for Skylake
  firmware handling"

* tag 'sound-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound:
  ASoC: Intel: Skylake: Fix the memory leak
  ASoC: Intel: Skylake: Revert previous broken fix memory leak fix
  ASoC: Use nested lock for snd_soc_dapm_mutex_lock
  ASoC: rt5645: add sys clk detection
  ALSA: hda - Add keycode map for alc input device
  ALSA: hda - Add mic mute hotkey quirk for Lenovo ThinkCentre AIO
  ASoC: arizona: Fix bclk for sample rates that are multiple of 4kHz

8 years agoMerge tag 'omap-for-v4.4/onenand-corruption' of git://git.kernel.org/pub/scm/linux...
Arnd Bergmann [Fri, 8 Jan 2016 16:46:45 +0000 (17:46 +0100)]
Merge tag 'omap-for-v4.4/onenand-corruption' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap into fixes

Pull "urgent onenand file system corruption fix for n900" from Tony Lindgren:

Last minute urgent pull request to prevent file system corruption
on Nokia N900.

Looks like we have a GPMC bus timing bug that has gone unnoticed
because of bootloader configured registers until few days ago. We
are not detecting the onenand clock rate properly unless we have
CONFIG_OMAP_GPMC_DEBUG set and this causes onenand corruption
that can be easily be reproduced.

There seems to be also an additional bug still lurking around for
onenand corruption. But that is still being investigated and
it does not seem to be GPMC timings related.

Meanwhile, it would be good to get this fix into v4.4 to prevent
wrong timings from corrupting onenand.

* tag 'omap-for-v4.4/onenand-corruption' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap:
  ARM: OMAP2+: Fix onenand rate detection to avoid filesystem corruption

8 years agoRevert "block: Split bios on chunk boundaries"
Jens Axboe [Fri, 8 Jan 2016 16:00:29 +0000 (09:00 -0700)]
Revert "block: Split bios on chunk boundaries"

This reverts commit d3805611130af9b911e908af9f67a3f64f4f0914.

If we end up splitting on the first segment, we don't adjust
the sector count. That results in hitting a BUG() with attempting
to split 0 sectors.

As this is just a performance issue and not a regression since
4.3 release, let's just rever this change. That gives us more
time to test a real fix for 4.5, which would be marked for
stable anyway.

8 years agoPCI: dra7xx: Mark driver as broken
Richard Cochran [Fri, 8 Jan 2016 15:58:31 +0000 (09:58 -0600)]
PCI: dra7xx: Mark driver as broken

Mark the dra7xx PCI host driver as broken.  This driver was first merged in
v3.17 and has never worked.  Although the driver compiles just fine, it is
missing an essential device reset.  If the driver is included, the kernel
locks up hard shortly after booting, before any console output appears.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
8 years agofirmware: dmi_scan: Fix UUID endianness for SMBIOS >= 2.6
Andrea Arcangeli [Fri, 8 Jan 2016 08:00:54 +0000 (09:00 +0100)]
firmware: dmi_scan: Fix UUID endianness for SMBIOS >= 2.6

The dmi_ver wasn't updated correctly before the dmi_decode method run
to save the uuid.

That resulted in "dmidecode -s system-uuid" and
/sys/class/dmi/id/product_uuid disagreeing. The latter was buggy and
this fixes it.

Reported-by: Federico Simoncelli <fsimonce@redhat.com>
Fixes: 9f9c9cbb6057 ("drivers/firmware/dmi_scan.c: fetch dmi version from SMBIOS if it exists")
Fixes: 79bae42d51a5 ("dmi_scan: refactor dmi_scan_machine(), {smbios,dmi}_present()")
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>
Signed-off-by: Jean Delvare <jdelvare@suse.de>
8 years agoACPI / property: avoid leaking format string into kobject name
Kees Cook [Thu, 7 Jan 2016 19:24:29 +0000 (11:24 -0800)]
ACPI / property: avoid leaking format string into kobject name

The dn->name is expected to be used as a literal, so add the missing
"%s".

Fixes: 263b4c1a64bc (ACPI / property: Expose data-only subnodes via sysfs)
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
8 years agoMerge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux
Linus Torvalds [Thu, 7 Jan 2016 21:06:35 +0000 (13:06 -0800)]
Merge branch 'drm-fixes' of git://people.freedesktop.org/~airlied/linux

Pull drm nouveau fix from Dave Airlie:
 "Still not back to work, but I decided to forward this fix"

* 'drm-fixes' of git://people.freedesktop.org/~airlied/linux:
  drm/nouveau/gr/nv40: fix oops in interrupt handler

8 years agoMerge tag 'iommu-fixes-v4.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 7 Jan 2016 20:56:23 +0000 (12:56 -0800)]
Merge tag 'iommu-fixes-v4.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu

Pull IOMMU fixes from Joerg Roedel:

 - Two build issues, one in the ipmmu-vmsa driver and one for the new
   generic dma-api implemention used on arm64

 - A performance fix for said dma-api implemention

 - An issue caused by a wrong offset in map_sg in the same code as above

* tag 'iommu-fixes-v4.4-rc8' of git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu:
  iommu/dma: Use correct offset in map_sg
  iommu/ipmmu-vmsa: Don't truncate ttbr if LPAE is not enabled
  iommu/dma: Avoid unlikely high-order allocations
  iommu/dma: Add some missing #includes

8 years agoMerge tag 'trace-v4.4-rc4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt...
Linus Torvalds [Thu, 7 Jan 2016 20:42:22 +0000 (12:42 -0800)]
Merge tag 'trace-v4.4-rc4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull ftrace fix from Steven Rostedt:
 "PeiyangX Qiu reported that if a module fails to load between calling
  ftrace_module_init() and do_init_module() that the allocations made in
  ftrace_module_init() will not be freed, resulting in a memory leak.

  The solution is to call ftrace_release_mod() on the failing module in
  the fail path befor do_init_module() is called.  This will remove any
  allocations made for that module, and nothing if ftrace_module_init()
  wasn't called yet for that module.

  Note, once do_init_module() is called, the MODULE_GOING notifiers are
  called for the failed module, which calls into the ftrace code to do
  the proper clean up (basically calling ftrace_release_mod())"

* tag 'trace-v4.4-rc4-4' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  ftrace/module: Call clean up function when module init fails early

8 years agoftrace/module: Call clean up function when module init fails early
Steven Rostedt (Red Hat) [Wed, 6 Jan 2016 01:32:47 +0000 (20:32 -0500)]
ftrace/module: Call clean up function when module init fails early

If the module init code fails after calling ftrace_module_init() and before
calling do_init_module(), we can suffer from a memory leak. This is because
ftrace_module_init() allocates pages to store the locations that ftrace
hooks are placed in the module text. If do_init_module() fails, it still
calls the MODULE_GOING notifiers which will tell ftrace to do a clean up of
the pages it allocated for the module. But if load_module() fails before
then, the pages allocated by ftrace_module_init() will never be freed.

Call ftrace_release_mod() on the module if load_module() fails before
getting to do_init_module().

Link: http://lkml.kernel.org/r/567CEA31.1070507@intel.com
Reported-by: "Qiu, PeiyangX" <peiyangx.qiu@intel.com>
Fixes: a949ae560a511 "ftrace/module: Hardcode ftrace_module_init() call into load_module()"
Cc: stable@vger.kernel.org # v2.6.38+
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
8 years agodts: vt8500: Add SDHC node to DTS file for WM8650
Roman Volkov [Fri, 1 Jan 2016 13:38:11 +0000 (16:38 +0300)]
dts: vt8500: Add SDHC node to DTS file for WM8650

Since WM8650 has the same 'WMT' SDHC controller as WM8505, and the driver
is already in the kernel, this node enables the controller support for
WM8650

Signed-off-by: Roman Volkov <rvolkov@v1ros.org>
Reviewed-by: Alexey Charkov <alchark@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
8 years agoARM: Fix broken USB support in multi_v7_defconfig for sunxi devices
Timo Sigurdsson [Fri, 1 Jan 2016 13:38:22 +0000 (14:38 +0100)]
ARM: Fix broken USB support in multi_v7_defconfig for sunxi devices

Commit 69fb4dcada77 ("power: Add an axp20x-usb-power driver") introduced a
new driver for the USB power supply used on various Allwinner based SBCs.
However, the driver was not added to multi_v7_defconfig which breaks USB
support for some boards (e.g. LeMaker BananaPi) as the kernel will now
turn off the USB power supply during boot by default if the driver isn't
present. (This was not the case in linux 4.3 or lower where the USB power
was always left on.)

Hence, add the driver to multi_v7_defconfig in order to keep USB support
working on those boards that require it.

Signed-off-by: Timo Sigurdsson <public_timo.s@silentcreek.de>
Tested-by: Timo Sigurdsson <public_timo.s@silentcreek.de>
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
8 years agokvm: x86: only channel 0 of the i8254 is linked to the HPET
Paolo Bonzini [Thu, 7 Jan 2016 12:50:38 +0000 (13:50 +0100)]
kvm: x86: only channel 0 of the i8254 is linked to the HPET

While setting the KVM PIT counters in 'kvm_pit_load_count', if
'hpet_legacy_start' is set, the function disables the timer on
channel[0], instead of the respective index 'channel'. This is
because channels 1-3 are not linked to the HPET.  Fix the caller
to only activate the special HPET processing for channel 0.

Reported-by: P J P <pjp@fedoraproject.org>
Fixes: 0185604c2d82c560dab2f2933a18f797e74ab5a8
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
8 years agoiommu/dma: Use correct offset in map_sg
Robin Murphy [Mon, 4 Jan 2016 16:19:42 +0000 (16:19 +0000)]
iommu/dma: Use correct offset in map_sg

When mapping a non-page-aligned scatterlist entry, we copy the original
offset to the output DMA address before aligning it to hand off to
iommu_map_sg(), then later adding the IOVA page address portion to get
the final mapped address. However, when the IOVA page size is smaller
than the CPU page size, it is the offset within the IOVA page we want,
not that within the CPU page, which can easily be larger than an IOVA
page and thus result in an incorrect final address.

Fix the bug by taking only the IOVA-aligned part of the offset as the
basis of the DMA address, not the whole thing.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
8 years agoMerge branch 'linux-4.4' of git://github.com/skeggsb/linux into drm-fixes
Dave Airlie [Thu, 7 Jan 2016 07:18:45 +0000 (17:18 +1000)]
Merge branch 'linux-4.4' of git://github.com/skeggsb/linux into drm-fixes

single nv40 oops fix.

* 'linux-4.4' of git://github.com/skeggsb/linux:
  drm/nouveau/gr/nv40: fix oops in interrupt handler

8 years agodmaengine: xgene-dma: Fix double IRQ issue by setting IRQ_DISABLE_UNLAZY flag
Rameshwar Prasad Sahu [Wed, 23 Dec 2015 12:58:15 +0000 (18:28 +0530)]
dmaengine: xgene-dma: Fix double IRQ issue by setting IRQ_DISABLE_UNLAZY flag

For interrupt controller that doesn't support irq_disable and hardware
with level interrupt, an extra interrupt can be pending. This patch fixes
the issue by setting IRQ_DISABLE_UNLAZY flag for the interrupt line.

Reference: http://git.kernel.org/tip/e9849777d0e27cdd2902805be51da73e7c79578c

Signed-off-by: Rameshwar Prasad Sahu <rsahu@apm.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
8 years agoasync_tx: use GFP_NOWAIT rather than GFP_IO
NeilBrown [Thu, 7 Jan 2016 00:02:34 +0000 (11:02 +1100)]
async_tx: use GFP_NOWAIT rather than GFP_IO

These async_XX functions are called from md/raid5 in an atomic
section, between get_cpu() and put_cpu(), so they must not sleep.
So use GFP_NOWAIT rather than GFP_IO.

Dan Williams writes: Longer term async_tx needs to be merged into md
directly as we can allocate this unmap data statically per-stripe
rather than per request.

Fixed: 7476bd79fc01 ("async_pq: convert to dmaengine_unmap_data")
Cc: stable@vger.kernel.org (v3.13+)
Reported-and-tested-by: Stanislav Samsonov <slava@annapurnalabs.com>
Acked-by: Dan Williams <dan.j.williams@intel.com>
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
8 years agoARM: versatile: fix MMC/SD interrupt assignment
Linus Walleij [Tue, 5 Jan 2016 08:59:30 +0000 (09:59 +0100)]
ARM: versatile: fix MMC/SD interrupt assignment

Commit 0976c946a610d06e907335b7a3afa6db046f8e1b
"arm/versatile: Fix versatile irq specifications"
has an off-by-one error on the Versatile AB that has
been regressing the Versatile AB hardware for some time.

However it seems like the interrupt assignments have
never been correct and I have now adjusted them according
to the specification. The masks for the valid interrupts
made it impossible to assign the right SIC interrupt
for the MMCI, so I went in and fixed these to correspond
to the specifications, and added references if anyone
wants to double-check.

Due to the Versatile PB including the Versatile AB
as a base DTS file, we need to override and correct
some values to correspond to the actual changes in the
hardware.

For the Versatile PB I don't think the IRQ line
assignment for MMCI has ever been correct for either of
the two MMCI blocks. It would be nice if someone with the
physical PB board could test this.

Patch tested on the Versatile AB, QEMU for Versatile AB
and QEMU for Versatile PB.

Cc: Rob Herring <robh@kernel.org>
Cc: Grant Likely <grant.likely@linaro.org>
Cc: stable@vger.kernel.org
Fixes: 0976c946a610 ("arm/versatile: Fix versatile irq specifications")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
8 years agoARM: nomadik: set latencies to 8 cycles
Linus Walleij [Mon, 4 Jan 2016 01:18:28 +0000 (02:18 +0100)]
ARM: nomadik: set latencies to 8 cycles

The Nomadik has sporadic crashes because of these latencies, setting
them to max makes the platform work nicely, so use this values for
now.

These latencies were set to 2 since the Nomadik platform was merged,
but I suspect they never took effect until the right size and
associativity for the cache was specified in the device tree and
that is why the crash comes now.

Cc: stable@vger.kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
8 years agoMerge tag 'for-linus-20160106' of git://git.infradead.org/linux-mtd
Linus Torvalds [Thu, 7 Jan 2016 04:32:08 +0000 (20:32 -0800)]
Merge tag 'for-linus-20160106' of git://git.infradead.org/linux-mtd

Pull MTD fixes from Brian Norris:
 "Three last MTD fixes for v4.4.  These are all fixes for regressions
  and bugs reported mid cycle.  Unfortunately, some of them took a bit
  long to get proper testing and feedback.

   - Assign the default MTD name earlier in the registration process, so
     partition parsers (like cmdlinepart) see the right name.  Without
     this, some systems may come up with unpartitioned flash.  This was
     a v4.4-rc1 regression.

   - Revert some new Winbond SPI NOR flash unlocking/locking support;
     new code in v4.4 caused regressions on some Spansion flash.

   - Fix mis-typed parameter ordering in SPI NOR unlock function; this
     bug was introduced in v4.4-rc1"

* tag 'for-linus-20160106' of git://git.infradead.org/linux-mtd:
  mtd: spi-nor: fix stm_is_locked_sr() parameters
  mtd: spi-nor: fix Spansion regressions (aliased with Winbond)
  mtd: fix cmdlinepart parser, early naming for auto-filled MTD

8 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Thu, 7 Jan 2016 00:15:03 +0000 (16:15 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net

Pull networking fixes from David Miller:
 "As usual, there are a couple straggler bug fixes:

   1) qlcnic_alloc_mbx_args() error returns are not checked in qlcnic
      driver.  Fix from Insu Yun.

   2) SKB refcounting bug in connector, from Florian Westphal.

   3) vrf_get_saddr() has to propagate fib_lookup() errors to it's
      callers, from David Ahern.

   4) Fix AF_UNIX splice/bind deadlock, from Rainer Weikusat.

   5) qdisc_rcu_free() fails to free the per-cpu qstats.  Fix from John
      Fastabend.

   6) vmxnet3 driver passes wrong page to dma_map_page(), fix from
     Shrikrishna Khare.

   7) Don't allow zero cwnd in tcp_cwnd_reduction(), from Yuchung Cheng"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net:
  tcp: fix zero cwnd in tcp_cwnd_reduction
  Driver: Vmxnet3: Fix regression caused by 5738a09
  net: qmi_wwan: Add WeTelecom-WPD600N
  mkiss: fix scribble on freed memory
  net: possible use after free in dst_release
  net: sched: fix missing free per cpu on qstats
  ARM: net: bpf: fix zero right shift
  6pack: fix free memory scribbles
  net: filter: make JITs zero A for SKF_AD_ALU_XOR_X
  bridge: Only call /sbin/bridge-stp for the initial network namespace
  af_unix: Fix splice-bind deadlock
  net: Propagate lookup failure in l3mdev_get_saddr to caller
  r8152: add reset_resume function
  connector: bump skb->users before callback invocation
  cxgb4: correctly handling failed allocation
  qlcnic: correctly handle qlcnic_alloc_mbx_args