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

Commit b82b6cca authored by Daniel Lezcano's avatar Daniel Lezcano Committed by Rafael J. Wysocki
Browse files

cpuidle: Invert CPUIDLE_FLAG_TIME_VALID logic



The only place where the time is invalid is when the ACPI_CSTATE_FFH entry
method is not set. Otherwise for all the drivers, the time can be correctly
measured.

Instead of duplicating the CPUIDLE_FLAG_TIME_VALID flag in all the drivers
for all the states, just invert the logic by replacing it by the flag
CPUIDLE_FLAG_TIME_INVALID, hence we can set this flag only for the acpi idle
driver, remove the former flag from all the drivers and invert the logic with
this flag in the different governor.

Signed-off-by: default avatarDaniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 206c5f60
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -15,7 +15,6 @@ static inline int arm_cpuidle_simple_enter(struct cpuidle_device *dev,
	.exit_latency           = 1,\
	.target_residency       = 1,\
	.power_usage		= p,\
	.flags                  = CPUIDLE_FLAG_TIME_VALID,\
	.name                   = "WFI",\
	.desc                   = "ARM WFI",\
}
+0 −1
Original line number Diff line number Diff line
@@ -66,7 +66,6 @@ static struct cpuidle_driver davinci_idle_driver = {
		.enter			= davinci_enter_idle,
		.exit_latency		= 10,
		.target_residency	= 10000,
		.flags			= CPUIDLE_FLAG_TIME_VALID,
		.name			= "DDR SR",
		.desc			= "WFI and DDR Self Refresh",
	},
+0 −1
Original line number Diff line number Diff line
@@ -24,7 +24,6 @@ static struct cpuidle_driver imx5_cpuidle_driver = {
		.enter            = imx5_cpuidle_enter,
		.exit_latency     = 2,
		.target_residency = 1,
		.flags            = CPUIDLE_FLAG_TIME_VALID,
		.name             = "IMX5 SRPG",
		.desc             = "CPU state retained,powered off",
	},
+1 −2
Original line number Diff line number Diff line
@@ -53,8 +53,7 @@ static struct cpuidle_driver imx6q_cpuidle_driver = {
		{
			.exit_latency = 50,
			.target_residency = 75,
			.flags = CPUIDLE_FLAG_TIME_VALID |
			         CPUIDLE_FLAG_TIMER_STOP,
			.flags = CPUIDLE_FLAG_TIMER_STOP,
			.enter = imx6q_enter_wait,
			.name = "WAIT",
			.desc = "Clock off",
+1 −2
Original line number Diff line number Diff line
@@ -40,8 +40,7 @@ static struct cpuidle_driver imx6sl_cpuidle_driver = {
		{
			.exit_latency = 50,
			.target_residency = 75,
			.flags = CPUIDLE_FLAG_TIME_VALID |
				CPUIDLE_FLAG_TIMER_STOP,
			.flags = CPUIDLE_FLAG_TIMER_STOP,
			.enter = imx6sl_enter_wait,
			.name = "WAIT",
			.desc = "Clock off",
Loading