From b82b6cca488074da3852e8a54fde1d9f74bf1557 Mon Sep 17 00:00:00 2001 From: Daniel Lezcano Date: Wed, 12 Nov 2014 16:03:50 +0100 Subject: 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: Daniel Lezcano Signed-off-by: Rafael J. Wysocki --- arch/sh/kernel/cpu/shmobile/cpuidle.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'arch/sh') diff --git a/arch/sh/kernel/cpu/shmobile/cpuidle.c b/arch/sh/kernel/cpu/shmobile/cpuidle.c index e3abfd4277e2..53b8eeb1db20 100644 --- a/arch/sh/kernel/cpu/shmobile/cpuidle.c +++ b/arch/sh/kernel/cpu/shmobile/cpuidle.c @@ -59,7 +59,6 @@ static struct cpuidle_driver cpuidle_driver = { .exit_latency = 1, .target_residency = 1 * 2, .power_usage = 3, - .flags = CPUIDLE_FLAG_TIME_VALID, .enter = cpuidle_sleep_enter, .name = "C1", .desc = "SuperH Sleep Mode", @@ -68,7 +67,6 @@ static struct cpuidle_driver cpuidle_driver = { .exit_latency = 100, .target_residency = 1 * 2, .power_usage = 1, - .flags = CPUIDLE_FLAG_TIME_VALID, .enter = cpuidle_sleep_enter, .name = "C2", .desc = "SuperH Sleep Mode [SF]", @@ -78,7 +76,6 @@ static struct cpuidle_driver cpuidle_driver = { .exit_latency = 2300, .target_residency = 1 * 2, .power_usage = 1, - .flags = CPUIDLE_FLAG_TIME_VALID, .enter = cpuidle_sleep_enter, .name = "C3", .desc = "SuperH Mobile Standby Mode [SF]", -- cgit v1.2.3-59-g8ed1b From a1518d3bbc15d89ccf33056ffa8b3a63de118d24 Mon Sep 17 00:00:00 2001 From: "Rafael J. Wysocki" Date: Sat, 29 Nov 2014 23:16:34 +0100 Subject: PM / Kconfig: Do not select PM directly from Kconfig files It is not valid to select CONFIG_PM directly without selecting CONFIG_PM_SLEEP or CONFIG_PM_RUNTIME too, because that breaks dependencies (ia64 does that) and it is not necessary to select CONFIG_PM directly if CONFIG_PM_SLEEP or CONFIG_PM_RUNTIME is selected, because CONFIG_PM will be set automatically in that case (sh does that). Fix those mistakes. Acked-by: Geert Uytterhoeven Reviewed-by: Kevin Hilman Signed-off-by: Rafael J. Wysocki --- arch/ia64/Kconfig | 1 - arch/sh/Kconfig | 1 - 2 files changed, 2 deletions(-) (limited to 'arch/sh') diff --git a/arch/ia64/Kconfig b/arch/ia64/Kconfig index 55bc92ca2ce6..536d13b0bea6 100644 --- a/arch/ia64/Kconfig +++ b/arch/ia64/Kconfig @@ -11,7 +11,6 @@ config IA64 select PCI if (!IA64_HP_SIM) select ACPI if (!IA64_HP_SIM) select ARCH_MIGHT_HAVE_ACPI_PDC if ACPI - select PM if (!IA64_HP_SIM) select HAVE_UNSTABLE_SCHED_CLOCK select HAVE_IDE select HAVE_OPROFILE diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig index 244fb4c81e25..a1403470f80e 100644 --- a/arch/sh/Kconfig +++ b/arch/sh/Kconfig @@ -222,7 +222,6 @@ config CPU_SHX3 config ARCH_SHMOBILE bool select ARCH_SUSPEND_POSSIBLE - select PM select PM_RUNTIME config CPU_HAS_PMU -- cgit v1.2.3-59-g8ed1b