diff --git a/kernel/cpu.c b/kernel/cpu.c index e37aad5d45b77..43c573a8a23f0 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -1449,7 +1449,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; }