[PATCH v2 1/2] sched: Expose idle_cpu() to modules
From: Prashant Malani
Date: Wed Jun 18 2025 - 20:09:54 EST
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@xxxxxxxxxx>
---
Patch first introduced in v2.
kernel/sched/syscalls.c | 1 +
1 file changed, 1 insertion(+)
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.
--
2.50.0.rc2.701.gf1e915cc24-goog