Set KMI_GENERATION=7 for 5/24 KMI update
3 function symbol(s) removed
'int mmu_interval_notifier_insert(struct mmu_interval_notifier*, struct mm_struct*, unsigned long, unsigned long, const struct mmu_interval_notifier_ops*)'
'void mmu_interval_notifier_remove(struct mmu_interval_notifier*)'
'unsigned long mmu_interval_read_begin(struct mmu_interval_notifier*)'
function symbol changed from 'int gh_rm_call(struct gh_rm*, u32, void*, size_t, void**, size_t*)' to 'int gh_rm_call(void*, u32, const void*, size_t, void**, size_t*)'
CRC changed from 0xfef4ce1d to 0xaa8c9d60
type changed from 'int(struct gh_rm*, u32, void*, size_t, void**, size_t*)' to 'int(void*, u32, const void*, size_t, void**, size_t*)'
parameter 1 type changed from 'struct gh_rm*' to 'void*'
pointed-to type changed from 'struct gh_rm' to 'void'
parameter 3 type changed from 'void*' to 'const void*'
pointed-to type changed from 'void' to 'const void'
qualifier const added
function symbol changed from 'int gh_rm_notifier_register(struct gh_rm*, struct notifier_block*)' to 'int gh_rm_notifier_register(void*, struct notifier_block*)'
CRC changed from 0x412fac09 to 0xd5a6a3c9
type changed from 'int(struct gh_rm*, struct notifier_block*)' to 'int(void*, struct notifier_block*)'
parameter 1 type changed from 'struct gh_rm*' to 'void*'
pointed-to type changed from 'struct gh_rm' to 'void'
function symbol changed from 'int gh_rm_notifier_unregister(struct gh_rm*, struct notifier_block*)' to 'int gh_rm_notifier_unregister(void*, struct notifier_block*)'
CRC changed from 0xf4d771f8 to 0x2c865d28
type changed from 'int(struct gh_rm*, struct notifier_block*)' to 'int(void*, struct notifier_block*)'
parameter 1 type changed from 'struct gh_rm*' to 'void*'
pointed-to type changed from 'struct gh_rm' to 'void'
function symbol 'int ___pskb_trim(struct sk_buff*, unsigned int)' changed
CRC changed from 0x6c6bbe0a to 0xaf3987c4
function symbol 'struct sk_buff* __alloc_skb(unsigned int, gfp_t, int, int)' changed
CRC changed from 0xd9823116 to 0xa873df72
function symbol 'void __balance_callbacks(struct rq*)' changed
CRC changed from 0x6537022 to 0xec0d081
... 1278 omitted; 1281 symbols have only CRC changes
type 'struct sock' changed
byte size changed from 768 to 776
member 'u64 android_oem_data1' was added
type 'struct freq_qos_request' changed
byte size changed from 56 to 64
member 'u64 android_oem_data1' was added
type 'struct dev_pm_qos_request' changed
byte size changed from 72 to 80
member 'union { struct plist_node pnode; struct pm_qos_flags_request flr; struct freq_qos_request freq; } data' changed
type 'union { struct plist_node pnode; struct pm_qos_flags_request flr; struct freq_qos_request freq; }' changed
byte size changed from 56 to 64
member 'struct device* dev' changed
offset changed by 64
type 'struct devfreq' changed
byte size changed from 1720 to 1736
member 'struct dev_pm_qos_request user_max_freq_req' changed
offset changed by 64
11 members ('unsigned long scaling_min_freq' .. 'struct notifier_block nb_max') changed
offset changed by 128
type 'struct gh_rm_platform_ops' changed
byte size changed from 16 to 48
member changed from 'int(* pre_mem_share)(struct gh_rm*, struct gh_rm_mem_parcel*)' to 'int(* pre_mem_share)(void*, struct gh_rm_mem_parcel*)'
type changed from 'int(*)(struct gh_rm*, struct gh_rm_mem_parcel*)' to 'int(*)(void*, struct gh_rm_mem_parcel*)'
pointed-to type changed from 'int(struct gh_rm*, struct gh_rm_mem_parcel*)' to 'int(void*, struct gh_rm_mem_parcel*)'
parameter 1 type changed from 'struct gh_rm*' to 'void*'
pointed-to type changed from 'struct gh_rm' to 'void'
member changed from 'int(* post_mem_reclaim)(struct gh_rm*, struct gh_rm_mem_parcel*)' to 'int(* post_mem_reclaim)(void*, struct gh_rm_mem_parcel*)'
type changed from 'int(*)(struct gh_rm*, struct gh_rm_mem_parcel*)' to 'int(*)(void*, struct gh_rm_mem_parcel*)'
pointed-to type changed from 'int(struct gh_rm*, struct gh_rm_mem_parcel*)' to 'int(void*, struct gh_rm_mem_parcel*)'
parameter 1 type changed from 'struct gh_rm*' to 'void*'
pointed-to type changed from 'struct gh_rm' to 'void'
member 'u64 android_backport_reserved1' was added
member 'u64 android_backport_reserved2' was added
member 'u64 android_backport_reserved3' was added
member 'u64 android_backport_reserved4' was added
type 'struct nf_conn' changed
byte size changed from 248 to 256
member 'u64 android_oem_data1' was added
type 'struct tipc_sock' changed
byte size changed from 1008 to 1016
31 members ('u32 max_pkt' .. 'u8 conn_addrtype') changed
offset changed by 64
type 'struct vsock_sock' changed
byte size changed from 1224 to 1232
25 members ('const struct vsock_transport* transport' .. 'void* trans') changed
offset changed by 64
type 'struct gh_rm_mem_parcel' changed
byte size changed from 48 to 112
member 'u64 android_backport_reserved1' was added
member 'u64 android_backport_reserved2' was added
member 'u64 android_backport_reserved3' was added
member 'u64 android_backport_reserved4' was added
member 'u64 android_backport_reserved5' was added
member 'u64 android_backport_reserved6' was added
member 'u64 android_backport_reserved7' was added
member 'u64 android_backport_reserved8' was added
type 'struct gh_rm_mem_entry' changed
member '__le64 phys_addr' was added
member '__le64 ipa_base' was removed
Bug: 283322303
Change-Id: I62859d103cd2151a8417a09b639cadc658314263
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Add KABI reservations in KMI-tracked Gunyah structures which aren't part
of the hypervisor ABI itself.
function symbol 'int devm_gh_rm_register_platform_ops(struct device*, struct gh_rm_platform_ops*)' changed
CRC changed from 0x51bb297d to 0x1f3ae551
function symbol 'int gh_rm_register_platform_ops(struct gh_rm_platform_ops*)' changed
CRC changed from 0xf2b08039 to 0xc34a7803
function symbol 'void gh_rm_unregister_platform_ops(struct gh_rm_platform_ops*)' changed
CRC changed from 0x41e9ce79 to 0xc1f09d18
type 'struct gh_rm_platform_ops' changed
byte size changed from 16 to 48
member 'u64 android_backport_reserved1' was added
member 'u64 android_backport_reserved2' was added
member 'u64 android_backport_reserved3' was added
member 'u64 android_backport_reserved4' was added
type 'struct gh_rm_mem_parcel' changed
byte size changed from 48 to 112
member 'u64 android_backport_reserved1' was added
member 'u64 android_backport_reserved2' was added
member 'u64 android_backport_reserved3' was added
member 'u64 android_backport_reserved4' was added
member 'u64 android_backport_reserved5' was added
member 'u64 android_backport_reserved6' was added
member 'u64 android_backport_reserved7' was added
member 'u64 android_backport_reserved8' was added
Bug: 282937940
Change-Id: I5abcb52630747f85d1b9cab51ff23b5d0c595da2
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
Sync with latest Gunyah patches:
https://lore.kernel.org/all/20230509204801.2824351-7-quic_eberman@quicinc.com/https://lore.kernel.org/all/20230509204801.2824351-10-quic_eberman@quicinc.com/
function symbol changed from 'int gh_rm_call(void*, u32, void*, size_t, void**, size_t*)' to 'int gh_rm_call(void*, u32, const void*, size_t, void**, size_t*)'
CRC changed from 0x162db09d to 0xaa8c9d60
type changed from 'int(void*, u32, void*, size_t, void**, size_t*)' to 'int(void*, u32, const void*, size_t, void**, size_t*)'
parameter 3 type changed from 'void*' to 'const void*'
pointed-to type changed from 'void' to 'const void'
qualifier const added
function symbol 'int devm_gh_rm_register_platform_ops(struct device*, struct gh_rm_platform_ops*)' changed
CRC changed from 0xa6a1478a to 0x51bb297d
function symbol 'int gh_rm_register_platform_ops(struct gh_rm_platform_ops*)' changed
CRC changed from 0x110877e8 to 0xf2b08039
function symbol 'void gh_rm_unregister_platform_ops(struct gh_rm_platform_ops*)' changed
CRC changed from 0x2e3c1910 to 0x41e9ce79
type 'struct gh_rm_mem_entry' changed
member '__le64 phys_addr' was added
member '__le64 ipa_base' was removed
Bug: 279506910
Change-Id: I50b0c67b9fcc33612e278de76feec6e4c85ac74a
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
struct gh_rm is an opaque pointer to everyone not the Gunyah Resource
Manager itself (drivers/virt/gunyah/rsc_mgr.c). The resource manager
provides functions (gh_rm_call, gh_rm_{un}register_notifier) for
entities to communicate with the resource manager. An opaque pointer is
provided to those entities and passed back in when making those calls.
Although Linux CRCs would be unaffected by internal changes to struct
gh_rm, Android KMI tracking unrolls the definition of struct gh_rm it
finds in drivers/virt/gunyah/rsc_mgr.c and would be subject to KMI
freeze. Since this is a private structure not accessible to vendor/OEM
drivers, replace the "struct gh_rm *" with "void *" on any KMI-tracked
symbol.
function symbol changed from 'int gh_rm_call(struct gh_rm*, u32, void*, size_t, void**, size_t*)' to 'int gh_rm_call(void*, u32, void*, size_t, void**, size_t*)'
CRC changed from 0xfef4ce1d to 0x162db09d
type changed from 'int(struct gh_rm*, u32, void*, size_t, void**, size_t*)' to 'int(void*, u32, void*, size_t, void**, size_t*)'
parameter 1 type changed from 'struct gh_rm*' to 'void*'
pointed-to type changed from 'struct gh_rm' to 'void'
function symbol changed from 'int gh_rm_notifier_register(struct gh_rm*, struct notifier_block*)' to 'int gh_rm_notifier_register(void*, struct notifier_block*)'
CRC changed from 0x412fac09 to 0xd5a6a3c9
type changed from 'int(struct gh_rm*, struct notifier_block*)' to 'int(void*, struct notifier_block*)'
parameter 1 type changed from 'struct gh_rm*' to 'void*'
pointed-to type changed from 'struct gh_rm' to 'void'
function symbol changed from 'int gh_rm_notifier_unregister(struct gh_rm*, struct notifier_block*)' to 'int gh_rm_notifier_unregister(void*, struct notifier_block*)'
CRC changed from 0xf4d771f8 to 0x2c865d28
type changed from 'int(struct gh_rm*, struct notifier_block*)' to 'int(void*, struct notifier_block*)'
parameter 1 type changed from 'struct gh_rm*' to 'void*'
pointed-to type changed from 'struct gh_rm' to 'void'
function symbol 'int devm_gh_rm_register_platform_ops(struct device*, struct gh_rm_platform_ops*)' changed
CRC changed from 0xb51b6569 to 0xa6a1478a
function symbol 'int gh_rm_register_platform_ops(struct gh_rm_platform_ops*)' changed
CRC changed from 0xa577ae43 to 0x110877e8
function symbol 'void gh_rm_unregister_platform_ops(struct gh_rm_platform_ops*)' changed
CRC changed from 0x5759f053 to 0x2e3c1910
type 'struct gh_rm_platform_ops' changed
member changed from 'int(* pre_mem_share)(struct gh_rm*, struct gh_rm_mem_parcel*)' to 'int(* pre_mem_share)(void*, struct gh_rm_mem_parcel*)'
type changed from 'int(*)(struct gh_rm*, struct gh_rm_mem_parcel*)' to 'int(*)(void*, struct gh_rm_mem_parcel*)'
pointed-to type changed from 'int(struct gh_rm*, struct gh_rm_mem_parcel*)' to 'int(void*, struct gh_rm_mem_parcel*)'
parameter 1 type changed from 'struct gh_rm*' to 'void*'
pointed-to type changed from 'struct gh_rm' to 'void'
member changed from 'int(* post_mem_reclaim)(struct gh_rm*, struct gh_rm_mem_parcel*)' to 'int(* post_mem_reclaim)(void*, struct gh_rm_mem_parcel*)'
type changed from 'int(*)(struct gh_rm*, struct gh_rm_mem_parcel*)' to 'int(*)(void*, struct gh_rm_mem_parcel*)'
pointed-to type changed from 'int(struct gh_rm*, struct gh_rm_mem_parcel*)' to 'int(void*, struct gh_rm_mem_parcel*)'
parameter 1 type changed from 'struct gh_rm*' to 'void*'
pointed-to type changed from 'struct gh_rm' to 'void'
Bug: 282937940
Change-Id: Ie775c668c95bee0d1c91862eebf8fd0f606ff309
Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
This reverts commit 509a7a32a5.
Qualcomm is reporting that internal debugging tools in addition to
Lauterbach Trace32 (T32) debugger (vLT_20230509_159359) are having
issues with DWARFv5.
Since the change to the DWARF debug info format was made after the
Android Feature Complete deadline, revert it from android14-* kernel
branches. We'll leave DWARFv5 for android-mainline and try again next
release in android15-*.
Bug: 281863640
Reported-by: Satya Durga Srinivasu Prabhala <quic_satyap@quicinc.com>
Change-Id: I5a1657bdf6785d23f3492dc12e6f3df0954b8deb
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Some vendors want to add a field when a 'sruct sock' is added so give a
hook to handle this. Any memory allocated when
trace_android_rvh_sk_alloc() is called needs to be freed when
trace_android_rvh_sk_free() is called.
Note, if trace_android_rvh_sk_alloc() fails, be sure to be able to
handle this in trace_android_rvh_sk_free(), but that should not be an
issue as that needs to be addressed in vendor code that runs for 'struct
sock' objects that have been created before the vendor code is loaded no
matter what.
Bug: 171013716
Signed-off-by: Vignesh Saravanaperumal <vignesh1.s@samsung.com>
Change-Id: I108a2f31d2dcc228f46159816deee6235afafbbd
Some vendors want to add a field when a 'sruct nf_conn' is added so give a
hook to handle this. Any memory allocated when
trace_android_rvh_nf_conn_alloc() is called needs to be freed when
trace_android_rvh_nf_conn_free() is called.
Note, if trace_android_rvh_nf_conn_alloc() fails, be sure to be able to
handle this in trace_android_rvh_nf_conn_free(), but that should not be
an issue as that needs to be addressed in vendor code that runs for
'struct nf_conn' objects that have been created before the vendor code
is loaded no matter what.
Bug: 171013716
Signed-off-by: Vignesh Saravanaperumal <vignesh1.s@samsung.com>
Change-Id: I4d2b025196a3df7ba4adec313c90483811cac728
Some vendors want to add things to 'struct sock', so give them a u64
where they can then have a pointer off to their private data and they
can do whatever they want to do without breaking or changing any abi for
anyone else.
Note, usually an android trace hook is also needed to use this properly,
so be aware that this will be required as well.
Bug: 171013716
Signed-off-by: Vignesh Saravanaperumal <vignesh1.s@samsung.com>
Change-Id: Iab0b5570753d4a9722ecf9ca9eeb9b9887e2a9d9
Some vendors want to add things to 'struct nf_conn', so give them a u64
where they can then have a pointer off to their private data and they
can do whatever they want to do without breaking or changing any abi for
anyone else.
Note, usually an android trace hook is also needed to use this properly,
so be aware that this will be required as well.
Bug: 171013716
Signed-off-by: Vignesh Saravanaperumal <vignesh1.s@samsung.com>
Change-Id: I245c162ee3fb083e3f39cf7bec3bd78cb624e005
Some vendors want to add things to 'struct skb_shared_info', so give
them an array to place their data.
Bug: 171013716
Signed-off-by: Vignesh Saravanaperumal <vignesh1.s@samsung.com>
Change-Id: Ia0024e3e8de89f4ef335fa26208ec6c45abafb22
Modern interactive systems, such as recent Android phones, tend to have
power efficient shallow idle states. Selecting deeper idle states on a
device while a latency-sensitive workload is running can adversely
impact performance due to increased latency. Additionally, if the CPU
wakes up from a deeper sleep before its target residency as is often the
case, it results in a waste of energy on top of that.
At the moment, none of the available idle governors take any scheduling
information into account. They also tend to overestimate the idle
duration quite often, which causes them to select excessively deep idle
states, thus leading to increased wakeup latency and lower performance
with no power saving. For 'menu' while web browsing on Android for
instance, those types of wakeups ('too deep') account for over 24% of
all wakeups.
At the same time, on some platforms idle state 0 can be power efficient
enough to warrant wanting to prefer it over idle state 1. This is
because the power usage of the two states can be so close that
sufficient amounts of too deep state 1 sleeps can completely offset the
state 1 power saving to the point where it would've been more power
efficient to just use state 0 instead. This is, of course, for systems
where state 0 is not a polling state, such as arm-based devices.
Sleeps that happened in state 0 while they could have used state 1 ('too
shallow') only save less power than they otherwise could have. Too deep
sleeps, on the other hand, harm performance and nullify the potential
power saving from using state 1 in the first place. While taking this
into account, it is clear that on balance it is preferable for an idle
governor to have more too shallow sleeps instead of more too deep sleeps
on those kinds of platforms.
This patch specifically tunes TEO to prefer shallower idle states in
order to reduce wakeup latency and achieve better performance.
To this end, before selecting the next idle state it uses the avg_util
signal of a CPU's runqueue in order to determine to what extent the CPU
is being utilized. This util value is then compared to a threshold
defined as a percentage of the CPU's capacity (capacity >> 6 ie. ~1.5%
in the current implementation). If the util is above the threshold, the
index of the idle state selected by TEO metrics will be reduced by 1,
thus selecting a shallower state. If the util is below the threshold,
the governor defaults to the TEO metrics mechanism to try to select the
deepest available idle state based on the closest timer event and its
own correctness.
The main goal of this is to reduce latency and increase performance for
some workloads. Under some workloads it will result in an increase in
power usage (Geekbench 5) while for other workloads it will also result
in a decrease in power usage compared to TEO (PCMark Web, Jankbench,
Speedometer).
It can provide drastically decreased latency and performance benefits in
certain types of workloads that are sensitive to latency.
Example test results:
1. GB5 (better score, latency & more power usage)
| metric | menu | teo | teo-util-aware |
| ------------------------------------- | -------------- | ----------------- | ----------------- |
| gmean score | 2826.5 (0.0%) | 2764.8 (-2.18%) | 2865 (1.36%) |
| gmean power usage [mW] | 2551.4 (0.0%) | 2606.8 (2.17%) | 2722.3 (6.7%) |
| gmean too deep % | 14.99% | 9.65% | 4.02% |
| gmean too shallow % | 2.5% | 5.96% | 14.59% |
| gmean task wakeup latency (asynctask) | 78.16μs (0.0%) | 61.60μs (-21.19%) | 54.45μs (-30.34%) |
2. Jankbench (better score, latency & less power usage)
| metric | menu | teo | teo-util-aware |
| ------------------------------------- | -------------- | ----------------- | ----------------- |
| gmean frame duration | 13.9 (0.0%) | 14.7 (6.0%) | 12.6 (-9.0%) |
| gmean jank percentage | 1.5 (0.0%) | 2.1 (36.99%) | 1.3 (-17.37%) |
| gmean power usage [mW] | 144.6 (0.0%) | 136.9 (-5.27%) | 121.3 (-16.08%) |
| gmean too deep % | 26.00% | 11.00% | 2.54% |
| gmean too shallow % | 4.74% | 11.89% | 21.93% |
| gmean wakeup latency (RenderThread) | 139.5μs (0.0%) | 116.5μs (-16.49%) | 91.11μs (-34.7%) |
| gmean wakeup latency (surfaceflinger) | 124.0μs (0.0%) | 151.9μs (22.47%) | 87.65μs (-29.33%) |
Bug: 258723112
Change-Id: Ifcf37e02c597ab5276656379d95dc6efc0d32771
Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
[ rjw: Comment edits and white space adjustments ]
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 9ce0f7c4bc)
Signed-off-by: Qais Yousef <qyousef@google.com>
Add a no_poll flag to teo_find_shallower_state() that will let the
function optionally not consider polling states.
This allows the caller to guard against the function inadvertently
resulting in TEO putting the CPU in a polling state when that
behaviour is undesirable.
Bug: 258723112
Change-Id: I31553993715a25c3ed04ec985416cfb0e222973d
Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
(cherry picked from commit 27f8508801)
Signed-off-by: Qais Yousef <qyousef@google.com>
Need to get the request frequency and target frequency
use it to do frequency check and modify it according to
the platform thermal requirements.
Bug: 208166320
Signed-off-by: Jeson Gao <jeson.gao@unisoc.com>
Signed-off-by: Di Shen <di.shen@unisoc.com>
Change-Id: I776b43c8f559b8a072abd8d3abcb3528348b2c5d
(cherry picked from commit fc827b344f)
(cherry picked from commit 11f1be4453)
Add vendor hook inside of get_page_from_freelist() to check
and modify the watermark in some special situations.
Additional page flag bit will be set for future identification.
Separately, a vendor hook inside of page_add_new_anon_rmap()
is added to set the referenced bit in some situations, e.g.
if the special bit in the page flag mentioned before is set,
we will give this page one more chance before it gets reclaimed.
Bug: 279793368
Change-Id: I363853a050a87201f6f368ccc580485dddd6c6b6
Signed-off-by: Dezhi Huang <huangdezhi@hihonor.com>
We want to record the cputime of each running process by adding
hooks for cpufreq_acct_update_power.
Bug: 186604985
Signed-off-by: zhengding chen <chenzhengding@oppo.com>
Change-Id: I35e38be4680781df3338b4a01041922294aecaa0
(cherry picked from commit 3983753280)
Update symbols of Exynos driver.
No function/variable symbols newly added/removed on ABI, but only
update list of Exynos.
Bug: 283658626
Signed-off-by: Junki Min <joonki.min@samsung.com>
Change-Id: Ib471bafa11943d7388de593712b114d17c72436c
Add a hook in irqtime_account_process_tick, which helps to get
information about the high load task.
Bug: 187904818
Change-Id: I644f7d66b09d047ca6b0a0fbd2915a6387c8c007
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
(cherry picked from commit fe580539f6)
(cherry picked from commit bf3b384e08)
Add hook to dup_task_struct for vendor data fields initialisation.
Bug: 188004638
Change-Id: I4b58604ee822fb8d1e0cc37bec72e820e7318427
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
(cherry picked from commit f66d96b14a)
(cherry picked from commit bafafe0ec4)
These hooks will do the following works:
a) record the time of the process in various states
b) Make corresponding optimization strategies in different hooks
Bug: 205938967
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: Ia3c47bbf0aadd17337ce18fd910343b1b8c3ef93
(cherry picked from commit a61d61bab7)
Signed-off-by: Carlos Llamas <cmllamas@google.com>
(cherry picked from commit b7a1174cc5dfc68cf769547b91958df407e55981)
(cherry picked from commit e1f430a487)
Add hook to boost thread when process killed.
Bug: 237749933
Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: I7cc6f248397021f3a8271433144a0e582ed27cfa
(cherry picked from commit 709679142d583b0b7338d931fdd43b27b1bbf9e0)
(cherry picked from commit 226f36eddd)
Logging callback symbolic name is generating too many different
messages making Abort analysis miss big trends.
Stick to console reported message providing sufficient information.
Bug: 280678242
Signed-off-by: Thierry Strudel <tstrudel@google.com>
(cherry picked from https://android-review.googlesource.com/q/commit:9f8f2ea03ede21d8928793c4be87eeb76d81bc7f)
Merged-In: Ic0ea662a60919454060e3a085aeabd8a4099e0b4
Change-Id: Ic0ea662a60919454060e3a085aeabd8a4099e0b4
Add hooks to capture various per-zone memory stats when
a trigger threshold is hit.
Bug: 268290366
Change-Id: Ibe39263ddb05ffc3fa63b5225497a90c6480c8d7
Signed-off-by: Georgi Djakov <quic_c_gdjako@quicinc.com>
When ufshcd_err_handler() is executed, CQ event interrupt can enter waiting
for the same lock. This can happen in ufshcd_handle_mcq_cq_events() and
also in ufs_mtk_mcq_intr(). The following warning message will be generated
when &hwq->cq_lock is used in IRQ context with IRQ enabled. Use
ufshcd_mcq_poll_cqe_lock() with spin_lock_irqsave instead of spin_lock to
resolve the deadlock issue.
[name:lockdep&]WARNING: inconsistent lock state
[name:lockdep&]--------------------------------
[name:lockdep&]inconsistent {IN-HARDIRQ-W} -> {HARDIRQ-ON-W} usage.
[name:lockdep&]kworker/u16:4/260 [HC0[0]:SC0[0]:HE1:SE1] takes:
ffffff8028444600 (&hwq->cq_lock){?.-.}-{2:2}, at:
ufshcd_mcq_poll_cqe_lock+0x30/0xe0
[name:lockdep&]{IN-HARDIRQ-W} state was registered at:
lock_acquire+0x17c/0x33c
_raw_spin_lock+0x5c/0x7c
ufshcd_mcq_poll_cqe_lock+0x30/0xe0
ufs_mtk_mcq_intr+0x60/0x1bc [ufs_mediatek_mod]
__handle_irq_event_percpu+0x140/0x3ec
handle_irq_event+0x50/0xd8
handle_fasteoi_irq+0x148/0x2b0
generic_handle_domain_irq+0x4c/0x6c
gic_handle_irq+0x58/0x134
call_on_irq_stack+0x40/0x74
do_interrupt_handler+0x84/0xe4
el1_interrupt+0x3c/0x78
<snip>
Possible unsafe locking scenario:
CPU0
----
lock(&hwq->cq_lock);
<Interrupt>
lock(&hwq->cq_lock);
*** DEADLOCK ***
2 locks held by kworker/u16:4/260:
[name:lockdep&]
stack backtrace:
CPU: 7 PID: 260 Comm: kworker/u16:4 Tainted: G S W OE
6.1.17-mainline-android14-2-g277223301adb #1
Workqueue: ufs_eh_wq_0 ufshcd_err_handler
Call trace:
dump_backtrace+0x10c/0x160
show_stack+0x20/0x30
dump_stack_lvl+0x98/0xd8
dump_stack+0x20/0x60
print_usage_bug+0x584/0x76c
mark_lock_irq+0x488/0x510
mark_lock+0x1ec/0x25c
__lock_acquire+0x4d8/0xffc
lock_acquire+0x17c/0x33c
_raw_spin_lock+0x5c/0x7c
ufshcd_mcq_poll_cqe_lock+0x30/0xe0
ufshcd_poll+0x68/0x1b0
ufshcd_transfer_req_compl+0x9c/0xc8
ufshcd_err_handler+0x3bc/0xea0
process_one_work+0x2f4/0x7e8
worker_thread+0x234/0x450
kthread+0x110/0x134
ret_from_fork+0x10/0x20
Bug: 267974767
(cherry picked from commit 948afc6961https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git 6.4/scsi-staging)
Fixes: ed975065c3 ("scsi: ufs: core: mcq: Add completion support in poll")
Reviewed-by: Can Guo <quic_cang@quicinc.com>
Reviewed-by: Stanley Chu <stanley.chu@mediatek.com>
Signed-off-by: Alice Chao <alice.chao@mediatek.com>
Link: https://lore.kernel.org/r/20230424080400.8955-1-alice.chao@mediatek.com
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Change-Id: Ib75c41579138a14e820eba19b876cd4ae786dd67
Signed-off-by: Alice Chao <alice.chao@mediatek.com>
In order to update cpufreq, vendor modules invoke cpufreq_update_util(),
but when we build our modules, report error:
ERROR: modpost: "cpufreq_update_util_data" [xxx.ko] undefined!
Bug: 192218676
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: Ib1da70229f04b08d8d812d065021dec0bf891e0e
(cherry picked from commit 8943a2e7a3)
(cherry picked from commit d1bc61dd85e8d28f1df0e22e2d73aa9e99cb645e)
Export the tracepoint task_rename to identify specific new task,
to customize task's util for power and performance, or optimize
task schedule parameters.
Bug: 189985971
Change-Id: I3bb71eae316e3096d361e7b47012ba46ea4be509
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
(cherry picked from commit 016d3f7b69)
(cherry picked from commit cfc14a391adb4d44d8186694b4884815bd85be6c)
Adds various macros to create reserved data fields in kernel data
structures before the freeze and to use reserved data fields to backport
upstream changes after the freeze.
Bug: 233387627
Change-Id: Ifbf8444861fa805593ce9b4837cd2653b7b7a0b0
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
spin_trylock may fail due to a parallel drain in rmqueue_pcplist.
In the case, it should retry to allocate with buddy.
It matches with upstream policy.
Fixes: 433445e9a1 ("ANDROID: mm: add cma pcp list")
Change-Id: I07367888d7ede38e09f9d882fc2485baa175fe64
Signed-off-by: Minchan Kim <minchan@google.com>
Writing to HFGWTR_EL2 is undefined on CPUs without the capability,
so make sure not to touch the register when that is the case.
Bug: 282917063
Bug: 282993310
Change-Id: I85211105d6b1fbee854b4f13f037b8573c5a211c
Signed-off-by: Quentin Perret <qperret@google.com>
This reverts commit 6cf9fb4579. It was a
temporary workaround which will be replaced a proper fix shortly.
Bug: 282917063
Bug: 282993310
Change-Id: I0caec4a63aabaecbf3fa7ec5d5b4c6930ea6efcd
Signed-off-by: Quentin Perret <qperret@google.com>
Create the symbol list file for Honor Device Co.
Bug: 279793369
Signed-off-by: Dezhi Huang <huangdezhi@hihonor.com>
Change-Id: I11bca937366428bc87a174a64b7d6843e3d92339
Vendor data is not initialized which can make the drivers to see the
junk. Initialize it.
Bug: 273448633
Fixes: a033dd393f ("ANDROID: mm: shmem: add vendor data in 'shmem_inode_info'")
Change-Id: I44379c97831324e8dd439a27c6326706eb0bcadf
Signed-off-by: Charan Teja Kalla <quic_charante@quicinc.com>
Add a hook in account_process_tick, which help us to get information
about the high load task and the cpu they running on.
Bug: 183260319
Change-Id: I54162ce3c65bd69e08d2d4747e4d4883efe4c442
Signed-off-by: Liujie Xie <xieliujie@oppo.com>