]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/log
mirror_ubuntu-artful-kernel.git
6 years agoARM: dts: apq8064: Add thermal cooling maps
Georgi Djakov [Wed, 26 Aug 2015 15:19:47 +0000 (18:19 +0300)]
ARM: dts: apq8064: Add thermal cooling maps

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Conflicts:
arch/arm/boot/dts/qcom-apq8064.dtsi

6 years agoARM: dts: apq8064: Add OPP data for frequencies above 1ghz
Georgi Djakov [Fri, 28 Aug 2015 08:43:33 +0000 (11:43 +0300)]
ARM: dts: apq8064: Add OPP data for frequencies above 1ghz

Now we can scale voltages, so add all frequencies.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
6 years agoARM: dts: apq8064: Assign a power supply to each CPU
Georgi Djakov [Fri, 28 Aug 2015 08:42:05 +0000 (11:42 +0300)]
ARM: dts: apq8064: Assign a power supply to each CPU

Assign to each CPU its power supply that will be used for
voltage scaling.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
6 years agoARM: qcom: add description of KPSS WDT for APQ8064
Pramod Gurav [Wed, 19 Nov 2014 10:09:04 +0000 (15:39 +0530)]
ARM: qcom: add description of KPSS WDT for APQ8064

Describe the Krait Processor Sub-system (KPSS) Watchdog timer in the
APQ8064 device tree.  Also, add a fixed-clock description of SLEEP_CLK,
which will do for now.

Signed-off-by: Josh Cartwright <joshc@codeaurora.org>
6 years agoARM: dts: qcom: Add necessary DT data for Krait cpufreq
Stephen Boyd [Fri, 5 Sep 2014 22:47:36 +0000 (15:47 -0700)]
ARM: dts: qcom: Add necessary DT data for Krait cpufreq

Add the necessary DT nodes and data so we can probe the cpufreq
driver on MSM devices with Krait CPUs.

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
6 years agoARM: dts: apq8064: add pci support in CM QS600
Srinivas Kandagatla [Wed, 26 Nov 2014 12:42:18 +0000 (13:42 +0100)]
ARM: dts: apq8064: add pci support in CM QS600

This patch adds PCIE support to APQ8064, tested with Ethernet on
Compulab QS600 board.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
6 years agoARM: dts: APQ8064: Add iommu
Rob Clark [Thu, 10 Jul 2014 02:07:15 +0000 (22:07 -0400)]
ARM: dts: APQ8064: Add iommu

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Srinivas Kandagatla [updated with latest generic IOMMU changes from Sricharan]

6 years agoARM: dts: ifc6410: add inforce LVDS panel support
Srinivas Kandagatla [Tue, 28 Jul 2015 12:54:36 +0000 (13:54 +0100)]
ARM: dts: ifc6410: add inforce LVDS panel support

This patch adds LVDS panel for IFC6410.

Signed-off-by: Rob Clark <robdclark@gmail.com>
[Rob Clark: WIP patch]
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
6 years agoARM: dts: qs600: enable MDP support
Srinivas Kandagatla [Tue, 28 Jul 2015 12:54:27 +0000 (13:54 +0100)]
ARM: dts: qs600: enable MDP support

This patch enables MDP support on QS600 platform.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
6 years agoARM: dts: ifc6410: enable MDP support
Srinivas Kandagatla [Tue, 28 Jul 2015 12:54:18 +0000 (13:54 +0100)]
ARM: dts: ifc6410: enable MDP support

This patch enables MDP support on IFC6410.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
6 years agoARM: dts: apq8064: Add MDP support
Rob Clark [Tue, 28 Jul 2015 12:54:09 +0000 (13:54 +0100)]
ARM: dts: apq8064: Add MDP support

This patch adds MDP node to APQ8064 dt.

Signed-off-by: Rob Clark <robdclark@gmail.com>
[Srinivas Kandagatla] : updated with new style rpm regulators
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
6 years agoARM: dts: ifc6410: enable pcie dt node for this board
Stanimir Varbanov [Thu, 3 Dec 2015 13:35:24 +0000 (15:35 +0200)]
ARM: dts: ifc6410: enable pcie dt node for this board

Enable pcie dt node and fill pcie dt node with regulator, pinctrl
and reset gpio, to use the pcie on the ifc6410 board.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
6 years agoARM: dts: apq8064: add pcie devicetree node
Stanimir Varbanov [Thu, 3 Dec 2015 13:35:23 +0000 (15:35 +0200)]
ARM: dts: apq8064: add pcie devicetree node

Add the pcie dt node so that it can probe and used.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
6 years agoARM: dts: qcom: apq8064-ifc6410 Use hardware flow control for GSBI6
Ivan T. Ivanov [Fri, 11 Dec 2015 18:29:58 +0000 (18:29 +0000)]
ARM: dts: qcom: apq8064-ifc6410 Use hardware flow control for GSBI6

GSBI6 UART module is connected to BT chip, which uses
hardware flow control lines. Enable them on SoC side.

Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
Signed-off-by: Andy Gross <andy.gross@linaro.org>
6 years agoarm: dts: qcom: apq8064: Add fixed rate on-board oscillators
Georgi Djakov [Thu, 3 Dec 2015 14:02:55 +0000 (16:02 +0200)]
arm: dts: qcom: apq8064: Add fixed rate on-board oscillators

Currently the rates of the xo and sleep clocks are hard-coded in the
GCC driver, but this is a board layout description that actually should
be in the DT. Moving them into DT also allows us to insert the RPM
controlled clocks between the DT and GCC clocks.

Signed-off-by: Georgi Djakov <georgi.djakov@linaro.org>
Signed-off-by: Andy Gross <agross@codeaurora.org>
6 years agoarm: dts: qcom: Add generic PMIC gpio/MPP compat strings
Stephen Boyd [Sat, 21 Nov 2015 01:49:46 +0000 (17:49 -0800)]
arm: dts: qcom: Add generic PMIC gpio/MPP compat strings

Add the generic compatible strings for the PMIC gpio and MPP
modules found on qcom based PMICs.

Cc: <devicetree@vger.kernel.org>
Cc: "Ivan T. Ivanov" <iivanov@mm-sol.com>
Cc: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Cc: Rob Herring <robh@kernel.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Andy Gross <agross@codeaurora.org>
6 years agoARM: dts: qcom: apq8064: Introduce gsbi5 and gsbi5 serial node
Bjorn Andersson [Thu, 22 Oct 2015 18:13:50 +0000 (11:13 -0700)]
ARM: dts: qcom: apq8064: Introduce gsbi5 and gsbi5 serial node

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Andy Gross <agross@codeaurora.org>
6 years agoARM: dts: qcom: apq8064: Declare all pm8921 regulators
Bjorn Andersson [Thu, 22 Oct 2015 18:13:49 +0000 (11:13 -0700)]
ARM: dts: qcom: apq8064: Declare all pm8921 regulators

Consolidate all labeling of regulators into the core 8064 dtsi file to
make them available from all other dts files.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Andy Gross <agross@codeaurora.org>
6 years agoARM: dts: qcom: apq8064: Add hwmutex and SMEM nodes
Bjorn Andersson [Thu, 22 Oct 2015 18:13:48 +0000 (11:13 -0700)]
ARM: dts: qcom: apq8064: Add hwmutex and SMEM nodes

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Andy Gross <agross@codeaurora.org>
6 years agodevicetree: Add hardware rng entry to qcom-apq8064.dtsi
John Stultz [Fri, 18 Sep 2015 12:31:12 +0000 (13:31 +0100)]
devicetree: Add hardware rng entry to qcom-apq8064.dtsi

Add devicetree data to add support for hw_rng support
to the apq8064 dts.

Tested on the Nexus7 (2013).

Cc: Kumar Gala <galak@codeaurora.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: devicetree@vger.kernel.org
Reviewed-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
Reviewed-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Signed-off-by: Andy Gross <agross@codeaurora.org>
6 years agodrm/msm: mdp4 lvds: Check the panel node in detect_panel()
Srinivas Kandagatla [Fri, 14 Aug 2015 13:51:29 +0000 (14:51 +0100)]
drm/msm: mdp4 lvds: Check the panel node in detect_panel()

This patch checks if the panel node is disabled in DT or not, this would
let us return proper error code so that the driver could stop panel
specific intialization.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
6 years agodrm/msm: mdp4 lvds: continue if the panel is not connected
Srinivas Kandagatla [Fri, 14 Aug 2015 13:42:13 +0000 (14:42 +0100)]
drm/msm: mdp4 lvds: continue if the panel is not connected

Two issues:

1> Intializing panel specific bits without actual panel presence.
2> Bailing out if the detect_panel() return -ENODEV.

With the existing code if detect_panel() returns an error code the
driver would bail out without doing anything, However it could continue
intializing hdmi related things. This patch adds two things.

1> moves the panel specific intialization only if the panel is detected
2> let the driver continue with hdmi intialization if detect_panel()
return -ENODEV.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
6 years agodrm/panel: simple-panel: Add panel picker support.
Srinivas Kandagatla [Fri, 14 Aug 2015 12:58:07 +0000 (13:58 +0100)]
drm/panel: simple-panel: Add panel picker support.

This patch adds panel picker support to simple-panel.

The idea of panel picker is to select the correct panel timings if it
supports probing edid via DDC bus, edid contains manufacture ID
and Manufacturer product code, so it can match against the panel_picker
entries to get the correct panel timings.

From DT point of view the panel picker uses generic compatible string
"panel-simple", keeping the panel specific compatible strings still
supported.

Panels can be static entry in the DT, but practically development boards
like IFC6410 where developers can connect any LVDS panel which makes it
difficult to maintian the dt support for those panels in dts file.
With this dynamic probing via panel picker makes it easy to support such
use-cases.
This patch also adds panel presence detection based, if there is no
panel detected or panel picker could not find the panel then the driver
would mark the panel DT node as disabled so that the drm driver would
be able to take right decision based on that panel node status.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
6 years agodrm/edid: export edid_vendor()
Srinivas Kandagatla [Thu, 13 Aug 2015 13:15:40 +0000 (14:15 +0100)]
drm/edid: export edid_vendor()

This patch exports edid_vendor() match function, so that other drivers
could use it for matching the vendor id.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
6 years agodrm/edid: Add support to get edid early
Srinivas Kandagatla [Thu, 13 Aug 2015 13:13:40 +0000 (14:13 +0100)]
drm/edid: Add support to get edid early

This patch adds support to get edid way early before the connector is
created, this is mainly used for panel drivers to auto-probe the panel
based on the vendor and product id from EDID.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
6 years agoPCI: qcom: Add Qualcomm PCIe controller driver
Stanimir Varbanov [Mon, 7 Dec 2015 14:05:27 +0000 (14:05 +0000)]
PCI: qcom: Add Qualcomm PCIe controller driver

The PCIe driver reuse the Designware common code for host
and MSI initialization, and also program the Qualcomm
application specific registers.

Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
6 years agoDT: PCI: qcom: Document PCIe devicetree bindings
Stanimir Varbanov [Thu, 3 Dec 2015 13:35:21 +0000 (15:35 +0200)]
DT: PCI: qcom: Document PCIe devicetree bindings

Document Qualcomm PCIe driver devicetree bindings.

Signed-off-by: Stanimir Varbanov <svarbanov@mm-sol.com>
Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
6 years agoPCI: designware: add memory barrier after enabling region
Stanimir Varbanov [Thu, 3 Dec 2015 13:35:20 +0000 (15:35 +0200)]
PCI: designware: add memory barrier after enabling region

Add 'write memory' barrier after enable region in PCIE_ATU_CR2
register. The barrier is needed to ensure that the region enable
request has been reached it's destination at time when we
read/write to PCI configuration space.

Without this barrier PCI device enumeration during kernel boot
is not reliable, and reading configuration space for particular
PCI device on the bus returns zero aka no device.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
6 years agomedia: vidc: Qualcomm video encoder/decoder driver
Stanimir Varbanov [Mon, 17 Aug 2015 12:38:23 +0000 (15:38 +0300)]
media: vidc: Qualcomm video encoder/decoder driver

add venus video encoder/decoder driver.

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
6 years agomedia: v4l2-controls: add h264 5.2 level and constrained high profile
Stanimir Varbanov [Mon, 17 Aug 2015 12:35:55 +0000 (15:35 +0300)]
media: v4l2-controls: add h264 5.2 level and constrained high profile

Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org>
6 years agoInput: pm8941: Add RESIN_N input handling
Ivan T. Ivanov [Fri, 18 Sep 2015 08:44:09 +0000 (11:44 +0300)]
Input: pm8941: Add RESIN_N input handling

RESIN_N PMIC input is commonly used as "Volume Down"
button on Quallcom platforms. Add support for it.

TODO: Do it better.

Signed-off-by: Ivan T. Ivanov <ivan.ivanov@linaro.org>
6 years agoiommu:msm: fix compilation error.
Srinivas Kandagatla [Thu, 18 Sep 2014 17:56:58 +0000 (18:56 +0100)]
iommu:msm: fix compilation error.

As part of Rob Clarks cleanup one of the flags have been renamed in
header which introduced a compilation failure.

drivers/iommu/msm_iommu.c: In function ‘msm_iommu_map’:
drivers/iommu/msm_iommu.c:426:7: error: ‘FL_AP_READ’ undeclared (first use in this function)
drivers/iommu/msm_iommu.c:426:7: note: each undeclared identifier is reported only once for each function it appears in
drivers/iommu/msm_iommu.c:426:20: error: ‘FL_AP_WRITE’ undeclared (first use in this function)
make[3]: *** [drivers/iommu/msm_iommu.o] Error 1
make[2]: *** [drivers/iommu] Error 2
make[1]: *** [drivers] Error 2

iThis patch fixes the error by using the new flags in the driver.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
6 years agoWIP:pwrseq: Convert in to proper platform device
Srinivas Kandagatla [Thu, 17 Sep 2015 09:17:05 +0000 (10:17 +0100)]
WIP:pwrseq: Convert in to proper platform device

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
6 years agoarm:multi_v7_defconfig: Add QCOM specific Kconfigs
Srinivas Kandagatla [Wed, 18 Mar 2015 18:40:30 +0000 (18:40 +0000)]
arm:multi_v7_defconfig: Add QCOM specific Kconfigs

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
6 years agoARM: qcom_defconfig: Add QCOM specific drivers
Srinivas Kandagatla [Tue, 9 Dec 2014 10:15:24 +0000 (10:15 +0000)]
ARM: qcom_defconfig: Add QCOM specific drivers

This patch adds common kconfig options required for qcom chips to work.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
6 years agohid: add support for Lilliput touchscreen
Kiran Rudramuni [Tue, 15 Sep 2015 19:06:04 +0000 (21:06 +0200)]
hid: add support for Lilliput touchscreen

Signed-off-by: Kiran Rudramuni <kchitrik@codeaurora.org>
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
6 years agommc: mmci: Support any block sizes for ux500v2 and qcom variant
Ulf Hansson [Mon, 18 Aug 2014 05:06:46 +0000 (06:06 +0100)]
mmc: mmci: Support any block sizes for ux500v2 and qcom variant

For the ux500v2 variant of the PL18x block, any block sizes are
supported. This will make it possible to decrease data overhead
for SDIO transfers.

This patch is based on Ulf Hansson patch
http://www.spinics.net/lists/linux-mmc/msg12160.html

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
enabled this support on qcom variant.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
6 years agoUBUNTU: [packaging] collect all packaging history
Paolo Pisati [Thu, 3 Dec 2015 16:24:39 +0000 (17:24 +0100)]
UBUNTU: [packaging] collect all packaging history

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: Fix getabis
Paolo Pisati [Thu, 3 Dec 2015 16:10:19 +0000 (17:10 +0100)]
UBUNTU: Fix getabis

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: [Packaging] Fix dependency on linux-dragon410c-tools-common
Paolo Pisati [Thu, 3 Dec 2015 16:08:37 +0000 (17:08 +0100)]
UBUNTU: [Packaging] Fix dependency on linux-dragon410c-tools-common

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: Remove unused package definitions
Paolo Pisati [Thu, 3 Dec 2015 16:06:35 +0000 (17:06 +0100)]
UBUNTU: Remove unused package definitions

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: Disable doc and source package generation
Paolo Pisati [Thu, 3 Dec 2015 16:02:18 +0000 (17:02 +0100)]
UBUNTU: Disable doc and source package generation

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: packaging: arm64.mk: do_linux_tools=true
Paolo Pisati [Thu, 3 Dec 2015 15:58:21 +0000 (16:58 +0100)]
UBUNTU: packaging: arm64.mk: do_linux_tools=true

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: [Packaging] Clean up d-i
Paolo Pisati [Thu, 3 Dec 2015 15:56:38 +0000 (16:56 +0100)]
UBUNTU: [Packaging] Clean up d-i

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: [Debian] drop generic.inclusion-list
Paolo Pisati [Thu, 3 Dec 2015 15:53:03 +0000 (16:53 +0100)]
UBUNTU: [Debian] drop generic.inclusion-list

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: [Config] Added libssl-dev to Build-Depends
Paolo Pisati [Thu, 3 Dec 2015 15:47:49 +0000 (16:47 +0100)]
UBUNTU: [Config] Added libssl-dev to Build-Depends

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: [Config] Add uuid-dev to Build-Depends
Paolo Pisati [Thu, 3 Dec 2015 15:46:46 +0000 (16:46 +0100)]
UBUNTU: [Config] Add uuid-dev to Build-Depends

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: packaging: remove the abi dir
Paolo Pisati [Thu, 3 Dec 2015 15:31:05 +0000 (16:31 +0100)]
UBUNTU: packaging: remove the abi dir

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: packaging: remove all but generic-dragon410c vars
Paolo Pisati [Thu, 3 Dec 2015 15:30:08 +0000 (16:30 +0100)]
UBUNTU: packaging: remove all but generic-dragon410c vars

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: packaging: remove all but arm64 rules.mk
Paolo Pisati [Thu, 3 Dec 2015 15:28:38 +0000 (16:28 +0100)]
UBUNTU: packaging: remove all but arm64 rules.mk

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: packaging: remove all but arm64 configs
Paolo Pisati [Thu, 3 Dec 2015 15:23:10 +0000 (16:23 +0100)]
UBUNTU: packaging: remove all but arm64 configs

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: packaging: rename generic config to generic-dragon410c
Paolo Pisati [Thu, 3 Dec 2015 16:29:04 +0000 (17:29 +0100)]
UBUNTU: packaging: rename generic config to generic-dragon410c

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: packaging: arm64.mk: disable_d_i=true, do_libc_dev_package=false and do_commo...
Paolo Pisati [Thu, 3 Dec 2015 15:20:15 +0000 (16:20 +0100)]
UBUNTU: packaging: arm64.mk: disable_d_i=true, do_libc_dev_package=false and do_common_headers_indep=false

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: packaging: flavour-control.stub: linux-headers-PKGVER-ABINUM-FLAVOUR depends...
Paolo Pisati [Thu, 3 Dec 2015 15:11:57 +0000 (16:11 +0100)]
UBUNTU: packaging: flavour-control.stub: linux-headers-PKGVER-ABINUM-FLAVOUR depends on SRCPKGNAME-headers-PKGVER-ABINUM

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: packaging: control.stub.in: keep the src pkg as linux-dragon410c
Paolo Pisati [Thu, 3 Dec 2015 15:09:51 +0000 (16:09 +0100)]
UBUNTU: packaging: control.stub.in: keep the src pkg as linux-dragon410c

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: packaging: 2-binary-arch.mk: skip modules signing if the private key is not...
Paolo Pisati [Thu, 26 Feb 2015 16:41:19 +0000 (16:41 +0000)]
UBUNTU: packaging: 2-binary-arch.mk: skip modules signing if the private key is not available

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: packaging: kernel-versions.in: arm64 only and generic-dragon410c rename"
Paolo Pisati [Thu, 3 Dec 2015 14:58:10 +0000 (15:58 +0100)]
UBUNTU: packaging: kernel-versions.in: arm64 only and generic-dragon410c rename"

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: packaging: arm64.mk: generic-dragon410c rename
Paolo Pisati [Thu, 3 Dec 2015 14:57:54 +0000 (15:57 +0100)]
UBUNTU: packaging: arm64.mk: generic-dragon410c rename

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: packaging: vars.generic: arm64 only and generic-410c rename
Paolo Pisati [Thu, 3 Dec 2015 14:51:00 +0000 (15:51 +0100)]
UBUNTU: packaging: vars.generic: arm64 only and generic-410c rename

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: packaging: control.stub.in: arm64 only
Paolo Pisati [Thu, 3 Dec 2015 14:49:41 +0000 (15:49 +0100)]
UBUNTU: packaging: control.stub.in: arm64 only

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: packaging: getabis: arm64 only and generic-dragon410c rename
Paolo Pisati [Thu, 3 Dec 2015 14:36:26 +0000 (15:36 +0100)]
UBUNTU: packaging: getabis: arm64 only and generic-dragon410c rename

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: packaging: kernelconfig: arm64 only
Paolo Pisati [Thu, 3 Dec 2015 14:35:20 +0000 (15:35 +0100)]
UBUNTU: packaging: kernelconfig: arm64 only

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: Switch default Debian to dragon410c
Paolo Pisati [Thu, 3 Dec 2015 14:31:12 +0000 (15:31 +0100)]
UBUNTU: Switch default Debian to dragon410c

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: Add debian.dragon410c
Paolo Pisati [Thu, 3 Dec 2015 14:30:21 +0000 (15:30 +0100)]
UBUNTU: Add debian.dragon410c

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: packaging fix: 0-common-vars.mk: don't choke on -0.0 version
Paolo Pisati [Thu, 19 Feb 2015 09:23:52 +0000 (09:23 +0000)]
UBUNTU: packaging fix: 0-common-vars.mk: don't choke on -0.0 version

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoRevert "arm64: kernel: implement ACPI parking protocol"
Paolo Pisati [Mon, 7 Mar 2016 14:49:53 +0000 (15:49 +0100)]
Revert "arm64: kernel: implement ACPI parking protocol"

This reverts commit 72196fb6d7ab50bc99e6223fac76daaec0c1c18f.

Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
6 years agoUBUNTU: Ubuntu-4.4.0-120.144
Kleber Sacilotto de Souza [Thu, 5 Apr 2018 13:05:56 +0000 (15:05 +0200)]
UBUNTU: Ubuntu-4.4.0-120.144

Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agox86/speculation: Use Indirect Branch Prediction Barrier in context switch
Tim Chen [Thu, 5 Apr 2018 05:56:00 +0000 (07:56 +0200)]
x86/speculation: Use Indirect Branch Prediction Barrier in context switch

BugLink: https://bugs.launchpad.net/bugs/1759920
CVE-2017-5715 (Spectre v2 Intel)

Flush indirect branches when switching into a process that marked itself
non dumpable. This protects high value processes like gpg better,
without having too high performance overhead.

If done naïvely, we could switch to a kernel idle thread and then back
to the original process, such as:

    process A -> idle -> process A

In such scenario, we do not have to do IBPB here even though the process
is non-dumpable, as we are switching back to the same process after a
hiatus.

To avoid the redundant IBPB, which is expensive, we track the last mm
user context ID. The cost is to have an extra u64 mm context id to track
the last mm we were using before switching to the init_mm used by idle.
Avoiding the extra IBPB is probably worth the extra memory for this
common scenario.

For those cases where tlb_defer_switch_to_init_mm() returns true (non
PCID), lazy tlb will defer switch to init_mm, so we will not be changing
the mm for the process A -> idle -> process A switch. So IBPB will be
skipped for this case.

Thanks to the reviewers and Andy Lutomirski for the suggestion of
using ctx_id which got rid of the problem of mm pointer recycling.

Signed-off-by: Tim Chen <tim.c.chen@linux.intel.com>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: ak@linux.intel.com
Cc: karahmed@amazon.de
Cc: arjan@linux.intel.com
Cc: torvalds@linux-foundation.org
Cc: linux@dominikbrodowski.net
Cc: peterz@infradead.org
Cc: bp@alien8.de
Cc: luto@kernel.org
Cc: pbonzini@redhat.com
Cc: gregkh@linux-foundation.org
Link: https://lkml.kernel.org/r/1517263487-3708-1-git-send-email-dwmw@amazon.co.uk
(backported from commit 18bf3c3ea8ece8f03b6fc58508f2dfd23c7711c7)
[tyhicks: Dropped the enhancement that tracked the last mm user context ID]
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agoRevert "x86/mm: Only set IBPB when the new thread cannot ptrace current thread"
Tyler Hicks [Thu, 5 Apr 2018 05:56:00 +0000 (07:56 +0200)]
Revert "x86/mm: Only set IBPB when the new thread cannot ptrace current thread"

BugLink: https://bugs.launchpad.net/bugs/1759920
CVE-2017-5715 (Spectre v2 Intel)

This reverts commit 3f21d934ae3580f2b2d3b8095bea02f31e4dc58b.

Using a ptrace access check in the middle of a task switch was causing
a hard lockup in some cases when the old task was confined by AppArmor.
If the AppArmor policy for the the old task didn't allow the task to
ptrace the new task, AppArmor would attempt to emit an audit message and
deadlock on the task's pi_lock would occur. The fix is to revert this
change and go with upstream's implementation that uses the task's
dumpable state to determine if IBPB should be used.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agoUBUNTU: [Packaging] include the retpoline extractor in the headers
Andy Whitcroft [Tue, 3 Apr 2018 16:52:00 +0000 (18:52 +0200)]
UBUNTU: [Packaging] include the retpoline extractor in the headers

BugLink: http://bugs.launchpad.net/bugs/1760876
Out of tree builds utilise the kernel Makefiles and therefore
we need to include all direct dependencies of those Makefiles.
Now that we call out to the repoline extractor during builds we
must carry the extractor with the headers.  Move the extractor
to the kernel scripts directory and ensure its name is unique.

Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
[ klebers: added fixup for commit message ]
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agoUBUNTU: [Packaging] final-checks -- remove check for empty retpoline files
Seth Forshee [Tue, 3 Apr 2018 16:52:00 +0000 (18:52 +0200)]
UBUNTU: [Packaging] final-checks -- remove check for empty retpoline files

With the new support for removing known safe retpoline sequences
from the ones which were detected it is now completely valid to
end up with an empty retpoline file in the abi. Remove the
check for empty retpoline files so this will not cause an error.

BugLink: http://bugs.launchpad.net/bugs/1758856
Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Juerg Haefliger <juerg.haefliger@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agoLinux 4.4.117
Greg Kroah-Hartman [Thu, 22 Feb 2018 14:45:02 +0000 (15:45 +0100)]
Linux 4.4.117

BugLink: http://bugs.launchpad.net/bugs/1756860
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agomedia: r820t: fix r820t_write_reg for KASAN
Arnd Bergmann [Thu, 30 Nov 2017 11:08:05 +0000 (06:08 -0500)]
media: r820t: fix r820t_write_reg for KASAN

BugLink: http://bugs.launchpad.net/bugs/1756860
commit 16c3ada89cff9a8c2a0eea34ffa1aa20af3f6008 upstream.

With CONFIG_KASAN, we get an overly long stack frame due to inlining
the register access functions:

drivers/media/tuners/r820t.c: In function 'generic_set_freq.isra.7':
drivers/media/tuners/r820t.c:1334:1: error: the frame size of 2880 bytes is larger than 2048 bytes [-Werror=frame-larger-than=]

This is caused by a gcc bug that has now been fixed in gcc-8.
To work around the problem, we can pass the register data
through a local variable that older gcc versions can optimize
out as well.

Link: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agoARM: dts: s5pv210: add interrupt-parent for ohci
Arnd Bergmann [Wed, 10 Jan 2018 16:10:11 +0000 (17:10 +0100)]
ARM: dts: s5pv210: add interrupt-parent for ohci

BugLink: http://bugs.launchpad.net/bugs/1756860
commit 5c1037196b9ee75897c211972de370ed1336ec8f upstream.

The ohci-hcd node has an interrupt number but no interrupt-parent,
leading to a warning with current dtc versions:

arch/arm/boot/dts/s5pv210-aquila.dtb: Warning (interrupts_property): Missing interrupt-parent for /soc/ohci@ec300000
arch/arm/boot/dts/s5pv210-goni.dtb: Warning (interrupts_property): Missing interrupt-parent for /soc/ohci@ec300000
arch/arm/boot/dts/s5pv210-smdkc110.dtb: Warning (interrupts_property): Missing interrupt-parent for /soc/ohci@ec300000
arch/arm/boot/dts/s5pv210-smdkv210.dtb: Warning (interrupts_property): Missing interrupt-parent for /soc/ohci@ec300000
arch/arm/boot/dts/s5pv210-torbreck.dtb: Warning (interrupts_property): Missing interrupt-parent for /soc/ohci@ec300000

As seen from the related exynos dts files, the ohci and ehci controllers
always share one interrupt number, and the number is the same here as
well, so setting the same interrupt-parent is the reasonable solution
here.

Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agoARM: pxa/tosa-bt: add MODULE_LICENSE tag
Arnd Bergmann [Wed, 10 Jan 2018 14:40:37 +0000 (15:40 +0100)]
ARM: pxa/tosa-bt: add MODULE_LICENSE tag

BugLink: http://bugs.launchpad.net/bugs/1756860
commit 3343647813fdf0f2409fbf5816ee3e0622168079 upstream.

Without this tag, we get a build warning:

WARNING: modpost: missing MODULE_LICENSE() in arch/arm/mach-pxa/tosa-bt.o

For completeness, I'm also adding author and description fields.

Acked-by: Robert Jarzmik <robert.jarzmik@free.fr>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agovfs: don't do RCU lookup of empty pathnames
Linus Torvalds [Mon, 3 Apr 2017 00:10:08 +0000 (17:10 -0700)]
vfs: don't do RCU lookup of empty pathnames

BugLink: http://bugs.launchpad.net/bugs/1756860
commit c0eb027e5aef70b71e5a38ee3e264dc0b497f343 upstream.

Normal pathname lookup doesn't allow empty pathnames, but using
AT_EMPTY_PATH (with name_to_handle_at() or fstatat(), for example) you
can trigger an empty pathname lookup.

And not only is the RCU lookup in that case entirely unnecessary
(because we'll obviously immediately finalize the end result), it is
actively wrong.

Why? An empth path is a special case that will return the original
'dirfd' dentry - and that dentry may not actually be RCU-free'd,
resulting in a potential use-after-free if we were to initialize the
path lazily under the RCU read lock and depend on complete_walk()
finalizing the dentry.

Found by syzkaller and KASAN.

Reported-by: Dmitry Vyukov <dvyukov@google.com>
Reported-by: Vegard Nossum <vegard.nossum@gmail.com>
Acked-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Eric Biggers <ebiggers3@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agox86: fix build warnign with 32-bit PAE
Arnd Bergmann [Thu, 15 Feb 2018 15:16:57 +0000 (16:16 +0100)]
x86: fix build warnign with 32-bit PAE

BugLink: http://bugs.launchpad.net/bugs/1756860
I ran into a 4.9 build warning in randconfig testing, starting with the
KAISER patches:

arch/x86/kernel/ldt.c: In function 'alloc_ldt_struct':
arch/x86/include/asm/pgtable_types.h:208:24: error: large integer implicitly truncated to unsigned type [-Werror=overflow]
 #define __PAGE_KERNEL  (__PAGE_KERNEL_EXEC | _PAGE_NX)
                        ^
arch/x86/kernel/ldt.c:81:6: note: in expansion of macro '__PAGE_KERNEL'
      __PAGE_KERNEL);
      ^~~~~~~~~~~~~

I originally ran into this last year when the patches were part of linux-next,
and tried to work around it by using the proper 'pteval_t' types consistently,
but that caused additional problems.

This takes a much simpler approach, and makes the argument type of the dummy
helper always 64-bit, which is wide enough for any page table layout and
won't hurt since this call is just an empty stub anyway.

Fixes: 8f0baadf2bea ("kaiser: merged update")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Kees Cook <keescook@chromium.org>
Acked-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agodm: correctly handle chained bios in dec_pending()
NeilBrown [Thu, 15 Feb 2018 09:00:15 +0000 (20:00 +1100)]
dm: correctly handle chained bios in dec_pending()

BugLink: http://bugs.launchpad.net/bugs/1756860
commit 8dd601fa8317243be887458c49f6c29c2f3d719f upstream.

dec_pending() is given an error status (possibly 0) to be recorded
against a bio.  It can be called several times on the one 'struct
dm_io', and it is careful to only assign a non-zero error to
io->status.  However when it then assigned io->status to bio->bi_status,
it is not careful and could overwrite a genuine error status with 0.

This can happen when chained bios are in use.  If a bio is chained
beneath the bio that this dm_io is handling, the child bio might
complete and set bio->bi_status before the dm_io completes.

This has been possible since chained bios were introduced in 3.14, and
has become a lot easier to trigger with commit 18a25da84354 ("dm: ensure
bio submission follows a depth-first tree walk") as that commit caused
dm to start using chained bios itself.

A particular failure mode is that if a bio spans an 'error' target and a
working target, the 'error' fragment will complete instantly and set the
->bi_status, and the other fragment will normally complete a little
later, and will clear ->bi_status.

The fix is simply to only assign io_error to bio->bi_status when
io_error is not zero.

Reported-and-tested-by: Milan Broz <gmazyland@gmail.com>
Cc: stable@vger.kernel.org (v3.14+)
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agomvpp2: fix multicast address filter
Mikulas Patocka [Sun, 11 Feb 2018 23:10:28 +0000 (18:10 -0500)]
mvpp2: fix multicast address filter

BugLink: http://bugs.launchpad.net/bugs/1756860
commit 7ac8ff95f48cbfa609a060fd6a1e361dd62feeb3 upstream.

IPv6 doesn't work on the MacchiatoBIN board. It is caused by broken
multicast address filter in the mvpp2 driver.

The driver loads doesn't load any multicast entries if "allmulti" is not
set. This condition should be reversed.

The condition !netdev_mc_empty(dev) is useless (because
netdev_for_each_mc_addr is nop if the list is empty).

This patch also fixes a possible overflow of the multicast list - if
mvpp2_prs_mac_da_accept fails, we set the allmulti flag and retry.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Cc: stable@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agoALSA: seq: Fix racy pool initializations
Takashi Iwai [Mon, 12 Feb 2018 14:20:51 +0000 (15:20 +0100)]
ALSA: seq: Fix racy pool initializations

BugLink: http://bugs.launchpad.net/bugs/1756860
commit d15d662e89fc667b90cd294b0eb45694e33144da upstream.

ALSA sequencer core initializes the event pool on demand by invoking
snd_seq_pool_init() when the first write happens and the pool is
empty.  Meanwhile user can reset the pool size manually via ioctl
concurrently, and this may lead to UAF or out-of-bound accesses since
the function tries to vmalloc / vfree the buffer.

A simple fix is to just wrap the snd_seq_pool_init() call with the
recently introduced client->ioctl_mutex; as the calls for
snd_seq_pool_init() from other side are always protected with this
mutex, we can avoid the race.

Reported-by: 范龙飞 <long7573@126.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agoALSA: usb-audio: add implicit fb quirk for Behringer UFX1204
Lassi Ylikojola [Fri, 9 Feb 2018 14:51:36 +0000 (16:51 +0200)]
ALSA: usb-audio: add implicit fb quirk for Behringer UFX1204

BugLink: http://bugs.launchpad.net/bugs/1756860
commit 5e35dc0338d85ccebacf3f77eca1e5dea73155e8 upstream.

Add quirk to ensure a sync endpoint is properly configured.
This patch is a fix for same symptoms on Behringer UFX1204 as patch
from Albertto Aquirre on Dec 8 2016 for Axe-Fx II.

Signed-off-by: Lassi Ylikojola <lassi.ylikojola@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agoALSA: hda/realtek: PCI quirk for Fujitsu U7x7
Jan-Marek Glogowski [Wed, 14 Feb 2018 10:29:15 +0000 (11:29 +0100)]
ALSA: hda/realtek: PCI quirk for Fujitsu U7x7

BugLink: http://bugs.launchpad.net/bugs/1756860
commit fdcc968a3b290407bcba9d4c90e2fba6d8d928f1 upstream.

These laptops have a combined jack to attach headsets, the U727 on
the left, the U757 on the right, but a headsets microphone doesn't
work. Using hdajacksensetest I found that pin 0x19 changed the
present state when plugging the headset, in addition to 0x21, but
didn't have the correct configuration (shown as "Not connected").

So this sets the configuration to the same values as the headphone
pin 0x21 except for the device type microphone, which makes it
work correctly. With the patch the configured pins for U727 are

Pin 0x12 (Internal Mic, Mobile-In): present = No
Pin 0x14 (Internal Speaker): present = No
Pin 0x19 (Black Mic, Left side): present = No
Pin 0x1d (Internal Aux): present = No
Pin 0x21 (Black Headphone, Left side): present = No

Signed-off-by: Jan-Marek Glogowski <glogow@fbihome.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agoALSA: usb-audio: Fix UAC2 get_ctl request with a RANGE attribute
Kirill Marinushkin [Mon, 29 Jan 2018 05:37:55 +0000 (06:37 +0100)]
ALSA: usb-audio: Fix UAC2 get_ctl request with a RANGE attribute

BugLink: http://bugs.launchpad.net/bugs/1756860
commit 447cae58cecd69392b74a4a42cd0ab9cabd816af upstream.

The layout of the UAC2 Control request and response varies depending on
the request type. With the current implementation, only the Layout 2
Parameter Block (with the 2-byte sized RANGE attribute) is handled
properly. For the Control requests with the 1-byte sized RANGE attribute
(Bass Control, Mid Control, Tremble Control), the response is parsed
incorrectly.

This commit:
* fixes the wLength field value in the request
* fixes parsing the range values from the response

Fixes: 23caaf19b11e ("ALSA: usb-mixer: Add support for Audio Class v2.0")
Signed-off-by: Kirill Marinushkin <k.marinushkin@gmail.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agoALSA: hda - Fix headset mic detection problem for two Dell machines
Hui Wang [Mon, 29 Jan 2018 06:23:15 +0000 (14:23 +0800)]
ALSA: hda - Fix headset mic detection problem for two Dell machines

BugLink: http://bugs.launchpad.net/bugs/1756860
commit 3f2f7c553d077be6a30cb96b2976a2c940bf5335 upstream.

One of them has the codec of alc256 and the other one has the codec
of alc289.

Cc: <stable@vger.kernel.org>
Signed-off-by: Hui Wang <hui.wang@canonical.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agoBtrfs: fix unexpected -EEXIST when creating new inode
Liu Bo [Thu, 25 Jan 2018 18:02:56 +0000 (11:02 -0700)]
Btrfs: fix unexpected -EEXIST when creating new inode

BugLink: http://bugs.launchpad.net/bugs/1756860
commit 900c9981680067573671ecc5cbfa7c5770be3a40 upstream.

The highest objectid, which is assigned to new inode, is decided at
the time of initializing fs roots.  However, in cases where log replay
gets processed, the btree which fs root owns might be changed, so we
have to search it again for the highest objectid, otherwise creating
new inode would end up with -EEXIST.

cc: <stable@vger.kernel.org> v4.4-rc6+
Fixes: f32e48e92596 ("Btrfs: Initialize btrfs_root->highest_objectid when loading tree root and subvolume roots")
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agoBtrfs: fix crash due to not cleaning up tree log block's dirty bits
Liu Bo [Thu, 25 Jan 2018 18:02:51 +0000 (11:02 -0700)]
Btrfs: fix crash due to not cleaning up tree log block's dirty bits

BugLink: http://bugs.launchpad.net/bugs/1756860
commit 1846430c24d66e85cc58286b3319c82cd54debb2 upstream.

In cases that the whole fs flips into readonly status due to failures in
critical sections, then log tree's blocks are still dirty, and this leads
to a crash during umount time, the crash is about use-after-free,

umount
 -> close_ctree
    -> stop workers
    -> iput(btree_inode)
       -> iput_final
          -> write_inode_now
     -> ...
       -> queue job on stop'd workers

cc: <stable@vger.kernel.org> v3.12+
Fixes: 681ae50917df ("Btrfs: cleanup reserved space when freeing tree log on error")
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agoBtrfs: fix deadlock in run_delalloc_nocow
Liu Bo [Thu, 25 Jan 2018 18:02:50 +0000 (11:02 -0700)]
Btrfs: fix deadlock in run_delalloc_nocow

BugLink: http://bugs.launchpad.net/bugs/1756860
commit e89166990f11c3f21e1649d760dd35f9e410321c upstream.

@cur_offset is not set back to what it should be (@cow_start) if
btrfs_next_leaf() returns something wrong, and the range [cow_start,
cur_offset) remains locked forever.

cc: <stable@vger.kernel.org>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agortlwifi: rtl8821ae: Fix connection lost problem correctly
Larry Finger [Mon, 5 Feb 2018 18:38:11 +0000 (12:38 -0600)]
rtlwifi: rtl8821ae: Fix connection lost problem correctly

BugLink: http://bugs.launchpad.net/bugs/1756860
commit c713fb071edc0efc01a955f65a006b0e1795d2eb upstream.

There has been a coding error in rtl8821ae since it was first introduced,
namely that an 8-bit register was read using a 16-bit read in
_rtl8821ae_dbi_read(). This error was fixed with commit 40b368af4b75
("rtlwifi: Fix alignment issues"); however, this change led to
instability in the connection. To restore stability, this change
was reverted in commit b8b8b16352cd ("rtlwifi: rtl8821ae: Fix connection
lost problem").

Unfortunately, the unaligned access causes machine checks in ARM
architecture, and we were finally forced to find the actual cause of the
problem on x86 platforms. Following a suggestion from Pkshih
<pkshih@realtek.com>, it was found that increasing the ASPM L1
latency from 0 to 7 fixed the instability. This parameter was varied to
see if a smaller value would work; however, it appears that 7 is the
safest value. A new symbol is defined for this quantity, thus it can be
easily changed if necessary.

Fixes: b8b8b16352cd ("rtlwifi: rtl8821ae: Fix connection lost problem")
Cc: Stable <stable@vger.kernel.org> # 4.14+
Fix-suggested-by: Pkshih <pkshih@realtek.com>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Tested-by: James Cameron <quozl@laptop.org> # x86_64 OLPC NL3
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agoconsole/dummy: leave .con_font_get set to NULL
Nicolas Pitre [Mon, 15 Jan 2018 16:04:22 +0000 (17:04 +0100)]
console/dummy: leave .con_font_get set to NULL

BugLink: http://bugs.launchpad.net/bugs/1756860
commit 724ba8b30b044aa0d94b1cd374fc15806cdd6f18 upstream.

When this method is set, the caller expects struct console_font fields
to be properly initialized when it returns. Leave it unset otherwise
nonsensical (leaked kernel stack) values are returned to user space.

Signed-off-by: Nicolas Pitre <nico@linaro.org>
Cc: stable@vger.kernel.org
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agovideo: fbdev: atmel_lcdfb: fix display-timings lookup
Johan Hovold [Fri, 29 Dec 2017 18:48:43 +0000 (19:48 +0100)]
video: fbdev: atmel_lcdfb: fix display-timings lookup

BugLink: http://bugs.launchpad.net/bugs/1756860
commit 9cb18db0701f6b74f0c45c23ad767b3ebebe37f6 upstream.

Fix child-node lookup during probe, which ended up searching the whole
device tree depth-first starting at the parent rather than just matching
on its children.

To make things worse, the parent display node was also prematurely
freed.

Note that the display and timings node references are never put after a
successful dt-initialisation so the nodes would leak on later probe
deferrals and on driver unbind.

Fixes: b985172b328a ("video: atmel_lcdfb: add device tree suport")
Cc: stable <stable@vger.kernel.org> # 3.13
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Signed-off-by: Johan Hovold <johan@kernel.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agomm: hide a #warning for COMPILE_TEST
Arnd Bergmann [Fri, 16 Feb 2018 15:25:53 +0000 (16:25 +0100)]
mm: hide a #warning for COMPILE_TEST

BugLink: http://bugs.launchpad.net/bugs/1756860
commit af27d9403f5b80685b79c88425086edccecaf711 upstream.

We get a warning about some slow configurations in randconfig kernels:

  mm/memory.c:83:2: error: #warning Unfortunate NUMA and NUMA Balancing config, growing page-frame for last_cpupid. [-Werror=cpp]

The warning is reasonable by itself, but gets in the way of randconfig
build testing, so I'm hiding it whenever CONFIG_COMPILE_TEST is set.

The warning was added in 2013 in commit 75980e97dacc ("mm: fold
page->_last_nid into page->flags where possible").

Cc: stable@vger.kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agoext4: correct documentation for grpid mount option
Ernesto A. Fernández [Thu, 11 Jan 2018 18:43:33 +0000 (13:43 -0500)]
ext4: correct documentation for grpid mount option

BugLink: http://bugs.launchpad.net/bugs/1756860
commit 9f0372488cc9243018a812e8cfbf27de650b187b upstream.

The grpid option is currently described as being the same as nogrpid.

Signed-off-by: Ernesto A. Fernández <ernesto.mnd.fernandez@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agoext4: save error to disk in __ext4_grp_locked_error()
Zhouyi Zhou [Wed, 10 Jan 2018 05:34:19 +0000 (00:34 -0500)]
ext4: save error to disk in __ext4_grp_locked_error()

BugLink: http://bugs.launchpad.net/bugs/1756860
commit 06f29cc81f0350261f59643a505010531130eea0 upstream.

In the function __ext4_grp_locked_error(), __save_error_info()
is called to save error info in super block block, but does not sync
that information to disk to info the subsequence fsck after reboot.

This patch writes the error information to disk.  After this patch,
I think there is no obvious EXT4 error handle branches which leads to
"Remounting filesystem read-only" will leave the disk partition miss
the subsequence fsck.

Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agortc-opal: Fix handling of firmware error codes, prevent busy loops
Stewart Smith [Tue, 2 Aug 2016 01:50:16 +0000 (11:50 +1000)]
rtc-opal: Fix handling of firmware error codes, prevent busy loops

BugLink: http://bugs.launchpad.net/bugs/1756860
commit 5b8b58063029f02da573120ef4dc9079822e3cda upstream.

According to the OPAL docs:
  skiboot-5.2.5/doc/opal-api/opal-rtc-read-3.txt
  skiboot-5.2.5/doc/opal-api/opal-rtc-write-4.txt

OPAL_HARDWARE may be returned from OPAL_RTC_READ or OPAL_RTC_WRITE and
this indicates either a transient or permanent error.

Prior to this patch, Linux was not dealing with OPAL_HARDWARE being a
permanent error particularly well, in that you could end up in a busy
loop.

This was not too hard to trigger on an AMI BMC based OpenPOWER machine
doing a continuous "ipmitool mc reset cold" to the BMC, the result of
that being that we'd get stuck in an infinite loop in
opal_get_rtc_time().

We now retry a few times before returning the error higher up the
stack.

Fixes: 16b1d26e77b1 ("rtc/tpo: Driver to support rtc and wakeup on PowerNV platform")
Cc: stable@vger.kernel.org # v3.19+
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agodrm/radeon: adjust tested variable
Julia Lawall [Sat, 27 Jan 2018 14:28:15 +0000 (15:28 +0100)]
drm/radeon: adjust tested variable

BugLink: http://bugs.launchpad.net/bugs/1756860
commit 3a61b527b4e1f285d21b6e9e623dc45cf8bb391f upstream.

Check the variable that was most recently initialized.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression x, y, f, g, e, m;
statement S1,S2,S3,S4;
@@

x = f(...);
if (\(<+...x...+>\&e\)) S1 else S2
(
x = g(...);
|
m = g(...,&x,...);
|
y = g(...);
*if (e)
 S3 else S4
)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agox86/cpu: Change type of x86_cache_size variable to unsigned int
Gustavo A. R. Silva [Tue, 13 Feb 2018 19:22:08 +0000 (13:22 -0600)]
x86/cpu: Change type of x86_cache_size variable to unsigned int

BugLink: http://bugs.launchpad.net/bugs/1756860
commit 24dbc6000f4b9b0ef5a9daecb161f1907733765a upstream.

Currently, x86_cache_size is of type int, which makes no sense as we
will never have a valid cache size equal or less than 0. So instead of
initializing this variable to -1, it can perfectly be initialized to 0
and use it as an unsigned variable instead.

Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Gustavo A. R. Silva <garsilva@embeddedor.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Addresses-Coverity-ID: 1464429
Link: http://lkml.kernel.org/r/20180213192208.GA26414@embeddedor.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agoKVM/x86: Reduce retpoline performance impact in slot_handle_level_range(), by always...
David Woodhouse [Sat, 10 Feb 2018 23:39:24 +0000 (23:39 +0000)]
KVM/x86: Reduce retpoline performance impact in slot_handle_level_range(), by always inlining iterator helper methods

BugLink: http://bugs.launchpad.net/bugs/1756860
commit 928a4c39484281f8ca366f53a1db79330d058401 upstream.

With retpoline, tight loops of "call this function for every XXX" are
very much pessimised by taking a prediction miss *every* time. This one
is by far the biggest contributor to the guest launch time with retpoline.

By marking the iterator slot_handle_…() functions always_inline, we can
ensure that the indirect function call can be optimised away into a
direct call and it actually generates slightly smaller code because
some of the other conditionals can get optimised away too.

Performance is now pretty close to what we see with nospectre_v2 on
the command line.

Suggested-by: Linus Torvalds <torvalds@linux-foundation.org>
Tested-by: Filippo Sironi <sironi@amazon.de>
Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
Reviewed-by: Filippo Sironi <sironi@amazon.de>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Cc: Andy Lutomirski <luto@kernel.org>
Cc: Arjan van de Ven <arjan@linux.intel.com>
Cc: Borislav Petkov <bp@alien8.de>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: arjan.van.de.ven@intel.com
Cc: dave.hansen@intel.com
Cc: jmattson@google.com
Cc: karahmed@amazon.de
Cc: kvm@vger.kernel.org
Cc: rkrcmar@redhat.com
Link: http://lkml.kernel.org/r/1518305967-31356-4-git-send-email-dwmw@amazon.co.uk
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agoALSA: seq: Fix regression by incorrect ioctl_mutex usages
Takashi Iwai [Mon, 19 Feb 2018 16:16:01 +0000 (17:16 +0100)]
ALSA: seq: Fix regression by incorrect ioctl_mutex usages

BugLink: http://bugs.launchpad.net/bugs/1756860
This is the revised backport of the upstream commit
b3defb791b26ea0683a93a4f49c77ec45ec96f10

We had another backport (e.g. 623e5c8ae32b in 4.4.115), but it applies
the new mutex also to the code paths that are invoked via faked
kernel-to-kernel ioctls.  As reported recently, this leads to a
deadlock at suspend (or other scenarios triggering the kernel
sequencer client).

This patch addresses the issue by taking the mutex only in the code
paths invoked by user-space, just like the original fix patch does.

Reported-and-tested-by: Andres Bertens <abertensu@yahoo.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agoarm: spear13xx: Fix spics gpio controller's warning
Viresh Kumar [Thu, 11 Jan 2018 05:58:53 +0000 (11:28 +0530)]
arm: spear13xx: Fix spics gpio controller's warning

BugLink: http://bugs.launchpad.net/bugs/1756860
commit f8975cb1b8a36d0839b6365235778dd9df1d04ca upstream.

This fixes the following warning by also sending the flags argument for
gpio controllers:

Property 'cs-gpios', cell 6 is not a phandle reference in
/ahb/apb/spi@e0100000

Fixes: 8113ba917dfa ("ARM: SPEAr: DT: Update device nodes")
Cc: stable@vger.kernel.org # v3.8+
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
6 years agoarm: spear13xx: Fix dmas cells
Viresh Kumar [Thu, 11 Jan 2018 05:58:52 +0000 (11:28 +0530)]
arm: spear13xx: Fix dmas cells

BugLink: http://bugs.launchpad.net/bugs/1756860
commit cdd10409914184c7eee5ae3e11beb890c9c16c61 upstream.

The "dmas" cells for the designware DMA controller need to have only 3
properties apart from the phandle: request line, src master and
destination master. But the commit 6e8887f60f60 updated it incorrectly
while moving from platform code to DT. Fix it.

Cc: stable@vger.kernel.org # v3.10+
Fixes: 6e8887f60f60 ("ARM: SPEAr13xx: Pass generic DW DMAC platform data from DT")
Reported-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Juerg Haefliger <juergh@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>