linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: linux-next: build failure after merge of the final tree (akpm tree related)
Date: Wed, 6 Mar 2013 15:52:33 -0800	[thread overview]
Message-ID: <20130306155233.3598a39ef5a99c4daf4fbc81@linux-foundation.org> (raw)
In-Reply-To: <20130304141051.a630590df1007f2d349a2d8a@canb.auug.org.au>

On Mon, 4 Mar 2013 14:10:51 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:

> Hi all,
> 
> After merging the final tree, today's linux-next build (sparc64 defconfig)
> failed like this:
> 
> arch/sparc/built-in.o: In function `setup_arch':
> (.init.text+0xc38): undefined reference to `early_console'
> arch/sparc/built-in.o: In function `setup_arch':
> (.init.text+0xc44): undefined reference to `early_console'
> 
> Caused by commit 16ac99bd7acd ("early_printk: consolidate random copies
> of identical code").  This build does not have CONFIG_EARLY_PRINTK defined.

Yes, it looks like some ifdeffing is needed in
arch/sparc/kernel/setup_32.c and in arch/sparc/kernel/setup_64.c.  And
I suspect arch/powerpc/kernel/udbg.c will break with
CONFIG_EARLY_PRINTK=n.

> I have reverted that commit for today.

I had a shot at fixing it all but I'm not very confident in the result,
so I guess I'll drop it as well.

diff -puN arch/powerpc/kernel/udbg.c~early_printk-consolidate-random-copies-of-identical-code-fix arch/powerpc/kernel/udbg.c
--- a/arch/powerpc/kernel/udbg.c~early_printk-consolidate-random-copies-of-identical-code-fix
+++ a/arch/powerpc/kernel/udbg.c
@@ -162,9 +162,10 @@ static struct console udbg_console = {
  */
 void __init register_early_udbg_console(void)
 {
+#ifdef CONFIG_EARLY_PRINTK
 	if (early_console)
 		return;
-
+#endif
 	if (!udbg_putc)
 		return;
 
diff -puN arch/sparc/kernel/setup_32.c~early_printk-consolidate-random-copies-of-identical-code-fix arch/sparc/kernel/setup_32.c
--- a/arch/sparc/kernel/setup_32.c~early_printk-consolidate-random-copies-of-identical-code-fix
+++ a/arch/sparc/kernel/setup_32.c
@@ -108,6 +108,7 @@ unsigned long cmdline_memory_size __init
 /* which CPU booted us (0xff = not set) */
 unsigned char boot_cpu_id = 0xff; /* 0xff will make it into DATA section... */
 
+#ifdef CONFIG_EARLY_PRINTK
 static void
 prom_console_write(struct console *con, const char *s, unsigned n)
 {
@@ -120,6 +121,7 @@ static struct console prom_early_console
 	.flags =	CON_PRINTBUFFER | CON_BOOT,
 	.index =	-1,
 };
+#endif
 
 /* 
  * Process kernel command line switches that are specific to the
@@ -138,7 +140,9 @@ static void __init process_switch(char c
 		prom_halt();
 		break;
 	case 'p':
+#ifdef CONFIG_EARLY_PRINTK
 		prom_early_console.flags &= ~CON_BOOT;
+#endif
 		break;
 	default:
 		printk("Unknown boot switch (-%c)\n", c);
@@ -309,8 +313,10 @@ void __init setup_arch(char **cmdline_p)
 
 	boot_flags_init(*cmdline_p);
 
+#ifdef CONFIG_EARLY_PRINTK
 	early_console = &prom_early_console;
 	register_console(&prom_early_console);
+#endif
 
 	printk("ARCH: ");
 	switch(sparc_cpu_model) {
diff -puN arch/sparc/kernel/setup_64.c~early_printk-consolidate-random-copies-of-identical-code-fix arch/sparc/kernel/setup_64.c
--- a/arch/sparc/kernel/setup_64.c~early_printk-consolidate-random-copies-of-identical-code-fix
+++ a/arch/sparc/kernel/setup_64.c
@@ -75,21 +75,23 @@ struct screen_info screen_info = {
 	16                      /* orig-video-points */
 };
 
+/* Exported for mm/init.c:paging_init. */
+unsigned long cmdline_memory_size = 0;
+
+#ifdef CONFIG_EARLY_PRINTK
 static void
 prom_console_write(struct console *con, const char *s, unsigned n)
 {
 	prom_write(s, n);
 }
 
-/* Exported for mm/init.c:paging_init. */
-unsigned long cmdline_memory_size = 0;
-
 static struct console prom_early_console = {
 	.name =		"earlyprom",
 	.write =	prom_console_write,
 	.flags =	CON_PRINTBUFFER | CON_BOOT | CON_ANYTIME,
 	.index =	-1,
 };
+#endif
 
 /* 
  * Process kernel command line switches that are specific to the
@@ -106,7 +108,9 @@ static void __init process_switch(char c
 		prom_halt();
 		break;
 	case 'p':
+#ifdef CONFIG_EARLY_PRINTK
 		prom_early_console.flags &= ~CON_BOOT;
+#endif
 		break;
 	case 'P':
 		/* Force UltraSPARC-III P-Cache on. */
@@ -551,11 +555,17 @@ static void __init init_sparc64_elf_hwca
 		pause_patch();
 }
 
+#ifdef CONFIG_EARLY_PRINTK
 static inline void register_prom_console(void)
 {
 	early_console = &prom_early_console;
 	register_console(&prom_early_console);
 }
+#else
+static inline void register_prom_console(void)
+{
+}
+#endif
 
 void __init setup_arch(char **cmdline_p)
 {
_

  reply	other threads:[~2013-03-06 23:52 UTC|newest]

Thread overview: 51+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-04  3:10 linux-next: build failure after merge of the final tree (akpm tree related) Stephen Rothwell
2013-03-06 23:52 ` Andrew Morton [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-06-06  7:25 Stephen Rothwell
2013-06-06  7:15 Stephen Rothwell
2013-06-06  6:18 Stephen Rothwell
2013-03-04  3:28 Stephen Rothwell
2013-03-04  9:22 ` Jan Kara
2013-01-24  5:54 Stephen Rothwell
2013-01-24 10:30 ` Shaohua Li
2013-01-24 23:22   ` Stephen Rothwell
2013-01-21  6:08 Stephen Rothwell
2013-01-21  7:17 ` Tang Chen
2012-11-09  4:16 Stephen Rothwell
2012-11-09  4:09 Stephen Rothwell
2012-11-14 22:18 ` Andrew Morton
2012-11-14 22:30   ` David Miller
2012-11-14 23:09     ` Andrew Morton
2012-11-14 23:10       ` David Miller
2012-11-09  3:58 Stephen Rothwell
2012-11-09  4:01 ` Andrew Morton
2012-11-12  0:00   ` Stephen Rothwell
2012-09-17 11:49 Stephen Rothwell
2012-09-13  8:11 Stephen Rothwell
2012-09-13 13:24 ` David Fries
2012-09-13 13:34   ` Stephen Rothwell
2012-09-14  4:20     ` David Fries
2012-09-13  8:01 Stephen Rothwell
2012-09-13 10:01 ` Shaohua Li
2012-09-13 12:29   ` Stephen Rothwell
2012-05-11  6:20 Stephen Rothwell
2012-03-14 23:44 Stephen Rothwell
2012-02-17 10:20 Stephen Rothwell
2012-02-17 12:06 ` Konstantin Khlebnikov
2012-02-19 23:04 ` Stephen Rothwell
2012-02-19 23:15   ` Andrew Morton
2012-02-17  5:30 Stephen Rothwell
2012-02-17  6:07 ` Benjamin Herrenschmidt
2012-01-20  2:02 Stephen Rothwell
2011-12-17  4:42 Stephen Rothwell
2011-12-17  5:02 ` NeilBrown
2011-11-30  4:52 Stephen Rothwell
2011-11-30  5:40 ` David Miller
2011-11-30  6:07   ` Andrew Morton
2011-11-30 11:48     ` Neil Horman
2011-11-30  4:42 Stephen Rothwell
2011-11-30  5:16 ` Andrew Morton
2011-10-05  8:23 Stephen Rothwell
2011-09-30  1:52 Stephen Rothwell
2011-09-28 10:01 Stephen Rothwell
2011-07-27  3:55 Stephen Rothwell
2011-07-01  5:45 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=20130306155233.3598a39ef5a99c4daf4fbc81@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=tglx@linutronix.de \
    /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).