Impact: fix panic possible panic
Some versions of GCC inline the weak global function if it's empty.
Add a barrier() to work it around.
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
}
u64 __weak hw_perf_save_disable(void) { return 0; }
-void __weak hw_perf_restore(u64 ctrl) { }
-void __weak hw_perf_counter_setup(void) { }
+void __weak hw_perf_restore(u64 ctrl) { barrier(); }
+void __weak hw_perf_counter_setup(void) { barrier(); }
static void
list_add_counter(struct perf_counter *counter, struct perf_counter_context *ctx)