From: Steven Rostedt <rostedt@goodmis.org>
To: Jiri Kosina <jkosina@suse.cz>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Petr Mladek <pmladek@suse.cz>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Subject: Re: linux-next: build failure after merge of the ftrace tree
Date: Fri, 21 Nov 2014 09:20:36 -0500 [thread overview]
Message-ID: <20141121092036.09edee57@gandalf.local.home> (raw)
In-Reply-To: <alpine.LNX.2.00.1411211149490.23174@pobox.suse.cz>
>
> From: Jiri Kosina <jkosina@suse.cz>
> Subject: [PATCH] printk: make sure printk_func_t is known in percpu.h
>
> Commit afdc34a3d3b8 ("printk: Add per_cpu printk func to allow printk to
> be diverted") caused percpu variable printk_func to be declared in
> percpu.h. Make sure that the corresponding type is known at the time of
> declaration.
>
> Fixes build failure on certain arch/config combinations.
>
> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
> ---
> include/linux/percpu.h | 1 +
> 1 file changed, 1 insertion(+)
>
> 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.
-- Steve
From: "Steven Rostedt (Red Hat)" <rostedt@goodmis.org>
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.
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>
---
include/linux/percpu.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/linux/percpu.h b/include/linux/percpu.h
index ba2e85a0ff5b..74398ef1d294 100644
--- a/include/linux/percpu.h
+++ b/include/linux/percpu.h
@@ -134,7 +134,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 */
--
2.1.1
next prev parent reply other threads:[~2014-11-21 14:20 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-21 7:32 linux-next: build failure after merge of the ftrace tree Stephen Rothwell
2014-11-21 10:50 ` Jiri Kosina
2014-11-21 14:20 ` Steven Rostedt [this message]
2014-11-21 14:23 ` Jiri Kosina
2014-11-21 14:27 ` Steven Rostedt
2014-11-21 12:43 ` Steven Rostedt
-- strict thread matches above, loose matches on Subject: below --
2023-10-23 2:30 Stephen Rothwell
2023-10-23 3:32 ` Matthew Wilcox
2023-10-23 13:41 ` Steven Rostedt
2023-10-26 1:18 ` Stephen Rothwell
2023-10-26 1:21 ` Steven Rostedt
2022-01-12 0:31 Stephen Rothwell
2022-01-14 1:02 ` Stephen Rothwell
2022-01-14 1:04 ` Steven Rostedt
2022-01-14 2:16 ` Steven Rostedt
2022-01-14 2:58 ` Stephen Rothwell
2022-01-14 3:02 ` Stephen Rothwell
2022-01-14 3:25 ` Steven Rostedt
2022-01-14 3:34 ` Stephen Rothwell
2022-01-14 3:50 ` Steven Rostedt
2022-01-14 5:12 ` Yinan Liu
2022-01-14 6:42 ` Stephen Rothwell
2021-06-10 8:08 Stephen Rothwell
2021-06-10 8:26 ` Peter Zijlstra
2021-06-10 15:06 ` Steven Rostedt
2021-06-15 6:51 ` Mark-PK Tsai
2020-06-03 7:42 Stephen Rothwell
2020-06-03 15:10 ` Tom Zanussi
2020-06-03 15:22 ` Steven Rostedt
2020-06-03 15:24 ` Tom Zanussi
2020-06-03 15:30 ` Steven Rostedt
2020-06-03 21:49 ` Stephen Rothwell
2013-03-01 2:47 Stephen Rothwell
2013-03-01 3:06 ` Steven Rostedt
2013-03-02 2:45 ` Steven Rostedt
2013-03-02 3:42 ` Stephen Rothwell
2013-03-02 3:55 ` Steven Rostedt
2013-03-02 4:17 ` Stephen Rothwell
2013-03-02 4:22 ` Steven Rostedt
2013-03-02 4:55 ` Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20141121092036.09edee57@gandalf.local.home \
--to=rostedt@goodmis.org \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=paulmck@linux.vnet.ibm.com \
--cc=pmladek@suse.cz \
--cc=sfr@canb.auug.org.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).