Commit Graph

177 Commits

Author SHA1 Message Date
Todd Kjos
b6dace455e ANDROID: subsystem-specific vendor_hooks.c for sched
Change how vendor hooks are instantiated to promote
more complete structure definition in the ABI XML
description without complicating hook definition for
partners.

We don't want to force partners to include all
headers as part of the hook definition in include/trace/hooks/
since that causes extra headers to be included in
source files that runs the risk of changing visibility
resulting in CRC changes to KMI symbols. Instead continue
the practice of using forward declarations in the hook
header files.

Instead of instantiating all hook tracepoints globally in
drivers/android/vendor_hooks.c, use subsystem-specific
vendor_hooks.c if inclusion of subsystem-specific
header files is required. This avoids namespace collisions
between internal header files and limits the exposure
to the internal headers to the instantiation, not the
call sites.

In this patch, all of the scheduler related hooks are
instantiated in kernel/sched/vendor_hooks.c which can
cleanly include scheduler-related header files to
provide full type visibility.

Bug: 233047575
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: Ife5a66c2968de73e3f6d05840411310611e2e175
2022-09-08 23:24:37 +00:00
Rick Yiu
b8545ebadd ANDROID: sched: Add vendor hook for rt util update
Vendor may have need to track rt util.

Bug: 201261299
Signed-off-by: Rick Yiu <rickyiu@google.com>
Change-Id: I2f4e5142c6bc8574ee3558042e1fb0dae13b702d
2022-08-01 13:20:13 +00:00
Rick Yiu
e8762ad424 ANDROID: sched: Add vendor hook for util-update related functions
Vendor may have the need to implement their own util tracking.

Bug: 201260585
Signed-off-by: Rick Yiu <rickyiu@google.com>
Change-Id: I973902e6ff82a85ecd029ac5a78692d629df1ebe
2022-08-01 13:19:59 +00:00
Liujie Xie
94f9adb4d0 ANDROID: vendor_hooks: export hooks of mem_cgroup subsystem
Forgot export hooks for driver, fix it.

Fixes: 1cdcf76b15 ("ANDROID: vendor_hooks: add hooks in mem_cgroup subsystem")
Bug: 192052083

Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: I79779406b4dab52ceca02bd5de909d3a0c127cb9
(cherry picked from commit 69c931581f)
2022-07-19 12:47:38 +00:00
Veerendranath Jakkam
816e633095 ANDROID: nl80211/cfg80211: Add support to do API changes after GKI freeze
Reserve sufficient nl80211 attributes in enum nl80211_commands and enum
nl80211_attr to backport upstream UAPI changes.

Reserve data fields for upstream backport changes and vendor hooks.
Also, add vendor hooks to set/get additional info from driver based on
the cfg80211 current context. These APIs can be used to configure/fetch
data of the new params added in upstream cfg80211_op calls.

Ex:
upstream kernel added a new param to existing cfg80211_op "add_key()".
The addtional param info added in the upstream kernel can be configured
using "android_vh_cfg80211_set_context" before calling "add_key".

Bug: 233387627
Change-Id: I99f696ad291ae5965fc6d91bf565cc0c9d423dd5
Signed-off-by: Veerendranath Jakkam <quic_vjakkam@quicinc.com>
2022-07-19 12:47:37 +00:00
rongqianfeng
8da6ee328b ANDROID: vendor_hooks: add hook and OEM data for slab shrink
Some shrinker add lock in count_objects() may cause lock contention
issues and lead all task stall on slab shrink. Add vendor hook in
do_shrink_slab() for shrinker->count_objects() latency measuring.

Add 3 oem data in shrink_control struct. Two is for
shrinker->count_objects() and shrinker->scan_objects() latency
measuring, other one to store priority, some shrinker know the reclaimer
priority can control the memory reclaim more better.

Bug: 188684131

Change-Id: I80e9d90179bb52a99c54d9a067c6fcee835bb2ad
Signed-off-by: rongqianfeng <rongqianfeng@vivo.com>
2022-07-19 12:47:36 +00:00
Aking Chen
b5db5ef6b9 ANDROID: mmc: Add vendor hooks
Add vendor hooks to support vendor-specific exception handling features.

Bug: 185083720

Change-Id: I30381ed9835338308f2b03856f510a2982db6e6a
Signed-off-by: Mingli Feng <mingli.feng@vivo.com>
Signed-off-by: Aking Chen <akingchen@vivo.com>
(cherry picked from commit e80bcd4627)
Signed-off-by: Aking Chen <akingchen@vivo.corp-partner.google.com>
2022-07-19 12:47:30 +00:00
Vignesh Saravanaperumal
b6a991b531 ANDROID: GKI: net: add vendor hooks for 'struct sock' lifecycle
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
2022-07-19 12:47:29 +00:00
Vignesh Saravanaperumal
88ca8a6cd6 ANDROID: GKI: net: add vendor hooks for 'struct nf_conn' lifecycle
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
2022-07-19 12:47:29 +00:00
zhaoyang.huang
109097ed1c ANDROID: Add vendor hook for MemcgV2 optimization
The associated vendor hooks/data are used for implementing dynamic memory.low protection based on memcgv2.

Bug: 232723420
Test: build pass
Change-Id: I2e92bdc2840af1eaaa08ee6427d2a82d78390005
Signed-off-by: zhaoyang.huang <zhaoyang.huang@unisoc.com>
2022-07-19 12:47:28 +00:00
Zhuguangqing
58e3f869fc ANDROID: Add vendor hooks to signal.
Add vendor hook to get signal for vendor-specific tuning.

Conflicts:
    drivers/android/vendor_hooks.c

Bug: 184898838

Signed-off-by: Zhuguangqing <zhuguangqing@xiaomi.com>
Change-Id: I83a28b0a6eb413976f4c57f2314d008ad792fa0d
(cherry picked from commit d623f1ff72)
2022-07-19 12:47:26 +00:00
wudean
842c68a977 ANDROID: vendor_hooks: bypass shrink slab
Add hooks for bypass shrink slab.

Bug: 185951972
(cherry picked from commit 396a6adfd3)

Change-Id: I343e02ae5cd6d076d525d0e4bfc09ecdfeda1d7b
Signed-off-by: wudean <dean.wu@vivo.com>
2022-07-19 12:47:26 +00:00
xieliujie
ad2d36f06f ANDROID: vendor_hooks: Add hook for binder
Add hook to support oem's performance feature.

Bug: 186482511

Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: Ib495e80e569cc293eaa98d87a050aee8915eb415
(cherry picked from commit 2337b9185a)
2022-07-19 03:54:51 +00:00
Naina Mehta
62bb81afc5 ANDROID: fault: Add vendor hook for TLB conflict
Add android_vh_handle_tlb_conf vendor hook to gracefully
handle TLB conflict.

Leaf changes summary: 1 artifact changed
Changed leaf types summary: 0 leaf type changed
Removed/Changed/Added functions summary: 0 Removed, 0 Changed, 0 Added function
Removed/Changed/Added variables summary: 0 Removed, 0 Changed, 1 Added variable

1 Added variable:

  [A] 'tracepoint __tracepoint_android_vh_handle_tlb_conf'

Bug: 222637802
Change-Id: I3d6814cd950e77e1a15ce444764078692724cd0a
Signed-off-by: Naina Mehta <quic_nainmeht@quicinc.com>
Signed-off-by: Vamsi Krishna Lanka <quic_vamslank@quicinc.com>
2022-07-19 03:54:50 +00:00
zhang chuang
3c5df4a52e ANDROID: Add hook to show vendor info for transactions
When watchdog or anr occur, we need to read
dev/binderfs/binder_logs/proc/pid or dev/binderfs/binder_logs/state
node to know the time-consuming information of the binder call.
We need to add the time-consuming information of binder transaction.

Bug: 190413570

Signed-off-by: zhang chuang <zhangchuang3@xiaomi.com>
Change-Id: I0423d4e821d5cd725a848584133dc7245cbc233a
(cherry picked from commit eabe9707f2)
Signed-off-by: Carlos Llamas <cmllamas@google.com>
[cmllamas: fix trivial merge conflict in vendor_hooks.c]
2022-07-19 03:54:50 +00:00
kamasali
10bac17ee9 ANDROID: vendor_hooks: Add hook for partial_init
Need this vendor hook to support patial init functionality. This hook needs to be restricted as the additional vendor handling need to perform operations (such as wait_for_completion) in non-atomic context.
One of the main functionality of Partial init feature is to reduce latency during resume.

Bug: 231654364
Link: https://lore.kernel.org/lkml/ea318551ec0b43429ce47bfac9ebf285@quicinc.com/#r

Change-Id: Ia1cb0b7173db3318d2d6686f4bd4719f3cfefd8b
Signed-off-by: kamasali <quic_kamasali@quicinc.com>
2022-07-19 03:54:45 +00:00
Dezhi Huang
0f656fd2a1 ANDROID: mutex: Add vendor hook to init mutex oem data.
Add hooks to init oem data of mutex.

Bug: 231527236
Signed-off-by: Dezhi Huang <huangdezhi@hihonor.com>
Change-Id: Id0aeac168e81bd3d88051657c32ba709c329dbdd
2022-07-19 03:52:57 +00:00
Liangliang Li
47fc7fad0e ANDROID: vendor_hooks: Add hooks to tcp/udp send/recv msg functions.
Add hook to tcp/udp to collect network info and do performance tuning.

Bug: 190523684

Change-Id: Id790a381d5ce6c35a747697510f14678ccf3ff2f
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
(cherry picked from commit 81c8161bed)
2022-07-19 03:52:56 +00:00
Liangliang Li
9a7758d97f ANDROID: GKI: Add vendor hook to binder transaction
We want to get binder free space information in the binder
transaction, but this needs to hold the mutex lock. So we add
this restrict hook to do this.

Bug: 205648032
Change-Id: Ie1f377018da686bd62f5ac2d1e5421899741e6d5
Signed-off-by: Liangliang Li <liliangliang@vivo.com>
(cherry picked from commit 2f3f5731de)
2022-07-19 03:52:56 +00:00
Liujie Xie
78ac5ea5e3 ANDROID: vendor_hooks: Add hooks for account process tick
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>
(cherry picked from commit 63399b4e2e)
2022-07-19 03:52:55 +00:00
xieliujie
e1960b400c ANDROID: vendor_hooks: Add hooks for rwsem and mutex
Add hooks to apply oem's optimization of rwsem and mutex

Bug: 182237112
Signed-off-by: xieliujie <xieliujie@oppo.com>
Change-Id: I6332623732e2d6826b8b61087ca74e55393e0c3d
(cherry picked from commit 80b4341d05)
2022-07-19 03:52:55 +00:00
HongCheol Shim
d11cf42a71 ANDROID: input: Add vendor hook for __pass_event in evdev.c
Add vendor hook for passing events to client drivers.

We have some limitation to achieve the goal of input performance
without modification of kernel. So I would like you to add vendor
hook and please review the reason why I want to add it.

As the users trigger input actions, we need to support the input
operation and the what the users want to do so that there's no delay.
So we've developed and used "input booster" controling some resources
properly during input operations according to input type.

Android already has the booster in framework to support input actions
however this way has a long latency to control resources.

To reduce latency, we've placed the booster in kernel side for high
responsiveness and it guarantees faster than framework booster.
In addtion, I applied Samsung's own concept to the booster.
And it has been operated stably on all Galaxy models for about 10 years.

So we need
  - add function to notify input events delivered to client in evdev.

Bug: 228927595
Signed-off-by: HongCheol Shim <hongc.shim@samsung.corp-partner.google.com>
Change-Id: Ibe199c148974b6788e02c192f950cb6802745f68
2022-07-19 03:52:54 +00:00
Liangliang Li
bafafe0ec4 ANDROID: vendor_hooks: Add hooks to dup_task_struct
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)
2022-07-19 03:52:54 +00:00
kamasali
07bd537bb0 ANDROID: vendor_hooks: Add hook in wakeup functionality
Need this verndor hook to support wakeup functionality
for sdio cards.

Bug: 231668342
Change-Id: I1d1a34d6d02f4558edf56eccdd09df57d6232c05
Signed-off-by: Sarthak Garg <sartgarg@codeaurora.org>
Signed-off-by: Kamasali Satyanarayan <quic_kamasali@quicinc.com>
2022-07-19 03:52:54 +00:00
Liangliang Li
bf3b384e08 ANDROID: vendor_hooks: Add hooks for account irqtime process tick
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)
2022-07-19 03:52:53 +00:00
Manaf Meethalavalappu Pallikunhi
d98b3950a3 ANDROID: thermal: vendor hook to disable thermal cooling stats
Add vendor hook to thermal to allow vendor to selectively disable
thermal cooling device stats feature based on requirement. It helps
vendor to optimize memory footprint due to this feature especially
for low memory devices.

Bug: 218825214
Change-Id: I2ec72505f03575e09229c54765584614b16a3904
Signed-off-by: Manaf Meethalavalappu Pallikunhi <quic_manafm@quicinc.com>
2022-07-19 03:52:53 +00:00
Liujie Xie
b7ea1c4987 ANDROID: vendor_hooks: Add hook in shrink_node_memcgs
Add vendor hook in shrink_node_memcgs to adjust whether
to skip memory reclamation of memcg.

Bug: 226482420
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: I925856353e63c5a821027de4f8476c833e21b982
2022-07-19 03:52:52 +00:00
Liujie Xie
5fdfed7d78 ANDROID: vendor_hooks: Add hooks for memory when debug
Add vendors hooks for recording memory used

Bug: 182443489
Bug: 234407991
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: I62d8bb2b6650d8b187b433f97eb833ef0b784df1
2022-07-19 03:52:51 +00:00
Jiewen Wang
ecbd315a64 ANDROID: vendor_hooks: Add hook in try_to_unmap_one()
Add hook in try_to_unmap_one() to trace this function for debug memory
swap bugs.

Bug: 198385827
Change-Id: I1fdbe60e09bb491b949e06a07133710453ecca03
Signed-off-by: Jiewen Wang <jiewen.wang@vivo.com>
(cherry picked from commit 955f917251)
2022-07-19 03:52:51 +00:00
Jiewen Wang
e846635d85 ANDROID: vendor_hooks: Add hook in mmap_region()
Add hook in mmap_region() to record the vma and address information
of monitored processes.

Bug: 198385827
Change-Id: I0bde29113b47ca7f4a9f5d42a54188e791ca3b7e
Signed-off-by: Jiewen Wang <jiewen.wang@vivo.com>
(cherry picked from commit 878e0caa77)
2022-07-19 03:52:51 +00:00
Sachin Gupta
c8ed7439af ANDROID: scsi: ufs: Add hook to influence the UFS clock scaling policy
Add a vendor hook in ufshcd_devfreq_target() to allow vendor modules to
influence the UFS clock scaling policy.

Bug: 234112523

Change-Id: I64b9b77661fffc6cc96fa610985483e6cfc6542b
Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
Signed-off-by: Sachin Gupta <quic_sachgupt@quicinc.com>
2022-07-19 03:52:50 +00:00
Yang Yang
c3a4348aae ANDROID: vendor_hooks: add vendor hook in blk_mq_rq_ctx_init()
This vendor hook let us initialize payload of the request.

Bug: 188749221
Change-Id: I51d6a3010ac0ab36066dbe1368158592832112b7
Signed-off-by: Yang Yang <yang.yang@vivo.com>
(cherry picked from commit 2faed77792)
2022-07-19 03:52:40 +00:00
Yang Yang
66db31d522 ANDROID: vendor_hooks: add vendor hook in blk_mq_alloc_rqs()
This vendor hook let us attach oem data as payload to the request.
The payload is used by oem driver for debugging purpose.

Bug: 188749221
Change-Id: Iac598bd9cce836dac0efe9198a3e7752928f351a
Signed-off-by: Yang Yang <yang.yang@vivo.com>
(cherry picked from commit eecc725a8e)
2022-07-19 03:52:40 +00:00
Peifeng Li
998b760798 ANDROID: vendor_hooks: Add hooks to for free_unref_page_commit
Provide a vendor hook to skip cma-pages to add in pcplist when
free_unref_page_commit.

The patch is revelant to skip drain_all_pages in alloc_contig_range,
the revelant hooks is android_vh_cma_drain_all_pages_bypass
which is to avoid to delay in drain pcppages when drain_all_pages.

In most case, pcp->high is small so that free-pages with other mt_types
can also fill with pcplist full.

Bug: 224732340
Bug: 234405962
Signed-off-by: Peifeng Li <lipeifeng@oppo.com>
Change-Id: Ifdeeed9f8934d87671ec3fa6787a02675b993082
2022-07-19 03:52:39 +00:00
Peifeng Li
a82943cdfb ANDROID: vendor_hooks: Add hooks to for alloc_contig_range
Provide a vendor hook to allow drain_all_pages to be skipped
during alloc_contig_range in some cases to avoid delays caused by
it in cases when the benefits of draining pcp lists are known
to be small.

Bug: 224732340
Bug: 234405962
Signed-off-by: Peifeng Li <lipeifeng@oppo.com>
Change-Id: I0a82f668cf985ad5344d666c0c6372a7e61c3798
2022-07-19 03:52:39 +00:00
Liujie Xie
d1ba6f2de7 ANDROID: vendor_hooks: Add hooks for __alloc_pages_direct_reclaim
Provide a vendor hook to allow drain_all_pages to be skipped
during direct reclaim in some cases to avoid delays caused by
it in cases when the benefits of draining pcp lists are known
to be small.

Bug: 220811627
Bug: 234405962
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Change-Id: I0805241f81e0a94afcf62c98e97cff125d4061e2
2022-07-19 03:52:39 +00:00
Liujie Xie
6f98ceb358 ANDROID: vendor_hooks: Add hooks for shrink_active_list
Provide a vendor hook to allow page_referenced to be skipped
during shrink_active_list to avoid heavy cpuloading caused by
it.

Bug: 220878851
Bug: 234405962
Signed-off-by: Liujie Xie <xieliujie@oppo.com>
Signed-off-by: Peifeng Li <lipeifeng@oppo.com>
Change-Id: Ie0e369f8f8739fea59a95470af20ab0e976869d1
2022-07-19 03:52:39 +00:00
Neeraj Upadhyay
e4918f7bd5 ANDROID: gic-v3: Change GIC v3 vendor hook to restricted
Some of the irq migration paths call chip set affinity, after
current CPU is marked offline in cpu_online_mask. These
chip set affinity calls do not invoke vendor trace hooks.
So, convert gic_v3_set_affinity() vendor hook to a restricted
hook, to allow trace hook to be called from these irq migration
paths.

Bug: 187161770
Change-Id: I8f45536deb1ba1dc6be861ca4fc2b32306a5c50a
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
(cherry picked from commit 3bd9ad7eb4)
2022-07-19 03:52:37 +00:00
Shaleen Agrawal
aec40de3d7 ANDROID: cputime: seprate irq entry and exit tracehooks
Currently the code has single hook for tracking irqs. However
modules need to deduce start and end of the irq.

Create separate hooks for irq start and end since the
cputime has already figured it out.

Bug: 231341763
Change-Id: Ie0dd503b283d83f69d01171ebd1cd6127c3bafd0
Signed-off-by: Shaleen Agrawal <quic_shalagra@quicinc.com>
Signed-off-by: Ashay Jaiswal <quic_ashayj@quicinc.com>
2022-05-12 10:02:42 +05:30
duwenchao
785d595536 ANDROID: vendor_hooks: Add hooks for ufs scheduler
Add hooks to support oem's ufs scheduler feature.

Bug: 183085044
Signed-off-by: duwenchao <duwenchao@xiaomi.com>
Change-Id: I09bf9cba33412c81e4da83292772c0e95cf32022
(cherry picked from commit 00185a421a)
2022-05-09 20:41:44 +00:00
Wenchao Chen
7f5325b5bb ANDROID: GKI: add vendor hook for mmc
UNISOC's solution allows more requests to be issued to improve read and
write performance, so vendor hooks are added to support this function.

Bug: 229920089
Signed-off-by: Wenchao Chen <wenchao.chen@unisoc.com>
Change-Id: Ic9423b651884111d286646d0d66a033fce3b44d7
2022-04-22 18:12:36 +08:00
Jian Gong
ace93ca5ef ANDROID: GKI: psci: add hook to check if cpu is allowed to power off
While TOS is running alongside with linux, cpu power off operation by linux
may need be denied by TOS in some scenarios.
This patch added two hooks in psci_tos_resident_on and psci_cpu_suspend
to hook cpu off operation.

The function psci_tos_resident_on originally is used to check if TOS is resident on
a specific cpu and that cpu is dedicated for running TOS exclusively. If so, that
cpu can not be power off. Actually if TOS supports SMP, TOS may need deny any
other cpu to power down in some cases, i.e. there are no-expired timers in TOS.
Thus the first hook for psci_tos_resident_on is used to determine if
the specific cpu is allowed to power off in the cpu hotplug path.

Besides cpu hotplug, a cpu also can power off by cpu_suspend.
The second hook for psci_cpu_suspend determines if cpu suspend should go through
or not. When the same conditions described above meets, cpu suspend will break up.

The hook is same as commit 88d88955ae0b8b1f1a555d7810beb6c8ca4ca0f1 from android12-5.4

Bug: 229067021
Change-Id: Ib329beeff20f0cfef263f6a7813280d33f6a5eaa
Signed-off-by: Jian Gong <Jian.Gong@unisoc.com>
2022-04-20 00:31:37 +00:00
Stephen Dickey
40bcf12c6b ANDROID: sched: vendor hook for sched_getaffinity
Just as sched_getaffinity updates the affinity based upon the
active_mask, the vendor hook needs to be able to constrain
the task's affinity.

Introduce a hook to sched_getaffinity such that vendor modules
are able to update the affinity.

Bug: 229133948
Change-Id: I5c501e9204d4fcc6688f675a41be60ef5a2d1075
Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
2022-04-20 00:30:01 +00:00
Abhijeet Dharmapurikar
fad13230ac ANDROID: sched: create trace points for 32bit execve
Module code would like to hold some locks when affinity is being updated
for 32 bit task exec.

Create pre and post tracepoints in force_compatible_cpus_allowed_ptr()

Bug: 187917024
Change-Id: I95bff9f4d5b5d37c1d5440acbd6857d2855c2b43
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Shaleen Agrawal <shalagra@codeaurora.org>
Signed-off-by: Stephen Dickey <quic_dickey@quicinc.com>
2022-04-19 22:23:21 +00:00
Gaofeng Sheng
8879650556 ANDROID: GKI: dma-buf: add vendor hook for dma_buf_release
The main function is to check whether the corresponding IOMMU buffer
is unmapped when dmabuf is released, so as to avoid memory coverage
caused by IOMMU.

Bug: 229552121
Change-Id: I56ae3f0994cd4f3d24494b7972e4d89d0f004da8
Signed-off-by: Gaofeng Sheng <gaofeng.sheng@unisoc.com>
2022-04-19 05:39:15 +00:00
Xiaopeng Bai
53e342c183 ANDROID: GKI: regmap: Add regmap vendor hook for of_syscon_register
For global registers access, UNISOC have one special method called set/clear
mechanism that would avoid using hardware spinlock. But now regmap framework
does not support our set/clear mechanism, so add vendor hook to support
this feature.

Bug: 228907258
Signed-off-by: Xiaopeng Bai <xiaopeng.bai@unisoc.com>
Change-Id: I9a6651f07a048ffebd5c2d8e369a4e7b374bc182
2022-04-19 08:57:22 +08:00
Yunxian He
0e10f65fa9 ANDROID: usb: Add vendor hook when core detect a new device
Add vendor hook when core detect a new device. Vendor side
can use this hook to do several things. Our Unisoc ASIC had
some drawback. most scene, we use DWC3 controller and
associated PHY, when digital headset plug in, we need end the
enumeration and switch to another controller and phy. Using this
hook, we can do the switch easily and efficiently.

Bug: 229330749
Change-Id: I1cba28b43ff1b1f5ac0138c0bb743f3d8e9f1e4b
Signed-off-by: Yunxian He <yunxian.he@unisoc.com>
2022-04-15 18:54:33 +08:00
Jack Pham
982c7ee3e3 ANDROID: sound: usb: Add vendor hooks for connect & disconnect
Add vendor hooks to capture when a USB audio interface is probed
and disconnected.  These will allow for supporting offloading of
audio device handling to a co-processor.

The disconnect hook needs to be restricted as the additional
vendor handling may need to perform operations (such as
wait_for_completion) in non-atomic context.

Bug: 224904393
Change-Id: Idf1da95556814e0ffbdc5f9fb5a25563ebee9be2
Signed-off-by: Jack Pham <quic_jackp@quicinc.com>
2022-04-08 15:28:33 -07:00
Di Shen
12b8ef18b2 ANDROID: thermal: Add vendor hook to get thermal zone device
Need to get temperature data and config info from thermal zone device.

Bug: 208946028

Signed-off-by: Di Shen <di.shen@unisoc.com>
Signed-off-by: Jeson Gao <jeson.gao@unisoc.com>
Change-Id: I5945df5258181b4a441b6bbe09327099491418b3
(cherry picked from commit c53f0e3530641d6b696bae12eed55c58599ab516)
2022-04-08 18:46:55 +00:00
Jeson Gao
fbe6f8708d ANDROID: thermal: Add hook for cpufreq thermal
Add hook to get cpufreq policy data after registering and unregistering
cpufreq thermal for platform thermal requirement.

Bug: 228423762

Signed-off-by: Jeson Gao <jeson.gao@unisoc.com>
Change-Id: I9c6bc88f348f252c428560427bd8bca91092edfa
2022-04-08 15:20:47 +00:00