diff mbox series

[1/4] tick/sched: Export symbols used by cpuidle governors

Message ID 1637830481-21709-2-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
Export symbols that are used by cpuidle menu, ladder and teo governors
in preparation to allow cpuidle governors to be compiled as modules.

Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Maulik Shah <quic_mkshah@quicinc.com>
---
 kernel/time/tick-sched.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Thomas Gleixner Nov. 30, 2021, 11:12 p.m. UTC | #1
On Thu, Nov 25 2021 at 14:24, Maulik Shah wrote:
>  bool tick_nohz_enabled __read_mostly  = true;
> +EXPORT_SYMBOL(tick_nohz_enabled);

If any of this gets ever exported then with EXPORT_SYMBOL_GPL(), but I
agree with Rafael that there is no real value for this, so the exports
are not required either.

Thanks,

        tglx
diff mbox series

Patch

diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c
index 6bffe5af..7cc6619 100644
--- a/kernel/time/tick-sched.c
+++ b/kernel/time/tick-sched.c
@@ -573,6 +573,8 @@  void __init tick_nohz_init(void)
  * NO HZ enabled ?
  */
 bool tick_nohz_enabled __read_mostly  = true;
+EXPORT_SYMBOL(tick_nohz_enabled);
+
 unsigned long tick_nohz_active  __read_mostly;
 /*
  * Enable / Disable tickless mode
@@ -590,6 +592,7 @@  bool tick_nohz_tick_stopped(void)
 
 	return ts->tick_stopped;
 }
+EXPORT_SYMBOL(tick_nohz_tick_stopped);
 
 bool tick_nohz_tick_stopped_cpu(int cpu)
 {
@@ -1147,6 +1150,7 @@  bool tick_nohz_idle_got_tick(void)
 	}
 	return false;
 }
+EXPORT_SYMBOL(tick_nohz_idle_got_tick);
 
 /**
  * tick_nohz_get_next_hrtimer - return the next expiration time for the hrtimer
@@ -1202,6 +1206,7 @@  ktime_t tick_nohz_get_sleep_length(ktime_t *delta_next)
 
 	return ktime_sub(next_event, now);
 }
+EXPORT_SYMBOL(tick_nohz_get_sleep_length);
 
 /**
  * tick_nohz_get_idle_calls_cpu - return the current idle calls counter value