Add modem QPM sensors to QPM qmi sensors list. It enables
these qmi sensors to expose as thermal zones and apps can
able to monitor and mitigate for these sensors.
Change-Id: I2c5d4eb3655b9fa193a4ee052a40c1d7d1603bf7
Signed-off-by: Gopala Krishna Nuthaki <gnuthaki@codeaurora.org>
While executing suspend_noirq callbacks non-wakeup interrupts are
disabled, wake-up interrupts are enabled but their handling is
deferred till the completion of suspend_noirq stage.
GENI I2C unvote the resources in the suspend_noirq stage.
There is no issue wrt managing clk and pinctrl resources at
noirq stage however ICC BW voting can't be done at noirq stage.
ICC requests are converted to ack based requested for RPM driver, the
ack here is nothing but interrupt from IPCC driver and it can't be
processed at noirq stage, hence flow is indefinitely stuck in I2C
suspend_noirq callback.
This is for platforms using IPCC driver and also it is no harm in
making this change applicable to all platforms.
Change-Id: I9bf95e1dd990acb6ccc96e5a0ed9850de466a598
Signed-off-by: Akash Asthana <akashast@codeaurora.org>
Enable Yupik pinctrl driver for the functioning of
Top Level Mode Multiplexer block (TLMM) on Yupik SoC.
Change-Id: Iec1e520fa3952057f8b48cf1c75fa0ebdce3c2ef
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Add support for Yupik pin configuration and control
via pinctrl framework.
Change-Id: Ie9791a2f4239380b94b759629232e9562ce20c1a
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Remove CONFIG_SCSI_UFS_HISI=m and CONFIG_TYPEC_TCPM=m
from the hikey960_gki.fragment, as those configs have
been added to the gki_defconfig
Fixes: bb765ef8427e ("ANDROID: GKI: enable QCOM and HISI UFS drivers")
Fixes: 5625a6460e96 ("ANDROID: GKI: enable CONFIG_TYPEC_TCPM")
Signed-off-by: John Stultz <john.stultz@linaro.org>
Change-Id: I124a0d050c7170557d9672968729af196ad2f81c
(cherry picked from commit ae78c73104aa2fa957cbb7b4524c3e3e862174fd)
The rate-limit tunable in the schedutil governor applies to transitions
to both lower and higher frequencies. On several platforms it is not the
ideal tunable though, as it is difficult to get best power/performance
figures using the same limit in both directions.
It is common on mobile platforms with demanding user interfaces to want
to increase frequency rapidly for example but decrease slowly.
One of the example can be a case where we have short busy periods
followed by similar or longer idle periods. If we keep the rate-limit
high enough, we will not go to higher frequencies soon enough. On the
other hand, if we keep it too low, we will have too many frequency
transitions, as we will always reduce the frequency after the busy
period.
It would be very useful if we can set low rate-limit while increasing
the frequency (so that we can respond to the short busy periods quickly)
and high rate-limit while decreasing frequency (so that we don't reduce
the frequency immediately after the short busy period and that may avoid
frequency transitions before the next busy period).
Implement separate up/down transition rate limits. Note that the
governor avoids frequency recalculations for a period equal to minimum
of up and down rate-limit. A global mutex is also defined to protect
updates to min_rate_limit_us via two separate sysfs files.
Note that this wouldn't change behavior of the schedutil governor for
the platforms which wish to keep same values for both up and down rate
limits.
This is tested with the rt-app [1] on ARM Exynos, dual A15 processor
platform.
Testcase: Run a SCHED_OTHER thread on CPU0 which will emulate work-load
for X ms of busy period out of the total period of Y ms, i.e. Y - X ms
of idle period. The values of X/Y taken were: 20/40, 20/50, 20/70, i.e
idle periods of 20, 30 and 50 ms respectively. These were tested against
values of up/down rate limits as: 10/10 ms and 10/40 ms.
For every test we noticed a performance increase of 5-10% with the
schedutil governor, which was very much expected.
[Viresh]: Simplified user interface and introduced min_rate_limit_us +
mutex, rewrote commit log and included test results.
[1] https://github.com/scheduler-tools/rt-app/.
Change-Id: I18720a83855b196b8e21dcdc8deae79131635b84
Signed-off-by: Steve Muckle <smuckle.linux@gmail.com>
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
(applied from https://marc.info/?l=linux-kernel&m=147936011103832&w=2)
[trivial adaptations]
Signed-off-by: Juri Lelli <juri.lelli@arm.com>
[updated rate limiting & fixed conflicts]
Signed-off-by: Chris Redpath <chris.redpath@arm.com>
Git-commit: 50c26fdb74563ec0cb4a83373d42667f4e83a23e
Git-repo: https://android.googlesource.com/kernel/common/
[dickey@codeaurora.org: Trivial cherry-pick conflicts]
Signed-off-by: Stephen Dickey <dickey@codeaurora.org>
ALARM_EN status is retained in PMIC register after device shutdown
if poweron_alarm is enabled. Read it to make sure the driver has
consistent value with the register status.
Change-Id: Ie0c5ce67cf6ee39ee6f156d8b7a4a81c624adec1
Signed-off-by: Guixiong Wei <guixiong@codeaurora.org>
Added support for client data flags set by clients with mmrm_set_value.
These flags will be used for additional information passed from clients
to mmrm driver.
Change-Id: Ic629e3dea3a8ab6d85771dd89aa80feb8b9b9719
Signed-off-by: Shivendra Kakrania <shiven@codeaurora.org>
SCM driver upstream effort has broken how results from trusted side
used to be handled. Since, all 4 return variables (return, res[0-2]
are not available, use correct available variable to fill up result.
Change-Id: Iaf930bb1b70a91b34a14490ab1c2c2794c7c0a48
Signed-off-by: Dinesh K Garg <dineshg@codeaurora.org>
With CFI enabled compiler replacing the reference to vm_mmap
passed to copy_to_user with a pointer to the CFI jump table
in the module itself. So use the __va_function API for
finding the proper address of vm_mmap.
Bug: 166220312
Suggested-by: Sami Tolvanen <samitolvanen@google.com>
Change-Id: Id5bd96cc9bfa1aa99f34bd4785792e0a4eeae5b1
Signed-off-by: Prasad Sodagudi <psodagud@codeaurora.org>
Remove CONFIG_REGULATOR_FIXED_VOLTAGE=m from lahaina_GKI.config
since CONFIG_REGULATOR_FIXED_VOLTAGE=y is present in gki_defconfig.
The config entry in lahaina_GKI.config results in fixed.ko being
compiled. However, it fails to load at runtime since the
statically compiled version of the fixed regulator driver is
already loaded along with the GKI base kernel image.
Change-Id: I561d642f98d42d924baca20ec91717f64946041d
Signed-off-by: David Collins <collinsd@codeaurora.org>
Now that all fixed regulator devices which utilize proxy-consumer
properties have switched to be qti-fixed-regulator devices, the
definition of QTI_FIXED_REGULATOR can be removed from fixed.c.
Change-Id: I5847ead86723b63771d69f4076eafd26139baa80
Signed-off-by: David Collins <collinsd@codeaurora.org>
Enable the qti-fixed-regulator driver so that proxy consumer
voting may be used for fixed regulator devices.
Change-Id: Ibdbe3129de0a11f71d2c0adbae12659e6332f5fd
Signed-off-by: David Collins <collinsd@codeaurora.org>
Add a new QTI fixed voltage regulator driver that is derived from
the fixed voltage regulator driver. Use this to provide support
for proxy consumer voting and debug features required on Qualcomm
Technologies, Inc. boards. Implement this driver as a wrapper
around fixed.c with #ifdef directives so that future updates to
fixed.c are applied automatically to qti-fixed-regulator.c.
Change-Id: If4cf664b3f6a8214256a4b2de753f7ff27aa864e
Signed-off-by: David Collins <collinsd@codeaurora.org>
We use non-canonical CFI jump tables with CONFIG_CFI_CLANG, which
means the compiler replaces function address references with the
address of the function's CFI jump table entry. This results in
__pa_symbol(function), for example, returning the physical address
of the jump table entry, which can lead to address space confusion
since the jump table itself points to a virtual address.
This change adds generic definitions for __pa/va_function, which
architectures that support CFI can override.
Bug: 166220312
Change-Id: If4a162de7854547d8437bf59be03eb6d16220832
Signed-off-by: Sami Tolvanen <samitolvanen@google.com>
Similar to commit f683c8dc7f ("ANDROID: kallsyms: strip hashes from
static functions with ThinLTO and CFI"), since LLVM adds a hash to
static function names when CONFIG_THINLTO and CFI are enabled, callers
of kallsyms_lookup_name() which aren't aware of the additional suffix
will fail to find the symbol. One example is kprobes (both compiled
and the dynamic events) which rely on this to resolve the function
name to attach a kprobe/kretprobe to.
Address this by also calling the cleanup_symbol_name() helper from
kallsyms_lookup_name() when failing to match a symbol by name.
This will strip off the hash suffix, if any, and attempt the
strcmp() again.
Change-Id: I4c79c818c29b4b82a94a5a7e86ae9783a41e853d
Signed-off-by: Jack Pham <jackp@codeaurora.org>
When some processes crashed, we want to save cpu regs(x0-x30、pc、sp),
and context(task_struct、thread_info) to log for debugging
Bug: 166228327
Signed-off-by: yong qian <qianyong@oppo.com>
Change-Id: I4f49ffed583a0e20f1aaa7e445e85a0cbb603bbe
Currently __set_oom_adj loops through all processes in the system to
keep oom_score_adj and oom_score_adj_min in sync between processes
sharing their mm. This is done for any task with more that one mm_users,
which includes processes with multiple threads (sharing mm and signals).
However for such processes the loop is unnecessary because their signal
structure is shared as well.
Android updates oom_score_adj whenever a tasks changes its role
(background/foreground/...) or binds to/unbinds from a service, making
it more/less important. Such operation can happen frequently.
We noticed that updates to oom_score_adj became more expensive and after
further investigation found out that the patch mentioned in "Fixes"
introduced a regression. Using Pixel 4 with a typical Android workload,
write time to oom_score_adj increased from ~3.57us to ~362us. Moreover
this regression linearly depends on the number of multi-threaded
processes running on the system.
Mark the mm with a new MMF_MULTIPROCESS flag bit when task is created with
(CLONE_VM && !CLONE_THREAD && !CLONE_VFORK). Change __set_oom_adj to use
MMF_MULTIPROCESS instead of mm_users to decide whether oom_score_adj
update should be synchronized between multiple processes. To prevent
races between clone() and __set_oom_adj(), when oom_score_adj of the
process being cloned might be modified from userspace, we use
oom_adj_mutex. Its scope is changed to global. The combination of
(CLONE_VM && !CLONE_THREAD) is rarely used except for the case of vfork().
To prevent performance regressions of vfork(), we skip taking oom_adj_mutex
and setting MMF_MULTIPROCESS when CLONE_VFORK is specified. Clearing the
MMF_MULTIPROCESS flag (when the last process sharing the mm exits) is left
out of this patch to keep it simple and because it is believed that this
threading model is rare. Should there ever be a need for optimizing that
case as well, it can be done by hooking into the exit path, likely
following the mm_update_next_owner pattern.
With the combination of (CLONE_VM && !CLONE_THREAD && !CLONE_VFORK) being
quite rare, the regression is gone after the change is applied.
Fixes: 44a70adec9 ("mm, oom_adj: make sure processes sharing mm have same view of oom_score_adj")
Reported-by: Tim Murray <timmurray@google.com>
Debugged-by: Minchan Kim <minchan@kernel.org>
Suggested-by: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
Bug: 168521639
Link: https://lore.kernel.org/linux-fsdevel/20200902012558.2335613-1-surenb@google.com/
[isaacm: upstream bound, no cherry-pick info because patch is in mm tree]
Change-Id: I20352a77815fbc358c36e686bb1503fdeea658ed
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
Add some traces to make it easier to debug and track timeline behavior.
Change-Id: Ic0dedbadbfe623c675616a0d2fdd800b49f14705
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Some graphics APIs want the ability to create and use timelines
with 64 bit sequence numbers to synchronize between threads.
Add support for timelines that can be created, signaled and managed from
user space. Timelines can also be signaled from a draw context command
stream via an auxiliary command and a wait can be added as a sync object
to any GPU command.
Change-Id: Ic0dedbad0ffc99cc309951369eaf85b56727802c
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Extend the KGSL uapi for the sempahore timeline APIs,
aux commands and syncobjs.
Change-Id: Ic0dedbadf7338b49da52ab9d0e54d5321217c3fd
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
We are choosing to go in a different direction for virtual buffer objects
so remove the old sparse code to get it out of the way. In a few cases
we'll add back similar code so there is a bit of churn but its easierto
just delete everything and start over from scratch.
This doesn't remove the uapi definitions for sparse since we're stuck
with those forever but they'll just harmlessly return error.
Change-Id: Ic0dedbad9a79ef321e9510115d64b5019743eb2b
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
This is a one-off change that updates the type ids of anonymous
structs and unions to a more stable id.
Bug: 163532421
Change-Id: I2ae8b1fa19fab489412fca3f83fa9e2c7361c2b7
Signed-off-by: Giuliano Procida <gprocida@google.com>
Add support to read ADC channel 0xA5 for parallel charger
current.
Some PMICs (PMI632) the max supported current is 5A, hence
define a new config data and compatible string for it.
Change-Id: I973dfdf81ee955d322da7e2c328d8b1472d33013
Signed-off-by: Jishnu Prakash <jprakash@codeaurora.org>
Signed-off-by: Anirudh Ghayal <aghayal@codeaurora.org>
DDR interface is (2x16), so update the number of channels to "2"
and bus width to "4".
Change-Id: I2e6c8f3ebe8cce38412dbcb5fe9032353d28b597
Signed-off-by: Odelu Kukatla <okukatla@codeaurora.org>
Explicitly adding out-of-bounds check to ensure bus_vote_values and
mdwc->dbm_ep_num_mapping use indices within their specified range.
Change-Id: I196f69011f2c2392477e11b6eb19a395bb753dc5
Signed-off-by: Ronak Vijay Raheja <rraheja@codeaurora.org>
Check for accessible pages, before capturing the
page context, while dumping pointer data, for
CPU registers.
Change-Id: If7f38f0e3cb12e5c0ad85f8ed3140ce098108f62
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Set reading status to False in function tmc_read_unprepare_etb.
Otherwise, it will causes device or resource busy error issue.
Change-Id: I82a3896665e91ad36109e55f8ed29fd7f2667ed0
Signed-off-by: Tao,Zhang <taozha@codeaurora.org>
Add clock IDs for CAMCC/DISPCC/GCC/GPUCC/VIDEOCC for clients
to be able to request for clocks from these clock controllers.
Change-Id: I8dcab30fbbbcc0ce9fef52d315e0f2ff250a8586
Signed-off-by: Jagadeesh Kona <jkona@codeaurora.org>
Remove adreno_is_a660v1 function as its not required.
Change-Id: I02c86a0fec939e16244f81bdab4212cfcde4bf55
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
add a debugfs interface to support testbus also add an interface for
dumping testbus information, module parameters tcu_testbus_sel and
tbu_testbus_sel can be used for selecting different testbuses to dump
on tcu and tbu respectively.
Change-Id: I1bf420db053458b2ce1f43dc544c0776a3f4d176
Signed-off-by: Vijayanand Jitta <vjitta@codeaurora.org>
[isaacm@codeaurora.org: introduced CONFIG_ARM_SMMU_TESTBUS_DEBUGFS]
Signed-off-by: Isaac J. Manjarres <isaacm@codeaurora.org>
[guptap@codeaurora.org: resolved merge conflict]
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>