Skip to content

Commit

Permalink
PM: Provide a config snippet for disabling PM
Browse files Browse the repository at this point in the history
A frequent source of build problems is poor handling of optional PM
support, almost all development is done with the PM options enabled
but they can be turned off.  Currently few if any of the build test
services do this as standard as there is no standard config for it and
the use of selects and def_bool means that simply setting CONFIG_PM=n
doesn't do what is expected.  To make this easier provide a fragement
that can be used with KCONFIG_ALLCONFIG to force PM off.

CONFIG_XEN is disabled as Xen uses hibernation callbacks which end up
turning on power management on architectures with Xen.  Some cpuidle
implementations on ARM select PM so CONFIG_CPU_IDLE is disabled, and
some ARM architectures unconditionally enable PM so they are also
disabled.

Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Rafael J. Wysocki <[email protected]>
  • Loading branch information
broonie authored and rafaeljw committed Dec 4, 2017
1 parent ae64f9b commit 4ab53fe
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -10890,6 +10890,7 @@ F: include/linux/pm.h
F: include/linux/pm_*
F: include/linux/powercap.h
F: drivers/powercap/
F: kernel/configs/nopm.config

POWER STATE COORDINATION INTERFACE (PSCI)
M: Mark Rutland <[email protected]>
Expand Down
15 changes: 15 additions & 0 deletions kernel/configs/nopm.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
CONFIG_PM=n
CONFIG_SUSPEND=n
CONFIG_HIBERNATION=n

# Triggers PM on OMAP
CONFIG_CPU_IDLE=n

# Triggers enablement via hibernate callbacks
CONFIG_XEN=n

# ARM/ARM64 architectures that select PM unconditionally
CONFIG_ARCH_OMAP2PLUS_TYPICAL=n
CONFIG_ARCH_RENESAS=n
CONFIG_ARCH_TEGRA=n
CONFIG_ARCH_VEXPRESS=n

0 comments on commit 4ab53fe

Please sign in to comment.