[tip:core/core] rcu: Convert leftover rcu_lockdep_assert() call sites to RCU_LOCKDEP_WARN()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit-ID:  80008e1af69136f099c45201a18e75e3a4c23b09
Gitweb:     http://git.kernel.org/tip/80008e1af69136f099c45201a18e75e3a4c23b09
Author:     Ingo Molnar <mingo@xxxxxxxxxx>
AuthorDate: Sat, 22 Aug 2015 11:41:42 +0200
Committer:  Ingo Molnar <mingo@xxxxxxxxxx>
CommitDate: Sat, 22 Aug 2015 11:46:04 +0200

rcu: Convert leftover rcu_lockdep_assert() call sites to RCU_LOCKDEP_WARN()

Commit:

  f78f5b90c4ff ("rcu: Rename rcu_lockdep_assert() to RCU_LOCKDEP_WARN()")

made RCU_LOCKDEP_WARN() the primary lockdep bug-check facility of RCU
and deprecated rcu_lockdep_assert().

Convert rcu_lockdep_assert() uses that arrived after this commit
in the x86 tree, to make the build warnings-clean.

Cc: Andy Lutomirski <luto@xxxxxxxxxxxxxx>
Cc: Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
Cc: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
Cc: linux-kernel@xxxxxxxxxxxxxxx
Signed-off-by: Ingo Molnar <mingo@xxxxxxxxxx>
---
 arch/x86/kernel/irq.c   |  2 +-
 arch/x86/kernel/traps.c | 18 +++++++++---------
 kernel/notifier.c       |  3 +--
 3 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
index d596eba..4616672 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -231,7 +231,7 @@ __visible unsigned int __irq_entry do_IRQ(struct pt_regs *regs)
 	entering_irq();
 
 	/* entering_irq() tells RCU that we're not quiescent.  Check it. */
-	rcu_lockdep_assert(rcu_is_watching(), "IRQ failed to wake up RCU");
+	RCU_LOCKDEP_WARN(!rcu_is_watching(), "IRQ failed to wake up RCU");
 
 	irq = __this_cpu_read(vector_irq[vector]);
 
diff --git a/arch/x86/kernel/traps.c b/arch/x86/kernel/traps.c
index fca20e4a..346eec7 100644
--- a/arch/x86/kernel/traps.c
+++ b/arch/x86/kernel/traps.c
@@ -112,7 +112,7 @@ static inline void preempt_conditional_cli(struct pt_regs *regs)
 void ist_enter(struct pt_regs *regs)
 {
 	if (user_mode(regs)) {
-		rcu_lockdep_assert(rcu_is_watching(), "entry code didn't wake RCU");
+		RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
 	} else {
 		/*
 		 * We might have interrupted pretty much anything.  In
@@ -282,7 +282,7 @@ static void do_error_trap(struct pt_regs *regs, long error_code, char *str,
 {
 	siginfo_t info;
 
-	rcu_lockdep_assert(rcu_is_watching(), "entry code didn't wake RCU");
+	RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
 
 	if (notify_die(DIE_TRAP, str, regs, error_code, trapnr, signr) !=
 			NOTIFY_STOP) {
@@ -364,7 +364,7 @@ dotraplinkage void do_bounds(struct pt_regs *regs, long error_code)
 	const struct bndcsr *bndcsr;
 	siginfo_t *info;
 
-	rcu_lockdep_assert(rcu_is_watching(), "entry code didn't wake RCU");
+	RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
 	if (notify_die(DIE_TRAP, "bounds", regs, error_code,
 			X86_TRAP_BR, SIGSEGV) == NOTIFY_STOP)
 		return;
@@ -442,7 +442,7 @@ do_general_protection(struct pt_regs *regs, long error_code)
 {
 	struct task_struct *tsk;
 
-	rcu_lockdep_assert(rcu_is_watching(), "entry code didn't wake RCU");
+	RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
 	conditional_sti(regs);
 
 	if (v8086_mode(regs)) {
@@ -496,7 +496,7 @@ dotraplinkage void notrace do_int3(struct pt_regs *regs, long error_code)
 		return;
 
 	ist_enter(regs);
-	rcu_lockdep_assert(rcu_is_watching(), "entry code didn't wake RCU");
+	RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
 #ifdef CONFIG_KGDB_LOW_LEVEL_TRAP
 	if (kgdb_ll_trap(DIE_INT3, "int3", regs, error_code, X86_TRAP_BP,
 				SIGTRAP) == NOTIFY_STOP)
@@ -729,14 +729,14 @@ static void math_error(struct pt_regs *regs, int error_code, int trapnr)
 
 dotraplinkage void do_coprocessor_error(struct pt_regs *regs, long error_code)
 {
-	rcu_lockdep_assert(rcu_is_watching(), "entry code didn't wake RCU");
+	RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
 	math_error(regs, error_code, X86_TRAP_MF);
 }
 
 dotraplinkage void
 do_simd_coprocessor_error(struct pt_regs *regs, long error_code)
 {
-	rcu_lockdep_assert(rcu_is_watching(), "entry code didn't wake RCU");
+	RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
 	math_error(regs, error_code, X86_TRAP_XF);
 }
 
@@ -749,7 +749,7 @@ do_spurious_interrupt_bug(struct pt_regs *regs, long error_code)
 dotraplinkage void
 do_device_not_available(struct pt_regs *regs, long error_code)
 {
-	rcu_lockdep_assert(rcu_is_watching(), "entry code didn't wake RCU");
+	RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
 	BUG_ON(use_eager_fpu());
 
 #ifdef CONFIG_MATH_EMULATION
@@ -775,7 +775,7 @@ dotraplinkage void do_iret_error(struct pt_regs *regs, long error_code)
 {
 	siginfo_t info;
 
-	rcu_lockdep_assert(rcu_is_watching(), "entry code didn't wake RCU");
+	RCU_LOCKDEP_WARN(!rcu_is_watching(), "entry code didn't wake RCU");
 	local_irq_enable();
 
 	info.si_signo = SIGILL;
diff --git a/kernel/notifier.c b/kernel/notifier.c
index 980e433..def5386 100644
--- a/kernel/notifier.c
+++ b/kernel/notifier.c
@@ -544,8 +544,7 @@ int notrace notify_die(enum die_val val, const char *str,
 		.signr	= sig,
 
 	};
-	rcu_lockdep_assert(rcu_is_watching(),
-			   "notify_die called but RCU thinks we're quiescent");
+	RCU_LOCKDEP_WARN(!rcu_is_watching(), "notify_die called but RCU thinks we're quiescent");
 	return atomic_notifier_call_chain(&die_chain, val, &args);
 }
 NOKPROBE_SYMBOL(notify_die);
--
To unsubscribe from this list: send the line "unsubscribe linux-tip-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Stable Commits]     [Linux Stable Kernel]     [Linux Kernel]     [Linux USB Devel]     [Linux Video &Media]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux