Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1185459 > unrolled thread
| Started by | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| First post | 2015-07-16 05:20 +0200 |
| Last post | 2015-07-17 23:40 +0200 |
| Articles | 4 — 3 participants |
Back to article view | Back to linux.kernel
linux-next: build failure after merge of the rcu tree Stephen Rothwell <sfr@canb.auug.org.au> - 2015-07-16 05:20 +0200
Re: linux-next: build failure after merge of the rcu tree "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-07-16 06:00 +0200
Re: linux-next: build failure after merge of the rcu tree Ingo Molnar <mingo@kernel.org> - 2015-07-17 13:50 +0200
Re: linux-next: build failure after merge of the rcu tree "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> - 2015-07-17 23:40 +0200
| From | Stephen Rothwell <sfr@canb.auug.org.au> |
|---|---|
| Date | 2015-07-16 05:20 +0200 |
| Subject | linux-next: build failure after merge of the rcu tree |
| Message-ID | <pMHSh-2E1-3@gated-at.bofh.it> |
Hi Paul,
After merging the rcu tree, today's linux-next build (arm
multi_v7_defconfig) failed like this:
kernel/notifier.c: In function 'notify_die':
kernel/notifier.c:547:2: error: implicit declaration of function 'rcu_lockdep_assert' [-Werror=implicit-function-declaration]
rcu_lockdep_assert(rcu_is_watching(),
^
Caused by commit
02300fdb3e5f ("rcu: Rename rcu_lockdep_assert() to RCU_LOCKDEP_WARN()")
interacting with commit
e727c7d7a11e ("notifiers, RCU: Assert that RCU is watching in notify_die()")
[ and I also noted
0333a209cbf6 ("x86/irq, context_tracking: Document how IRQ context tracking works and add an RCU assertion")
]
from the tip tree.
I added the following merge fix patch:
From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Thu, 16 Jul 2015 13:08:50 +1000
Subject: [PATCH] rcu: merge fix for Rename rcu_lockdep_assert() to RCU_LOCKDEP_WARN()
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
arch/x86/kernel/irq.c | 2 +-
kernel/notifier.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
index 30dbf35bc90b..f9cd81825187 100644
--- a/arch/x86/kernel/irq.c
+++ b/arch/x86/kernel/irq.c
@@ -234,7 +234,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/kernel/notifier.c b/kernel/notifier.c
index 980e4330fb59..fd2c9acbcc19 100644
--- a/kernel/notifier.c
+++ b/kernel/notifier.c
@@ -544,7 +544,7 @@ int notrace notify_die(enum die_val val, const char *str,
.signr = sig,
};
- rcu_lockdep_assert(rcu_is_watching(),
+ RCU_LOCKDEP_WARN(!rcu_is_watching(),
"notify_die called but RCU thinks we're quiescent");
return atomic_notifier_call_chain(&die_chain, val, &args);
}
--
2.1.4
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2015-07-16 06:00 +0200 |
| Message-ID | <pMIv0-3mF-3@gated-at.bofh.it> |
| In reply to | #1185459 |
On Thu, Jul 16, 2015 at 01:14:23PM +1000, Stephen Rothwell wrote:
> Hi Paul,
>
> After merging the rcu tree, today's linux-next build (arm
> multi_v7_defconfig) failed like this:
>
> kernel/notifier.c: In function 'notify_die':
> kernel/notifier.c:547:2: error: implicit declaration of function 'rcu_lockdep_assert' [-Werror=implicit-function-declaration]
> rcu_lockdep_assert(rcu_is_watching(),
> ^
>
> Caused by commit
>
> 02300fdb3e5f ("rcu: Rename rcu_lockdep_assert() to RCU_LOCKDEP_WARN()")
>
> interacting with commit
>
> e727c7d7a11e ("notifiers, RCU: Assert that RCU is watching in notify_die()")
>
> [ and I also noted
> 0333a209cbf6 ("x86/irq, context_tracking: Document how IRQ context tracking works and add an RCU assertion")
> ]
>
> from the tip tree.
Thank you in both cases! I suspect that more will follow, so is there
something I can do to make this easier? (Hard for me to patch stuff
that is not yet in the tree...)
Thanx, Paul
> I added the following merge fix patch:
>
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Thu, 16 Jul 2015 13:08:50 +1000
> Subject: [PATCH] rcu: merge fix for Rename rcu_lockdep_assert() to RCU_LOCKDEP_WARN()
>
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
> arch/x86/kernel/irq.c | 2 +-
> kernel/notifier.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/kernel/irq.c b/arch/x86/kernel/irq.c
> index 30dbf35bc90b..f9cd81825187 100644
> --- a/arch/x86/kernel/irq.c
> +++ b/arch/x86/kernel/irq.c
> @@ -234,7 +234,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/kernel/notifier.c b/kernel/notifier.c
> index 980e4330fb59..fd2c9acbcc19 100644
> --- a/kernel/notifier.c
> +++ b/kernel/notifier.c
> @@ -544,7 +544,7 @@ int notrace notify_die(enum die_val val, const char *str,
> .signr = sig,
>
> };
> - rcu_lockdep_assert(rcu_is_watching(),
> + RCU_LOCKDEP_WARN(!rcu_is_watching(),
> "notify_die called but RCU thinks we're quiescent");
> return atomic_notifier_call_chain(&die_chain, val, &args);
> }
> --
> 2.1.4
>
> --
> Cheers,
> Stephen Rothwell sfr@canb.auug.org.au
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Ingo Molnar <mingo@kernel.org> |
|---|---|
| Date | 2015-07-17 13:50 +0200 |
| Message-ID | <pNcjo-4ml-9@gated-at.bofh.it> |
| In reply to | #1185469 |
* Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:
> On Thu, Jul 16, 2015 at 01:14:23PM +1000, Stephen Rothwell wrote:
> > Hi Paul,
> >
> > After merging the rcu tree, today's linux-next build (arm
> > multi_v7_defconfig) failed like this:
> >
> > kernel/notifier.c: In function 'notify_die':
> > kernel/notifier.c:547:2: error: implicit declaration of function 'rcu_lockdep_assert' [-Werror=implicit-function-declaration]
> > rcu_lockdep_assert(rcu_is_watching(),
> > ^
> >
> > Caused by commit
> >
> > 02300fdb3e5f ("rcu: Rename rcu_lockdep_assert() to RCU_LOCKDEP_WARN()")
> >
> > interacting with commit
> >
> > e727c7d7a11e ("notifiers, RCU: Assert that RCU is watching in notify_die()")
> >
> > [ and I also noted
> > 0333a209cbf6 ("x86/irq, context_tracking: Document how IRQ context tracking works and add an RCU assertion")
> > ]
> >
> > from the tip tree.
>
> Thank you in both cases! I suspect that more will follow, so is there
> something I can do to make this easier? (Hard for me to patch stuff
> that is not yet in the tree...)
So we could keep the old macro around as well for such cases, and then remove it
in v4.4 or so?
Thanks,
Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | "Paul E. McKenney" <paulmck@linux.vnet.ibm.com> |
|---|---|
| Date | 2015-07-17 23:40 +0200 |
| Message-ID | <pNlwm-JB-13@gated-at.bofh.it> |
| In reply to | #1186736 |
On Fri, Jul 17, 2015 at 09:51:31PM +0200, Ingo Molnar wrote:
>
> * Paul E. McKenney <paulmck@linux.vnet.ibm.com> wrote:
>
> > And here is a prototype patch, which I intend to merge with the existing patch
> > that renames rcu_lockdep_assert() to RCU_LOCKDEP_WARN(). I will also queue a
> > revert of the patch below for 4.4.
> >
> > Thoughts?
> >
> > Thanx, Paul
> >
> > ------------------------------------------------------------------------
> >
> > diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
> > index 41c49b12fe6d..663d6e028c3d 100644
> > --- a/include/linux/rcupdate.h
> > +++ b/include/linux/rcupdate.h
> > @@ -536,9 +536,29 @@ static inline int rcu_read_lock_sched_held(void)
> >
> > #endif /* #else #ifdef CONFIG_DEBUG_LOCK_ALLOC */
> >
> > +/* Deprecate the rcu_lockdep_assert() macro. */
> > +static inline void __attribute((deprecated)) deprecate_rcu_lockdep_assert(void)
> > +{
> > +}
> > +
> > #ifdef CONFIG_PROVE_RCU
> >
> > /**
> > + * rcu_lockdep_assert - emit lockdep splat if specified condition not met
> > + * @c: condition to check
> > + * @s: informative message
> > + */
> > +#define rcu_lockdep_assert(c, s) \
> > + do { \
> > + static bool __section(.data.unlikely) __warned; \
> > + deprecate_rcu_lockdep_assert(); \
> > + if (debug_lockdep_rcu_enabled() && !__warned && !(c)) { \
> > + __warned = true; \
> > + lockdep_rcu_suspicious(__FILE__, __LINE__, s); \
> > + } \
>
> Btw., out of general macro paranoia I'd write such constructs as something like:
>
> if (!(c) && debug_lockdep_rcu_enabled() && !__warned) { \
>
> I.e. always evaluate 'c' even if debugging is off. This way if the construct is
> fed an expression with a side effect (bad idea!) then it still works regardless of
> whether the warning triggered already or not.
If you feel strongly about this, I will need to make lockdep_is_held()
be defined when lockdep is disabled. Easy enough to do, just thought
I should double-check.
> But this construct is OK too to me, so feel free to add my:
>
> Reviewed-by: Ingo Molnar <mingo@kernel.org>
Thank you!
Thanx, Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web