diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-03-14 03:57:03 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-03-14 03:57:03 -0400 |
commit | 2aa2b50dd62b5d0675bd7453fbeb5732dc2d7866 (patch) | |
tree | b7a8de47f825a38930ece21c437dd79dd14170f8 /arch | |
parent | 3474cbd11df8cdd6413781ea95bd51dd469098ff (diff) |
x86/mce: Fix build bug with CONFIG_PROVE_LOCKING=y && CONFIG_X86_MCE_INTEL=y
Commit f56e8a076 "x86/mce: Fix RCU lockdep splats" introduced the
following build bug:
arch/x86/kernel/cpu/mcheck/mce.c: In function 'mce_log':
arch/x86/kernel/cpu/mcheck/mce.c:166: error: 'mce_read_mutex' undeclared (first use in this function)
arch/x86/kernel/cpu/mcheck/mce.c:166: error: (Each undeclared identifier is reported only once
arch/x86/kernel/cpu/mcheck/mce.c:166: error: for each function it appears in.)
Move the in-the-middle-of-file lock variable up to the variable
definition section, the top of the .c file.
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: x86@kernel.org
Cc: laijs@cn.fujitsu.com
Cc: dipankar@in.ibm.com
Cc: mathieu.desnoyers@polymtl.ca
Cc: josh@joshtriplett.org
Cc: dvhltc@us.ibm.com
Cc: niv@us.ibm.com
Cc: peterz@infradead.org
Cc: rostedt@goodmis.org
Cc: Valdis.Kletnieks@vt.edu
Cc: dhowells@redhat.com
LKML-Reference: <1267830207-9474-3-git-send-email-paulmck@linux.vnet.ibm.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/x86/kernel/cpu/mcheck/mce.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c index bd58de4d7a2..3ab9c886b61 100644 --- a/arch/x86/kernel/cpu/mcheck/mce.c +++ b/arch/x86/kernel/cpu/mcheck/mce.c | |||
@@ -46,6 +46,8 @@ | |||
46 | 46 | ||
47 | #include "mce-internal.h" | 47 | #include "mce-internal.h" |
48 | 48 | ||
49 | static DEFINE_MUTEX(mce_read_mutex); | ||
50 | |||
49 | #define rcu_dereference_check_mce(p) \ | 51 | #define rcu_dereference_check_mce(p) \ |
50 | rcu_dereference_check((p), \ | 52 | rcu_dereference_check((p), \ |
51 | rcu_read_lock_sched_held() || \ | 53 | rcu_read_lock_sched_held() || \ |
@@ -1490,8 +1492,6 @@ static void collect_tscs(void *data) | |||
1490 | rdtscll(cpu_tsc[smp_processor_id()]); | 1492 | rdtscll(cpu_tsc[smp_processor_id()]); |
1491 | } | 1493 | } |
1492 | 1494 | ||
1493 | static DEFINE_MUTEX(mce_read_mutex); | ||
1494 | |||
1495 | static ssize_t mce_read(struct file *filp, char __user *ubuf, size_t usize, | 1495 | static ssize_t mce_read(struct file *filp, char __user *ubuf, size_t usize, |
1496 | loff_t *off) | 1496 | loff_t *off) |
1497 | { | 1497 | { |