diff mbox series

[v2,1/2] sched: Expose idle_cpu() to modules

Message ID 20250619000925.415528-2-pmalani@google.com
State New
Headers show
Series [v2,1/2] sched: Expose idle_cpu() to modules | expand

Commit Message

Prashant Malani June 19, 2025, 12:09 a.m. UTC
idle_cpu() can be helpful in some drivers which can utilize it to make
performance optimizations based on CPU idle state; since these drivers
can be compiled as modules, that prevents them from using idle_cpu().

So, expose the function to be available to modules.

Signed-off-by: Prashant Malani <pmalani@google.com>
---

Patch first introduced in v2.

 kernel/sched/syscalls.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/kernel/sched/syscalls.c b/kernel/sched/syscalls.c
index 547c1f05b667..0fd5e2dafcf7 100644
--- a/kernel/sched/syscalls.c
+++ b/kernel/sched/syscalls.c
@@ -216,6 +216,7 @@  int idle_cpu(int cpu)
 
 	return 1;
 }
+EXPORT_SYMBOL_GPL(idle_cpu);
 
 /**
  * available_idle_cpu - is a given CPU idle for enqueuing work.