Loading drivers/cpuidle/lpm-levels.c +8 −3 Original line number Diff line number Diff line Loading @@ -1203,6 +1203,7 @@ static void cluster_prepare(struct lpm_cluster *cluster, if (cluster_configure(cluster, i, from_idle, predicted)) goto failed; if (!IS_ERR_OR_NULL(cluster->stats)) cluster->stats->sleep_time = start_time; cluster_prepare(cluster->parent, &cluster->num_children_in_sync, i, from_idle, start_time); Loading @@ -1211,6 +1212,7 @@ static void cluster_prepare(struct lpm_cluster *cluster, return; failed: spin_unlock(&cluster->sync_lock); if (!IS_ERR_OR_NULL(cluster->stats)) cluster->stats->sleep_time = 0; } Loading Loading @@ -1250,7 +1252,7 @@ static void cluster_unprepare(struct lpm_cluster *cluster, if (!first_cpu || cluster->last_level == cluster->default_level) goto unlock_return; if (cluster->stats->sleep_time) if (!IS_ERR_OR_NULL(cluster->stats) && cluster->stats->sleep_time) cluster->stats->sleep_time = end_time - cluster->stats->sleep_time; lpm_stats_cluster_exit(cluster->stats, cluster->last_level, success); Loading Loading @@ -1689,6 +1691,9 @@ static void register_cluster_lpm_stats(struct lpm_cluster *cl, cl->stats = lpm_stats_config_level(cl->cluster_name, level_name, cl->nlevels, parent ? parent->stats : NULL, NULL); if (IS_ERR_OR_NULL(cl->stats)) pr_info("Cluster (%s) stats not registered\n", cl->cluster_name); kfree(level_name); Loading Loading
drivers/cpuidle/lpm-levels.c +8 −3 Original line number Diff line number Diff line Loading @@ -1203,6 +1203,7 @@ static void cluster_prepare(struct lpm_cluster *cluster, if (cluster_configure(cluster, i, from_idle, predicted)) goto failed; if (!IS_ERR_OR_NULL(cluster->stats)) cluster->stats->sleep_time = start_time; cluster_prepare(cluster->parent, &cluster->num_children_in_sync, i, from_idle, start_time); Loading @@ -1211,6 +1212,7 @@ static void cluster_prepare(struct lpm_cluster *cluster, return; failed: spin_unlock(&cluster->sync_lock); if (!IS_ERR_OR_NULL(cluster->stats)) cluster->stats->sleep_time = 0; } Loading Loading @@ -1250,7 +1252,7 @@ static void cluster_unprepare(struct lpm_cluster *cluster, if (!first_cpu || cluster->last_level == cluster->default_level) goto unlock_return; if (cluster->stats->sleep_time) if (!IS_ERR_OR_NULL(cluster->stats) && cluster->stats->sleep_time) cluster->stats->sleep_time = end_time - cluster->stats->sleep_time; lpm_stats_cluster_exit(cluster->stats, cluster->last_level, success); Loading Loading @@ -1689,6 +1691,9 @@ static void register_cluster_lpm_stats(struct lpm_cluster *cl, cl->stats = lpm_stats_config_level(cl->cluster_name, level_name, cl->nlevels, parent ? parent->stats : NULL, NULL); if (IS_ERR_OR_NULL(cl->stats)) pr_info("Cluster (%s) stats not registered\n", cl->cluster_name); kfree(level_name); Loading