summaryrefslogtreecommitdiffstats
path: root/kernel/printk/printk.c
diff options
context:
space:
mode:
authorSteven Rostedt (Red Hat) <rostedt@goodmis.org>2014-11-21 15:16:58 +0100
committerSteven Rostedt <rostedt@goodmis.org>2014-11-21 17:19:15 +0100
commit04b74b27c2941e5d62120f6fee3a0a9388a30613 (patch)
tree05a24b1a4768b12f6656a6121d1281ed77426116 /kernel/printk/printk.c
parentx86/nmi: Perform a safe NMI stack trace on all CPUs (diff)
downloadlinux-04b74b27c2941e5d62120f6fee3a0a9388a30613.tar.xz
linux-04b74b27c2941e5d62120f6fee3a0a9388a30613.zip
printk/percpu: Define printk_func when printk is not defined
To avoid include hell, the per_cpu variable printk_func was declared in percpu.h. But it is only defined if printk is defined. As users of printk may also use the printk_func variable, it needs to be defined even if CONFIG_PRINTK is not. Also add a printk.h include in percpu.h just to be safe. Link: http://lkml.kernel.org/r/20141121183215.01ba539c@canb.auug.org.au Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to '')
-rw-r--r--kernel/printk/printk.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index f7b723f98cb9..5af2b8bc88f0 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -1896,6 +1896,9 @@ static size_t msg_print_text(const struct printk_log *msg, enum log_flags prev,
bool syslog, char *buf, size_t size) { return 0; }
static size_t cont_print_text(char *text, size_t size) { return 0; }
+/* Still needs to be defined for users */
+DEFINE_PER_CPU(printk_func_t, printk_func);
+
#endif /* CONFIG_PRINTK */
#ifdef CONFIG_EARLY_PRINTK