public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Ingo Molnar <mingo@elte.hu>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, paulmck@linux.vnet.ibm.com,
	hpa@zytor.com, mingo@redhat.com, tglx@linutronix.de,
	mingo@elte.hu
Subject: [tip:core/urgent] x86/mce: Fix build bug with CONFIG_PROVE_LOCKING=y && CONFIG_X86_MCE_INTEL=y
Date: Sun, 14 Mar 2010 08:06:44 GMT	[thread overview]
Message-ID: <tip-2aa2b50dd62b5d0675bd7453fbeb5732dc2d7866@git.kernel.org> (raw)
In-Reply-To: <1267830207-9474-3-git-send-email-paulmck@linux.vnet.ibm.com>

Commit-ID:  2aa2b50dd62b5d0675bd7453fbeb5732dc2d7866
Gitweb:     http://git.kernel.org/tip/2aa2b50dd62b5d0675bd7453fbeb5732dc2d7866
Author:     Ingo Molnar <mingo@elte.hu>
AuthorDate: Sun, 14 Mar 2010 08:57:03 +0100
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Sun, 14 Mar 2010 08:57:03 +0100

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>
---
 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 bd58de4..3ab9c88 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -46,6 +46,8 @@
 
 #include "mce-internal.h"
 
+static DEFINE_MUTEX(mce_read_mutex);
+
 #define rcu_dereference_check_mce(p) \
 	rcu_dereference_check((p), \
 			      rcu_read_lock_sched_held() || \
@@ -1490,8 +1492,6 @@ static void collect_tscs(void *data)
 	rdtscll(cpu_tsc[smp_processor_id()]);
 }
 
-static DEFINE_MUTEX(mce_read_mutex);
-
 static ssize_t mce_read(struct file *filp, char __user *ubuf, size_t usize,
 			loff_t *off)
 {

      parent reply	other threads:[~2010-03-14  8:07 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-05 23:02 [PATCH tip/core/rcu 0/3] rcu: ftrace&x86/mce RCU lockdep fixes, extend RCU CPU stall Paul E. McKenney
2010-03-05 23:03 ` [PATCH tip/core/rcu 1/3] ftrace: replace read_barrier_depends() with rcu_dereference_raw() Paul E. McKenney
2010-03-06  1:29   ` Steven Rostedt
2010-03-06  1:45     ` Josh Triplett
2010-03-06  1:57       ` Steven Rostedt
2010-03-06  2:15         ` Josh Triplett
2010-03-06  2:31           ` Steven Rostedt
2010-03-11 14:38   ` [tip:core/urgent] ftrace: Replace " tip-bot for Paul E. McKenney
2010-03-05 23:03 ` [PATCH tip/core/rcu 2/3] rcu: Increase RCU CPU stall timeouts if PROVE_RCU Paul E. McKenney
2010-03-11 14:38   ` [tip:core/urgent] " tip-bot for Paul E. McKenney
2010-03-05 23:03 ` [PATCH tip/core/rcu 3/3] x86/mce: fix RCU lockdep splats Paul E. McKenney
2010-03-11 14:38   ` [tip:core/urgent] x86/mce: Fix " tip-bot for Paul E. McKenney
2010-03-14  8:06   ` tip-bot for Ingo Molnar [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-2aa2b50dd62b5d0675bd7453fbeb5732dc2d7866@git.kernel.org \
    --to=mingo@elte.hu \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox