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

Commit c5e6208d authored by Manoj Vishwanathan's avatar Manoj Vishwanathan
Browse files

cpuidle: lpm-levels: removing trace calls in idle



LOCKDEP complains about a potential "suspicious RCU usage" in calling
trace calls in cpu-idle.

Change-Id: I59711a4a9bded246cac8b433bd1756269a17e153
Signed-off-by: default avatarManoj Vishwanathan <mvishwan@codeaurora.org>
parent 03d27647
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0-only

/* Copyright (c) 2012-2020, The Linux Foundation. All rights reserved.
/* Copyright (c) 2012-2021, The Linux Foundation. All rights reserved.
 * Copyright (C) 2006-2007 Adam Belay <abelay@novell.com>
 * Copyright (C) 2009 Intel Corporation
 */
@@ -31,6 +31,7 @@
#include <linux/sched/clock.h>
#include <linux/sched/idle.h>
#include <linux/sched/stat.h>
#include <linux/rcupdate.h>
#include <linux/psci.h>
#include <soc/qcom/pm.h>
#include <soc/qcom/lpm_levels.h>
@@ -1445,8 +1446,8 @@ static void update_history(struct cpuidle_device *dev, int idx)

	history->mode[history->hptr] = idx;

	trace_cpu_pred_hist(history->mode[history->hptr],
		history->resi[history->hptr], history->hptr, tmr);
	RCU_NONIDLE(trace_cpu_pred_hist(history->mode[history->hptr],
		history->resi[history->hptr], history->hptr, tmr));

	if (history->nsamp < MAXSAMPLES)
		history->nsamp++;
@@ -1472,7 +1473,7 @@ static int lpm_cpuidle_enter(struct cpuidle_device *dev,
	cpu_prepare(cpu, idx, true);
	cluster_prepare(cpu->parent, cpumask, idx, true, start_time);

	trace_cpu_idle_enter(idx);
	RCU_NONIDLE(trace_cpu_idle_enter(idx));
	lpm_stats_cpu_enter(idx, start_time);

	if (need_resched() || is_IPI_pending(cpumask_of(dev->cpu)))
@@ -1494,7 +1495,7 @@ static int lpm_cpuidle_enter(struct cpuidle_device *dev,
	cpu_unprepare(cpu, idx, true);
	dev->last_residency = ktime_us_delta(ktime_get(), start);
	update_history(dev, idx);
	trace_cpu_idle_exit(idx, ret);
	RCU_NONIDLE(trace_cpu_idle_exit(idx, ret));
	if (lpm_prediction && cpu->lpm_prediction) {
		histtimer_cancel();
		clusttimer_cancel();