ANDROID: Fix kenelci build-break for !CONFIG_PERF_EVENTS

Kernelci builds were broken if !CONFIG_PERF_EVENTS since 830f0202d7 ("ANDROID: cpu/hotplug:
avoid breaking Android ABI by fusing cpuhp steps") causes
perf_event_init_cpu(cpu) to be reduced to "NULL(cpu)":

kernel/cpu.c:1868:21: error: called object type 'void *' is not a function or function pointer

Fixes: 830f0202d7 ("ANDROID: cpu/hotplug: avoid breaking Android ABI by fusing cpuhp steps")
Signed-off-by: Todd Kjos <tkjos@google.com>
Change-Id: Ifc7351f74470c87018770395af4b4f6096f0d73f
This commit is contained in:
Todd Kjos
2022-10-06 18:00:02 +00:00
parent 24220df802
commit b046e2dca5

View File

@@ -1865,7 +1865,9 @@ int __boot_cpu_id;
/* Horrific hacks because we can't add more to cpuhp_hp_states. */
static int random_and_perf_prepare_fusion(unsigned int cpu)
{
#ifdef CONFIG_PERF_EVENTS
perf_event_init_cpu(cpu);
#endif
random_prepare_cpu(cpu);
return 0;
}