diff mbox series

cpuidle: governor: export cpuidle_register_governor

Message ID 20200630191308.23611-1-ilina@codeaurora.org (mailing list archive)
State Superseded
Headers show
Series cpuidle: governor: export cpuidle_register_governor | expand

Commit Message

Lina Iyer June 30, 2020, 7:13 p.m. UTC
Commit 83788c0caed3 ("cpuidle: remove unused exports") removed
capability of registering cpuidle governors. With this change, let's
bring the capability back to allow cpuidle governors to be registered
from a module.

Signed-off-by: Lina Iyer <ilina@codeaurora.org>
---
 drivers/cpuidle/governor.c | 1 +
 include/linux/cpuidle.h    | 1 +
 2 files changed, 2 insertions(+)

Comments

Lina Iyer June 30, 2020, 8:26 p.m. UTC | #1
Please ignore this patch. Will re-send.

Thanks,
Lina

On Tue, Jun 30 2020 at 13:13 -0600, Lina Iyer wrote:
>Commit 83788c0caed3 ("cpuidle: remove unused exports") removed
>capability of registering cpuidle governors. With this change, let's
>bring the capability back to allow cpuidle governors to be registered
>from a module.
>
>Signed-off-by: Lina Iyer <ilina@codeaurora.org>
>---
> drivers/cpuidle/governor.c | 1 +
> include/linux/cpuidle.h    | 1 +
> 2 files changed, 2 insertions(+)
>
>diff --git a/drivers/cpuidle/governor.c b/drivers/cpuidle/governor.c
>index 29acaf48e575..480ec58cffa9 100644
>--- a/drivers/cpuidle/governor.c
>+++ b/drivers/cpuidle/governor.c
>@@ -102,6 +102,7 @@ int cpuidle_register_governor(struct cpuidle_governor *gov)
>
> 	return ret;
> }
>+EXPORT_SYMBOL_GPL(cpuidle_register_governor);
>
> /**
>  * cpuidle_governor_latency_req - Compute a latency constraint for CPU
>diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
>index ec2ef63771f0..cc02ce7eab6c 100644
>--- a/include/linux/cpuidle.h
>+++ b/include/linux/cpuidle.h
>@@ -264,6 +264,7 @@ struct cpuidle_governor {
> 					bool *stop_tick);
> 	void (*reflect)		(struct cpuidle_device *dev, int index);
> };
>+EXPORT_SYMBOL_GPL(cpuidle_governor);
>
> #ifdef CONFIG_CPU_IDLE
> extern int cpuidle_register_governor(struct cpuidle_governor *gov);
>-- 
>The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
>a Linux Foundation Collaborative Project
>
kernel test robot July 1, 2020, 8:19 a.m. UTC | #2
Hi Lina,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on pm/linux-next]
[also build test ERROR on daniel.lezcano/clockevents/next v5.8-rc3 next-20200701]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Lina-Iyer/cpuidle-governor-export-cpuidle_register_governor/20200701-031538
base:   https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: i386-randconfig-s002-20200630 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
        # apt-get install sparse
        # sparse version: v0.6.2-3-gfa153962-dirty
        # save the attached .config to linux build tree
        make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>

All error/warnings (new ones prefixed by >>):

   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from arch/x86/include/asm/percpu.h:45,
                    from arch/x86/include/asm/current.h:6,
                    from include/linux/sched.h:12,
                    from kernel/sched/sched.h:5,
                    from kernel/sched/fair.c:23:
>> include/linux/cpuidle.h:267:19: error: 'cpuidle_governor' undeclared here (not in a function)
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         |                   ^~~~~~~~~~~~~~~~
   include/linux/export.h:98:16: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                ^~~
   include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
     155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
     159 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
>> include/linux/cpuidle.h:267:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         | ^~~~~~~~~~~~~~~~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from arch/x86/include/asm/percpu.h:45,
                    from arch/x86/include/asm/current.h:6,
                    from include/linux/sched.h:12,
                    from kernel/sched/sched.h:5,
                    from kernel/sched/core.c:9:
>> include/linux/cpuidle.h:267:19: error: 'cpuidle_governor' undeclared here (not in a function)
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         |                   ^~~~~~~~~~~~~~~~
   include/linux/export.h:98:16: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                ^~~
   include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
     155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
     159 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
>> include/linux/cpuidle.h:267:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         | ^~~~~~~~~~~~~~~~~
   In file included from kernel/rcu/update.c:587:
   kernel/rcu/tasks.h:405:6: warning: no previous prototype for 'rcu_tasks_postscan' [-Wmissing-prototypes]
     405 | void rcu_tasks_postscan(struct list_head *hop)
         |      ^~~~~~~~~~~~~~~~~~
   kernel/rcu/tasks.h:757:6: warning: no previous prototype for 'rcu_read_unlock_trace_special' [-Wmissing-prototypes]
     757 | void rcu_read_unlock_trace_special(struct task_struct *t, int nesting)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/rcu/tasks.h:1135:6: warning: no previous prototype for 'synchronize_rcu_tasks_trace' [-Wmissing-prototypes]
    1135 | void synchronize_rcu_tasks_trace(void)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from kernel/rcu/update.c:587:
   kernel/rcu/tasks.h:1148:6: warning: no previous prototype for 'rcu_barrier_tasks_trace' [-Wmissing-prototypes]
    1148 | void rcu_barrier_tasks_trace(void)
         |      ^~~~~~~~~~~~~~~~~~~~~~~
   kernel/trace/ftrace.c:305:5: warning: no previous prototype for '__register_ftrace_function' [-Wmissing-prototypes]
     305 | int __register_ftrace_function(struct ftrace_ops *ops)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/trace/ftrace.c:348:5: warning: no previous prototype for '__unregister_ftrace_function' [-Wmissing-prototypes]
     348 | int __unregister_ftrace_function(struct ftrace_ops *ops)
         |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/bpf/core.c:1353:12: warning: no previous prototype for 'bpf_probe_read_kernel' [-Wmissing-prototypes]
    1353 | u64 __weak bpf_probe_read_kernel(void *dst, u32 size, const void *unsafe_ptr)
         |            ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from arch/x86/include/asm/percpu.h:45,
                    from arch/x86/include/asm/current.h:6,
                    from include/linux/sched.h:12,
                    from kernel/sched/sched.h:5,
                    from kernel/sched/wait.c:7:
>> include/linux/cpuidle.h:267:19: error: 'cpuidle_governor' undeclared here (not in a function)
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         |                   ^~~~~~~~~~~~~~~~
   include/linux/export.h:98:16: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                ^~~
   include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
     155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
     159 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
>> include/linux/cpuidle.h:267:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         | ^~~~~~~~~~~~~~~~~
   In file included from kernel/bpf/core.c:21:
   kernel/bpf/core.c: In function '___bpf_prog_run':
   include/linux/filter.h:879:3: warning: cast between incompatible function types from 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} to 'u64 (*)(u64,  u64,  u64,  u64,  u64,  const struct bpf_insn *)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  const struct bpf_insn *)'} [-Wcast-function-type]
     879 |  ((u64 (*)(u64, u64, u64, u64, u64, const struct bpf_insn *)) \
         |   ^
   kernel/bpf/core.c:1521:13: note: in expansion of macro '__bpf_call_base_args'
    1521 |   BPF_R0 = (__bpf_call_base_args + insn->imm)(BPF_R1, BPF_R2,
         |             ^~~~~~~~~~~~~~~~~~~~
   kernel/bpf/core.c: In function 'bpf_patch_call_args':
   include/linux/filter.h:879:3: warning: cast between incompatible function types from 'u64 (*)(u64,  u64,  u64,  u64,  u64)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int)'} to 'u64 (*)(u64,  u64,  u64,  u64,  u64,  const struct bpf_insn *)' {aka 'long long unsigned int (*)(long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  long long unsigned int,  const struct bpf_insn *)'} [-Wcast-function-type]
     879 |  ((u64 (*)(u64, u64, u64, u64, u64, const struct bpf_insn *)) \
         |   ^
   kernel/bpf/core.c:1712:3: note: in expansion of macro '__bpf_call_base_args'
    1712 |   __bpf_call_base_args;
         |   ^~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from arch/x86/include/asm/percpu.h:45,
                    from arch/x86/include/asm/current.h:6,
                    from include/linux/sched.h:12,
                    from kernel/sched/sched.h:5,
                    from kernel/sched/loadavg.c:9:
>> include/linux/cpuidle.h:267:19: error: 'cpuidle_governor' undeclared here (not in a function)
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         |                   ^~~~~~~~~~~~~~~~
   include/linux/export.h:98:16: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                ^~~
   include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
     155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
     159 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
>> include/linux/cpuidle.h:267:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         | ^~~~~~~~~~~~~~~~~
   kernel/trace/ftrace.c:3801:15: warning: no previous prototype for 'arch_ftrace_match_adjust' [-Wmissing-prototypes]
    3801 | char * __weak arch_ftrace_match_adjust(char *str, const char *search)
         |               ^~~~~~~~~~~~~~~~~~~~~~~~
   kernel/trace/ftrace.c: In function 'process_mod_list':
   kernel/trace/ftrace.c:4112:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
    4112 |  int ret;
         |      ^~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from arch/x86/include/asm/percpu.h:45,
                    from arch/x86/include/asm/current.h:6,
                    from include/linux/sched.h:12,
                    from kernel/sched/sched.h:5,
                    from kernel/sched/clock.c:56:
>> include/linux/cpuidle.h:267:19: error: 'cpuidle_governor' undeclared here (not in a function)
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         |                   ^~~~~~~~~~~~~~~~
   include/linux/export.h:98:16: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                ^~~
   include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
     155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
     159 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
>> include/linux/cpuidle.h:267:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         | ^~~~~~~~~~~~~~~~~
   kernel/trace/ftrace.c: In function 'ftrace_regex_release':
   kernel/trace/ftrace.c:5517:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
    5517 |  int ret;
         |      ^~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from arch/x86/include/asm/percpu.h:45,
                    from arch/x86/include/asm/current.h:6,
                    from include/linux/sched.h:12,
                    from kernel/sched/sched.h:5,
                    from kernel/sched/rt.c:6:
>> include/linux/cpuidle.h:267:19: error: 'cpuidle_governor' undeclared here (not in a function)
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         |                   ^~~~~~~~~~~~~~~~
   include/linux/export.h:98:16: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                ^~~
   include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
     155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
     159 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
>> include/linux/cpuidle.h:267:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         | ^~~~~~~~~~~~~~~~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from arch/x86/include/asm/percpu.h:45,
                    from arch/x86/include/asm/current.h:6,
                    from include/linux/sched.h:12,
                    from kernel/sched/sched.h:5,
                    from kernel/sched/cputime.c:5:
>> include/linux/cpuidle.h:267:19: error: 'cpuidle_governor' undeclared here (not in a function)
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         |                   ^~~~~~~~~~~~~~~~
   include/linux/export.h:98:16: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                ^~~
   include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
     155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
     159 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
>> include/linux/cpuidle.h:267:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         | ^~~~~~~~~~~~~~~~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from arch/x86/include/asm/percpu.h:45,
                    from arch/x86/include/asm/current.h:6,
                    from include/linux/sched.h:12,
                    from kernel/sched/sched.h:5,
                    from kernel/sched/deadline.c:18:
>> include/linux/cpuidle.h:267:19: error: 'cpuidle_governor' undeclared here (not in a function)
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         |                   ^~~~~~~~~~~~~~~~
   include/linux/export.h:98:16: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                ^~~
   include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
     155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
     159 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
>> include/linux/cpuidle.h:267:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         | ^~~~~~~~~~~~~~~~~
   kernel/panic.c:85:13: warning: no previous prototype for 'panic_smp_self_stop' [-Wmissing-prototypes]
      85 | void __weak panic_smp_self_stop(void)
         |             ^~~~~~~~~~~~~~~~~~~
   kernel/panic.c:95:13: warning: no previous prototype for 'nmi_panic_self_stop' [-Wmissing-prototypes]
      95 | void __weak nmi_panic_self_stop(struct pt_regs *regs)
         |             ^~~~~~~~~~~~~~~~~~~
   kernel/panic.c:106:13: warning: no previous prototype for 'crash_smp_send_stop' [-Wmissing-prototypes]
     106 | void __weak crash_smp_send_stop(void)
         |             ^~~~~~~~~~~~~~~~~~~
   kernel/panic.c: In function '__warn':
   kernel/panic.c:590:3: warning: function '__warn' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
     590 |   vprintk(args->fmt, args->args);
         |   ^~~~~~~
   kernel/panic.c: At top level:
   kernel/panic.c:683:24: warning: no previous prototype for '__stack_chk_fail' [-Wmissing-prototypes]
     683 | __visible noinstr void __stack_chk_fail(void)
         |                        ^~~~~~~~~~~~~~~~
   kernel/sched/fair.c:5352:6: warning: no previous prototype for 'init_cfs_bandwidth' [-Wmissing-prototypes]
    5352 | void init_cfs_bandwidth(struct cfs_bandwidth *cfs_b) {}
         |      ^~~~~~~~~~~~~~~~~~
   make[3]: *** [scripts/Makefile.build:281: kernel/sched/clock.o] Error 1
   make[3]: *** [scripts/Makefile.build:281: kernel/sched/wait.o] Error 1
   kernel/sched/fair.c:11078:6: warning: no previous prototype for 'free_fair_sched_group' [-Wmissing-prototypes]
   11078 | void free_fair_sched_group(struct task_group *tg) { }
         |      ^~~~~~~~~~~~~~~~~~~~~
   kernel/sched/fair.c:11080:5: warning: no previous prototype for 'alloc_fair_sched_group' [-Wmissing-prototypes]
   11080 | int alloc_fair_sched_group(struct task_group *tg, struct task_group *parent)
         |     ^~~~~~~~~~~~~~~~~~~~~~
   kernel/sched/fair.c:11085:6: warning: no previous prototype for 'online_fair_sched_group' [-Wmissing-prototypes]
   11085 | void online_fair_sched_group(struct task_group *tg) { }
         |      ^~~~~~~~~~~~~~~~~~~~~~~
   kernel/sched/fair.c:11087:6: warning: no previous prototype for 'unregister_fair_sched_group' [-Wmissing-prototypes]
   11087 | void unregister_fair_sched_group(struct task_group *tg) { }
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   make[3]: *** [scripts/Makefile.build:281: kernel/sched/cputime.o] Error 1
   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from arch/x86/include/asm/percpu.h:45,
                    from arch/x86/include/asm/current.h:6,
                    from include/linux/sched.h:12,
                    from kernel/sched/sched.h:5,
                    from kernel/sched/idle.c:9:
>> include/linux/cpuidle.h:267:19: error: 'cpuidle_governor' undeclared here (not in a function)
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         |                   ^~~~~~~~~~~~~~~~
   include/linux/export.h:98:16: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                ^~~
   include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
     155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
     159 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
>> include/linux/cpuidle.h:267:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         | ^~~~~~~~~~~~~~~~~
   make[3]: *** [scripts/Makefile.build:281: kernel/sched/fair.o] Error 1
   make[3]: *** [scripts/Makefile.build:281: kernel/sched/deadline.o] Error 1
   kernel/sched/core.c:2117:6: warning: no previous prototype for 'sched_set_stop_task' [-Wmissing-prototypes]
    2117 | void sched_set_stop_task(int cpu, struct task_struct *stop)
         |      ^~~~~~~~~~~~~~~~~~~
   make[3]: *** [scripts/Makefile.build:281: kernel/sched/loadavg.o] Error 1
   kernel/sched/rt.c:253:6: warning: no previous prototype for 'free_rt_sched_group' [-Wmissing-prototypes]
     253 | void free_rt_sched_group(struct task_group *tg) { }
         |      ^~~~~~~~~~~~~~~~~~~
   kernel/sched/rt.c:255:5: warning: no previous prototype for 'alloc_rt_sched_group' [-Wmissing-prototypes]
     255 | int alloc_rt_sched_group(struct task_group *tg, struct task_group *parent)
         |     ^~~~~~~~~~~~~~~~~~~~
   kernel/sched/rt.c:668:6: warning: no previous prototype for 'sched_rt_bandwidth_account' [-Wmissing-prototypes]
     668 | bool sched_rt_bandwidth_account(struct rt_rq *rt_rq)
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~
   make[3]: *** [scripts/Makefile.build:281: kernel/sched/core.o] Error 1
   make[3]: *** [scripts/Makefile.build:281: kernel/sched/rt.o] Error 1
   kernel/trace/trace_seq.c:142: warning: Function parameter or member 'args' not described in 'trace_seq_vprintf'
   kernel/trace/trace_output.c: In function 'trace_output_raw':
   kernel/trace/trace_output.c:321:2: warning: function 'trace_output_raw' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
     321 |  trace_seq_vprintf(s, fmt, ap);
         |  ^~~~~~~~~~~~~~~~~
   kernel/events/core.c:6490:6: warning: no previous prototype for 'perf_pmu_snapshot_aux' [-Wmissing-prototypes]
    6490 | long perf_pmu_snapshot_aux(struct perf_buffer *rb,
         |      ^~~~~~~~~~~~~~~~~~~~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from arch/x86/include/asm/percpu.h:45,
                    from arch/x86/include/asm/current.h:6,
                    from include/linux/sched.h:12,
                    from kernel/sched/sched.h:5,
                    from kernel/sched/wait_bit.c:5:
>> include/linux/cpuidle.h:267:19: error: 'cpuidle_governor' undeclared here (not in a function)
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         |                   ^~~~~~~~~~~~~~~~
   include/linux/export.h:98:16: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                ^~~
   include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
     155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
     159 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
>> include/linux/cpuidle.h:267:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         | ^~~~~~~~~~~~~~~~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from arch/x86/include/asm/percpu.h:45,
                    from arch/x86/include/asm/current.h:6,
                    from include/linux/sched.h:12,
                    from kernel/sched/sched.h:5,
                    from kernel/sched/swait.c:5:
   include/linux/cpuidle.h:267:19: error: 'cpuidle_governor' undeclared here (not in a function)
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         |                   ^~~~~~~~~~~~~~~~
   include/linux/export.h:98:16: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                ^~~
   include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
     155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
     159 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
   include/linux/cpuidle.h:267:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         | ^~~~~~~~~~~~~~~~~
   make[3]: *** [scripts/Makefile.build:281: kernel/sched/wait_bit.o] Error 1
   make[3]: *** [scripts/Makefile.build:281: kernel/sched/idle.o] Error 1
   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from arch/x86/include/asm/percpu.h:45,
                    from arch/x86/include/asm/current.h:6,
                    from include/linux/sched.h:12,
                    from kernel/sched/sched.h:5,
                    from kernel/sched/completion.c:14:
   include/linux/cpuidle.h:267:19: error: 'cpuidle_governor' undeclared here (not in a function)
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         |                   ^~~~~~~~~~~~~~~~
   include/linux/export.h:98:16: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                ^~~
   include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
     155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
     159 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
   include/linux/cpuidle.h:267:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         | ^~~~~~~~~~~~~~~~~
   kernel/trace/ftrace.c:5306: warning: Function parameter or member 'ops' not described in 'ftrace_set_filter_ip'
   kernel/trace/ftrace.c:5306: warning: Function parameter or member 'ip' not described in 'ftrace_set_filter_ip'
   kernel/trace/ftrace.c:5306: warning: Function parameter or member 'remove' not described in 'ftrace_set_filter_ip'
   kernel/trace/ftrace.c:5306: warning: Function parameter or member 'reset' not described in 'ftrace_set_filter_ip'
   kernel/trace/ftrace.c:5320: warning: Function parameter or member 'ops' not described in 'ftrace_ops_set_global_filter'
   kernel/trace/ftrace.c:5348: warning: Function parameter or member 'ops' not described in 'ftrace_set_filter'
   kernel/trace/ftrace.c:5348: warning: Function parameter or member 'buf' not described in 'ftrace_set_filter'
   kernel/trace/ftrace.c:5348: warning: Function parameter or member 'len' not described in 'ftrace_set_filter'
   kernel/trace/ftrace.c:5348: warning: Function parameter or member 'reset' not described in 'ftrace_set_filter'
   kernel/trace/ftrace.c:5367: warning: Function parameter or member 'ops' not described in 'ftrace_set_notrace'
   kernel/trace/ftrace.c:5367: warning: Function parameter or member 'buf' not described in 'ftrace_set_notrace'
   kernel/trace/ftrace.c:5367: warning: Function parameter or member 'len' not described in 'ftrace_set_notrace'
   kernel/trace/ftrace.c:5367: warning: Function parameter or member 'reset' not described in 'ftrace_set_notrace'
   kernel/trace/ftrace.c:5382: warning: Function parameter or member 'buf' not described in 'ftrace_set_global_filter'
   kernel/trace/ftrace.c:5382: warning: Function parameter or member 'len' not described in 'ftrace_set_global_filter'
   kernel/trace/ftrace.c:5382: warning: Function parameter or member 'reset' not described in 'ftrace_set_global_filter'
   kernel/trace/ftrace.c:5398: warning: Function parameter or member 'buf' not described in 'ftrace_set_global_notrace'
   kernel/trace/ftrace.c:5398: warning: Function parameter or member 'len' not described in 'ftrace_set_global_notrace'
   kernel/trace/ftrace.c:5398: warning: Function parameter or member 'reset' not described in 'ftrace_set_global_notrace'
   kernel/trace/ftrace.c:7374: warning: Function parameter or member 'ops' not described in 'register_ftrace_function'
   kernel/trace/ftrace.c:7396: warning: Function parameter or member 'ops' not described in 'unregister_ftrace_function'
   kernel/exit.c:1714:13: warning: no previous prototype for 'abort' [-Wmissing-prototypes]
    1714 | __weak void abort(void)
         |             ^~~~~
   In file included from include/linux/linkage.h:7,
                    from include/linux/kernel.h:8,
                    from arch/x86/include/asm/percpu.h:45,
                    from arch/x86/include/asm/current.h:6,
                    from include/linux/sched.h:12,
                    from kernel/sched/sched.h:5,
                    from kernel/sched/cpupri.c:25:
   include/linux/cpuidle.h:267:19: error: 'cpuidle_governor' undeclared here (not in a function)
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         |                   ^~~~~~~~~~~~~~~~
   include/linux/export.h:98:16: note: in definition of macro '___EXPORT_SYMBOL'
      98 |  extern typeof(sym) sym;       \
         |                ^~~
   include/linux/export.h:155:34: note: in expansion of macro '__EXPORT_SYMBOL'
     155 | #define _EXPORT_SYMBOL(sym, sec) __EXPORT_SYMBOL(sym, sec, "")
         |                                  ^~~~~~~~~~~~~~~
   include/linux/export.h:159:33: note: in expansion of macro '_EXPORT_SYMBOL'
     159 | #define EXPORT_SYMBOL_GPL(sym)  _EXPORT_SYMBOL(sym, "_gpl")
         |                                 ^~~~~~~~~~~~~~
   include/linux/cpuidle.h:267:1: note: in expansion of macro 'EXPORT_SYMBOL_GPL'
     267 | EXPORT_SYMBOL_GPL(cpuidle_governor);
         | ^~~~~~~~~~~~~~~~~
   kernel/trace/ring_buffer.c:1141: warning: Function parameter or member 'cpu_buffer' not described in 'rb_check_list'
   kernel/trace/ring_buffer.c:1141: warning: Function parameter or member 'list' not described in 'rb_check_list'
   make[3]: *** [scripts/Makefile.build:281: kernel/sched/swait.o] Error 1
   kernel/rcu/tree.c:969: warning: Excess function parameter 'irq' description in 'rcu_nmi_enter'
   kernel/rcu/tree.c:3024: warning: Function parameter or member 'count' not described in 'kfree_rcu_cpu'
   In file included from include/linux/linkage.h:7,
..

vim +/cpuidle_governor +267 include/linux/cpuidle.h

   247	
   248	/******************************
   249	 * CPUIDLE GOVERNOR INTERFACE *
   250	 ******************************/
   251	
   252	struct cpuidle_governor {
   253		char			name[CPUIDLE_NAME_LEN];
   254		struct list_head 	governor_list;
   255		unsigned int		rating;
   256	
   257		int  (*enable)		(struct cpuidle_driver *drv,
   258						struct cpuidle_device *dev);
   259		void (*disable)		(struct cpuidle_driver *drv,
   260						struct cpuidle_device *dev);
   261	
   262		int  (*select)		(struct cpuidle_driver *drv,
   263						struct cpuidle_device *dev,
   264						bool *stop_tick);
   265		void (*reflect)		(struct cpuidle_device *dev, int index);
   266	};
 > 267	EXPORT_SYMBOL_GPL(cpuidle_governor);
   268	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
diff mbox series

Patch

diff --git a/drivers/cpuidle/governor.c b/drivers/cpuidle/governor.c
index 29acaf48e575..480ec58cffa9 100644
--- a/drivers/cpuidle/governor.c
+++ b/drivers/cpuidle/governor.c
@@ -102,6 +102,7 @@  int cpuidle_register_governor(struct cpuidle_governor *gov)
 
 	return ret;
 }
+EXPORT_SYMBOL_GPL(cpuidle_register_governor);
 
 /**
  * cpuidle_governor_latency_req - Compute a latency constraint for CPU
diff --git a/include/linux/cpuidle.h b/include/linux/cpuidle.h
index ec2ef63771f0..cc02ce7eab6c 100644
--- a/include/linux/cpuidle.h
+++ b/include/linux/cpuidle.h
@@ -264,6 +264,7 @@  struct cpuidle_governor {
 					bool *stop_tick);
 	void (*reflect)		(struct cpuidle_device *dev, int index);
 };
+EXPORT_SYMBOL_GPL(cpuidle_governor);
 
 #ifdef CONFIG_CPU_IDLE
 extern int cpuidle_register_governor(struct cpuidle_governor *gov);