Skip to content

Commit 4b072cd

Browse files
storulfrafaeljw
authored andcommitted
cpuidle: psci: Fail cpuidle registration if set OSI mode failed
Currently we allow the cpuidle driver registration to succeed, even if we failed to enable the OSI mode when the hierarchical DT layout is used. This means running in a degraded mode, by using the available idle states per CPU, while also preventing the domain idle states. Moving forward, this behaviour looks quite questionable to maintain, as complexity seems to grow around it, especially when trying to add support for deferred probe, for example. Therefore, let's make the cpuidle driver registration to fail in this situation, thus relying on the default architectural cpuidle backend for WFI to be used. Reviewed-by: Lina Iyer <[email protected]> Signed-off-by: Ulf Hansson <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent 0317561 commit 4b072cd

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

drivers/cpuidle/cpuidle-psci-domain.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ struct psci_pd_provider {
2626
};
2727

2828
static LIST_HEAD(psci_pd_providers);
29-
static bool osi_mode_enabled __initdata;
3029

3130
static int psci_pd_power_off(struct generic_pm_domain *pd)
3231
{
@@ -272,7 +271,6 @@ static int __init psci_idle_init_domains(void)
272271
goto remove_pd;
273272
}
274273

275-
osi_mode_enabled = true;
276274
of_node_put(np);
277275
pr_info("Initialized CPU PM domain topology\n");
278276
return pd_count;
@@ -293,9 +291,6 @@ struct device __init *psci_dt_attach_cpu(int cpu)
293291
{
294292
struct device *dev;
295293

296-
if (!osi_mode_enabled)
297-
return NULL;
298-
299294
dev = dev_pm_domain_attach_by_name(get_cpu_device(cpu), "psci");
300295
if (IS_ERR_OR_NULL(dev))
301296
return dev;

0 commit comments

Comments
 (0)