diff options
author | Yinghai Lu <yinghai@kernel.org> | 2008-12-27 00:05:06 -0500 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-12-27 05:58:48 -0500 |
commit | 01ea1ccaa24dea3552e103be13b7897211607a8b (patch) | |
tree | 38c1e83ba1e144113307a6763cdccaf3d6727869 /kernel/perf_counter.c | |
parent | e44aef58ecfbe061eb4c53b939bcc35fb1bee82d (diff) |
perf_counter: more barrier in blank weak function
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>
Diffstat (limited to 'kernel/perf_counter.c')
-rw-r--r-- | kernel/perf_counter.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/perf_counter.c b/kernel/perf_counter.c index d7a79f321b1c..37f771691f93 100644 --- a/kernel/perf_counter.c +++ b/kernel/perf_counter.c | |||
@@ -45,8 +45,8 @@ hw_perf_counter_init(struct perf_counter *counter) | |||
45 | } | 45 | } |
46 | 46 | ||
47 | u64 __weak hw_perf_save_disable(void) { return 0; } | 47 | u64 __weak hw_perf_save_disable(void) { return 0; } |
48 | void __weak hw_perf_restore(u64 ctrl) { } | 48 | void __weak hw_perf_restore(u64 ctrl) { barrier(); } |
49 | void __weak hw_perf_counter_setup(void) { } | 49 | void __weak hw_perf_counter_setup(void) { barrier(); } |
50 | 50 | ||
51 | static void | 51 | static void |
52 | list_add_counter(struct perf_counter *counter, struct perf_counter_context *ctx) | 52 | list_add_counter(struct perf_counter *counter, struct perf_counter_context *ctx) |