From: tip-bot for Borislav Petkov <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: torvalds@linux-foundation.org, mingo@kernel.org,
linux-kernel@vger.kernel.org, bp@suse.de, tony.luck@intel.com,
tglx@linutronix.de, paulmck@linux.vnet.ibm.com, hpa@zytor.com,
peterz@infradead.org
Subject: [tip:ras/core] x86/mce: Rename rcu_dereference_check_mce() to mce_log_get_idx_check()
Date: Thu, 13 Aug 2015 03:49:38 -0700 [thread overview]
Message-ID: <tip-9a7783d02197f299f71b4fa2364a345c05f92b83@git.kernel.org> (raw)
In-Reply-To: <1439396985-12812-12-git-send-email-bp@alien8.de>
Commit-ID: 9a7783d02197f299f71b4fa2364a345c05f92b83
Gitweb: http://git.kernel.org/tip/9a7783d02197f299f71b4fa2364a345c05f92b83
Author: Borislav Petkov <bp@suse.de>
AuthorDate: Wed, 12 Aug 2015 18:29:43 +0200
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 13 Aug 2015 10:12:53 +0200
x86/mce: Rename rcu_dereference_check_mce() to mce_log_get_idx_check()
The "rcu_" prefix misleads for it being a proper RCU interface
which is not. It basically checks whether we're preemptible or
holding the chrdev_read mutex.
Rename it accordingly.
Signed-off-by: Borislav Petkov <bp@suse.de>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Tony Luck <tony.luck@intel.com>
Link: http://lkml.kernel.org/r/1439396985-12812-12-git-send-email-bp@alien8.de
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
arch/x86/kernel/cpu/mcheck/mce.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/x86/kernel/cpu/mcheck/mce.c b/arch/x86/kernel/cpu/mcheck/mce.c
index ee5272d..b979711 100644
--- a/arch/x86/kernel/cpu/mcheck/mce.c
+++ b/arch/x86/kernel/cpu/mcheck/mce.c
@@ -52,11 +52,11 @@
static DEFINE_MUTEX(mce_chrdev_read_mutex);
-#define rcu_dereference_check_mce(p) \
+#define mce_log_get_idx_check(p) \
({ \
rcu_lockdep_assert(rcu_read_lock_sched_held() || \
lockdep_is_held(&mce_chrdev_read_mutex), \
- "suspicious rcu_dereference_check_mce() usage"); \
+ "suspicious mce_log_get_idx_check() usage"); \
smp_load_acquire(&(p)); \
})
@@ -165,7 +165,7 @@ void mce_log(struct mce *mce)
mce->finished = 0;
wmb();
for (;;) {
- entry = rcu_dereference_check_mce(mcelog.next);
+ entry = mce_log_get_idx_check(mcelog.next);
for (;;) {
/*
@@ -1812,7 +1812,7 @@ static ssize_t mce_chrdev_read(struct file *filp, char __user *ubuf,
goto out;
}
- next = rcu_dereference_check_mce(mcelog.next);
+ next = mce_log_get_idx_check(mcelog.next);
/* Only supports full reads right now */
err = -EINVAL;
next prev parent reply other threads:[~2015-08-13 10:50 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-12 16:29 [PATCH 00/13] x86/RAS queue for 4.3 Borislav Petkov
2015-08-12 16:29 ` [PATCH 01/13] x86/mce: Reuse one of the u16 padding fields in struct mce Borislav Petkov
2015-08-13 10:45 ` [tip:ras/core] x86/mce: Reuse one of the u16 padding fields in ' struct mce' tip-bot for Borislav Petkov
2015-08-12 16:29 ` [PATCH 02/13] x86/mce: Provide a lockless memory pool to save error records Borislav Petkov
2015-08-13 10:46 ` [tip:ras/core] " tip-bot for Chen, Gong
2015-08-12 16:29 ` [PATCH 03/13] x86/mce: Don't use percpu workqueues Borislav Petkov
2015-08-13 10:46 ` [tip:ras/core] " tip-bot for Chen, Gong
2015-08-12 16:29 ` [PATCH 04/13] x86/mce: Remove the MCE ring for Action Optional errors Borislav Petkov
2015-08-13 10:47 ` [tip:ras/core] " tip-bot for Chen, Gong
2015-08-12 16:29 ` [PATCH 05/13] x86/mce: Avoid potential deadlock due to printk() in MCE context Borislav Petkov
2015-08-13 10:47 ` [tip:ras/core] " tip-bot for Chen, Gong
2015-08-12 16:29 ` [PATCH 06/13] x86/mce: Kill drain_mcelog_buffer() Borislav Petkov
2015-08-13 10:47 ` [tip:ras/core] " tip-bot for Borislav Petkov
2015-08-12 16:29 ` [PATCH 07/13] x86/mce: Remove unused function declarations Borislav Petkov
2015-08-13 10:48 ` [tip:ras/core] " tip-bot for Ashok Raj
2015-08-12 16:29 ` [PATCH 08/13] x86/mce: Clear Local MCE opt-in before kexec Borislav Petkov
2015-08-13 10:48 ` [tip:ras/core] " tip-bot for Ashok Raj
2015-08-12 16:29 ` [PATCH 09/13] x86/mce: Reenable CMCI banks when swiching back to interrupt mode Borislav Petkov
2015-08-13 10:48 ` [tip:ras/core] " tip-bot for Xie XiuQi
2015-08-12 16:29 ` [PATCH 10/13] RAS: Add a menuconfig option with descriptive text Borislav Petkov
2015-08-13 10:49 ` [tip:ras/core] " tip-bot for Borislav Petkov
2015-08-12 16:29 ` [PATCH 11/13] x86/mce: Rename rcu_dereference_check_mce() to mce_log_get_idx_check() Borislav Petkov
2015-08-13 10:49 ` tip-bot for Borislav Petkov [this message]
2015-08-12 16:29 ` [PATCH 12/13] x86/mce: Add a wrapper around mce_log() for injection Borislav Petkov
2015-08-13 10:49 ` [tip:ras/core] " tip-bot for Borislav Petkov
2015-08-12 16:29 ` [PATCH 13/13] x86/ras: Move AMD MCE injector to arch/x86/ras/ Borislav Petkov
2015-08-13 10:50 ` [tip:ras/core] " tip-bot for Borislav Petkov
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-9a7783d02197f299f71b4fa2364a345c05f92b83@git.kernel.org \
--to=tipbot@zytor.com \
--cc=bp@suse.de \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=torvalds@linux-foundation.org \
/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