Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b9ea33ff authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "lpm_levels: Avoid race by preventing hotplug during lpm probe"

parents cfd42c3b 84b9a470
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -1290,10 +1290,12 @@ static int lpm_probe(struct platform_device *pdev)
	int size;
	struct kobject *module_kobj = NULL;

	get_online_cpus();
	lpm_root_node = lpm_of_parse_cluster(pdev);

	if (IS_ERR_OR_NULL(lpm_root_node)) {
		pr_err("%s(): Failed to probe low power modes\n", __func__);
		put_online_cpus();
		return PTR_ERR(lpm_root_node);
	}

@@ -1306,7 +1308,6 @@ static int lpm_probe(struct platform_device *pdev)
	 * core.  BUG in existing code but no known issues possibly because of
	 * how late lpm_levels gets initialized.
	 */
	register_hotcpu_notifier(&lpm_cpu_nblk);
	get_cpu();
	on_each_cpu(setup_broadcast_timer, (void *)true, 1);
	put_cpu();
@@ -1317,6 +1318,7 @@ static int lpm_probe(struct platform_device *pdev)
	if (ret) {
		pr_err("%s: Failed initializing scm_handoff_lock (%d)\n",
			__func__, ret);
		put_online_cpus();
		return ret;
	}

@@ -1326,12 +1328,13 @@ static int lpm_probe(struct platform_device *pdev)
	register_cluster_lpm_stats(lpm_root_node, NULL);

	ret = cluster_cpuidle_register(lpm_root_node);
	put_online_cpus();
	if (ret) {
		pr_err("%s()Failed to register with cpuidle framework\n",
				__func__);
		goto failed;
	}

	register_hotcpu_notifier(&lpm_cpu_nblk);
	module_kobj = kset_find_obj(module_kset, KBUILD_MODNAME);
	if (!module_kobj) {
		pr_err("%s: cannot find kobject for module %s\n",