ANDROID: sched: Add vendor hooks for update_topology

Add a vendor hook for modules to know when the topology
code has determined the max capacity of cpus.

Bug: 200103201
Change-Id: Ia3e22479059d2e57500cbdd46504aa4773af6e4a
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Signed-off-by: Ashay Jaiswal <quic_ashayj@quicinc.com>
This commit is contained in:
Abhijeet Dharmapurikar
2021-05-04 12:26:13 -07:00
committed by Todd Kjos
parent 30c8f87544
commit 93c605314b
3 changed files with 6 additions and 0 deletions

View File

@@ -156,3 +156,4 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_check_preempt_tick);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_check_preempt_wakeup_ignore);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_replace_next_task_fair);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_build_sched_domains);
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_update_topology_flags_workfn);

View File

@@ -219,6 +219,7 @@ static void update_topology_flags_workfn(struct work_struct *work)
{
update_topology = 1;
rebuild_sched_domains();
trace_android_vh_update_topology_flags_workfn(NULL);
pr_debug("sched_domain hierarchy rebuilt, flags updated\n");
update_topology = 0;
}

View File

@@ -16,6 +16,10 @@ DECLARE_HOOK(android_vh_arch_set_freq_scale,
unsigned long max, unsigned long *scale),
TP_ARGS(cpus, freq, max, scale));
DECLARE_HOOK(android_vh_update_topology_flags_workfn,
TP_PROTO(void *unused),
TP_ARGS(unused));
#endif /* _TRACE_HOOK_TOPOLOGY_H */
/* This part must be outside protection */
#include <trace/define_trace.h>