This change adds the 7nm UFS QMP PHY driver support on Lahaina.
Change-Id: I554884ef658ba759e7a917ab66cc992718f08fe4
Signed-off-by: Can Guo <cang@codeaurora.org>
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>
PHY congifuration actions should come only after regulators and clocks are
enabled.
Change-Id: Ib1c10d0b1d25d41b59d724f0a2d301ac6cd7f219
Signed-off-by: Can Guo <cang@codeaurora.org>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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)
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)
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>
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>
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>