Loading include/linux/perf_event.h +2 −0 Original line number Diff line number Diff line Loading @@ -1409,9 +1409,11 @@ 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); int perf_event_start_swevents(unsigned int cpu); #else #define perf_event_init_cpu NULL #define perf_event_exit_cpu NULL #define perf_event_start_swevents NULL #endif #endif /* _LINUX_PERF_EVENT_H */ kernel/cpu.c +1 −1 Original line number Diff line number Diff line Loading @@ -1556,7 +1556,7 @@ static struct cpuhp_step cpuhp_ap_states[] = { }, [CPUHP_AP_PERF_ONLINE] = { .name = "perf:online", .startup.single = perf_event_init_cpu, .startup.single = perf_event_start_swevents, .teardown.single = perf_event_exit_cpu, }, [CPUHP_AP_WORKQUEUE_ONLINE] = { Loading kernel/events/core.c +1 −22 Original line number Diff line number Diff line Loading @@ -11226,7 +11226,7 @@ static void perf_event_zombie_cleanup(unsigned int cpu) spin_unlock(&zombie_list_lock); } static int perf_event_start_swevents(unsigned int cpu) int perf_event_start_swevents(unsigned int cpu) { struct perf_event_context *ctx; struct pmu *pmu; Loading Loading @@ -11370,25 +11370,6 @@ static struct notifier_block perf_event_idle_nb = { .notifier_call = event_idle_notif, }; #ifdef CONFIG_HOTPLUG_CPU static int perf_cpu_hp_init(void) { int ret; ret = cpuhp_setup_state_nocalls(CPUHP_AP_PERF_ONLINE, "PERF/CORE/CPUHP_AP_PERF_ONLINE", perf_event_start_swevents, perf_event_exit_cpu); if (ret) pr_err("CPU hotplug notifier for perf core could not be registered: %d\n", ret); return ret; } #else static int perf_cpu_hp_init(void) { return 0; } #endif void __init perf_event_init(void) { int ret, cpu; Loading @@ -11415,8 +11396,6 @@ void __init perf_event_init(void) perf_event_init_cpu(smp_processor_id()); idle_notifier_register(&perf_event_idle_nb); register_reboot_notifier(&perf_reboot_notifier); ret = perf_cpu_hp_init(); WARN(ret, "core perf_cpu_hp_init() failed with: %d", ret); ret = init_hw_breakpoint(); WARN(ret, "hw_breakpoint initialization failed with: %d", ret); Loading Loading
include/linux/perf_event.h +2 −0 Original line number Diff line number Diff line Loading @@ -1409,9 +1409,11 @@ 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); int perf_event_start_swevents(unsigned int cpu); #else #define perf_event_init_cpu NULL #define perf_event_exit_cpu NULL #define perf_event_start_swevents NULL #endif #endif /* _LINUX_PERF_EVENT_H */
kernel/cpu.c +1 −1 Original line number Diff line number Diff line Loading @@ -1556,7 +1556,7 @@ static struct cpuhp_step cpuhp_ap_states[] = { }, [CPUHP_AP_PERF_ONLINE] = { .name = "perf:online", .startup.single = perf_event_init_cpu, .startup.single = perf_event_start_swevents, .teardown.single = perf_event_exit_cpu, }, [CPUHP_AP_WORKQUEUE_ONLINE] = { Loading
kernel/events/core.c +1 −22 Original line number Diff line number Diff line Loading @@ -11226,7 +11226,7 @@ static void perf_event_zombie_cleanup(unsigned int cpu) spin_unlock(&zombie_list_lock); } static int perf_event_start_swevents(unsigned int cpu) int perf_event_start_swevents(unsigned int cpu) { struct perf_event_context *ctx; struct pmu *pmu; Loading Loading @@ -11370,25 +11370,6 @@ static struct notifier_block perf_event_idle_nb = { .notifier_call = event_idle_notif, }; #ifdef CONFIG_HOTPLUG_CPU static int perf_cpu_hp_init(void) { int ret; ret = cpuhp_setup_state_nocalls(CPUHP_AP_PERF_ONLINE, "PERF/CORE/CPUHP_AP_PERF_ONLINE", perf_event_start_swevents, perf_event_exit_cpu); if (ret) pr_err("CPU hotplug notifier for perf core could not be registered: %d\n", ret); return ret; } #else static int perf_cpu_hp_init(void) { return 0; } #endif void __init perf_event_init(void) { int ret, cpu; Loading @@ -11415,8 +11396,6 @@ void __init perf_event_init(void) perf_event_init_cpu(smp_processor_id()); idle_notifier_register(&perf_event_idle_nb); register_reboot_notifier(&perf_reboot_notifier); ret = perf_cpu_hp_init(); WARN(ret, "core perf_cpu_hp_init() failed with: %d", ret); ret = init_hw_breakpoint(); WARN(ret, "hw_breakpoint initialization failed with: %d", ret); Loading