Re: [tip:core/rcu] rcu: Add second diagnostic check for a possibleCPU-hotplug race

From: Paul E. McKenney
Date: Sat Aug 08 2009 - 19:22:02 EST


On Sat, Aug 08, 2009 at 05:01:03PM +0200, Ingo Molnar wrote:
>
> * tip-bot for Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx> wrote:
>
> > Commit-ID: 0d84abdae6740ee5290a7a523ee35916f65e16ec
> > Gitweb: http://git.kernel.org/tip/0d84abdae6740ee5290a7a523ee35916f65e16ec
> > Author: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
> > AuthorDate: Wed, 5 Aug 2009 18:26:45 -0700
> > Committer: Ingo Molnar <mingo@xxxxxxx>
> > CommitDate: Sat, 8 Aug 2009 16:51:08 +0200
> >
> > rcu: Add second diagnostic check for a possible CPU-hotplug race
>
> hm, got this build failure in -tip testing:
>
> kernel/rcupdate.c: In function ârcu_cpu_notifiedâ:
> kernel/rcupdate.c:251: error: implicit declaration of function âcpu_notifiedâ
>
> with the config below.

Gah... I didn't take !CONFIG_HOTPLUG_CPU into account. Fix below.

Thanx, Paul

------------------------------------------------------------------------

Fix build breakage in diagnostic patch.

Move cpu_notified() declaration out from under #ifdef.

Signed-off-by: Paul E. McKenney <paulmck@xxxxxxxxxxxxxxxxxx>
---

cpu.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/cpu.h b/include/linux/cpu.h
index d9b3c18..1b1c30c 100644
--- a/include/linux/cpu.h
+++ b/include/linux/cpu.h
@@ -45,13 +45,13 @@ extern int sched_create_sysfs_power_savings_entries(struct sysdev_class *cls);
extern void unregister_cpu(struct cpu *cpu);
#endif
struct notifier_block;
+extern int cpu_notified(int (*fn)(struct notifier_block *, unsigned long, void *));

#ifdef CONFIG_SMP
/* Need to know about CPUs going up/down? */
#ifdef CONFIG_HOTPLUG_CPU
extern int register_cpu_notifier(struct notifier_block *nb);
extern void unregister_cpu_notifier(struct notifier_block *nb);
-extern int cpu_notified(int (*fn)(struct notifier_block *, unsigned long, void *));
extern int raw_notifier_chain_is_registered(struct raw_notifier_head *nh,
int (*fn)(struct notifier_block *, unsigned long, void *));
#else
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/