Commit graph

588740 commits

Author SHA1 Message Date
Alex Sarraf
78f7468f2e input: misc: hbtp_input: filter out fb events
Filter out the fb events which don't need to be handled.

Change-Id: I0dd748aec54594454f0d5333255f1ccb71b49201
Signed-off-by: Alex Sarraf <asarraf@codeaurora.org>
2017-04-19 16:19:25 -07:00
Subbaraman Narayanamurthy
71e9d32634 power: qpnp-fg-gen3: configure ESR FCC based on Qnovo enable status
Currently, FG driver configures ESR FCC manually when charging is
enabled and parallel charging is enabled. However, when Qnovo is
enabled, it needs to be configured even when parallel charging is
not enabled. This makes sure that the ESR pulses don't cause any
overshoot when FCC is high already and thus help reducing VLIM
errors seen on Qnovo.

Change-Id: Iabe9e7ea785534d673978f081d20584de1480559
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2017-04-19 15:37:01 -07:00
Linux Build Service Account
7514c164f1 Merge "usb: gadget: configfs: Replace strncpy with strlcpy" 2017-04-19 11:41:41 -07:00
Linux Build Service Account
1d9cf2a667 Merge "leds: qpnp-flash-v2: Enable charger mitigation" 2017-04-19 11:41:37 -07:00
Linux Build Service Account
1a597a13e8 Merge "arm64: cache: change ARCH_DMA_MINALIGN and L1_CACHE_SHIFT values" 2017-04-19 11:41:36 -07:00
Linux Build Service Account
f984c0f9a0 Merge "ARM: dts: msm: update VDD_APC margin adjustments for msm8998v2" 2017-04-19 11:41:35 -07:00
Linux Build Service Account
a69827fe6d Merge "defconfig: msm: enable vndbinder for sdm660 and msmcortex" 2017-04-19 11:41:34 -07:00
David Collins
6320ff32d4 ARM: dts: msm: configure PM8998 S5 and S7 for mode pin control on msm8998
Configure PMIC PM8998 SMPS regulators S5 and S7 to use the
PMIC_AWAKE signal for mode pin control.  This ensures that these
regulators are set to auto mode instead of retention mode during
system suspend when RFCLK3_EN is asserted by the 802.11ad
hardware.  This is needed so that WLAN wake works correctly as
the 802.11ad circuitry draws more current than retention mode
supports.

Change-Id: Id72fb3629b28322d3cb4aa6892e1c166f375a073
Signed-off-by: David Collins <collinsd@codeaurora.org>
2017-04-19 11:31:13 -07:00
Subash Abhinov Kasiviswanathan
ae714a17b9 defconfig: arm64: msmcortex: Enable IP6_NF_IPTABLES_128
This enables 128 bit matching in ip6tables to help
optimize cases where there is no match required.

This shows a rough improvement of 40Mbps in a UDPv6
downlink test using iperf.

CRs-Fixed: 2034577
Change-Id: I093069b17f21cfbbe60b2bd941f8e2dfef562401
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2017-04-19 11:56:54 -06:00
Subash Abhinov Kasiviswanathan
6f6c1a1f8b net: ipv6: Optimize ipv6 packet matching
iptables matching for ipv6 always has a mask if an address is
specified for match. Adding a check for mask prior to that
helps to improve performance as it avoids the masked comparison.
This is achieved by defining a new feature IP6_NF_IPTABLES_128
which allows to perform 128 bit arithmetic while matching.

CRs-Fixed: 2034577
Change-Id: I9ffd34e29d1b06ad74545d4751aa0e1ea06ded49
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
2017-04-19 11:56:49 -06:00
Rajkumar Subbiah
4c368d38aa ARM: dts: msm: Add device tree for 8998 MTP with 4k display
The 4k display variant of the 8998 MTP has a new device subtype.
Creating a new device tree file with the default panel set to
4k command mode to support this MTP variant.

Change-Id: I1f1eee1baf2bfb1f452e724b55536674a9d6d973
Signed-off-by: Rajkumar Subbiah <rsubbia@codeaurora.org>
2017-04-19 10:43:53 -07:00
Kiran Gunda
be5977b833 ARM: dts: msm: Add PBS trigger support for OLEDB for PM660A
OLEDB driver needs to configure the PBS RAM sequence for
disabling the OLEDB pull down during the module disable.
Add it for PM660A.

Change-Id: I8a969125faa14b2011714ad5bd98a1f9a0f5b649
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2017-04-19 04:53:47 -07:00
Amir Levy
7f7b911b32 msm: ipa3: disable statuses for modem pipes on SSR
On SSR scenario disable statuses for modem producer pipes.
Since modem is not up these statuses are redundant and are
not read by any EE.

Change-Id: I6e7a475d74902f7c5d1b9083f9f7935d3ed2c7c9
CRs-Fixed: 2034903
Signed-off-by: Amir Levy <alevy@codeaurora.org>
2017-04-19 14:35:12 +03:00
Kiran Gunda
35b84c47a5 regulator: qpnp-oledb: Clear SPARE_CTL register during disable
OLEDB_SPARE_CTL register bit is set by the PBS during the display enable
and is used during the display suspend to trigger the PBS event.
Hence, move clearing of the OLEDB_SPARE_CTL register to regulator disable.
Also enable the force_pd_ctl only for DRAX-A revisions <=2.0.

Change-Id: I339cefc91f94f772bc4f84e85f2471e1a73e4aed
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2017-04-19 16:36:46 +05:30
Manu Gautam
851175d661 usb: gadget: configfs: Replace strncpy with strlcpy
Use safer version of strcpy i.e. strlcpy instead of
strncpy for NULL terminated strings.

Change-Id: I5e2800d1d539545744a1b1231e1d589a7c92797a
Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
2017-04-19 04:05:56 -07:00
Shankar Ravi
b4391df0be msm: camera: Fix for NOC error in CCI
During stability runs, CCI dump registers are
accessed after the cci release call causing NOC
errors.Enable dump registers if necessary

Change-Id: Ib80bed8de0bdb68dc0ad72d7be8bd5e973ed7f57
Signed-off-by: Shankar Ravi <rshankar@codeaurora.org>
2017-04-19 16:30:06 +05:30
Gopikrishna Mogasati
296e5025fa diag: Add validity check for process descriptor
This fix checks the validity of memory device session's
process descriptor before issuing a signal to it while
subsystem restart is performed. This fix avoids accessing
of cleaned-up process descriptor's fields.

CRs-Fixed: 2034816
Change-Id: I2725d3348fbeb8290c887cccea4bca6d41c5b184
Signed-off-by: Gopikrishna Mogasati <gmogas@codeaurora.org>
2017-04-19 15:58:32 +05:30
Kiran Gunda
6c86753b0d regulator: qpnp-oledb: Add support for LAB_VREG_NOT_OK notifier
Register a notifier callback for LAB_VREG_NOT_OK, which is triggered
by the LABIBB driver when short circuit(SC) is detected on the LAB
rail. Disable the OLEDB module upon receiving the LAB_VREG_NOT_OK
notification.

Change-Id: Ia3cc19d9a3c2f32acc413677a9ea4b3100464cd2
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2017-04-19 02:30:41 -07:00
Kiran Gunda
91a6162f19 regulator: qpnp-labibb: Handle LAB short circuit(SC) detection
On certain PMICs, there is no short circuit (SC) detection available
in LAB module. Add support to detect it manually and disable LAB/IBB
module upon SC detection. In addition, notify it to OLEDB driver to
disable OLEDB module.

Change-Id: I2a9dc5b1ae8ece45c85b3992026c7f389fd4d135
Signed-off-by: Kiran Gunda <kgunda@codeaurora.org>
2017-04-19 14:47:26 +05:30
Neeraj Upadhyay
5e9e067d19 defconfig: msm: enable vndbinder for sdm660 and msmcortex
Restore default android binder domains. As 'binder,hwbinder,vndbinder'
is the default, this change enables vndbinder.

Change-Id: I48ce75fc6090ad3d9a5b66ca437acbde5a913751
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2017-04-19 02:01:54 -07:00
Lingutla Chandrasekhar
4df9b7635e msm_11ad: reorder registration with memory dump table
Memory dump table doesn't support de registration, but
when ssr ramdump device creation failed, it frees
the buffer registered with Memory dump table also.

So re-order ramdump device creation to avoid freeing
memory dump table buffer.

Change-Id: I0ac595259159f3d3fe2e5c864dae8a6a1d6b4078
Signed-off-by: Lingutla Chandrasekhar <clingutla@codeaurora.org>
2017-04-19 14:26:56 +05:30
Sandeep Panda
92e847bb7e msm: mdss: add debug bus support for dsi block
Add support to dump dsi debug bus registers to memory
or print in xlog. This will be helpful in analyzing HW
behavior more precisely while debugging DSI stability
issues.

Change-Id: I7735897d9f24ca06e15015cf0d277bfe800b35bf
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
2017-04-18 23:56:35 -07:00
Sarada Prasanna Garnayak
784db7a8b0 wcnss: fix the buffer overflow in MAC address store sysfs
Invalid typecast in MAC address store sysfs entry method
causing device crash due to the buffer overflow.

To fix the above issue check the length of the userspace MAC
address before write. Update the datatype and parsing method
to store the userspace MAC address.

CRs-Fixed: 2034549
Change-Id: I0d4709c5b623c8333a99991c042552df1e7da923
Signed-off-by: Sarada Prasanna Garnayak <sgarna@codeaurora.org>
2017-04-18 23:46:20 -07:00
Utkarsh Saxena
314c7a8de6 msm: ipa: Fix to use GFP_DMA and add check for dma_map_single
IPAv2 hardware works with 32 bit addressing,
so allocate a kernel memory using GFP_DMA flag
which is processed by IPA hardware.

Add a error check for return of dma_map_single
using dma_mapping_error API.

Change-Id: I08e3eec8e9b2d81f945283a72338c0a8f23e2ac9
Acked-by: Mohammed Javid <mjavid@qti.qualcomm.com>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
2017-04-19 11:43:59 +05:30
Sandeep Panda
4086c86ed0 msm: mdss: check for audio support before notifying frameworks
In the current implementation DBA driver always assumes
the TV connected is supporting audio. However if the TV
connected is in DVI mode or it's EDID does not contain
any audio block then it will not support audio data.
Hence after parsing EDID, check if the connected TV has
support for audio and accordingly configure and send HPD
events to audio framework.

Change-Id: Id1d175b9c0c1c07bcb4447eeaa907a17c15df098
Signed-off-by: Sandeep Panda <spanda@codeaurora.org>
Signed-off-by: Vishnuvardhan Prodduturi <vproddut@codeaurora.org>
2017-04-19 11:38:45 +05:30
James Morse
48dcef3717 arm64: Change cpu_resume() to enable mmu early then access sleep_sp by va
By enabling the MMU early in cpu_resume(), the sleep_save_sp and stack can
be accessed by VA, which avoids the need to convert-addresses and clean to
PoC on the suspend path.

MMU setup is shared with the boot path, meaning the swapper_pg_dir is
restored directly: ttbr1_el1 is no longer saved/restored.

struct sleep_save_sp is removed, replacing it with a single array of
pointers.

cpu_do_{suspend,resume} could be further reduced to not restore: cpacr_el1,
mdscr_el1, tcr_el1, vbar_el1 and sctlr_el1, all of which are set by
__cpu_setup(). However these values all contain res0 bits that may be used
to enable future features.

Change-Id: I9a188fe2600914463ca30d7515db48851f12a7fe
Signed-off-by: James Morse <james.morse@arm.com>
Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Git-commit: cabe1c81ea5be983425d117912d7883e252a3b09
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Mohammed Khajapasha <mkhaja@codeaurora.org>
2017-04-19 11:35:47 +05:30
Mark Rutland
9a59cd5429 arm64: kasan: clear stale stack poison
Functions which the compiler has instrumented for KASAN place poison on
the stack shadow upon entry and remove this poison prior to returning.

In the case of cpuidle, CPUs exit the kernel a number of levels deep in
C code.  Any instrumented functions on this critical path will leave
portions of the stack shadow poisoned.

If CPUs lose context and return to the kernel via a cold path, we
restore a prior context saved in __cpu_suspend_enter are forgotten, and
we never remove the poison they placed in the stack shadow area by
functions calls between this and the actual exit of the kernel.

Thus, (depending on stackframe layout) subsequent calls to instrumented
functions may hit this stale poison, resulting in (spurious) KASAN
splats to the console.

To avoid this, clear any stale poison from the idle thread for a CPU
prior to bringing a CPU online.

Change-Id: I2d928e26d66d14e9e625ab862e453c59d2341ae4
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Reviewed-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit: 0d97e6d8024c71cc838b292c01d5bd951e080eba
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Mohammed Khajapasha <mkhaja@codeaurora.org>
2017-04-19 11:34:20 +05:30
Mohammed Khajapasha
a58123672c Revert "arm64: Change cpu_resume() to enable mmu early ..."
This reverts commit 3b5f4eb596 ("arm64: Change cpu_resume()
to enable mmu early then access sleep_sp by va"). This
change removed KASAN unpoison check from the original upstream
commit. Subsequent change in this series includes the original
change, with KASAN check present.

Change-Id: Ib8ec11078bef1eb167d69d922a66630aa6379e84
Signed-off-by: Mohammed Khajapasha <mkhaja@codeaurora.org>
2017-04-19 11:33:07 +05:30
Mark Rutland
5ca5edbcb0 sched/kasan: remove stale KASAN poison after hotplug
Functions which the compiler has instrumented for KASAN place poison on
the stack shadow upon entry and remove this poision prior to returning.

In the case of CPU hotplug, CPUs exit the kernel a number of levels deep
in C code.  Any instrumented functions on this critical path will leave
portions of the stack shadow poisoned.

When a CPU is subsequently brought back into the kernel via a different
path, depending on stackframe, layout calls to instrumented functions
may hit this stale poison, resulting in (spurious) KASAN splats to the
console.

To avoid this, clear any stale poison from the idle thread for a CPU
prior to bringing a CPU online.

Change-Id: I05a91c3e39e86e186e957cb84442a7da456e8fb7
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Reviewed-by: Ingo Molnar <mingo@kernel.org>
Cc: Alexander Potapenko <glider@google.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit: e1b77c92981a522223bd1ac118fdcade6b7ad086
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Mohammed Khajapasha <mkhaja@codeaurora.org>
2017-04-19 11:31:45 +05:30
Mark Rutland
929dac4900 kasan: add functions to clear stack poison
Functions which the compiler has instrumented for ASAN place poison on
the stack shadow upon entry and remove this poison prior to returning.

In some cases (e.g. hotplug and idle), CPUs may exit the kernel a
number of levels deep in C code.  If there are any instrumented
functions on this critical path, these will leave portions of the idle
thread stack shadow poisoned.

If a CPU returns to the kernel via a different path (e.g. a cold
entry), then depending on stack frame layout subsequent calls to
instrumented functions may use regions of the stack with stale poison,
resulting in (spurious) KASAN splats to the console.

Contemporary GCCs always add stack shadow poisoning when ASAN is
enabled, even when asked to not instrument a function [1], so we can't
simply annotate functions on the critical path to avoid poisoning.

Instead, this series explicitly removes any stale poison before it can
be hit.  In the common hotplug case we clear the entire stack shadow in
common code, before a CPU is brought online.

On architectures which perform a cold return as part of cpu idle may
retain an architecture-specific amount of stack contents.  To retain the
poison for this retained context, the arch code must call the core KASAN
code, passing a "watermark" stack pointer value beyond which shadow will
be cleared.  Architectures which don't perform a cold return as part of
idle do not need any additional code.

This patch (of 3):

Functions which the compiler has instrumented for KASAN place poison on
the stack shadow upon entry and remove this poision prior to returning.

In some cases (e.g.  hotplug and idle), CPUs may exit the kernel a number
of levels deep in C code.  If there are any instrumented functions on this
critical path, these will leave portions of the stack shadow poisoned.

If a CPU returns to the kernel via a different path (e.g.  a cold entry),
then depending on stack frame layout subsequent calls to instrumented
functions may use regions of the stack with stale poison, resulting in
(spurious) KASAN splats to the console.

To avoid this, we must clear stale poison from the stack prior to
instrumented functions being called.  This patch adds functions to the
KASAN core for removing poison from (portions of) a task's stack.  These
will be used by subsequent patches to avoid problems with hotplug and
idle.

Change-Id: I5813ed6901ad27b168e54dfc6186ffc31aba8d84
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Acked-by: Catalin Marinas <catalin.marinas@arm.com>
Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit: e3ae116339f9a0c77523abc95e338fa405946e07
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Mohammed Khajapasha <mkhaja@codeaurora.org>
2017-04-19 11:29:04 +05:30
Linux Build Service Account
1342831f8a Merge "qcom: smblib: report discharging in case of input OV" 2017-04-18 22:19:28 -07:00
Linux Build Service Account
518e9d19b5 Merge "msm: ipa3: allocate memory for DMA task on init" 2017-04-18 22:19:27 -07:00
Linux Build Service Account
849232eb3e Merge "msm: pcie: support QGIC MSI with SMMU fastmap enabled" 2017-04-18 22:19:26 -07:00
Linux Build Service Account
984ec0d1e7 Merge "msm: mdss: Wait for VSYNC after continuous splash handoff" 2017-04-18 22:19:24 -07:00
Linux Build Service Account
e34cc21861 Merge "usb: phy: qmp: Remove extra debug log" 2017-04-18 22:19:24 -07:00
Linux Build Service Account
aadfc6d284 Merge "power: smb-lib: WA to fix legacy cable detection" 2017-04-18 22:19:21 -07:00
Linux Build Service Account
64cf255adf Merge "soc: qcom: qpnp-haptic: Optimize updating RATE_CFG registers" 2017-04-18 22:19:19 -07:00
Linux Build Service Account
c5371f74c8 Merge "msm: mdss: reset cdm block after used" 2017-04-18 22:19:18 -07:00
Ingrid Gallardo
1a582ab50b msm: mdss: dsi: reset phy during idle screen
Add reset of the phy pll when driver
exits idle screen. This fixes random
failures that were causing dsi commands
to fail after exit idle power collapse.

Change-Id: I0f6a53aef31c1c00f6d3cf1efceaa8211684412c
Signed-off-by: Ingrid Gallardo <ingridg@codeaurora.org>
2017-04-18 17:52:24 -07:00
Skylar Chang
021b9a458c msm: rmnet_ipa: fix security issue
Fix the security issue where mux channel name might
not be null-terminated in ipa wan driver.

Change-Id: I3ef440b62cf3861464fb60c1e7f65f2be5e39ed0
Acked-by: Shihuan Liu <shihuanl@qti.qualcomm.com>
Signed-off-by: Skylar Chang <chiaweic@codeaurora.org>
2017-04-18 17:39:45 -07:00
Bhalchandra Gajare
b121d52808 ASoC: wcd-dsp-mgr: force crash upon collecting ramdumps
In case of WDSP fatal errors, subsystem restart is done to reset the
WDSP. Currently, the driver performs subsystem restart silently and
does not cause devie crash. Add debugfs property 'panic_on_error'
to indicate the driver to induce BUG_ON to aid debugging. The BUG_ON
is done only when the debugfs property is explicity set through
debugfs. If not set, the driver will continue without crashing. The
below command can be used to set the debugfs property.

echo Y > /sys/kernel/debug/wdsp_mgr/panic_on_error

CRs-fixed: 2029058
Change-Id: I1442cc59e1819c3b0abd4c4776f4b32ba63d59e2
Signed-off-by: Bhalchandra Gajare <gajare@codeaurora.org>
2017-04-18 14:47:43 -07:00
Linux Build Service Account
ce87c90172 Merge "lowmemorykiller: fix scan_mutex contention" 2017-04-18 13:57:02 -07:00
Linux Build Service Account
be57574adf Merge "soc: qcom: spcom: validate rx_buf in spcom_rx before usage" 2017-04-18 13:57:01 -07:00
Linux Build Service Account
dcdd543fe1 Merge "wil6210: add option to load FTM FW" 2017-04-18 13:56:59 -07:00
Linux Build Service Account
68cbe2822c Merge "mm: separate out the invocation of lowmemorykiller shrinker" 2017-04-18 13:56:59 -07:00
Linux Build Service Account
2dfa6e303f Merge "wil6210: Improve AP stop handling" 2017-04-18 13:56:57 -07:00
Linux Build Service Account
f574243fae Merge "regulator: qpnp-oledb: Add revid support for OLEDB driver" 2017-04-18 13:56:56 -07:00
Linux Build Service Account
fe484ee85a Merge "power: smb-lib: start CC2 removal WA when VBUS is low" 2017-04-18 13:56:55 -07:00
Linux Build Service Account
a4da2aadd9 Merge "ANDROID: Refactor fs readpage/write tracepoints." 2017-04-18 13:56:54 -07:00
Linux Build Service Account
74cf65d68c Merge "ANDROID: fs: FS tracepoints to track IO." 2017-04-18 13:56:53 -07:00