Skip to content

Commit

Permalink
perf: Fix compile error when HOTPLUG_CPU is disabled
Browse files Browse the repository at this point in the history
Add a stub for perf_event_restart_events() when HOTPLUG_CPU is disabled.

Signed-off-by: Sultan Alsawaf <[email protected]>
  • Loading branch information
kerneltoast authored and dereference23 committed Jun 18, 2023
1 parent c6b0758 commit ae6ccd8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions include/linux/perf_event.h
Original file line number Diff line number Diff line change
Expand Up @@ -1447,8 +1447,12 @@ static struct device_attribute format_attr_##_name = __ATTR_RO(_name)
#ifdef CONFIG_PERF_EVENTS
int perf_event_init_cpu(unsigned int cpu);
int perf_event_exit_cpu(unsigned int cpu);
#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_KEXEC_CORE)
int perf_event_restart_events(unsigned int cpu);
#else
static inline int perf_event_restart_events(unsigned int cpu) { return 0; }
#endif
#else
#define perf_event_init_cpu NULL
#define perf_event_exit_cpu NULL
#define perf_event_restart_events NULL
Expand Down

0 comments on commit ae6ccd8

Please sign in to comment.