Commit graph

884,342 commits

Author SHA1 Message Date
qctecmdr
c2d54934ff Merge "dwc3-msm: Add support to vote USB FORCE_MEM_CORE_ON" 2020-06-11 10:59:12 -07:00
qctecmdr
8958166013 Merge "soc: qcom: mem-buf: Fix error handling when releasing memory" 2020-06-11 10:59:12 -07:00
Nitheesh Muthuraj
59d94c3a20 msm: kgsl: PERFCNTR_CTRL needs to be at end of restore list
PERFCNTR_CTRL needs to be at the end of restore list to ensure
perfcounters count correctly across IFPC.

Change-Id: Ic0718a28074bf15910e2f6e97c16eb90e69ef917
Signed-off-by: Nitheesh Muthuraj <nmuthuraj@codeaurora.org>
2020-06-11 10:49:26 -07:00
Can Guo
c2825345ea scsi: ufs-qcom: Remove unnecessary devm_kfree
Resources allocated with devm_* are managed by device driver framework,
meaning the resources will be automatically released when the associated
device is removed. Besides, having a devm_kfree here would cause a
use-after-free scenario: after hba->host is freed up, data inside hba->host
shall still be accessed when device driver framework frees up all resources
associated with hba->dev. hba->host->rcdev, for example, shall be used by
func devm_reset_controller_release() when resources associated with
hba->dev are freed up.

Change-Id: I90bab41c34450a1c814d863b9f3653228f5eeb95
Signed-off-by: Can Guo <cang@codeaurora.org>
2020-06-11 19:38:06 +08:00
Veerabhadrarao Badiganti
930e70e995 mmc: sdhci-msm: Ensure larger discard size
Discard size calculation uses max_busy_timeout in deriving the
value. So, we can ensure a larger discard size by setting this
timeout as zero. If this timeout is zero then it takes max erase
timeout vlaue (which is 60sec) in the discard size calculation.

And qcom SDHC can support h/w based busy detection, So
we need set MMC_CAP_NEED_RSP_BUSY capability flag.

Since Qcom SDHC can support h/w based busy detection for R1b
commands, this timeout value is not relevant for us.
Setting it zero won't affect in any operation provied
MMC_CAP_NEED_RSP_BUSY cap is set.

Change-Id: Ib20a1e536d2e24cf8de1e927715a8a3aa7f0ae27
Signed-off-by: Veerabhadrarao Badiganti <vbadigan@codeaurora.org>
2020-06-11 16:44:03 +05:30
Pavankumar Kondeti
71827e4a8b sched: walt: Improve the scheduler
This change is for general scheduler improvements.

Change-Id: I511e49ea6c207378c66a580e29e89f28aaa9f7f3
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2020-06-11 15:57:54 +05:30
Avinash Philip
9b79acf99c llcc_perfmon: Initialize variable before use
Initialize th variable before access.

Change-Id: I2e55c7ffe3fbbe9996072e62f34532b4b6d133ee
Signed-off-by: Avinash Philip <avinashp@codeaurora.org>
2020-06-11 11:53:06 +05:30
Prakruthi Deepak Heragu
c0c38dbf3a ABI: Update internal whitelist with debugfs symbols
To ease testing efforts, add all necessary debugfs symbols in the
internal whitelist so that DEBUG_FS config can be turned on when
necessary without having to change the actual whitelist.

Change-Id: Ic5862a0a7ecc4bda1171265baf7b5847773a1b70
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
2020-06-10 20:45:04 -07:00
Subbaraman Narayanamurthy
a8800b4bb0 power: qti_battery_charger: call power_supply_changed() if fake_soc is set
There are clients who are waiting for power supply change events
when fake soc is set during testing. Call power_supply_changed()
to support them.

Change-Id: I6a1f4e7daa136b3783f5ed35f37abafad7447378
Signed-off-by: Subbaraman Narayanamurthy <subbaram@codeaurora.org>
2020-06-10 19:00:51 -07:00
Yue Ma
4b6e052187 cnss2: Make sure PCIe/MHI is up before collecting RAM dump
There may be race condition between firmware assert and runtime PM
suspend. Hence make sure PCIe/MHI is up before collecting RAM dump.

Change-Id: I9a76bf96c4a72045d31449ed9f760e498ae78789
Signed-off-by: Yue Ma <yuem@codeaurora.org>
2020-06-10 17:57:10 -07:00
Satya Durga Srinivasu Prabhala
88949be233 sched: Improve the scheduler
This change is for general scheduler improvements.

Change-Id: Iaefb893a84055748be7f2108179e3b869ac00318
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
2020-06-10 15:35:30 -07:00
Hemant Kumar
3c1d70e5e7 sound: usb: Increase upper bound check for bInterval to 16
Driver currently restrict upper bound check for bInterval
to 4 which corresponds to 1 ms. Fix the bInterval range
check as per the USB spec for ISOC endpoint.

Change-Id: I580e1fdfab0eeb1231642b920239691e7af67727
Signed-off-by: Hemant Kumar <hemantk@codeaurora.org>
2020-06-10 12:46:56 -07:00
Jack Pham
da53231c3f usb: xhci: Don't check for USB_STATE_NOTATTACHED in sec_event_ring_cleanup
Similar to xhci_stop_endpoint(), this API is called when a device
is removed. The check for udev->state == USB_STATE_NOTATTACHED
was added by mistake and should be removed.

Change-Id: Ie0df67c3139bd585f098215d093169c961710349
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2020-06-10 11:53:54 -07:00
qctecmdr
1d46207553 Merge "sched: Improve the scheduler" 2020-06-10 11:30:47 -07:00
Guru Das Srinagesh
2887f9287d soc: qti_battery_debug: Move qbg_context to device bin file
Replace the "qbg_context" debugfs blob with a binary file associated
with the battery_debug device that provides the same functionality as
the existing debugfs blob for getting QBG context.

Usage:
  # cd /sys/devices/platform/soc/soc:qcom,pmic_glink_log/\
    soc:qcom,pmic_glink_log:qcom,battery_debug
  # echo 1 > qbg_context
  # cat qbg_context > file.bin

Change-Id: I59cfea2880362a95d8c87c02b4d823bfdca4e1e2
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
2020-06-10 09:04:45 -07:00
Prasad Sodagudi
8f8cf9f187 genirq/cpuhotplug: Reduce logging level for couple of prints
During the cpu hot plug stress testing, couple of messages
continuous flooding on to the console is causing timers
migration delay. Delayed time migrations from hot plugging
core is causing device instability with watchdog. So reduce
log level for couple of prints in cpu hot plug flow.

Change-Id: I14f034765b063fb2a83a2a9489c664eb2504a770
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
2020-06-10 08:26:17 -07:00
AnilKumar Chimata
42915e55d6 smcinvoke: Move error message to debug
Most of the times mink returns response type as inbound
request needed, which is nothing but call back object
requests. While decoding the response type it should
provide as info or debug message instead of error message.

Change-Id: I7eac9f6ae779b4c3d952fac38880cf4a658428c5
Signed-off-by: AnilKumar Chimata <anilc@codeaurora.org>
2020-06-10 20:45:38 +05:30
Tao,Zhang
89ac6c47b8 coresight: byte-cnter: Add ETR status check in bypass notifier
It is possible that notify call is called after etr is disabled or
after mode switch from usb to etr. Add etr status check to avoid
exception.

Change-Id: I65e81e5ec01ebb3747936cdd81f886632c5419f1
Signed-off-by: Tao,Zhang <taozha@codeaurora.org>
2020-06-10 06:26:29 -07:00
Prakash Gupta
07972090b8 dma-mapping-fast: reduce TLBI during map
Fastmap rely on minimizing tlbi to improve map performance.
At present only one marker is used to indicate if stale TLB might be used.
Instead use a clean bitmap for mapping to further reduce the TLB
invalidations.

Change-Id: I5a8dffde31f8804811357a83893b6ce0d863e8a9
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
2020-06-10 05:44:50 -07:00
Ajit Vaishya
cd6eefe445 arm64: enable internal regdb for lahaina
Enable internal wireless regulatory database.
This is needed for platforms without CRDA.

Change-Id: Ib3f526a8434f16b6d65a8ebb4e4603b6edbbdc03
CRs-Fixed: 2564350
Signed-off-by: Ajit Vaishya <avaishya@codeaurora.org>
2020-06-10 15:06:55 +05:30
Tao,Zhang
b20c61948d coresight: Forbid enabling sink while reading sink
Forbid enabling sink in the process of reading sink. Otherwise,
sink flag "activated" will be set to true, and the source has a
chance to be added to "cs_active_paths" twice. Then, system will
crash if sink is continued to be read due to two same source in
"cs_active_paths".

Change-Id: I3317ea435e9d84258e3fcbf854a6078afcd4a08e
Signed-off-by: Tao,Zhang <taozha@codeaurora.org>
2020-06-10 02:18:56 -07:00
Sami Tolvanen
42dd9451e6 ANDROID: scs: fix recursive spinlock in scs_check_usage
Use cmpxchg instead of a spinlock in scs_check_usage() to avoid
deadlocks.

Bug: 157781894
Change-Id: I1701ccaf25fdbd34ce4798c6f93e220b1565fb34
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Git-commit: e467b8c7db
Git-repo: https://android.googlesource.com/kernel/common
[jshriram@codeaurora.org: cherry-pick]
Signed-off-by: Jeevan Shriram <jshriram@codeaurora.org>
2020-06-09 23:39:55 -07:00
Jack Pham
5d938924f9 usb: xhci: Don't check for USB_STATE_NOTATTACHED in xhci_stop_endpoint
This API can be called by the QMI sound driver precisely when a
device is disconnected in order to issue a stop endpoint command
to properly halt the transfer ring. With this check the function
silently bails, so the XHCI controller hardware may continue to
be accessing the buffers on the transfer ring; meanwhile the
QMI sound driver proceeds to unmap the buffers from DMA
resulting in an SMMU fault. Remove the check to allow the
endpoint to be properly stopped.

Change-Id: I80315c31d9b1685ac4375c1da051a8e22cab07ca
Signed-off-by: Jack Pham <jackp@codeaurora.org>
2020-06-09 23:30:41 -07:00
Siddharth Gupta
0b81a3b3ff qcom: whitelist: Remove symbol from whitelist
QSEECOM is compiled as a module and its symbols should not be present on
the whitelist.

Change-Id: Id5d194fea82410611e4167dcdfd9b841529c6abd
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
2020-06-09 22:33:37 -07:00
Linyu Yuan
baa686c901 arm64: defconfig: enable USB redriver on Lahaina QRD
Enable USB redriver NB7VPQ904M on Lahaina QRD.

Change-Id: I2dbeebc78fbf069ff626c90a64396cc393118d99
Signed-off-by: Linyu Yuan <linyyuan@codeaurora.org>
2020-06-09 20:48:13 -07:00
Guru Das Srinagesh
394335503c usb: typec: ucsi: Modify IPC log string
Remove redundant function name information from the log string, and add
a word to help in readability.

Change-Id: I464b7c8e60771ea06744ef910c525c6dd664492e
Signed-off-by: Guru Das Srinagesh <gurus@codeaurora.org>
2020-06-09 20:41:42 -07:00
Asutosh Das
7e584e6331 scsi: ufs: Enable WriteBooster
The write performance of TLC NAND is considerably lower than SLC NAND.
Using SLC NAND as a WriteBooster Buffer enables the write request to be
processed with lower latency and improves the overall write
performance.

Adds support for shared-buffer mode WriteBooster.

WriteBooster enable:
SW enables it when clocks are scaled up, thus it's
enabled only in high load conditions.

WriteBooster disable:
SW will disable the feature, when clocks are scaled
down. Thus writes would go as normal writes.

To keep the endurance of the WriteBooster Buffer at a maximum, this
load-based toggling is adopted.

Change-Id: I55a348f17e2d29b46ed9b29960254937c146f147
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
2020-06-09 20:40:19 -07:00
Neeraj Upadhyay
7184df9a80 defconfig: msm: Add config fragment for DEBUG_FS disablement
Add a config fragment for disabling DEBUG_FS.

Change-Id: I877c74955e467002976c3bac6c946183c8be7043
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2020-06-09 20:09:28 -07:00
Pavankumar Kondeti
ca7e6941c1 sched/tracing: Fix format specifiers in sched_compute_energy
The energy values passed to sched_compute_energy trace event
are of unsigned long type. So use %lu format specifier instead
of %llu.

Change-Id: I1e82b34559d76d5cfb023598a8ce62917281a9af
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2020-06-10 08:10:51 +05:30
Can Guo
8611eb0c52 scsi: ufs: Move ufshcd_vops_dbg_register_dump out of ufshcd_print_host_regs
If ufshcd_print_host_regs() is called from IRQ context, some registers like
test bus and UFS PHY will not be printed by ufshcd_vops_dbg_register_dump()
due to sleep is not allowed. Move ufshcd_vops_dbg_register_dump out of
ufshcd_print_host_regs and explicitly call ufshcd_vops_dbg_register_dump
where we need to.

Change-Id: Icde9a71fc578c43af04a5329b04353d87217ce4f
Signed-off-by: Can Guo <cang@codeaurora.org>
2020-06-10 10:23:25 +08:00
Siddharth Gupta
d2006e6901 uapi: qg: Fix UAPI header to enable UAPI_HEADER_TEST
UAPI_HEADER_TEST ensures that all the uapi headers can be built as
standalone files which facilitates their use in the wider world. Fix
headers to use common kernel definitions.

Change-Id: I405dcabcede923eb18d8be4e1738b11b2e3761f4
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
2020-06-09 18:55:14 -07:00
Amir Vajid
d0142cbf68 devfreq: memlat: fix potential deadlock during CPU hotplug
The cpu_grp->mons_lock is acquired in the memlat hotplug notifier
callbacks to prevent races within the driver. The cpus_read_lock is
inherently acquired as well since it is in the middle of a hotplug
event. In parallel, stop_hwmon() could unregister from the hotplug
notifier (i.e. when last memlat mon in system is removed). However,
unregistering the hotplug notifier also requires the cpus_read_lock
and is done with the cpu_grp->mons_lock held as well which would lead
to a deadlock if a hotplug is currently in progress with the memlat
notifier callback waiting for the cpu_grp->mons_lock.

To fix this, release the cpu_grp->mons_lock in stop_hwmon() before
unregistering with the hotplug notifier. Also, make sure the memlat
hotplug notifier callbacks check cpu_grp->num_active_mons before
restarting events since that work won't be necessary if there are no
active memlat mons in the system.

Change-Id: I401639a6e28a472a64a96456d2c06f57b35dbc0d
Signed-off-by: Amir Vajid <avajid@codeaurora.org>
2020-06-09 16:46:50 -07:00
qctecmdr
063759141a Merge "aarch64: ABI: Update the QCOM whitelist" 2020-06-09 14:37:35 -07:00
qctecmdr
f5090438b6 Merge "interconnect: qcom: Add check to return status of clk_bulk_prepare_enable" 2020-06-09 14:25:01 -07:00
qctecmdr
f6564e6eb6 Merge "input: qcom-hv-haptics: update drive waveform data format" 2020-06-09 14:25:01 -07:00
qctecmdr
ff0bdab35c Merge "taskstats: add support for system stats" 2020-06-09 14:25:01 -07:00
qctecmdr
af1c8b84de Merge "interconnect: qcom: Fix the link error on 32bit architecture" 2020-06-09 14:25:00 -07:00
Elliot Berman
8167da7ded build.config: Add build.config files for Lahaina
Add basic build.config files for using Google's kernel/build project on
lahaina.

Change-Id: I81b8d6af3f632b653ab692944da37d9023ab489c
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2020-06-09 14:25:37 -06:00
George Shen
dc227ed603 msm: cvp: Allow re-send DSP HFI queue after SSR
Add new DSP state, DSP_INACTIVE, to indicate when CPU driver
shutdown DSP during SSR. The state helps CPU driver differentiate
DSP state between initial CVP boot up vs CVP restarted.

Change-Id: I0fd03efcecfceb38716b254a6725fb67bb969806
Signed-off-by: George Shen <sqiao@codeaurora.org>
2020-06-09 10:46:49 -07:00
Chris Lew
34c09bf47f net: qrtr: Use radix_tree_iter_delete
Use radix_tree_iter_delete instead of radix_tree_delete to properly
remove slots in a radix tree without any dangling references.

Change-Id: Ie72272d467b962538e7fe29b14c5d845308a9c51
Signed-off-by: Chris Lew <clew@codeaurora.org>
2020-06-09 10:41:40 -07:00
Deepak Kumar Singh
c59f36db81 net: qrtr: avoid calling node lookup from rx worker
Acquiring node in rx worker thread results in deadlock when node
release function is called from rx thread which in turn will wait
for rx thread to finish.

No need to acquire node in rx worker thread as node is guaranteed
to be present till the rx thread finishes.

CRs-Fixed: 2579396
Change-Id: I34903b672961e879596b58e28be5e333db5e10d8
Signed-off-by: Deepak Kumar Singh <deesin@codeaurora.org>
2020-06-09 10:41:40 -07:00
Chris Lew
b4277022c8 net: qrtr: Use lock while looking up tx flow
Flow structs are freed under the qrtr_tx_lock. Make sure all accesses
to the flow radix tree are protected by the qrtr_tx_lock.

Change-Id: I1574a09079e80ca9df255eaf9a8b3e5368b26305
Signed-off-by: Chris Lew <clew@codeaurora.org>
2020-06-09 10:41:40 -07:00
Raghavendra Rao Ananta
4dde087f1c aarch64: ABI: Update the QCOM whitelist
Update yet another batch of QCOM whitelist file with additional
symbols and regenerate the snapshot accordingly.

Change-Id: I0997a786fd50180744f1eb8fc9b0a817c589eb5e
Signed-off-by: Raghavendra Rao Ananta <rananta@codeaurora.org>
2020-06-09 06:37:53 -07:00
Pavankumar Kondeti
c9ed39dd5e sched/tracing: Print task status in sched_migrate_task
A task can migrate either while it is waking or while it
is running via load balancer. Print the task status
i.e running or not in sched_migrate_task. This helps in
counting the different types of migrations without relying
on other trace events.

Change-Id: Ib473f9ccdc78003bb1f5d2dc24354f2db7a684f5
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
2020-06-09 16:31:17 +05:30
Jagadeesh Kona
19d2a9ae70 clk: qcom: videocc: Update frequency table of video_cc_mvs0_clk_src
Update the frequency table of video_cc_mvs0_clk_src as per the latest
HW recommendation.

Change-Id: I0ac28e2465c80cfa3be1edfaf1ecab648565a48e
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
2020-06-09 13:03:17 +05:30
Can Guo
4b6fb5312e scsi: ufs-qcom: Dump bus test and PHY registers only if sleep is allowed
Dumping bus test and PHY registers needs to sleep a bit intermittently as
there are too many of them. Skip them if it is called from contexts where
sleep is not allowed.

Change-Id: Ia6b77a66095b72749e2ee85a2d97fb9608867a0b
Signed-off-by: Can Guo <cang@codeaurora.org>
2020-06-09 15:20:29 +08:00
Can Guo
5c3481e088 scsi: ufs: add checks before setting clk-gating states
Clock gating features can be turned on/off selectively which means its
state information is only important if it is enabled. This change makes
sure that we only look at state of clk-gating if it is enabled.

Change-Id: I201cb65d4a9712ba7c0f7022d7323cdf6dc144c9
Signed-off-by: Can Guo <cang@codeaurora.org>
2020-06-09 15:20:05 +08:00
Stephen Dickey
b2cc9bc552 sched: Improve the scheduler
This change is for general scheduler improvements.

Change-Id: I6dc8fd228ca34fd36cdbaf58c42812bae3dcff7d
Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
2020-06-08 23:52:52 -07:00
Isaac J. Manjarres
5dbd5d6343 ion: Derive CMA buffer struct page without using priv_virt
The priv_virt field can be useful for storing other meta-data
associated with a buffer besides the pointer to the struct page
associated with the buffer. Additionally, the struct page
pointer can be derived by looking at the sg-list structure for
the buffer. Thus, use the sg-list structure to derive the struct
page pointer for a CMA buffer, instead of the priv_virt field.

Change-Id: I1740ac56c4268ece315144fb2c3d8f48d9608c41
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2020-06-08 23:49:09 -07:00
Siddharth Gupta
a74880d61c ANDROID: GKI: Enable SYS_HYPERVISOR
Used by some Linux hypervisor support to tell userspace which hypervisor
it is being run under.

Bug: 157224726
Change-Id: Ia1cb56e665af6b60f6a51b5e81dd7abed240f812
Signed-off-by: Alistair Delva <adelva@google.com>
Git-repo: https://android.googlesource.com/kernel/common/
Git-commit: f8aa5f514ccb2ded066fe47f6fd571fe016ca648
Signed-off-by: Siddharth Gupta <sidgup@codeaurora.org>
2020-06-08 21:33:05 -07:00