Commit graph

899,523 commits

Author SHA1 Message Date
Siddartha Mohanadoss
b62866e622 pci: msm: Fix out of bound error with find_next_bit()
Existing api msm_pcie_write_reg_field() calls find_next_bit()
and results in a KASAN out of bounds error for taking in
the first parameter by typecasting as unsigned long type.
To avoid the KASAN error use __ffs() instead.

Change-Id: I9e155248e1233bbcb04ac5e2d1d6d512b3fa5387
Signed-off-by: Siddartha Mohanadoss <smohanad@codeaurora.org>
2021-08-11 12:50:03 -07:00
qctecmdr
45e5597f7b Merge "arm64: Add TLB conflict fault handler" 2021-08-11 08:20:47 -07:00
qctecmdr
fa867b3c87 Merge "cnss2: Add code to do PCIe L2 suspend during shutdown" 2021-08-11 08:20:47 -07:00
Naina Mehta
f056b8a329 arm64: Add TLB conflict fault handler
Add TLB conflict fault handler and try to handle
gracefully. Check whether TLB fault can be handled
by EL2 and cause panic if EL2 is not able to handle.

Change-Id: I276ec5413411932bd8a67ed4c85ebbf66f4affcf
Signed-off-by: Runmin Wang <runminw@codeaurora.org>
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Signed-off-by: Naina Mehta <nainmeht@codeaurora.org>
2021-08-11 14:56:32 +05:30
qctecmdr
1cda180ca1 Merge "soc: qcom: Dump stack in case of SSR failure for wpss" 2021-08-10 03:21:50 -07:00
Naina Mehta
086639c2a4 soc: qcom: Dump stack in case of SSR failure for wpss
Dump stack in case of SSR failure when ignore_ssr_failure
flag is enabled for wpss on Yupik platform.

Change-Id: I98fd294b12fe7bd9b52deb15edb8d83a5113acd8
Signed-off-by: Naina Mehta <nainmeht@codeaurora.org>
2021-08-10 12:11:25 +05:30
qctecmdr
93cba141aa Merge "cnss2: Add prealloc slots to accommodate WLAN host DP memory" 2021-08-06 21:01:57 -07:00
qctecmdr
4abc6114d9 Merge "drivers: pinctrl-msm: Move setting mpm_wake_ctl during .irq_enable" 2021-08-06 07:59:44 -07:00
qctecmdr
c4bb61e257 Merge "mmc: sdhci-msm: Avoid overiding of vendor_specific_func register" 2021-08-06 07:59:44 -07:00
Maulik Shah
9d978c7198 drivers: pinctrl-msm: Move setting mpm_wake_ctl during .irq_enable
Setting mpm_wake_ctl after enabling irq at parent PDC/GIC may cause
a false irq sometimes. Move setting mpm_wake_ctl during .irq_enable
before enabling irq at parent PDC/GIC. Since first irq is cleared
and then enabled it may clear any false irq received and pending at
GIC before enabling same.

While at this also add missing flags IRQCHIP_MASK_ON_SUSPEND and
IRQCHIP_SET_TYPE_MASKED for msmgpio irqchip.

Change-Id: I4801dd984ae5607f87045abc233dfd2d76fcadd1
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
2021-08-06 01:10:12 -07:00
Yeshwanth Sriram Guntuka
ee2fa95f9e cnss2: Add prealloc slots to accommodate WLAN host DP memory
Add four 8k, two 32k, six 64k, and one 128k prealloc slots
to accommodate memory requirements for various WLAN host DP
structures.

CRs-Fixed: 3007544
Change-Id: I6f8fcb46ad84016d9ccc5ca22a9ee9d74d8bbfea
Signed-off-by: Yeshwanth Sriram Guntuka <ysriramg@codeaurora.org>
Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>
2021-08-05 05:44:29 -07:00
qctecmdr
f6962f8ac1 Merge "msm: kgsl: Fix memory leak for anonymous buffers" 2021-08-05 02:06:40 -07:00
qctecmdr
18e4111736 Merge "msm: kgsl: Dump cx regulator consumer list in case disable timeouts" 2021-08-05 02:06:40 -07:00
qctecmdr
3d295b860d Merge "leds: aw2016: update breath sysfs node name" 2021-08-04 20:54:32 -07:00
qctecmdr
c3adef29ad Merge "smcinvoke: release lock before sleep" 2021-08-04 20:54:32 -07:00
qctecmdr
2bef9ce63f Merge "mmc: host: Do not include standard key support for QTI crypto" 2021-08-04 20:54:31 -07:00
qctecmdr
141944971c Merge "msm: mhi-dev: Check to avoid null pointer dereference" 2021-08-04 20:54:31 -07:00
qctecmdr
e2f066d983 Merge "kernel: msm-5.4: Update kconfig for qps615 driver" 2021-08-04 20:54:31 -07:00
Manuel Gomez
25018a71b0 kernel: msm-5.4: Update kconfig for qps615 driver
Chane the default state of QPS615 driver and update
description.

Change-Id: I87832f17898f9a57ad77959cb4eb7a0620cf3af3
Signed-off-by: Manuel Gomez <gomez@codeaurora.org>
2021-08-04 17:21:41 -07:00
qctecmdr
bca4e894c5 Merge "soc: qcom: hab: Updating return value for function attributed to kobject" 2021-08-03 23:48:00 -07:00
Monika Singh
e8e63e2a6e smcinvoke: release lock before sleep
Release g_smcinvoke_lock before sleep, to avoid
LLKD crash for holding lock for longer period of
time if TZ is busy.

Change-Id: Ie9523bc81f3aa03497836f06180c9d3f8a8efc9f
Signed-off-by: Monika Singh <monising@codeaurora.org>
2021-08-03 23:00:47 -07:00
Vaibhav Agrawal
9b74609f23 mmc: host: Do not include standard key support for QTI crypto
Do not include standard key support while creating a keyslot
manager because current implementation does not support standard
keys with hardware key manager. This leads to per file key test
failure, which tries generate standard keys and performs operations
using it. Per file keys should by default use fallback mechanism in
block crypto.

Test: Verified bootup and vts_kernel_encryption_test. Also verified
by customers.

Change-Id: I4aaf532028374e2729868a82e970572e6e6985e0
Signed-off-by: Vaibhav Agrawal <vagrawa@codeaurora.org>
2021-08-03 22:06:19 -07:00
Gauri Joshi
0b5165ee1a msm: mhi-dev: Check to avoid null pointer dereference
If mhi is not enabled the channels ring remain uninitialized. The host
might reset mhi which will result in device crash due to
null pointer dereference for the channel ring. Check if the pointer is
NULL before dereferencing it to avoid the crash.

Change-Id: I582f9a8a6c9bdca8d5f57e1800b566cca389b830
Signed-off-by: Gauri Joshi <gaurjosh@codeaurora.org>
2021-08-03 16:45:42 -07:00
qctecmdr
0a69438bf7 Merge "mmc: host: Reprogram keys after enabling cqhci crypto" 2021-08-03 08:23:56 -07:00
qctecmdr
dd21eda939 Merge "soc: qcom: sys_pm_vx: Print LPM exit log and correct timestamp" 2021-08-03 08:23:55 -07:00
qctecmdr
41a5acae7a Merge "msm: ethernet: Remove IOSS v1 driver" 2021-08-03 08:23:55 -07:00
Maulik Shah
991475c10b soc: qcom: sys_pm_vx: Print LPM exit log and correct timestamp
Print the LPM enter/exit alternative for only timestamp lines and
no DRV vote present.

While at this also print the timestamp shifted by time shift given.

Change-Id: I03c6e45d49a6c7c0af17dc7dad4f42f8806939a6
Signed-off-by: Maulik Shah <mkshah@codeaurora.org>
2021-08-02 23:46:00 -07:00
Hui Liu
ad6bf018e2 leds: aw2016: update breath sysfs node name
Update the blink sysfs node name to "breath"
to make sure the userspace code can access it
correctly. Meanwhile, replace msleep() with
usleep_range() for better sleeping delay precision,
and update the device sysfs node permission to 0644.

Change-Id: I0957087747fcf01f5a036f25c44ce83787b071a9
Signed-off-by: Hui Liu <huliu@codeaurora.org>
2021-08-02 23:35:55 -07:00
Vaibhav Agrawal
5192a8a20d mmc: host: Reprogram keys after enabling cqhci crypto
Call cqhci_crypto_recovery_finish() method during cqhci
enable in order to reprogram all keys into ice.
This is needed to cover the case of mmc reset followed
by cqhci recovery, which leads to all keys being cleared.
This causes an invalid crypto config error during
read/write of data after recovery is done.

Test: Verfied by storage team as part of mmc reset and
cqhci recovery testing.

Change-Id: I8deaf52158af223ec9b9a0a1069340467c7dc48a
Signed-off-by: Vaibhav Agrawal <vagrawa@codeaurora.org>
2021-08-02 22:44:22 -07:00
Mohammed Siddiq
3ebe41df9a cnss2: Add code to do PCIe L2 suspend during shutdown
During mhi resume if mhi detects link down then it posts link
recover event where cnss platform driver goes for self recovery,
as part of recovery the shutdown & powerup sequence is done.
During shutdown the PCIe link is suspended, the link suspend
should be L2 suspend. But in current scenario, it goes for DRV
suspend as the drv_connected_last flag is still set because
resume is initiated by host driver to get qmi stats via
cnss_pci_resume_bus. So on power up the link does not come up
as it tries for DRV resume instead of L2 resume. To fix this,
during shutdown the link suspend should be L2 suspend, so
add code to always do PCIe L2 suspend during shutdown.

Change-Id: I748d2e243bf4491ec31bc42027514a73c3d945b4
Signed-off-by: Mohammed Siddiq <msiddiq@codeaurora.org>
2021-08-02 06:14:30 -07:00
Vivek Pernamitta
71edd842d8 msm: pci: Notify client for recovery on reading invalid config
Notify client driver to recover link on reading PCIE endpoint
config registers as FF's.

Change-Id: Ibf283003f3470c783e17c05ce790512cc8ea8366
Signed-off-by: Vivek Pernamitta <vpernami@codeaurora.org>
2021-08-02 05:09:40 -07:00
Kamal Agrawal
3121593f88 msm: kgsl: Fix memory leak for anonymous buffers
Currently, clean up is not done properly for anonymous buffer
(KGSL_MEM_ENTRY_USER). Fix it by freeing up resources allocated
during memdesc_sg_virt.

Change-Id: I75bff2e718b494c102a8075a5f27323e1823b212
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
2021-07-30 23:25:52 -07:00
qctecmdr
573b7aef75 Merge "pci: pci-msm: Prevent double free of default state" 2021-07-30 18:12:03 -07:00
Sriharsha Allenki
4ad136961a pci: pci-msm: Prevent double free of default state
In the case of a linkdown during pm_suspend, the
pci_saved_state during enumeration(default_state) is
used to restore config space. But this state is freed up
during pm_resume as part of pm_load_and_free_saved_state.

And if this state (default_state) is used again in case
of another linkdown, this leads to use after free.
Fix this by using a copy of the default_state instead
of the original copy for restoring config space incase
of a linkdown.

Change-Id: I6ac763ed88341c739f0b26992d1e31bf2513fdab
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
2021-07-30 09:32:12 -07:00
qctecmdr
0faa021f71 Merge "clk: qcom: debugcc: Add measure only support for QDSS clocks" 2021-07-30 08:51:15 -07:00
qctecmdr
665802b42e Merge "clk: qcom: debugcc: Add measure only support for QDSS clocks" 2021-07-30 08:51:13 -07:00
Vijayanand Jitta
c6efde4313 mm: vmalloc: prevent use after free in _vm_unmap_aliases
A potential use after free can occur in _vm_unmap_aliases where an already
freed vmap_area could be accessed, Consider the following scenario:

Process 1						Process 2

__vm_unmap_aliases					__vm_unmap_aliases
	purge_fragmented_blocks_allcpus				rcu_read_lock()
		rcu_read_lock()
			list_del_rcu(&vb->free_list)
									list_for_each_entry_rcu(vb .. )
	__purge_vmap_area_lazy
		kmem_cache_free(va)
										va_start = vb->va->va_start

Here Process 1 is in purge path and it does list_del_rcu on vmap_block and
later frees the vmap_area, since Process 2 was holding the rcu lock at
this time vmap_block will still be present in and Process 2 accesse it and
thereby it tries to access vmap_area of that vmap_block which was already
freed by Process 1 and this results in use after free.

Fix this by adding a check for vb->dirty before accessing vmap_area
structure since vb->dirty will be set to VMAP_BBMAP_BITS in purge path
checking for this will prevent the use after free.

Change-Id: Ibba0e2ee0d0f049aa0158b78b086aeaad6b70f68
Link: https://lkml.kernel.org/r/1616062105-23263-1-git-send-email-vjitta@codeaurora.org
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
Git-Commit: ad216c0316ad6391d90f4de0a7f59396b2925a06
Git-Repo: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Reviewed-by: Uladzislau Rezki (Sony) <urezki@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2021-07-29 20:47:17 -07:00
Madhuri Medasani
4c695f9809 clk: qcom: debugcc: Add measure only support for QDSS clocks
Add measure only support for QDSS related GCC clocks for
YUPIK.

Change-Id: Ia27282433a63d21929cad3bd8098cc91df445db8
Signed-off-by: Madhuri Medasani <mmedasan@codeaurora.org>
2021-07-29 20:33:52 -07:00
Madhuri Medasani
487b036248 clk: qcom: debugcc: Add measure only support for QDSS clocks
Add measure only support for QDSS related GCC clocks for
SHIMA.

Change-Id: I8aac50323865f71cc44461abb45a8ae97e75c314
Signed-off-by: Madhuri Medasani <mmedasan@codeaurora.org>
2021-07-29 20:33:22 -07:00
qctecmdr
a17b7c30c8 Merge "msm: kgsl: Add fallback condition for atomic snapshot" 2021-07-29 16:01:00 -07:00
qctecmdr
3f963214ec Merge "net: qrtr: Move boot KPI to sysnode" 2021-07-29 05:47:04 -07:00
qctecmdr
7d40d258c3 Merge "msm: pcie : Notify client driver on reading FF's" 2021-07-29 01:51:17 -07:00
qctecmdr
64c318f67b Merge "clk: qcom: debugcc: Update the gcc_qup clocks of PM8008 to measure only" 2021-07-29 01:51:17 -07:00
Madhab Sharma
a6da29f8ed net: qrtr: Move boot KPI to sysnode
Moving boot KPI to sysnode by using “place_marker".

Change-Id: I0680584b23a63e4f185cf68c118e696ac956dd2e
Signed-off-by: Madhab Sharma <madhshar@codeaurora.org>
2021-07-29 01:35:20 -07:00
qctecmdr
1024a5df27 Merge "usb: dwc3: Dont release wakeup source during usb restart" 2021-07-28 21:43:42 -07:00
Madhuri Medasani
1990178de1 clk: qcom: debugcc: Update the gcc_qup clocks of PM8008 to measure only
Update gcc_qup clocks of pm8008 to measure only
since these are not registered in GCC to avoid
the crash because of parent index in BLAIR.

Change-Id: Ia9d19b95331a43eab3c229405218e5871c073be1
Signed-off-by: Madhuri Medasani <mmedasan@codeaurora.org>
2021-07-28 20:50:57 -07:00
qctecmdr
fd87c199ce Merge "kernel: msm-5.4: Add Kconfig option for IOSS Shim layer" 2021-07-28 13:53:55 -07:00
qctecmdr
094bac2b7c Merge "defconfig: sdxlemur: Enable QPS615_ioss module" 2021-07-28 13:53:55 -07:00
qctecmdr
caba42fdbd Merge "msm: mhi_dev: Defer mhi resume till M0 ack is sent" 2021-07-28 13:53:54 -07:00
Elson Roy Serrao
980a25b5c2 usb: dwc3: Dont release wakeup source during usb restart
When changing USB speed via sysfs, the device might utilize the
idle time between DISCONNECT and CONNECT events and enter suspend.
As a result the pending CONNECT might get delayed thus pushing USB
enumeration during the next resume. Avoid this by not releasing the
wakeup source when usb restart is in progress.

Change-Id: I754b76eb7b36923a2dcd4d58587101750d1cd83c
Signed-off-by: Elson Roy Serrao <eserrao@codeaurora.org>
2021-07-28 13:24:30 -07:00