Add gcc_pwm0_xo512_div_clk_src as parent of gcc_pwm0_xo512_clk
to support the pdm_pwm functionality.
Change-Id: I226dbb1c401f93816291915ecddb4d3c320f0eb9
Signed-off-by: Anaadi Mishra <quic_anaadim@quicinc.com>
Switch to LE ramdisk for waipio_le to align to what product side is using.
Change-Id: I62c2bd1447011c3098a7fd0d1139c28d57d7cbe5
Signed-off-by: Mukesh Pilaniya <quic_mpilaniy@quicinc.com>
Add pwm driver to support for Qualcomm Technologies Inc. SoCs.
Change-Id: I4486e2aadbc48605eef686c3d4b5e568d9158f72
Signed-off-by: Taniya Das <quic_tdas@quicinc.com>
Signed-off-by: Anaadi Mishra <quic_anaadim@quicinc.com>
Thread T1 add buffer to fl->cached_bufs and release fl->hlock and holding
buffer reference. Now thread T2 will aquire fl->hlock and free buffer in
fastrpc_cached_buf_list_free(). T1 will dereference the freed buffer.
Moving reference buffer uses for T1 inside fl->hlock to avoid UAF.
Change-Id: I5f08d5497099133f87d55f5879cfe50c2ba23ae6
Signed-off-by: Abhinav Parihar <quic_parihar@quicinc.com>
In the current design, we cannot directly match timestamps between the
APPS side ucsi_glink driver logs, with that of the charger remote-proc
side ucsi logs, as they use different timer references.
To overcome this problem, read the timer reference used by the
remoteproc, from the APPS side ucsi_glink driver and print them along
with the normal log prints, to make debugging easier.
Change-Id: I7c519385845f79fd1878a09f9e58987b326ab8ff
Signed-off-by: Jishnu Prakash <quic_jprakash@quicinc.com>
We are seeing wakeup ISR being called during the
shutdown path after port is closed. As part of
shutdown, in suspend wakeup IRQ is enabled and
later it is disabled. In this duration break error
is detected invoking wakeup ISR.
Do not service wakeup IRQ in shutdown path by
keeping the wakeup IRQ disabled in suspend
since shutdown is in progress.
Also ensured irq_set_irq_wake power management is
updated correctly and balanced in resume and suspend
functions.
Change-Id: Ic5d6cabafc0e9d08a17981668016bac411be0a4c
Signed-off-by: Prasanna S <quic_prass@quicinc.com>
When read pinconf-groups and pinconf-pins from debugfs,
the reserved gpio register was been accessed, device
got an NOC Error, so add the gpio chip line valid
judgment before the gpio register access.
Change-Id: I78cdf13cab6cf50b5e9cebc85db4a74fa1722953
Signed-off-by: Yue Liu <quic_yueliu@quicinc.com>
Add support for TBU and TCU clocks on RAVELIN target, so that
clients can vote for this clocks.
Change-Id: Ifb9ec881c0e4acf2ed618d8779124a1ddf404812
Signed-off-by: Kalpak Kawadkar <quic_kkawadka@quicinc.com>
context_lpac can be null if obj_lpac is null in
adreno_hwsched_reset_and_snapshot(). Add null pointer
check to pacify the static checker warning.
Change-Id: I28f2dd351cd15322bdc8f2639496d161d4e2243f
Signed-off-by: Sanjay Yadav <quic_sanjyada@quicinc.com>
This reverts commit e33ce54cef.
This commit removes the pm_runtime_get_sync from CTI HW enable
which will lead to CTI be access without power up and cause crash.
Change-Id: Ieb096e78e7cd95dcbe75eb61cbcd4a7fc1d70b4a
Signed-off-by: Xiaoqi Zhuang <quic_xiaozhua@quicinc.com>
The memlat sampling stats are updated every sample_ms in the
sched tick path and on idle entry. They are processed every
sample_ms by a work function that is queued in the jiffy
update path. However, this work function can be severely
delayed in high workload scenarios which can delay updating
last_sample_ts and hence cause extra sampling to happen in
sched tick path out of sync with jiffy updates as well as
extra jiffy updates to happen before next sampling has
completed. If an additional jiffy update and work function
execution happen before sampling stats have been updated,
all of the stats deltas will be zero which will cause a vote
of min even though cpu workload is very high. Process the
sampling stats in the jiffy update path itself to avoid
potential synchronization issues and impacts from workqueue
execution delays.
Change-Id: Ia73ff5a440e3d12dc58d266d3b9b52028acc3959
Signed-off-by: Amir Vajid <quic_avajid@quicinc.com>
Add TBU and TCU clock handles for GCC on RAVELIN target, so that clients
can request for the clock ids.
Change-Id: Iad57ae0f507299124969891ea4c87ccc8a7ed0e1
Signed-off-by: Kalpak Kawadkar <quic_kkawadka@quicinc.com>
The kernel side mapping ignores the user passed in cachemode
and uses writecombine to map the buffer to kernel virtual address
space. This can create problems due to mismatched attributes.
Fix this by taking into account the buffer's cachemode.
Change-Id: Ifffd7822eba841e10836c98a0b28443f7a345972
Signed-off-by: Sushmita Susheelendra <quic_ssusheel@quicinc.com>
Signed-off-by: Kamal Agrawal <quic_kamaagra@quicinc.com>
Adaptive Clock Distribution (ACD) is a power saving feature to
mitigate voltage droops.
Change-Id: I3a6f0305c0fd7c2165fcd0ab2ae339209576e878
Signed-off-by: Pankaj Gupta <quic_gpankaj@quicinc.com>
Add support for gcc venus resets on RAVELIN platform.
Change-Id: Ia3110d692274c150f3c0398942cc8eabc8fd5135
Signed-off-by: Kalpak Kawadkar <quic_kkawadka@quicinc.com>
Since evicting inodes triggers writes to the backing file, which uses
the mi_owner field from the mount_info struct, make sure inodes are
evicted before we free the mount_info data
Test: incfs_test
Bug: 270117845
Change-Id: I673b2e0e04b5adc3998caf6f22443598a30338af
Signed-off-by: Paul Lawrence <paullawrence@google.com>
(cherry picked from commit 7899985277527b29c47929a6d6a89c5c89b406ad)
Since commit c843966c55 ("mm: allow swappiness that prefers reclaiming
anon over the file workingset") has expended the swappiness value to make
swap to be preferred in some systems. We should also change the memcg
swappiness restriction to allow memcg swap-preferred.
Link: https://lkml.kernel.org/r/d77469b90c45c49953ccbc51e54a1d465bc18f70.1627626255.git.baolin.wang@linux.alibaba.com
Fixes: c843966c55 ("mm: allow swappiness that prefers reclaiming anon over the file workingset")
Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Bug: 275726149
(cherry picked from commit 37bc3cb9bbef86d1ddbbc789e55b588c8a2cac26)
Change-Id: If6a46ebe5313ae0f5e75917adb6ca852c8daa6e6
Signed-off-by: Carlos Galo <carlosgalo@google.com>
[ Upstream commit 29b0589a865b6f66d141d79b2dd1373e4e50fe17 ]
When the ene device is detaching, function ene_remove() will
be called. But there is no function to cancel tx_sim_timer
in ene_remove(), the timer handler ene_tx_irqsim() could race
with ene_remove(). As a result, the UAF bugs could happen,
the process is shown below.
(cleanup routine) | (timer routine)
| mod_timer(&dev->tx_sim_timer, ..)
ene_remove() | (wait a time)
| ene_tx_irqsim()
| dev->hw_lock //USE
| ene_tx_sample(dev) //USE
Fix by adding del_timer_sync(&dev->tx_sim_timer) in ene_remove(),
The tx_sim_timer could stop before ene device is deallocated.
What's more, The rc_unregister_device() and del_timer_sync()
should be called first in ene_remove() and the deallocated
functions such as free_irq(), release_region() and so on
should be called behind them. Because the rc_unregister_device()
is well synchronized. Otherwise, race conditions may happen. The
situations that may lead to race conditions are shown below.
Firstly, the rx receiver is disabled with ene_rx_disable()
before rc_unregister_device() in ene_remove(), which means it
can be enabled again if a process opens /dev/lirc0 between
ene_rx_disable() and rc_unregister_device().
Secondly, the irqaction descriptor is freed by free_irq()
before the rc device is unregistered, which means irqaction
descriptor may be accessed again after it is deallocated.
Thirdly, the timer can call ene_tx_sample() that can write
to the io ports, which means the io ports could be accessed
again after they are deallocated by release_region().
Therefore, the rc_unregister_device() and del_timer_sync()
should be called first in ene_remove().
Suggested by: Sean Young <sean@mess.org>
Bug: 272747251
Fixes: 9ea53b74df ("V4L/DVB: STAGING: remove lirc_ene0100 driver")
Signed-off-by: Duoming Zhou <duoming@zju.edu.cn>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I0076055ed3336b6f2ef4afe8afe68620dc6c2a0a
Bail out of protocol initialization routine early when basic information
about protocol version could not be retrieved. Failing to act this way
can lead to a initialized SCMI protocol which is in fact
not fully functional.
Change-Id: I661975be99fc962b102682b72b0c4b55d72bf7cb
Signed-off-by: Shivnandan Kumar <quic_kshivnan@quicinc.com>