diff options
Diffstat (limited to 'kernel')
| -rw-r--r-- | kernel/hw_breakpoint.c | 3 | ||||
| -rw-r--r-- | kernel/perf_event.c | 6 |
2 files changed, 7 insertions, 2 deletions
diff --git a/kernel/hw_breakpoint.c b/kernel/hw_breakpoint.c index 2c9120f0afca..e5325825aeb6 100644 --- a/kernel/hw_breakpoint.c +++ b/kernel/hw_breakpoint.c | |||
| @@ -620,7 +620,7 @@ static struct pmu perf_breakpoint = { | |||
| 620 | .read = hw_breakpoint_pmu_read, | 620 | .read = hw_breakpoint_pmu_read, |
| 621 | }; | 621 | }; |
| 622 | 622 | ||
| 623 | static int __init init_hw_breakpoint(void) | 623 | int __init init_hw_breakpoint(void) |
| 624 | { | 624 | { |
| 625 | unsigned int **task_bp_pinned; | 625 | unsigned int **task_bp_pinned; |
| 626 | int cpu, err_cpu; | 626 | int cpu, err_cpu; |
| @@ -655,6 +655,5 @@ static int __init init_hw_breakpoint(void) | |||
| 655 | 655 | ||
| 656 | return -ENOMEM; | 656 | return -ENOMEM; |
| 657 | } | 657 | } |
| 658 | core_initcall(init_hw_breakpoint); | ||
| 659 | 658 | ||
| 660 | 659 | ||
diff --git a/kernel/perf_event.c b/kernel/perf_event.c index cb6c0d2af68f..f818d9d2dc93 100644 --- a/kernel/perf_event.c +++ b/kernel/perf_event.c | |||
| @@ -31,6 +31,7 @@ | |||
| 31 | #include <linux/kernel_stat.h> | 31 | #include <linux/kernel_stat.h> |
| 32 | #include <linux/perf_event.h> | 32 | #include <linux/perf_event.h> |
| 33 | #include <linux/ftrace_event.h> | 33 | #include <linux/ftrace_event.h> |
| 34 | #include <linux/hw_breakpoint.h> | ||
| 34 | 35 | ||
| 35 | #include <asm/irq_regs.h> | 36 | #include <asm/irq_regs.h> |
| 36 | 37 | ||
| @@ -6321,6 +6322,8 @@ perf_cpu_notify(struct notifier_block *self, unsigned long action, void *hcpu) | |||
| 6321 | 6322 | ||
| 6322 | void __init perf_event_init(void) | 6323 | void __init perf_event_init(void) |
| 6323 | { | 6324 | { |
| 6325 | int ret; | ||
| 6326 | |||
| 6324 | perf_event_init_all_cpus(); | 6327 | perf_event_init_all_cpus(); |
| 6325 | init_srcu_struct(&pmus_srcu); | 6328 | init_srcu_struct(&pmus_srcu); |
| 6326 | perf_pmu_register(&perf_swevent); | 6329 | perf_pmu_register(&perf_swevent); |
| @@ -6328,4 +6331,7 @@ void __init perf_event_init(void) | |||
| 6328 | perf_pmu_register(&perf_task_clock); | 6331 | perf_pmu_register(&perf_task_clock); |
| 6329 | perf_tp_register(); | 6332 | perf_tp_register(); |
| 6330 | perf_cpu_notifier(perf_cpu_notify); | 6333 | perf_cpu_notifier(perf_cpu_notify); |
| 6334 | |||
| 6335 | ret = init_hw_breakpoint(); | ||
| 6336 | WARN(ret, "hw_breakpoint initialization failed with: %d", ret); | ||
| 6331 | } | 6337 | } |
