static variable for irq_counter/perf_mode fail for multiple controller,
change to allocate them for each controller instance.
irq_cnt will record irq number for each perf work schedule duration,
it will clear when work execution/cancel.
Change-Id: I1e07277fcd609b37728a9a716cdf5f75ccc35d9b
Signed-off-by: Linyu Yuan <linyyuan@codeaurora.org>
This change is to meet the spec for i2c at 400KHz. Note that there
is a QUP FW change along with this and then only this will work.
FW change takes care of the duty cycle, clock on/off.
Associated FW change is good to have for this SW change.
FW change CR : TBD separately by HW team.
CR fixed : 3017809.
Change-Id: I2446b736ef5f6cfa5310f4a30a717272d433a655
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
commit c8bcd9c5be24fb9e6132e97da5a35e55a83e36b9 upstream.
Currently, locking of ->session is very inconsistent; most places
protect it using the legacy tty mutex, but disassociate_ctty(),
__do_SAK(), tiocspgrp() and tiocgsid() don't.
Two of the writers hold the ctrl_lock (because they already need it for
->pgrp), but __proc_set_tty() doesn't do that yet.
On a PREEMPT=y system, an unprivileged user can theoretically abuse
this broken locking to read 4 bytes of freed memory via TIOCGSID if
tiocgsid() is preempted long enough at the right point. (Other things
might also go wrong, especially if root-only ioctls are involved; I'm
not sure about that.)
Change the locking on ->session such that:
- tty_lock() is held by all writers: By making disassociate_ctty()
hold it. This should be fine because the same lock can already be
taken through the call to tty_vhangup_session().
The tricky part is that we need to shorten the area covered by
siglock to be able to take tty_lock() without ugly retry logic; as
far as I can tell, this should be fine, since nothing in the
signal_struct is touched in the `if (tty)` branch.
- ctrl_lock is held by all writers: By changing __proc_set_tty() to
hold the lock a little longer.
- All readers that aren't holding tty_lock() hold ctrl_lock: By
adding locking to tiocgsid() and __do_SAK(), and expanding the area
covered by ctrl_lock in tiocspgrp().
Cc: stable@kernel.org
Signed-off-by: Jann Horn <jannh@google.com>
Reviewed-by: Jiri Slaby <jirislaby@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Change-Id: Ie8d8de63b1694803d8650b62993ca86a456831be
Git-commit: 361e822b7d8a9d06d88f7cea0fdb0fb6e41c4d45
Git-repo: https://android.googlesource.com/kernel/msm
Signed-off-by: PavanKumar S.R. <pavasr@codeaurora.org>
Increased the timeout value of ipa3_uc_send_cmd
from 10 to 20 in ipa3_uc_debug_stats_alloc function.
Change-Id: I5be5839c60b84226872a22e8a05bb712e395e62d
Signed-off-by: Jagadeesh Ponduru <jponduru@codeaurora.org>
Make sure there is enough room in the memory descriptor to store the
entire profiling buffer object.
Change-Id: I1e1c73097bb2bba9645b0a3c66fdbbc71d8ba8fa
Signed-off-by: Kamal Agrawal <kamaagra@codeaurora.org>
CDSPRM module implements a RPMSG interface to communicate with CDSP
while providing a way for CDSP to vote for CPU QoS to benefit CDSP
applications performance.Glink IRQ mostly is taken by the
silver cluster.CDSPRM driver vote for sliver cluster prevents
collapsing gold cluster.This saves significant power.
Change-Id: I6cac71e7ab85d823dfc44b19dd85a0dde62455db
Acked-by: Sreekanth Gande <sgande@qti.qualcomm.com>
Signed-off-by: Bavyasritha Alahari <alahari@codeaurora.org>
Currently usb speed override functionality doesn't work as expected
when usb role switch based notification is used. Hence move usb speed
override functionality out side edev check within dwc3_resume_work()
API. Also update maximum_speed as max hw supported speed out side
edev check.
Change-Id: I69b066721490277b77333d2caf820b6c87703501
Signed-off-by: Mayank Rana <mrana@codeaurora.org>
If higher 4 bits of chip ID (device major version) is 1, read board
data file name as bdwlang.e<board ID>. The assumption is board ID
will be always less than 0xFF. If board ID (0xFF) is invalid in OTP
then read it as bdwlang.elf for such case. Also only use lower 4 bits
of device major version as the version number to load firmware file
because of above new requirement.
Change-Id: I4dce528a9c389a660b19dabe4ee44e655a23570b
Signed-off-by: Yue Ma <yuem@codeaurora.org>
* This debug logging consumes 10% of all the CPU
cycles in the drivers communicating with the DSP.
* Disable the logging for the time being until we add
a config.
Bug: 71867957
Change-Id: I97d418fee3d4576b077ed284ed5ae4447da5a789
* Excessive logging -- not present on angler -- is
affecting performance, contributing to missed audio
deadlines and likely other latency-dependent tasks.
Bug: 30375418
[@0ctobot: Extend patch to cover binder_alloc_debug_mask]
Co-authored-by: Adam W. Willis <return.of.octobot@gmail.com>
Change-Id: I36c4ce8a0294e5e7847a3fd884691cb178cd95c2
Commit "rcu: Create RCU-specific workqueues with rescuers" switched RCU
to using local workqueses and removed power efficiency flag from them.
This caused a performance regression that can be observed in Geekbench 5
after enabling CONFIG_WQ_POWER_EFFICIENT_DEFAULT: score went down from
760/2500 to 620/2300 (single/multi core respectively).
Add WQ_POWER_EFFICIENT flag to avoid this regression.
Change-Id: I2c4f41faa55548f9e81a1c0cbe10703948062d89
Remote register I/O amounts to a measurably significant portion of CPU
time due to how frequently this function is used. Cache the value of
each register on-demand and use this value in future invocations to
mitigate the expensive I/O.
Co-authored-by: Sultan Alsawaf <sultan@kerneltoast.com>
[@0ctobot: Adapted for msm-4.19]
Change-Id: I6846ee58c476a125076d0c3ad351f9e15eba180a
* These have all moved into the ramdisk, and boot devices
has gone to the kernel commandline.
Bug: 117933812
Change-Id: I0d06607c522c08f50484b9eff4dc78b21cc083f5
* Android devices use LMK algorythms, so there's no
reason to disable and enable the OOM killer when entering and exiting
suspend.
* This is a fixed version of https://github.com/YaroST12/VIOLENT_kernel/commit/86e59a93b2ef
Co-authored-by: Danny Lin <danny@kdrag0n.dev>
Change-Id: Icb2a57e51128a9ae8d578e697f041ff19871351b
* Similar to what I've done on other devices, revert
to normal grace periods to reduce power usage.
* Expedited RCU hammers CPUs with IPIs to reduce grace
period durations and thus RCU latency, but that disrupts
busy CPUs and causes unnecessary wakeups while providing
little to no improvement in real-world performance.
Change-Id: I2b55e4aaa82bb670dfd6fb417b05fe9ae685e0a8
* Our kernel only runs on known systems where broken
IRQs would already have been discovered, so disable
this to reduce overhead in the IRQ handling path.
Change-Id: Ia9e655dc9891f9cb94a6123ceaec43ba7c5fd5b1
Add support to control the LDOs found on PM8010 PMICs. PM8010 is
a pin-compatible update of PM8008.
Change-Id: Ia15481c9610bdf1b8ce305381decbf28c9f65716
Signed-off-by: David Collins <collinsd@codeaurora.org>
Change the qcom_pm8008-regulator "regulator-name" device tree
property parsing procedure from an exact match to a substring
match. This allows multiple PM8008 chips to be used on a given
board which have unique names specified for their respective
regulators.
Change-Id: I519107431148cdf1882d8e50056f2d2e20ce018f
Signed-off-by: David Collins <collinsd@codeaurora.org>
When someone calls blk_get_request() and blk_put_request()
without invoking blk_execute_rq() in between, nr_pending
will be unbalanced. Fix this by adding a flag, namely the
RQF_PM_ADDED, to track the usage of nr_pending, so that
blk_pm_put_request() won't touch nr_pending if the flag is
not set. Extra care should be given to blk_pm_requeue_request(),
because blk-flush.c inserts flush requests into queue without
calling blk_pm_add_request(), if the flush requests get requeued
by LLD, blk_pm_requeue_request() should anyways decrease
nr_pending in this situation to keep it balanced.
Change-Id: I7baa2049ac532e4fd22a0ce358133ba88266a314
Signed-off-by: Ziqi Chen <ziqichen@codeaurora.org>
Signed-off-by: Can Guo <cang@codeaurora.org>
Currently MTP driver is handling OS descriptors which
causes CTS test failures(android.adb.cts.AdbHostTest) if
MTP is in the default composition.
Fix this by skipping the handling of OS descriptors in
MTP driver and let composite driver take care of it for
the whole configuration.
Change-Id: I77902108c3a550997dfd56b9b3127900c724f066
Signed-off-by: Pratham Pratap <prathampratap@codeaurora.org>
There is an existing device-tree property "qcom,hvdcp2-max-icl-ua" to
specify the ICL when QC2 charger adapter working at high voltage to
avoid VBUS voltage collapse. Normally QC2 adapters have different
current rating at different voltage level, hence keep the existing
property to specify the ICL setting at 9V level and add a new
property "qcom,hvdcp2-12v-max-icl-ua" to specify the ICL setting at
12V level.
Change-Id: I0811932de997b56a1d8d95bd5cbf22a194ffe035
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>
Currently driver is checking for VBUS state after accessing register
in msm_otg_suspend() routine. In case of CDP, there will be race between
msm_otg_suspend() and driving DP pulse. This could cause accessing
register in msm_otg_suspend() while clocks are off as part of sequence
to drive pulse on D+ line and later it is checking for VBUS state high
to abort suspend sequence. Hence fix it by checking for VBUS state
before accessing registers in msm_otg_suspend().
Change-Id: I95ad5339b21647e3971908d15f2eabe0c6311800
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Currently driver is checking only charger type from internal variable
in msm_otg_suspend(), which is valid for PHY based charger detection.
If PMIC charger does charger detection, that charger type will not be
updated and result in allowing low power mode sequence even VBUS is
active. Hence fix it by checking psy_type as well to avoid allowing
low power mode sequence while VBUS is active.
Change-Id: I8cb47912867b15ebdc30bc15b58ff99026a1e180
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
Currently driver is calling API to apply pulse from vbus notifier, but
it might lead to race condition during bootup and result in unclocked
access. Hence avoid applying DP pulse during bootup from vbus notifier
callback. Also enable LDOs and clocks only if usb is in lpm, else apply
DP pulse without enabling LDOs and clocks again.
Change-Id: I987d93de5261147481f3856254941091dedba108
Signed-off-by: Vijayavardhan Vennapusa <vvreddy@codeaurora.org>
When attaching to audiopd on ADSP, allocate one
extra byte for the process name so that it is
null terminated when data is copied from file
pointer in the userspace.
Change-Id: I98ac64a4c16f44fa4fd0e09da1648b9d78d65a82
Signed-off-by: prabha <prabha@codeaurora.org>
Remove the gcc_camss_camnoc clocks from debugcc
which are not registered in GCC to avoid the crash
because of parent index in KHAJE.
Change-Id: Ia8db40e55c3f7d96abb47bb810eb4f13c20e65f2
Signed-off-by: Madhuri Medasani <mmedasan@codeaurora.org>