On 05-07-21, 01:01, Hector Yuan wrote: > Hi, Viresh: > > OK, Thank you. > > I'll add this routine in of.c. > May I know the below prototype is okay to you? > > static int _of_get_related_cpus(const char *list_name, const char > *cell_name, int index, struct cpumask *m) of_perf_domain_get_sharing_cpumask(int cpu, const char *list_name, const char *cell_name, struct cpumask *cpumask); And actually add this in cpufreq.h, this doesn't have anything to do with OPP and I can assume that a platform not enabling the OPP functionality to end up using it later. Rafael, will that be fine ? Or we add it in a completely new header ? The users are going to be cpufreq drivers only I believe. > And maybe I have to find somewhere to update my > mtk_freq_domain_map[cpu]? > > static int mtk_get_related_cpus(int index, struct cpufreq_mtk *c) > { > for_each_possible_cpu(cpu) { > cpumask_set_cpu(cpu, &c->related_cpus);//related_cpu can copy policy > cpus > mtk_freq_domain_map[cpu] = c;//need to find somewhere to assign > > } > } I am not sure I understood this part well. -- viresh