[PATCH] rcu: fix build error for sysrq workaround

From: Arnd Bergmann
Date: Mon Apr 28 2014 - 09:41:22 EST


I got a build error in linux-next today, coming from:
http://ozlabs.org/~akpm/mmots/broken-out/sysrqrcu-suppress-rcu-stall-warnings-while-sysrq-runs.patch

I saw the problem has already been reported by other people, but couldn't find
a fix. This is what I used locally to avoid the build error. Not sure if it's
correct to do nothing though.

Please just ignore if the problem has already been solved independently.

Arnd

(re-sent with mailing list on Cc)

9<-----------
From: Arnd Bergmann <arnd@xxxxxxxx>
Subject: [PATCH] rcu: fix build error for sysrq workaround

Patch "sysrq,rcu: suppress RCU stall warnings while sysrq runs"
introduced two new functions, but they are unavailable if
CONFIG_RCU_STALL_COMMON is not set, so we have to provide
an alternative implementation, doing nothing.

Signed-off-by: Arnd Bergmann <arnd@xxxxxxxx>

diff --git a/include/linux/rcupdate.h b/include/linux/rcupdate.h
index e9cc71c..26e1771 100644
--- a/include/linux/rcupdate.h
+++ b/include/linux/rcupdate.h
@@ -247,8 +247,15 @@ void rcu_idle_enter(void);
void rcu_idle_exit(void);
void rcu_irq_enter(void);
void rcu_irq_exit(void);
+
+#ifdef CONFIG_RCU_STALL_COMMON
void rcu_sysrq_start(void);
void rcu_sysrq_end(void);
+#else
+static inline void rcu_sysrq_start(void) { }
+static inline void rcu_sysrq_end(void) { }
+
+#endif

#ifdef CONFIG_RCU_USER_QS
void rcu_user_enter(void);
--
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/