/* * Allow power off when OSI has been successfully enabled. * On a PREEMPT_RT based configuration the domain idle states are * supported, but only during system-wide suspend.
*/ if (use_osi) {
pd->power_off = psci_pd_power_off;
pd->flags |= GENPD_FLAG_ACTIVE_WAKEUP; if (IS_ENABLED(CONFIG_PREEMPT_RT))
pd->flags |= GENPD_FLAG_RPM_ALWAYS_ON;
} else {
pd->flags |= GENPD_FLAG_ALWAYS_ON;
}
/* Use governor for CPU PM domains if it has some states to manage. */
pd_gov = pd->states ? &pm_domain_cpu_gov : NULL;
ret = pm_genpd_init(pd, pd_gov, false); if (ret) goto free_pd_prov;
ret = of_genpd_add_provider_simple(np, pd); if (ret) goto remove_pd;
/* * Parse child nodes for the "#power-domain-cells" property and * initialize a genpd/genpd-of-provider pair when it's found.
*/
for_each_child_of_node_scoped(np, node) { if (!of_property_present(node, "#power-domain-cells")) continue;
ret = psci_pd_init(node, use_osi); if (ret) gotoexit;
pd_count++;
}
/* Bail out if not using the hierarchical CPU topology. */ if (!pd_count) return 0;
/* Link genpd masters/subdomains to model the CPU topology. */
ret = dt_idle_pd_init_topology(np); if (ret) goto remove_pd;
/* let's try to enable OSI. */
ret = psci_set_osi_mode(use_osi); if (ret) goto remove_pd;
pr_info("Initialized CPU PM domain topology using %s mode\n",
use_osi ? "OSI" : "PC"); return 0;
remove_pd:
dt_idle_pd_remove_topology(np);
psci_pd_remove(); exit:
pr_err("failed to create CPU PM domains ret=%d\n", ret); return ret;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.