On Fri, 21 Nov 2014 09:20:36 -0500
Steven Rostedt <[email protected]> wrote:
 
> > diff --git a/include/linux/percpu.h b/include/linux/percpu.h
> > index a3aa63e..c94c766 100644
> > --- a/include/linux/percpu.h
> > +++ b/include/linux/percpu.h
> > @@ -7,6 +7,7 @@
> >  #include <linux/cpumask.h>
> >  #include <linux/pfn.h>
> >  #include <linux/init.h>
> > +#include <linux/printk.h>
> >  
> >  #include <asm/percpu.h>
> 
> Unfortunately, this wasn't the fix. This was an allnoconfig, which
> means printk wasn't defined.
> 

Just to be safe, I put the printk.h back in. Although it doesn't seem
to be needed.

-- Steve

>From da1e044a557571fd3718bd161b7ce7f36d3f999e Mon Sep 17 00:00:00 2001
From: "Steven Rostedt (Red Hat)" <[email protected]>
Date: Fri, 21 Nov 2014 09:16:58 -0500
Subject: [PATCH] printk/percpu: Do not 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.

Also add a printk.h include in percpu.h just to be safe.

Link: http://lkml.kernel.org/r/[email protected]

Reported-by: Stephen Rothwell <[email protected]>
Signed-off-by: Steven Rostedt <[email protected]>
---
 include/linux/percpu.h | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index ba2e85a0ff5b..87e9082a2bd4 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -5,6 +5,7 @@
 #include <linux/preempt.h>
 #include <linux/smp.h>
 #include <linux/cpumask.h>
+#include <linux/printk.h>
 #include <linux/pfn.h>
 #include <linux/init.h>
 
@@ -134,7 +135,9 @@ extern phys_addr_t per_cpu_ptr_to_phys(void *addr);
        (typeof(type) __percpu *)__alloc_percpu(sizeof(type),           \
                                                __alignof__(type))
 
+#ifdef CONFIG_PRINTK
 /* To avoid include hell, as printk can not declare this, we declare it here */
 DECLARE_PER_CPU(printk_func_t, printk_func);
+#endif
 
 #endif /* __LINUX_PERCPU_H */
-- 
1.8.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to