Per client lan statistics feature requires fetching data
from IPA-Q6 and share it with user space application.
Make changes to provide ioctl-interface to interact with
IPA Q6 to get the per client lan statistics.
Change-Id: If0af747cd86058eaa275170f42af1d9e93e81768
Acked-by: Abhishek Choubey <abchoube@qti.qualcomm.com>
Acked-by: Pooja Kumari <kumarip@qti.qualcomm.com>
Acked-by: Chaitanya Pratapa <cpratapa@qti.qualcomm.com>
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
Signed-off-by: Utkarsh Saxena <usaxena@codeaurora.org>
(from https://patchwork.kernel.org/patch/9939405/)
commit 7a4408c6bd3e ("binder: make sure accesses to proc/thread are
safe") made a change to enqueue tcomplete to thread->todo before
enqueuing the transaction. However, in err_dead_proc_or_thread case,
the tcomplete is directly freed, without dequeued. It may cause the
thread->todo list to be corrupted.
So, dequeue it before freeing.
Bug: 65333488
Change-Id: I14ef48095d9f690148b1a50ea62d05dd67779505
Signed-off-by: Xu YiPing <xuyiping@hisilicon.com>
Signed-off-by: Todd Kjos <tkjos@google.com>
Git-commit: 86578a0fd70edffb11c78b5df85b8e113e44bfe1
Git-repo: https://android.googlesource.com/kernel/common
Signed-off-by: Kyle Yan <kyan@codeaurora.org>
Add device specific flag for new vmid heap shared feature.
Change-Id: I35cc0073a5fa10c715d520ebb9d77936a6820aa9
Signed-off-by: Tharun Kumar Merugu <mtharu@codeaurora.org>
The current implementation of synchronize_sched_expedited() incorrectly
assumes that resched_cpu() is unconditional, which it is not. This means
that synchronize_sched_expedited() can hang when resched_cpu()'s trylock
fails as follows (analysis by Neeraj Upadhyay):
o CPU1 is waiting for expedited wait to complete:
sync_rcu_exp_select_cpus
rdp->exp_dynticks_snap & 0x1 // returns 1 for CPU5
IPI sent to CPU5
synchronize_sched_expedited_wait
ret = swait_event_timeout(
rsp->expedited_wq,
sync_rcu_preempt_exp_done(rnp_root),
jiffies_stall);
expmask = 0x20 , and CPU 5 is in idle path (in cpuidle_enter())
o CPU5 handles IPI and fails to acquire rq lock.
Handles IPI
sync_sched_exp_handler
resched_cpu
returns while failing to try lock acquire rq->lock
need_resched is not set
o CPU5 calls rcu_idle_enter() and as need_resched is not set, goes to
idle (schedule() is not called).
o CPU 1 reports RCU stall.
Given that resched_cpu() is now used only by RCU, this commit fixes the
assumption by making resched_cpu() unconditional.
Change-Id: I67cbf28612004f4b78e355dd00b5abdd0f31ec13
Reported-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Suggested-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Acked-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Patch-mainline: linux-kernel @ 18/09/17, 09:01
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
We need the scheduler's fastpaths to be, well, fast, and unnecessarily
disabling and re-enabling interrupts is not necessarily consistent with
this goal. Especially given that there are regions of the scheduler that
already have interrupts disabled.
This commit therefore moves the call to rcu_note_context_switch()
to one of the interrupts-disabled regions of the scheduler, and
removes the now-redundant disabling and re-enabling of interrupts from
rcu_note_context_switch() and the functions it calls.
Reported-by: Peter Zijlstra <peterz@infradead.org>
Change-Id: I8de5c9890b1db126b06d4d8fed717b3c8bfcf866
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
[ paulmck: Shift rcu_note_context_switch() to avoid deadlock, as suggested
by Peter Zijlstra. ]
Git-commit: 46a5d164db53ba6066b11889abb7fa6bddbe5cf7
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[prsood@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
This commit applies an early-exit approach to rcu_sched_qs(), reducing
the nesting level and saving a line of code.
Change-Id: Ib5dff7a0e3a26ce8ed319fd03b15e77b7b6650db
Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Git-commit: fecbf6f01fbd83e6419ccb7f61d9a6eb987f1d92
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Prateek Sood <prsood@codeaurora.org>
Even if ICE device is not found it is possible
for list device API to return non NULL pointer
which will pass all NULL checks in code. Ensure
to return proper address or NULL.
Change-Id: I1465614b86f1415376b2adffeec6e4da1a33ddd5
Signed-off-by: Neeraj Soni <neersoni@codeaurora.org>
In this case gsi_ctrl_clear_cpkt_queues function is called
which is holding spinlock and in the meantime dwc3_interrupt
occurred on same CPU which in turn is calling gsi_ctrl_clear_cpkt_queues
function and it is trying to acquire the same spinlock causing
deadlock.
This change disables the interrupts when spinlock is acquired
in gsi_ctrl_clear_cpkt_queues function.
Change-Id: Ia87a0a283ca6b6298083dddb448e4d649a4f8e89
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
Line reset can occur during hibernate enter, exit or
during PA_INIT. In some cases, system slowness problem
is observed when line reset happened during hibernate
enter process in auto hibernate mode of operation as
link remains in PWM-G1 mode. To fix this problem, read
PA_PWRmode, PA_TxGear and PA_RxGear if line reset is
detected and if link is in PWM-G1 mode, initiate power
mode change to expected HS gear.
Change-Id: Ic06a11c917e8954743c4dcf80b89fedeec4584ed
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
Enable CONFIG_SLUB_DEBUG_ON for MSM8996 AUTO platform in order
to get more debug capability.
Change-Id: I076395c4d4b950859afa2c1fffdc3687ba39a71d
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Check whether USB is connected while doing conversion for
channels that require USB to read valid readings. If USB
is not plugged in, exit loop and return error.
Change-Id: Ib181a9e4406d88dc2988ca08e84598635e5a4716
Signed-off-by: Rama Krishna Phani A <rphani@codeaurora.org>
Change the smb138x_parallel_slave node name to smb138x_charger to be
consistent with other smb charger node names.
Change-Id: I2f325e943efbfa8d95223f830232246ee97149c4
Signed-off-by: Nicholas Troast <ntroast@codeaurora.org>
Add mpm sleep counter and imem boot stats for boot status and
boot time marker.
Change-Id: I9053bf89d30e92f9f18a979356c5e4c4626f498d
Signed-off-by: Zhiqiang Tu <ztu@codeaurora.org>
On 8996 AUTO platform, too many "hdmi_i2c_xfer" warnings appear
when booting that makes boot time longer and may cause watchdog
bite. The warning is generated by WARN_ON() in hdmi_i2c_xfer()
which prints call stack like:
hdmi_i2c_xfer+0x44/0x398
__i2c_transfer+0x270/0x4b4
i2c_transfer+0x64/0xb0
hdmi_ddc_read+0x84/0xdc
sde_hdmi_scdc_write+0xac/0x178
_sde_hdmi_bridge_mode_set+0x928/0xa34
drm_bridge_mode_set+0x30/0x54
complete_commit+0x448/0x938
_msm_drm_commit_work_cb+0xb0/0x1a0
kthread_worker_fn+0xcc/0x170
kthread+0xf8/0x100
ret_from_fork+0x10/0x20
The reason is the HDMI_CTRL_ENABLE bit of REG_HDMI_CTRL register
is disabled during the reset by the first commit. This reset is
caused by the missing of HPD regulator enabling in HPD call sequence.
So to remove the HDMI i2c warning, the patch enables HPD regulator
to avoid the reset.
Change-Id: I91e853535a972f241c7aa2d28c05785569ae23db
CRs-fixed: 2093649
Signed-off-by: Yujun Zhang <yujunzhang@codeaurora.org>
Dummy transport is only way to access if_ptr. When dummy
transport is freed, if_ptr allocated for dummy transport is
not freed. This result in memory leak.
kfree of if_ptr is called before freeing dummy transport.
CRs-Fixed: 2116744
Change-Id: I832e0fcde418b7c3d992f50e817866bc9075da3c
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
Data of intent is not freed even in purge_intent_list. This results
in memory leak.
Kfree is done for data before freeing intent.
CRs-Fixed: 2116744
Change-Id: Ib99261208df1cc9b63b4cd0a35ac0c7942efb4a8
Signed-off-by: Dhoat Harpal <hdhoat@codeaurora.org>
For some targets that have less vmalloc space this can be increased by
enabling config ENABLE_VMALLOC_SAVING. With this config we can reclaim
virtual mappings which remains unused because of non hlos carveout
reservations in lowmem.
Select the default method of reclaiming virtual memory as vmalloc saving.
Change-Id: I05bbae3b554be54f74b740404dda0cdfa89084bd
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
When the source is powered off with an external sink connected, it
will result in a call to blank and power off the source. In the
current implementation, sink is not transitioned to D3 power mode
prior to turning off the source. This can result in the sink
reporting signal lock failures as the source if powered off,
resulting in an HPD IRQ interrupt. If this interrupt is handled
after the DP controller is powered off, it can lead to unclocked
register accesses. Fix this by ensuring that sink is powered off
prior to powering off the source. In addition, ensure that no more
attention events are handled once the DP controller is powered off.
Change-Id: I08558229f7c3e603904527de58a39039b3d7615e
Signed-off-by: Aravind Venkateswaran <aravindh@codeaurora.org>
Signed-off-by: Padmanabhan Komanduru <pkomandu@codeaurora.org>
spcom server app might open the channel before the SP client app.
The asynchronous CONNECTED callback might be called while the server
is waiting for data.
Avoid locking the channel while waiting for data to avoid dead lock
while handling the CONNECTED callabck.
Change-Id: I7c576f240b60720a6f1461b3e48f4422c110e7c4
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
spcom_notify_state() is a callback called by glink upon channel connect.
It is asynchronous callback, that might be called after glink_close().
Avoid storing stale glink handle in such case.
Change-Id: I10359f38ca48f618899673f677a6409b01bc6618
Signed-off-by: Amir Samuelov <amirs@codeaurora.org>
Change the downmix/pan_scale control data type from integer to bytes
to make it compatible across different archs.
Change-Id: I9282673dc1e124185d7c545206bba31966b803dc
Signed-off-by: Varun Balaraj <varunb@codeaurora.org>
MBA image size comparison check is currently being
done with a signed count whose value can possibly be
negative. If count value is negative then comparison
will always succeed and invoke memcpy with incorrect
value of count leading to buffer overflow. Fix this
by not using signed comparison.
Change-Id: Id2d0cafae01f940f36cfd559d4656fc0f022d6a5
Signed-off-by: Kaushal Kumar <kaushalk@codeaurora.org>
Block device should be available before mounting of root
device. In some cases block device is not available at the
time of root device mounting because mmc detect work is not
completed by that time which is causing mount failure. This
change flush mmc detect work asynchronously after device probe
and before mounting of root device, async_synchronize_full
will make sure all asynchronous function calls have been done.
Change-Id: I22be6c4b528c952fd73ea5d5e8ba533ce7165f86
Signed-off-by: Ankit Jain <jankit@codeaurora.org>
Pop sound happens after start playback on HPH when
ultrasound playback on LO4 is enabled.
This is because CnP is sequence dependent and enabling
design blocks in specified order is causing minimum CnP.
CRs-Fixed: 2100346
Change-Id: If10f9013cc1a2aa61fe9c719d3190f2df0b00950
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
During firmware load, there could be data over reads
due to calculation of lm_size and lm_sequence from
block and block_size. Added bounds checking to prevent
this and improved the size calculation.
CRs-Fixed: 2107981
Change-Id: Ib4283951b0d6c8fb699af1f85e657981ad4c0318
Signed-off-by: Archana Sriram <apsrir@codeaurora.org>
This change adds device tree flag to allow system suspend
on automotive platform with USB devices connected that do
not support runtime suspend.
Change-Id: I3ddda5052c866e16c46e5a46255acc28ab6f9363
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
Kernel crash is observed when trying to access component
because wcd_dsp_ctl is deregistered. This is due to failure in
soundcard registration. The failure occurs due to msm
unable to set aanc version. Update afe clock version for
primary auxpcm resolves the issue.
CRs-Fixed: 2113187
Change-Id: I8bb3c9a6946f1c1af88a62d7ee154b6e7ff904f4
Signed-off-by: Vatsal Bucha <vbucha@codeaurora.org>
DWC3 driver uses wakeup_source and allows pm_suspend only after
entering low power mode as part of runtime suspend. This prevents
PM suspend in host mode if connected device's driver doesn't
support runtime or selective suspend.
Add support in driver where user can specify using dtsi attribute
to not use wakeup source in host mode. It will allow system to enter
deep sleep or pm_suspend irrespective of runtime PM state of XHCI.
On high level below are the changes in default behavior:
-Do not use wakeup_source for DWC3 when operating in host mode.
-For host mode, devices will suspend upon PM suspend and resumed
after PM resume.
Change-Id: Ia1d450e6dd99e094e48caf9723a355b7870b54dd
Signed-off-by: Ajay Agarwal <ajaya@codeaurora.org>
Block device should be available before mounting of
root device. In some cases block device is not available
at the time of root device mounting because mmc detect
work is not completed by that time which is causing mount
failure. To fix this, flush mmc detect work after device
probe completion.
Change-Id: I785a1e01a691652cfdb5a82acee2475e23fe3766
Signed-off-by: Ankit Jain <jankit@codeaurora.org>
Fix uninitialized variable use which would cause unexpected return
value.
CRs-Fixed: 2070945
Change-Id: I874ec28904149061246fb4c2b24444a4c33e0116
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
The max speed for the USB device is high speed. So
the device is always enumerated in high speed indpendent
of the connection. Fix this by setting the EXTCON_USB_SPEED
to 1 which in turn sets the max speed as super speed.
CRs-Fixed: 2108100
Change-Id: I8f313cc3ee015a1340ab78650e17334ca85ddd27
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
If the device is booted up with OTG cable connected,
the device does not switch to host mode. The trigger
is lost because the irqs are enabled at a later time.
Fix this by checking the ID state during probe.
CRs-Fixed: 2106351
Change-Id: I742d0839832219e757348e102252f97d95a8335b
Signed-off-by: Sriharsha Allenki <sallenki@codeaurora.org>
During p2p find unwanted probe requests with broadcast SSID is
sent along with the probe requests with p2p wildcard SSID.
The addition of survey report flag in scan flags initiates an
active scan along with the p2p scan, due to which we see probe
requests with broadcast SSID along with the probe requests having
p2p wildcard SSID.
Fix the flags sent during scan command for p2p scan.
CRs-Fixed: 2093805
Change-Id: I7c2a1502ef86bc5151e8c86f4a89f073e75a925d
Signed-off-by: Rakesh Pillai <pillair@codeaurora.org>