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>
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>
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>
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>
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>
Chane the default state of QPS615 driver and update
description.
Change-Id: I87832f17898f9a57ad77959cb4eb7a0620cf3af3
Signed-off-by: Manuel Gomez <gomez@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Add measure only support for QDSS related GCC clocks for
YUPIK.
Change-Id: Ia27282433a63d21929cad3bd8098cc91df445db8
Signed-off-by: Madhuri Medasani <mmedasan@codeaurora.org>
Add measure only support for QDSS related GCC clocks for
SHIMA.
Change-Id: I8aac50323865f71cc44461abb45a8ae97e75c314
Signed-off-by: Madhuri Medasani <mmedasan@codeaurora.org>
Moving boot KPI to sysnode by using “place_marker".
Change-Id: I0680584b23a63e4f185cf68c118e696ac956dd2e
Signed-off-by: Madhab Sharma <madhshar@codeaurora.org>
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>
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>