diff mbox series

[4/4] cpuidle: governors: Allow the governors to be compiled as modules

Message ID 1637830481-21709-5-git-send-email-quic_mkshah@quicinc.com (mailing list archive)
State Not Applicable, archived
Headers show
Series Allow cpuidle governors to be compiled as modules | expand

Commit Message

Maulik Shah Nov. 25, 2021, 8:54 a.m. UTC
Allow the menu, ladder and teo governors to be compiled as modules
when building allmodconfig.

Signed-off-by: Maulik Shah <quic_mkshah@quicinc.com>
---
 drivers/cpuidle/Kconfig            | 6 +++---
 drivers/cpuidle/governors/ladder.c | 4 ++++
 drivers/cpuidle/governors/menu.c   | 4 ++++
 drivers/cpuidle/governors/teo.c    | 4 ++++
 4 files changed, 15 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/drivers/cpuidle/Kconfig b/drivers/cpuidle/Kconfig
index c0aeedd..d71e3e4 100644
--- a/drivers/cpuidle/Kconfig
+++ b/drivers/cpuidle/Kconfig
@@ -19,13 +19,13 @@  config CPU_IDLE_MULTIPLE_DRIVERS
 	bool
 
 config CPU_IDLE_GOV_LADDER
-	bool "Ladder governor (for periodic timer tick)"
+	tristate "Ladder governor (for periodic timer tick)"
 
 config CPU_IDLE_GOV_MENU
-	bool "Menu governor (for tickless system)"
+	tristate "Menu governor (for tickless system)"
 
 config CPU_IDLE_GOV_TEO
-	bool "Timer events oriented (TEO) governor (for tickless systems)"
+	tristate "Timer events oriented (TEO) governor (for tickless systems)"
 	help
 	  This governor implements a simplified idle state selection method
 	  focused on timer events and does not do any interactivity boosting.
diff --git a/drivers/cpuidle/governors/ladder.c b/drivers/cpuidle/governors/ladder.c
index 8e9058c..4de5b3d 100644
--- a/drivers/cpuidle/governors/ladder.c
+++ b/drivers/cpuidle/governors/ladder.c
@@ -15,6 +15,7 @@ 
 #include <linux/kernel.h>
 #include <linux/cpuidle.h>
 #include <linux/jiffies.h>
+#include <linux/module.h>
 #include <linux/tick.h>
 
 #include <asm/io.h>
@@ -195,3 +196,6 @@  static int __init init_ladder(void)
 }
 
 postcore_initcall(init_ladder);
+
+MODULE_DESCRIPTION("CPUidle Ladder governor (for periodic timer tick)");
+MODULE_LICENSE("GPL v2");
diff --git a/drivers/cpuidle/governors/menu.c b/drivers/cpuidle/governors/menu.c
index 2e56704..2ef7cfc 100644
--- a/drivers/cpuidle/governors/menu.c
+++ b/drivers/cpuidle/governors/menu.c
@@ -13,6 +13,7 @@ 
 #include <linux/time.h>
 #include <linux/ktime.h>
 #include <linux/hrtimer.h>
+#include <linux/module.h>
 #include <linux/tick.h>
 #include <linux/sched.h>
 #include <linux/sched/loadavg.h>
@@ -577,3 +578,6 @@  static int __init init_menu(void)
 }
 
 postcore_initcall(init_menu);
+
+MODULE_DESCRIPTION("CPUidle Menu governor (for tickless system)");
+MODULE_LICENSE("GPL v2");
diff --git a/drivers/cpuidle/governors/teo.c b/drivers/cpuidle/governors/teo.c
index d9262db..1a1d9ef 100644
--- a/drivers/cpuidle/governors/teo.c
+++ b/drivers/cpuidle/governors/teo.c
@@ -104,6 +104,7 @@ 
 #include <linux/cpuidle.h>
 #include <linux/jiffies.h>
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/sched/clock.h>
 #include <linux/tick.h>
 
@@ -532,3 +533,6 @@  static int __init teo_governor_init(void)
 }
 
 postcore_initcall(teo_governor_init);
+
+MODULE_DESCRIPTION("CPUidle Timer events oriented (TEO) governor (for tickless systems)");
+MODULE_LICENSE("GPL v2");