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

Commit e8bb3e00 authored by Deepthi Dharwar's avatar Deepthi Dharwar Committed by Benjamin Herrenschmidt
Browse files

powerpc/cpuidle: Handle power_save=off



This patch makes pseries_idle_driver not to be registered when
power_save=off kernel boot option is specified. The
cpuidle_disable variable used here is similar to
its usage on x86. If cpuidle_disable is set then
sysfs entries for cpuidle framework are not created
and the required drivers are not loaded.

Signed-off-by: default avatarDeepthi Dharwar <deepthi@linux.vnet.ibm.com>
Signed-off-by: default avatarTrinabh Gupta <g.trinabh@gmail.com>
Signed-off-by: default avatarArun R Bharadwaj <arun.r.bharadwaj@gmail.com>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent e179816c
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -382,6 +382,7 @@ static inline unsigned long get_clean_sp(struct pt_regs *regs, int is_32)
}
}
#endif
#endif


extern unsigned long cpuidle_disable;
enum idle_boot_override {IDLE_NO_OVERRIDE = 0, IDLE_POWERSAVE_OFF};
enum idle_boot_override {IDLE_NO_OVERRIDE = 0, IDLE_POWERSAVE_OFF};


#endif /* __KERNEL__ */
#endif /* __KERNEL__ */
+3 −0
Original line number Original line Diff line number Diff line
@@ -269,6 +269,9 @@ static int pseries_idle_probe(void)
	if (!firmware_has_feature(FW_FEATURE_SPLPAR))
	if (!firmware_has_feature(FW_FEATURE_SPLPAR))
		return -ENODEV;
		return -ENODEV;


	if (cpuidle_disable != IDLE_NO_OVERRIDE)
		return -ENODEV;

	if (max_idle_state == 0) {
	if (max_idle_state == 0) {
		printk(KERN_DEBUG "pseries processor idle disabled.\n");
		printk(KERN_DEBUG "pseries processor idle disabled.\n");
		return -EPERM;
		return -EPERM;