Commit graph

892,914 commits

Author SHA1 Message Date
Gopala Krishna Nuthaki
0a69759b11 drivers: thermal: qmi_sensors: Add MSM_SKIN_THERM qmi sensors
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>
2020-09-16 01:18:25 -07:00
Sandeep Singh
daf1ede0b2 icnss2: Add vbatt feature code for holi
This change add vbatt feature support for icnss
platform driver.

Change-Id: If9c51534a461b65ed7775c92286e912b59be7c60
Signed-off-by: Sandeep Singh <sandsing@codeaurora.org>
2020-09-16 11:24:49 +05:30
Akash Asthana
06d7f57b55 i2c-msm-geni: Register suspend_late instead of suspend_noirq
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>
2020-09-16 11:04:51 +05:30
Neeraj Upadhyay
83477c8bf8 defconfig: msm: Enable pinctrl-yupik driver
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>
2020-09-15 22:06:40 -07:00
Neeraj Upadhyay
e89c502a6a pinctrl: qcom: Add support for Yupik SoC pin control
Add support for Yupik pin configuration and control
via pinctrl framework.

Change-Id: Ie9791a2f4239380b94b759629232e9562ce20c1a
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
2020-09-16 10:35:07 +05:30
John Stultz
f82716d6b7 ANDROID: hikey960_gki.fragment: Remove UFS and USB bits
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)
2020-09-16 03:32:40 +00:00
Steve Muckle
7a1d4bf0d0 ANDROID: cpufreq/schedutil: add up/down frequency transition rate limits
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>
2020-09-15 19:29:30 -07:00
Guixiong Wei
2df5fff695 rtc: rtc-pm8xxx: Read ALARM_EN and update to alarm enabled status
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>
2020-09-16 10:12:29 +08:00
qctecmdr
653a9c02c2 Merge "msm: kgsl: Move the GMU kernel IOMMU device to the GMU platform device" 2020-09-15 18:31:50 -07:00
qctecmdr
56886dbc1a Merge "defconfig: lahaina-gki: enable qti-fixed-regulator driver" 2020-09-15 18:31:49 -07:00
Shivendra Kakrania
936416a310 soc: mmrm: Adding mmrmm_client_data flags
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>
2020-09-15 15:58:17 -07:00
Dinesh K Garg
c3b00cbb39 smcinvoke: populate result from correct returned variable
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>
2020-09-15 13:08:51 -07:00
Prasad Sodagudi
5d5378d608 ANDROID: lkdtm/usercopy: Use __va_function to find proper vm_mmap address
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>
2020-09-15 13:01:00 -07:00
David Collins
8ba2ba4019 defconfig: lahaina-gki: disable the fixed regulator driver
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>
2020-09-15 12:06:39 -07:00
David Collins
a09956c856 regulator: fixed: remove QTI_FIXED_REGULATOR definition
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>
2020-09-15 12:06:38 -07:00
David Collins
579e911c7a defconfig: lahaina-gki: enable qti-fixed-regulator driver
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>
2020-09-15 12:06:36 -07:00
David Collins
1797727401 regulator: add QTI fixed voltage regulator driver
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>
2020-09-15 12:06:35 -07:00
Sami Tolvanen
a3cb7a0327 ANDROID: mm: add generic __va_function and __pa_function
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>
2020-09-15 18:20:31 +00:00
Jack Pham
e98c8815a5 ANDROID: kallsyms: ignore ThinLTO+CFI hash suffix in kallsyms_lookup_name()
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>
2020-09-15 11:09:46 -07:00
yong qian
802f342713 ANDROID: vendor_hooks: Add hooks for debugging exception context
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
2020-09-15 18:02:49 +00:00
Suren Baghdasaryan
40f057fb2d FROMGIT: mm, oom_adj: don't loop through tasks in __set_oom_adj when not necessary
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>
2020-09-15 09:34:00 -07:00
qctecmdr
31f07c0ce9 Merge "sched/fair: Improve the scheduler" 2020-09-15 08:24:19 -07:00
qctecmdr
05d1e38b39 Merge "msm: cvp: For DSP sessions, enhance CVP persist buffer release process" 2020-09-15 08:24:19 -07:00
qctecmdr
d54c36e840 Merge "msm: kgsl: Pass chipid in correct format to gmufw for A660 variant" 2020-09-15 08:24:18 -07:00
qctecmdr
2592f57116 Merge "cnss2: Avoid null pointer dereference of cnss_platform_cap" 2020-09-15 08:24:18 -07:00
qctecmdr
b8a0ce3faf Merge "Minidump: Dump only accessible pages data" 2020-09-15 08:24:17 -07:00
Jordan Crouse
70461f8b85 msm: kgsl: Add timeline traces
Add some traces to make it easier to debug and track timeline behavior.

Change-Id: Ic0dedbadbfe623c675616a0d2fdd800b49f14705
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2020-09-15 09:23:24 -06:00
Jordan Crouse
36b196ce5c msm: kgsl: Add software timelines
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>
2020-09-15 09:23:24 -06:00
Jordan Crouse
f68e1ac975 msm: kgsl: Add the user API definition for timelines
Extend the KGSL uapi for the sempahore timeline APIs,
aux commands and syncobjs.

Change-Id: Ic0dedbadf7338b49da52ab9d0e54d5321217c3fd
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
2020-09-15 09:23:23 -06:00
Jordan Crouse
c117af8e8f msm: kgsl: Remove support for sparse memory
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>
2020-09-15 09:23:23 -06:00
Giuliano Procida
45adb8186e ANDROID: ABI: refresh with latest libabigail 94f5d4ae
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>
2020-09-15 10:56:02 +00:00
Jishnu Prakash
260f87fb48 iio: adc: Add support to read parallel charger current channel
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>
2020-09-15 16:00:16 +05:30
Odelu Kukatla
730027b90a interconnect: qcom: Update the number of DDR channels for Holi
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>
2020-09-15 02:35:54 -07:00
Ronak Vijay Raheja
182eba5d94 usb: dwc3-msm: Add explicit out-of-bounds check before array access
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>
2020-09-15 01:56:41 -07:00
Neeraj Upadhyay
b6e6912193 Minidump: Dump only accessible pages data
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>
2020-09-15 12:01:01 +05:30
Tao,Zhang
3a343d018a coresight: tmc-etf: Set reading status to False
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>
2020-09-15 14:15:28 +08:00
qctecmdr
550a843c8f Merge "rpmsg: glink: Add error message in case of callback failure" 2020-09-14 23:12:55 -07:00
qctecmdr
3b25a61cba Merge "rpmsg: glink: check channel state before serving intent" 2020-09-14 23:12:55 -07:00
qctecmdr
237a2bb4ec Merge "msm: kgsl: Enable HWCG after a6xx register configurations" 2020-09-14 23:12:54 -07:00
qctecmdr
bcaa466fc5 Merge "Merge android11-5.4.61+ (a564726) into msm-5.4" 2020-09-14 23:12:54 -07:00
qctecmdr
3b1ff0a366 Merge "soc: qcom: guestvm_loader: fix vm start print message" 2020-09-14 23:12:53 -07:00
qctecmdr
b85f85965e Merge "dma-buf: Cache the dma-buf inode number" 2020-09-14 23:12:53 -07:00
Jagadeesh Kona
3fece19aed dt-bindings: clock: Add support for clock ids for YUPIK
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>
2020-09-15 10:22:52 +05:30
Deepak Kumar
4196820d0d msm: kgsl: Remove unused function adreno_is_a660v1
Remove adreno_is_a660v1 function as its not required.

Change-Id: I02c86a0fec939e16244f81bdab4212cfcde4bf55
Signed-off-by: Deepak Kumar <dkumar@codeaurora.org>
2020-09-15 10:15:02 +05:30
Faiyaz Mohammed
47b2cb7ab2 iommu: arm-smmu: update access to SMMU TCU testbus registers with scm call
Update access to SMMU TCU testbus and testbus_sel registers using scm.

Change-Id: I5a125070977ffa061a8ee94fdbd9f56603c00a82
Signed-off-by: Faiyaz Mohammed <faiyazm@codeaurora.org>
[guptap@codeaurora.org: resolved trival merge conflicts]
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
2020-09-15 09:19:53 +05:30
Prakash Gupta
d989e632a5 defconfig: arm64: enable SMMU TESTBUS configs
Enable ARM_SMMU_TESTBUS_DEBUGFS and CONFIG_ARM_SMMU_TESTBUS_DUMP config.

Change-Id: I5470b79f888c5358646abf358e97dcf257014d10
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
2020-09-15 09:19:53 +05:30
Vijayanand Jitta
9d67a36c0c iommu: arm-smmu: add testbus support for smmuv500
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>
2020-09-15 09:19:53 +05:30
qctecmdr
158801d1ab Merge "defconfig: lahaina: Enable USB_BAM and USB_F_QDSS for GKI" 2020-09-14 20:12:26 -07:00
qctecmdr
f0921de704 Merge "mm: page_alloc: avoid fatal sig check for GFP_NOFS" 2020-09-14 20:12:26 -07:00
qctecmdr
c8c83a1c2b Merge "cnss2: Allow cold boot calibration skip for debug" 2020-09-14 20:12:25 -07:00