Commit graph

597230 commits

Author SHA1 Message Date
Yong Ding
435b592e06 soc: qcom: hab: fix the panic in shmem device shutdown
The global struct list_head pchannels should be directly
used as the list head for pchan list traversal. Previously,
a local struct list_head instance was wrongly created and
used for such traversal. It caused kernel panic in system
shutdown.

Change-Id: Ifb82b55d5a0237fd12f8f53db095fccbcef96fb8
Signed-off-by: Yong Ding <yongding@codeaurora.org>
2018-02-08 19:18:47 -08:00
Linux Build Service Account
a6c36341e5 Merge "arm64: Move BP hardening to check_and_switch_context" 2018-02-08 19:03:43 -08:00
Linux Build Service Account
fe3ef6b4ac Merge "arm64: Add BTAC/LinkStack sanitizations for Kryo cores" 2018-02-08 19:03:42 -08:00
Linux Build Service Account
741767ad2c Merge "arm64: Implement branch predictor hardening for Falkor" 2018-02-08 19:03:41 -08:00
Linux Build Service Account
e89a71fb8b Merge "arch: arm64: Add midr values for kryo2xx big cores" 2018-02-08 19:03:41 -08:00
Linux Build Service Account
049d9307d2 Merge "arm64: Implement branch predictor hardening for affected Cortex-A CPUs" 2018-02-08 19:03:40 -08:00
Linux Build Service Account
e887df737e Merge "arm64: Define Cortex-A73 MIDR" 2018-02-08 19:03:39 -08:00
Linux Build Service Account
731d1e7b7f Merge "arm64: cputype: Add missing MIDR values for Cortex-A72 and Cortex-A75" 2018-02-08 19:03:38 -08:00
Linux Build Service Account
bb4e15efef Merge "arm64: cpu_errata: Allow an erratum to be match for all revisions of a core" 2018-02-08 19:03:37 -08:00
Linux Build Service Account
6564e041a6 Merge "arm64: Add skeleton to harden the branch predictor against aliasing attacks" 2018-02-08 19:03:37 -08:00
Linux Build Service Account
5d7bc6e4bb Merge "drivers/firmware: Expose psci_get_version through psci_ops structure" 2018-02-08 19:03:36 -08:00
Linux Build Service Account
18f6c1a5fb Merge "arm64: cpufeature: Pass capability structure to ->enable callback" 2018-02-08 19:03:35 -08:00
Linux Build Service Account
8543ad0652 Merge "arm64: errata: Calling enable functions for CPU errata too" 2018-02-08 19:03:34 -08:00
Linux Build Service Account
cf1de4e04b Merge "Merge android-4.4.115 (aa856bd) into msm-4.4" 2018-02-08 19:03:33 -08:00
Linux Build Service Account
71de2d96a7 Merge "cnss: Add support to program MAC address thru debugfs" 2018-02-08 19:03:31 -08:00
Linux Build Service Account
978d3b08ae Merge "msm: ADSPRPC: Use ID in response to get context pointer" 2018-02-08 19:03:29 -08:00
Linux Build Service Account
2503a1d5d8 Merge "msm: camera: change csiphy CDR regulator voltage on sdm660" 2018-02-08 19:03:28 -08:00
Yimin Peng
8755da552b ARM: dts: qcom: add wdog to the baseline msm8996 vplatform
The ramdump function needs watchdog device support.

Change-Id: I04e7e5773096c91fdc592aedf5d295256bd6ca08
Signed-off-by: Yimin Peng <yiminp@codeaurora.org>
2018-02-09 10:53:47 +08:00
Alex Yakavenka
baf99c4702 ARM: dts: msm: Remove rh850 device node from mizar
Mizar board doesn't have rh850 can controller

Change-Id: Ie3eb224fc4dfa71da7d290bfaf47ae4b9fcaceb4
Signed-off-by: Alex Yakavenka <ayakav@codeaurora.org>
2018-02-08 14:13:13 -08:00
Camus Wong
fe9857b511 DRM: SDE: Avoid vblank request to the same state
This change add check to existing vblank request state.  It will avoid
enable vblank multiple times.  It will also avoid disable vblank
multiple times.

Change-Id: I10781c33e51b1032b72fcbc1a01a7d01be8be510
Signed-off-by: Camus Wong <camusw@codeaurora.org>
2018-02-08 15:25:39 -05:00
Linux Build Service Account
6ca24c92b8 Merge "mm-camera2:isp2: Handle use after free buffer" 2018-02-08 08:43:54 -08:00
Tharun Kumar Merugu
e569b915a2 msm: ADSPRPC: Use ID in response to get context pointer
Send context ID in rpc header instead of context pointer.
Validate context ID received in response and get context pointer.

Change-Id: I9cfd10d0c1b25c3085b8e15c7ca1c8ff214bf10d
Acked-by: Viswanatham Paduchuri <vpaduchu@qti.qualcomm.com>
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
2018-02-08 15:30:54 +05:30
Marc Zyngier
03ac41373f arm64: Move BP hardening to check_and_switch_context
We call arm64_apply_bp_hardening() from post_ttbr_update_workaround,
which has the unexpected consequence of being triggered on every
exception return to userspace when ARM64_SW_TTBR0_PAN is selected,
even if no context switch actually occured.

This is a bit suboptimal, and it would be more logical to only
invalidate the branch predictor when we actually switch to
a different mm.

In order to solve this, move the call to arm64_apply_bp_hardening()
into check_and_switch_context(), where we're guaranteed to pick
a different mm context.

Change-Id: I28f2fb09b77544e5ead095e9dad1ad64b2b3ae36
Acked-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Git-commit: a8e4c0a919ae310944ed2c9ace11cf3ccd8a609b
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2018-02-08 01:50:38 -08:00
Srinivas Ramana
21393ff3ea arm64: Add BTAC/LinkStack sanitizations for Kryo cores
Kryo cores are exposed to two vulnerabilities due to subroutine return
(called LINK-STACK) and branch target predictors.
These two issues can be mitigated through software workarounds.

Kernel:
 - Apply LINK-STACK mitigation which is to issue 16 nested BL instructions
   on process context switch 'cpu_do_switch_mm()' where ASID changes.
 - Apply psci based branch predictor invalidation.

use the kryo core detection routine (based on MIDR) from the
commit bb48711800e6d ("arm64: cpu_errata: Add Kryo to Falkor 1003 errata")
by Stephen Boyd <sboyd@codeaurora.org>.

Change-Id: I81e8e72e7fa219f12dfe8ec39836eb8eb3c4c7b0
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2018-02-08 01:50:16 -08:00
Shanker Donthineni
f62d97e9b4 arm64: Implement branch predictor hardening for Falkor
Falkor is susceptible to branch predictor aliasing and can
theoretically be attacked by malicious code. This patch
implements a mitigation for these attacks, preventing any
malicious entries from affecting other victim contexts.

Change-Id: I535d423c2cefaf93627267b867bf0846e502d4c1
Signed-off-by: Shanker Donthineni <shankerd@codeaurora.org>
[will: fix label name when !CONFIG_KVM and remove references to MIDR_FALKOR]
Signed-off-by: Will Deacon <will.deacon@arm.com>
Git-commit: ec82b567a74fbdffdf418d4bb381d55f6a9096af
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[sramana@codeaurora.org: Use only the link stack sanitization routines,
and leave Falkor related BP hardening code]
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2018-02-08 15:13:20 +05:30
Mohammed Javid
36737be7c6 msm: ipa: Fix to add string NULL terminator
Missing null terminator to userspcae provided
string leads to strlen buffer overflow in strlcpy function.
Added code changes to fix string NULL terminator issue.

Change-Id: I3f9d5f22fbb26f68de12370bc5e07a4e6bc2ced9
Acked-by: Ashok Vuyyuru <avuyyuru@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
2018-02-07 22:49:47 -08:00
Vijay kumar Tumati
ca6497929a msm: camera: change csiphy CDR regulator voltage on sdm660
Set the appropriate regulator voltage to run csiphy in
cphy mode.

Change-Id: I1d6d65115e294dbf72560c8066b45bed0b03b92a
Signed-off-by: Vijay kumar Tumati <vtumati@codeaurora.org>
2018-02-08 11:15:41 +05:30
Sameer Thalappil
db441e2f4c cnss: Add support to program MAC address thru debugfs
MAC addresses provisioning thru CNSS is usually done by OEM drivers.
Debugfs interfaces can be used for internal testing.

Change-Id: I1a2693835ac09619baf03ee7d2e1b69dbe48559f
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2018-02-07 21:14:51 -08:00
Linux Build Service Account
f0020b57b5 Merge "i2c-msm-v2: Use "subsys" instead of "arch" initcall" 2018-02-07 17:11:15 -08:00
Linux Build Service Account
324ecc4547 Merge "ath10k: Enable wlan firmware based on the driver mode" 2018-02-07 17:11:14 -08:00
Linux Build Service Account
645d6ad33c Merge "power: smb1351-charger: Fix check in shutdown path for parallel disable" 2018-02-07 08:41:44 -08:00
Linux Build Service Account
f5c9996a31 Merge "cnss_utils: Add support for derived MAC address" 2018-02-07 08:41:42 -08:00
Linux Build Service Account
b7c0ad4f6b Merge "drm/msm: Corrected CCU load bit configuration" 2018-02-07 08:41:41 -08:00
Srinivas Ramana
254d671c83 arch: arm64: Add midr values for kryo2xx big cores
Add midr value for kryo2xx big cores to apply errata workarounds for
branch prediction hardening.

Change-Id: I7ca9cfa3e6b48d5af78a5297cb76ebe6f52e519e
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2018-02-07 04:16:55 -08:00
Will Deacon
ac2491ab10 arm64: Implement branch predictor hardening for affected Cortex-A CPUs
Cortex-A57, A72, A73 and A75 are susceptible to branch predictor aliasing
and can theoretically be attacked by malicious code.

This patch implements a PSCI-based mitigation for these CPUs when available.
The call into firmware will invalidate the branch predictor state, preventing
any malicious entries from affecting other victim contexts.

Change-Id: I554536e8e5cb3839e102299da8f5b944415b1880
Co-developed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Git-commit: aa6acde65e03186b5add8151e1ffe36c3c62639b
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2018-02-07 04:16:43 -08:00
Marc Zyngier
a2c10034c9 arm64: Define Cortex-A73 MIDR
As we're about to introduce a new workaround that is specific to
Cortex-A73, let's define the coresponding MIDR.

Change-Id: Iabb0e83a0eadddbde458fdafd1224e442b6f3e63
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Git-commit: 199fd2bff4040985fbd7853cc39b7245fcf54bb9
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[sramana@codeaurora.org: Resolve trivial merge conflicts]
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2018-02-07 04:16:32 -08:00
Will Deacon
424c93be33 arm64: cputype: Add missing MIDR values for Cortex-A72 and Cortex-A75
Hook up MIDR values for the Cortex-A72 and Cortex-A75 CPUs, since they
will soon need MIDR matches for hardening the branch predictor.

Change-Id: I59af5ea4af17198aa70d2ba4b25f729a562727ee
Signed-off-by: Will Deacon <will.deacon@arm.com>
Git-commit: a65d219fe5dc7887fd5ca04c2ac3e9a34feb8dfc
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[sramana@codeaurora.org: Resolve trivial merge conflicts]
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2018-02-07 04:16:21 -08:00
Marc Zyngier
cdf382ed61 arm64: cpu_errata: Allow an erratum to be match for all revisions of a core
Some minor erratum may not be fixed in further revisions of a core,
leading to a situation where the workaround needs to be updated each
time an updated core is released.

Introduce a MIDR_ALL_VERSIONS match helper that will work for all
versions of that MIDR, once and for all.

Change-Id: Icbb685f79205ba45f9c990d83cf961616b0d96b7
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Git-commit: 06f1494f837da8997d670a1ba87add7963b08922
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[sramana@codeaurora.org: Fix merge conflicts]
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2018-02-07 04:16:08 -08:00
Will Deacon
4e56397ea6 arm64: Add skeleton to harden the branch predictor against aliasing attacks
Aliasing attacks against CPU branch predictors can allow the attacks to
redirect speculative control flow on some CPUs and potentially divulge
information from one context to another.

This patch adds initial skeleton code behind a new Kconfig option to
enable implementation-specific mitigations against these attacks for
CPUs that are affected.

Change-Id: I07fba1943dd63df8951bf68fac947666100e5559
Co-developed-by: Marc Zyngier <marc.zyngier@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Git-commit: 0f15adbb2861ce6f75ccfc5a92b19eae0ef327d0
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[sramana@codeaurora.org: Fix merge conflicts and make it
compilable on msm-4.4]
Signed-off-by: Srinivas Ramana <sramana@codeaurora.org>
2018-02-07 17:33:15 +05:30
Vijay kumar Tumati
385d9c8750 msm: camera: Add RAW12 support for meta data
Adding support to decode 12 bit raw metadata
at CSID.

Change-Id: I89bb9f69f3f004df29b1498761e9a54fb88cdef0
Signed-off-by: Vijay kumar Tumati <vtumati@codeaurora.org>
2018-02-07 15:30:48 +05:30
Atanas Filipov
1b0c0d8c44 i2c-msm-v2: Use "subsys" instead of "arch" initcall
The i2c-msm-v2 driver trying to get the clocks too early, but
the clock framework is not initialized yet. The change of the
initcall type reducing deferred calls and improving boot time.

Info:
[0.212999] i2c-msm-v2 78b6000.i2c: probing driver i2c-msm-v2
[0.213172] i2c-msm-v2 78b6000.i2c: error on clk_get(core_clk):-517
-- snipped --
[0.275922] i2c-msm-v2 78b6000.i2c: probing driver i2c-msm-v2
[0.276086] i2c-msm-v2 78b6000.i2c: error on clk_get(core_clk):-517
-- snipped --
[0.302980] msm_mpm_dev_probe(): Cannot get clk resource for XO: -517
[0.303394] i2c-msm-v2 78b6000.i2c: probing driver i2c-msm-v2
-- snipped --

Change-Id: Ia8c110b5f67eeec07586adb30ec3a7aff7ce265a
Signed-off-by: Atanas Filipov <afilipov@codeaurora.org>
2018-02-07 14:55:25 +05:30
Cong Tang
f092d46f0f ASoC: msm: Upgrade Machine Driver to Support 32 Channels
Upgrade machine driver to support 32 channels include expose mixer
controls for TERT/QUAT slot_number and slot_width and also slot
mapping configuration.

Change-Id: Ie0a73cf45a6daf3d4aced02cd99aa0ec09cb7c48
Signed-off-by: Cong Tang <congt@codeaurora.org>
2018-02-07 16:10:22 +08:00
Linux Build Service Account
e0c650273e Merge "reg: qcom: call reg notifier during wiphy registration" 2018-02-06 23:46:59 -08:00
Linux Build Service Account
2be3fbd7ed Merge "drm/msm: restore perfcounter after turning on GPMU" 2018-02-06 23:46:57 -08:00
Linux Build Service Account
84d2490998 Merge "ath10k: Handle mgmt tx completion event" 2018-02-06 23:46:56 -08:00
Sameer Thalappil
e2b2768357 cnss_utils: Add support for derived MAC address
MAC address programmed thru CNSS could be provisioned or
derived MAC address. So add support for programming the derived
MAC address.

Change-Id: I2fae232e32a8600949c286346acd05afefd94ef8
Signed-off-by: Sameer Thalappil <sameert@codeaurora.org>
2018-02-06 20:36:18 -08:00
Cong Tang
9ae73bba1f ASoC: msm: Update Audio Header File for 32 Channels Support
Update audio header files include new macro and structure definitions
for 32 channels support.

Change-Id: Idf5e92f7fda4b820b1a7f01001a683772281d8ba
Signed-off-by: Cong Tang <congt@codeaurora.org>
2018-02-07 10:23:23 +08:00
Linux Build Service Account
1766dce24a Merge "lpm-stats: cleanup lpm stats processing sanity wrapping" 2018-02-06 15:07:47 -08:00
Linux Build Service Account
53c56ac0a5 Merge "Merge android-4.4.114 (fe09418) into msm-4.4" 2018-02-06 15:07:46 -08:00
Gustavo Solaira
a8c85fc795 ARM: dts: msm: Disable SPI CAN controller on msm8996 CV2X boards
Disable the SPI based CAN controller on msm8996 CV2X boards
since they are using the USB based CAN controller now.

Change-Id: I57cccee0b9ffa59f516747350160907960048a6a
Signed-off-by: Gustavo Solaira <gustavos@codeaurora.org>
2018-02-06 13:42:15 -08:00