On Thu, Nov 03, 2022 at 03:43:03PM -0700, Florian Fainelli wrote:
The original commit that introduced those stubs was already at fault,
but in the absence of a caller of perf_event_{init,exit}_cpu outside of
code that is compiled regardless of CONFIG_PERF_EVENTS, the build
failure cannot be observed. This was observed with the Android kernel to
produce a build failure similar to this:
In file included from ./include/uapi/linux/posix_types.h:5,
from ./include/uapi/linux/types.h:14,
from ./include/linux/types.h:6,
from ./include/linux/limits.h:6,
from ./include/linux/kernel.h:7,
from ./include/linux/sched/mm.h:5,
from kernel/cpu.c:6:
kernel/cpu.c: In function 'random_and_perf_prepare_fusion':
./include/linux/stddef.h:8:14: error: called object is not a function or function pointer
#define NULL ((void *)0)
^
./include/linux/perf_event.h:1607:29: note: in expansion of macro 'NULL'
#define perf_event_init_cpu NULL
^~~~
kernel/cpu.c:1686:2: note: in expansion of macro 'perf_event_init_cpu'
perf_event_init_cpu(cpu);
^~~~~~~~~~~~~~~~~~~
What is the actual problem reported here? Did you see all the other NULL
assignments in cpuhp_hp_states ?