Commit graph

877,558 commits

Author SHA1 Message Date
qctecmdr
f2f9933839 Merge "defconfig: lahaina-gki: Enable USB Electrical and Link test support" 2019-12-17 20:18:00 -08:00
qctecmdr
e97a9d491b Merge "dma-mapping-fast: Do not clobber existing atomic pool" 2019-12-17 20:17:59 -08:00
qctecmdr
3b2aa78ee1 Merge "cpufreq: qcom-hw: cleanup the driver for HW driver" 2019-12-17 20:17:59 -08:00
qctecmdr
3bcfcc2737 Merge "wil6210: new NL command to get driver capabilities" 2019-12-17 19:32:19 -08:00
Tingwei Zhang
6ffa5f7053 coresight: Add snapshot of jtagv8 driver
Add snapshot for jtagv8 driver from msm-4.19
commit c953c9b6eb1f ("include/linux: add notifier for fps change").
Make necessary change to adopt scm framework change.

Change-Id: I289846a1bcb3c0dd11514db69e0088198f7d1cb1
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
2019-12-18 11:12:44 +08:00
qctecmdr
69ac10db77 Merge "msm: ipa: Free rx_wrapper for tmp_alloc pages" 2019-12-17 18:50:53 -08:00
qctecmdr
ba31e4ed26 Merge "wil6210: extend bus voting support for wider bandwidth" 2019-12-17 18:50:53 -08:00
Can Guo
b496a8edc6 defconfig: lahaina-gki: enable ufs 7nm phy for lahaina
Enable the 7nm PHY driver used by UFS on lahaina.

Change-Id: Ie51018e122f881fb3aa1265de5fdb28bab6edfc5
Signed-off-by: Can Guo <cang@codeaurora.org>
2019-12-17 18:37:39 -08:00
Can Guo
685c9d3a16 phy: qcom-ufs: add 7nm UFS QMP PHY support on Lahaina
This change adds the 7nm UFS QMP PHY driver support on Lahaina.

Change-Id: I554884ef658ba759e7a917ab66cc992718f08fe4
Signed-off-by: Can Guo <cang@codeaurora.org>
2019-12-17 18:37:36 -08:00
Can Guo
47bdb5f1ce phy: qcom-ufs: add UFS HS-G4 support
New generation (3.0) UFS devices are capable of running at HS-G4
(High Speed Gear 4) mode which is 2x faster than previous generation
UFS devices. However, if the connected UFS device is only capable of HS-G3
at maximum, putting the UFS PHY to its HS-G4 settings would cause power
penalty. This change adds a boolean variable to the PHY calibration API to
allow the callers tell the calibration API whether HS-G3 or HS-G4 settings
should be configured. The value of this boolean variable is decided by the
UFS PHY's submode.

Change-Id: Id2e5fc2285e71ae07ab3b9a19c2aa3937ad465c8
Signed-off-by: Can Guo <cang@codeaurora.org>
2019-12-17 18:37:33 -08:00
Can Guo
3ad271f0fa phy: qcom-ufs: move PHY configurations after vregs and clocks are enabled
PHY congifuration actions should come only after regulators and clocks are
enabled.

Change-Id: Ib1c10d0b1d25d41b59d724f0a2d301ac6cd7f219
Signed-off-by: Can Guo <cang@codeaurora.org>
2019-12-17 18:37:29 -08:00
Can Guo
5935b509da phy: qcom-ufs: don't error out if vddp-ref-clk-supply is absent
vddp-ref-clk-supply is controlled by UFS host, so it can be absent in UFS
PHY's DT and shouldn't be considered as error.

Change-Id: I7f8af258c59851ccd8adceb73f9a6da62472e915
Signed-off-by: Can Guo <cang@codeaurora.org>
2019-12-17 18:37:27 -08:00
Can Guo
a686b527a3 phy: qcom-ufs: make ref_clk as optional
Per newer UFS PHY design, some platforms may not have the ON/OFF control
for reference clock, hence this clock may be optional.

Change-Id: I26edd35970e88a8d17edded399b63c5d3cc7f5d9
Signed-off-by: Can Guo <cang@codeaurora.org>
2019-12-17 18:37:24 -08:00
Can Guo
427b10e68e phy: qcom-ufs: separate out 2 lanes configuration
Some platforms have 2 UFS PHY instances, one instance supports 2-lane while
other instance supports only 1-lane. This change separates out the 2nd lane
configuration from 1-lane configuration so that we can apply the 2nd lane
configuration only if needed.

Change-Id: Idcf8aaa8ed7a9662c0f4186e5a28d2405f8fd5fc
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
[cang@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Can Guo <cang@codeaurora.org>
2019-12-17 18:37:21 -08:00
Can Guo
fee035811d phy: qcom-ufs: set no runtime PM callbacks flag
UFS PHY power management is managed by its parent (UFS host controller)
hence set the no runtime PM callbacks flag on UFS PHY device to
avoid any accidental attempt to call the PM callbacks for PHY device.

Change-Id: I06e6b140a98233e30d406754f0cdcdd27c834357
Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Signed-off-by: Can Guo <cang@codeaurora.org>
2019-12-17 18:37:18 -08:00
Can Guo
d44fa17860 phy: qcom-ufs: parse ref-clk details prior to resource request
Do not request a resource if the ref clk regulator details are
not defined in ufs phy node.

Change-Id: I10eb426d4407388681340cb71fe9e761794dc298
Signed-off-by: Asutosh Das <asutoshd@codeaurora.org>
[cang@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Can Guo <cang@codeaurora.org>
2019-12-17 18:37:15 -08:00
Can Guo
9542a206ae phy: qcom-ufs: remove warnings for optional clocks
tx_iface_clk and rx_iface_clk does not exist in newer version
of ufs-phy HW, hence remove the missing clk warnings for them.

Change-Id: Ic8dd3e9521159ce8da064da38cfa12e75f07209f
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
[cang@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Can Guo <cang@codeaurora.org>
2019-12-17 18:37:12 -08:00
Can Guo
ce32edf88c phy: qcom-ufs: add optional ref aux clk
Newer platforms need an additional ref aux clk to be enabled, add support
for the new ref aux clk and make it optional as its not needed by other phy
versions.

Change-Id: I5e04980eb451b193e9c024bfe35383d10d17feff
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
[cang@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Can Guo <cang@codeaurora.org>
2019-12-17 18:37:09 -08:00
Can Guo
9e33a5d6ae phy: qcom-ufs: don't probe for "dev_ref_clk_ctrl_mem"
This is handled in the ufs platform init. Drop the upstream
change that was missed in the ufs driver port to 4.4 kernel.

Change-Id: Ia3305f2b4f6c6eeafe3866833f2c98e186ad6632
Signed-off-by: Venkat Gopalakrishnan <venkatg@codeaurora.org>
[cang@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Can Guo <cang@codeaurora.org>
2019-12-17 18:37:06 -08:00
Can Guo
73597f6e60 phy: qcom-ufs: remove failure when rx/tx_iface_clk are absent
Since in future UFS Phy's the tx_iface_clk and rx_iface_clk
are no longer exist, we should not fail when their initialization
fail, but rather just report with debug message.

Change-Id: I87e4deca632d4d4ee9e35a03f2fc9c22987255b3
Signed-off-by: Yaniv Gardi <ygardi@codeaurora.org>
[cang@codeaurora.org: resolved trivial merge conflicts]
Signed-off-by: Can Guo <cang@codeaurora.org>
2019-12-17 18:37:03 -08:00
qctecmdr
099508939b Merge "msm: ipa4: Allocate coalescing close frame command payload" 2019-12-17 18:09:00 -08:00
qctecmdr
4450de5c13 Merge "socinfo: add socinfo driver" 2019-12-17 18:08:59 -08:00
Murali Nalajala
7fbd4b95ef defconfig: Initial genericarmv8 defconfig
This is the generic armv8 defconfig to build
virtual machines.

Change-Id: I1ea11eef7d571acfd226d9d7ba0d90555c377ce2
Signed-off-by: Murali Nalajala <mnalajal@codeaurora.org>
Signed-off-by: Prakruthi Deepak Heragu <pheragu@codeaurora.org>
2019-12-17 17:55:54 -08:00
Charan Teja Reddy
99f13d9564 mm: oom_kill: dump info of all tasks when the FG process is killed
Dump the memory information of all tasks when the foreground
process is killed and oom reaped.

Change-Id: I3183f8893442d2597f2fc1cd6d092d9807226b2f
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
[isaacm@codeaurora.org: invoke dump_tasks with OC structure ptr]
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
2019-12-17 17:20:23 -08:00
qctecmdr
5e820d2150 Merge "usb: dwc3-msm: Don't use devm_ioremap when ringing GSI DB" 2019-12-17 17:19:55 -08:00
qctecmdr
b5e5ccfbbe Merge "mm: cma: make writeable CMA debugfs optional" 2019-12-17 17:19:54 -08:00
qctecmdr
73e12b34da Merge "slimbus: Add snapshot of slimbus driver" 2019-12-17 17:19:53 -08:00
Prakash Gupta
caa096c64a iommu/arm-smmu: restrict secure vmid update while attached
Client can update secure vmid by setting attribute DOMAIN_ATTR_SECURE_VMID.
If this is done after domain attach, it causes a condition where TTBR pages
aren't mapped to secure VMID.  This causes S2 translation fault. Disallow
secure vmid update if domain is attached.
While we are at it, restrict DOMAIN_ATTR_FAST update while domain is
attached.

Change-Id: I4246f1f90a11ed21dfafa360cc2f16ade2708d2b
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
2019-12-17 16:39:57 -08:00
qctecmdr
96fb63ca26 Merge "usb: xhci: Add helper API to issue stop endpoint command" 2019-12-17 16:36:53 -08:00
qctecmdr
4296d43619 Merge "mm: oom_kill: reap memory of a task that receives SIGKILL" 2019-12-17 16:36:52 -08:00
Prakash Gupta
a91e14629c iommu/arm-smmu: reduce tlb sync poll retry latency
Limit tlb sync poll retry latency to a upper limit. This reduces the
response time of tlb sync completion.

Change-Id: I7b92e216c17f5942ad01a9e9f24eff88f7608388
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Signed-off-by: Chris Goldsworthy <cgoldswo@codeaurora.org>
2019-12-17 16:33:56 -08:00
Jordan Crouse
6ed237072e interconnect: qcom: Build icc-rpmh with qnoc-lahaina
Commit 342ec64e3b ("icc: qcom: Refactor icc rpmh support") made
icc-rpmh.c buildable as a module but it isn't set up to be a module which
results in the following warning:

 WARNING: modpost: missing MODULE_LICENSE() in drivers/interconnect/qcom/icc-rpmh.o

It looks like the intent is to make the symbols available in a module but
since only qnoc-lahaina selects it it makes sense for now to put the object
file into that module for now.

Change-Id: Ic0dedbad82d10f303e01a3624d78b39f711ab007
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2019-12-17 14:57:16 -07:00
Jordan Crouse
eb0d5beeff kbuild: Disable the gcc-wrapper with an environment variable
Sometimes we don't want to call the gcc-wrapper for various reasons, so
allow build scripts to set a special environment variable to skip it.

Change-Id: Ic0dedbadd3567812ed0216e7b30d8677ca14ba37
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2019-12-17 14:57:16 -07:00
qctecmdr
77a29a8c4d Merge "wil6210: support IPA offload" 2019-12-17 13:15:49 -08:00
Amir Vajid
6540cafe57 PM / devfreq: icc: add support for L3 voting
Add support for L3 voting in the devfreq icc driver.
This includes populating the device's OPP table with L3
frequencies from HW and voting in this same unit of Hz
as accepted by the L3 interconnect provider.

Change-Id: I877f41324b55b333f4e5ef9f34232563357712c8
Signed-off-by: Amir Vajid <avajid@codeaurora.org>
2019-12-17 13:06:19 -08:00
Amir Vajid
ed7a74e813 PM / devfreq: memlat: add support for shared core-dev tables
A core-dev table is explicity defined in each memlat device
today. However, some devices may want to share the same core-dev
table so add support for parsing a shared core-dev table that
can be used across multiple memlat devices.

Change-Id: I5ee0d439c199a6414d2adaeed8328f3dc99b2a84
Signed-off-by: Amir Vajid <avajid@codeaurora.org>
2019-12-17 13:02:24 -08:00
Satya Durga Srinivasu Prabhala
37cdece0de sched: Support Energy Aware Scheduling irrespective of governor
This reverts commit 1e6b1214f107503 ("FROMLIST: sched/topology:
Make Energy Aware Scheduling depend on schedutil").
Right now, EAS gets disabled when governor set to anything other
than schedutil which affects scheduling decisions. To make sure
we always get better scheduling decions, EAS needs to be supported
irrespective of the governor.

Change-Id: I788faaacd477b3ff93ea9787c18a1235c8c3eb0b
Signed-off-by: Satya Durga Srinivasu Prabhala <satyap@codeaurora.org>
[shalagra@codeaurora.org: Fixed merge conflicts in port to 5.x]
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
2019-12-17 13:00:39 -08:00
Shaleen Agrawal
5a181ba96e sched: Add schedutil snapshot
This snapshot is taken from msm-4.19 as of commit 2508aa54fb9e
(sched: Improve the scheduler").

Change-Id: I193900db684515f6585371b7c58d5b9c361c2e6b
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
2019-12-17 13:00:34 -08:00
Amir Vajid
d5fb75a05d PM / devfreq: memlat: simplify core-dev table parsing logic
In register_common(), there's unnecessary code used to find
which device tree node has the core-dev property. Refactor
this to reduce complexity.

Change-Id: Ib3475272b25e898ad23f9f5a4412d90cd889a356
Signed-off-by: Amir Vajid <avajid@codeaurora.org>
2019-12-17 12:57:13 -08:00
qctecmdr
4f5296141c Merge "coresight: enable stm logging for trace events, marker and printk" 2019-12-17 12:30:57 -08:00
qctecmdr
d1ec209b2c Merge "coresight-tmc: Re-use ETR buffer across use cases" 2019-12-17 12:30:57 -08:00
qctecmdr
f16f3bd743 Merge "soc: qcom: reserve memory in memory dump probe" 2019-12-17 12:30:56 -08:00
Greg Kroah-Hartman
fcf7605013 ANDROID: abi update for 5.4.4
New functions added from previous patches, 3 from android-specific
patches, one from 5.4.4 itself.

Leaf changes summary: 4 artifacts changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 4 Added functions
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 0 Added variable

4 Added functions:

  [A] 'function long int compat_ptr_ioctl(file*, unsigned int, unsigned long int)'
  [A] 'function int ufshcd_query_attr(ufs_hba*, query_opcode, attr_idn, u8, u8, u32*)'
  [A] 'function int ufshcd_query_descriptor_retry(ufs_hba*, query_opcode, desc_idn, u8, u8, u8*, int*)'
  [A] 'function int ufshcd_query_flag(ufs_hba*, query_opcode, flag_idn, bool*)'

Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I323015598d3077fb149c03dd4c3d6947e0a5b25c
2019-12-17 20:01:06 +00:00
Joel Fernandes
cdc4b905be ANDROID: mm: Throttle rss_stat tracepoint
Previously we were throttling rss_stat tracepoint by checking for 512KB
boundary cross over. We removed that because upstream suggested eBPF or
other ways. However right now, we don't have support for those. Let us
re introduce the patch to throttle and avoid large number of events
which are causing data loss.

Bug: 145972256

Change-Id: I4132133aa36163430069b3ca2f57443940fb90b3
Signed-off-by: Joel Fernandes <joelaf@google.com>
(cherry picked from commit b3ddf584b0d6042bb355969ec0f3fa6a2a6117f6)
2019-12-17 19:54:05 +00:00
Joel Fernandes (Google)
900e78fa31 FROMLIST: vsprintf: Inline call to ptr_to_hashval
There is concern that ptr_to_hashval not being inlined can cause performance
issues (unlike before where it was a static branch) with trace_printk being a
hot path for it. Just create an inline version called __ptr_to_hashval(), and
have the actual ptr_to_hashval() call it.

Bug: 145972256

Link: http://lore.kernel.org/r/20191113153816.14b95acd@gandalf.local.home
Link: lore.kernel.org/r/20191114164622.GC233237@google.com
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Change-Id: Ie7133b9f32a8185e244db2634b028b316a3d7ea1
Signed-off-by: Joel Fernandes <joel@joelfernandes.org>
Signed-off-by: Joel Fernandes <joelaf@google.com>
(cherry picked from commit 0f2b4ea6e2356687ce78ff23b8556d2138b6fe28)
2019-12-17 19:53:55 +00:00
Joel Fernandes
f6cc86c7bd UPSTREAM: rss_stat: Add support to detect RSS updates of external mm
When a process updates the RSS of a different process, the rss_stat
tracepoint appears in the context of the process doing the update. This
can confuse userspace that the RSS of process doing the update is
updated, while in reality a different process's RSS was updated.

This issue happens in reclaim paths such as with direct reclaim or
background reclaim.

This patch adds more information to the tracepoint about whether the mm
being updated belongs to the current process's context (curr field). We
also include a hash of the mm pointer so that the process who the mm
belongs to can be uniquely identified (mm_id field).

Also vsprintf.c is refactored a bit to allow reuse of hashing code.

Change-Id: Ic87af93af608c83be0b08757aed99d2b9c2c01d8
Reported-by: Ioannis Ilkos <ilkos@google.com>
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Acked-by: Petr Mladek <pmladek@suse.com> # lib/vsprintf.c
Signed-off-by: Joel Fernandes <joelaf@google.com>
2019-12-17 19:53:46 +00:00
Joel Fernandes (Google)
77510796c6 UPSTREAM: mm: emit tracepoint when RSS changes
Useful to track how RSS is changing per TGID to detect spikes in RSS and
memory hogs. Several Android teams have been using this patch in various
kernel trees for half a year now. Many reported to me it is really
useful so I'm posting it upstream.

Initial patch developed by Tim Murray. Changes I made from original patch:
o Prevent any additional space consumed by mm_struct.

Regarding the fact that the RSS may change too often thus flooding the
traces - note that, there is some "hysterisis" with this already. That
is - We update the counter only if we receive 64 page faults due to
SPLIT_RSS_ACCOUNTING. However, during zapping or copying of pte range,
the RSS is updated immediately which can become noisy/flooding. In a
previous discussion, we agreed that BPF or ftrace can be used to rate
limit the signal if this becomes an issue.

Also note that I added wrappers to trace_rss_stat to prevent compiler
errors where linux/mm.h is included from tracing code, causing errors
such as:
  CC      kernel/trace/power-traces.o
In file included from ./include/trace/define_trace.h:102,
                 from ./include/trace/events/kmem.h:342,
                 from ./include/linux/mm.h:31,
                 from ./include/linux/ring_buffer.h:5,
                 from ./include/linux/trace_events.h:6,
                 from ./include/trace/events/power.h:12,
                 from kernel/trace/power-traces.c:15:
./include/trace/trace_events.h:113:22: error: field ‘ent’ has incomplete type
   struct trace_entry ent;    \

Change-Id: I26e72db29ec89a305c29a50159279339067f4983
Link: http://lore.kernel.org/r/20190903200905.198642-1-joel@joelfernandes.org
Acked-by: Michal Hocko <mhocko@suse.com>
Co-developed-by: Tim Murray <timmurray@google.com>
Signed-off-by: Tim Murray <timmurray@google.com>
Signed-off-by: Joel Fernandes (Google) <joel@joelfernandes.org>
Signed-off-by: Joel Fernandes <joelaf@google.com>
2019-12-17 19:53:34 +00:00
Elliot Berman
228be3692e defconfig: Enable QCOM_RUN_QUEUE_STATS
Enable runqueue statistics for Lahaina.

Change-Id: I9e3773174c75d15bc92c487062ee215f93592eb5
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-12-17 11:45:37 -08:00
Elliot Berman
b666a7e42a time: Add rq_stats snapshot
Add snapshot of runqueue stats module as of commit <e56fe938419e>
(Merge "uapi: Introduce V4L2_FLAG_CVPMETADATA_SKIP flag").

Added #ifdefery to allow rq_stats to actually be optional.

Change-Id: I3352a472c5b0ad61cc04317a1d6f26549bfcdc04
Signed-off-by: Elliot Berman <eberman@codeaurora.org>
2019-12-17 11:44:09 -08:00
qctecmdr
9c881a3f63 Merge "coresight: Add snapshot of Coresight cti driver" 2019-12-17 11:40:03 -08:00