ANDROID: topology: Add flag to indicate topology has been updated
Commit f7128c75332b ("ANDROID: sched: Add vendor hooks for update_topology") was intended for the modules to get informed when topology initialization had completed. However that is not sufficient, the module could be insmoded after the hook was invoked. For such situations create a flag for modules to detect that topology initialization is completed. Bug: 187234873 Change-Id: I2ed4dff9c921e3de67dd11049c80f38e3c1a64fd Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
This commit is contained in:
parent
d4f032e36b
commit
e5aa1a481e
@ -205,6 +205,8 @@ static int register_cpu_capacity_sysctl(void)
|
||||
subsys_initcall(register_cpu_capacity_sysctl);
|
||||
|
||||
static int update_topology;
|
||||
bool topology_update_done;
|
||||
EXPORT_SYMBOL_GPL(topology_update_done);
|
||||
|
||||
int topology_update_cpu_topology(void)
|
||||
{
|
||||
@ -219,6 +221,7 @@ static void update_topology_flags_workfn(struct work_struct *work)
|
||||
{
|
||||
update_topology = 1;
|
||||
rebuild_sched_domains();
|
||||
topology_update_done = true;
|
||||
trace_android_vh_update_topology_flags_workfn(NULL);
|
||||
pr_debug("sched_domain hierarchy rebuilt, flags updated\n");
|
||||
update_topology = 0;
|
||||
|
@ -88,5 +88,6 @@ void remove_cpu_topology(unsigned int cpuid);
|
||||
void reset_cpu_topology(void);
|
||||
int parse_acpi_topology(void);
|
||||
#endif
|
||||
extern bool topology_update_done;
|
||||
|
||||
#endif /* _LINUX_ARCH_TOPOLOGY_H_ */
|
||||
|
Loading…
Reference in New Issue
Block a user