linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* undefined reference to `early_panic'
@ 2016-06-05  4:33 kbuild test robot
  2016-06-06 20:31 ` Andrew Morton
  0 siblings, 1 reply; 7+ messages in thread
From: kbuild test robot @ 2016-06-05  4:33 UTC (permalink / raw)
  Cc: kbuild-all, linux-kernel, Dan Williams, Andrew Morton,
	Linux Memory Management List

[-- Attachment #1: Type: text/plain, Size: 1549 bytes --]

Hi,

It's probably a bug fix that unveils the link errors.

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   049ec1b5a76d34a6980cccdb7c0baeb4eed7a993
commit: 888cdbc2c9a76a0e450f533b1957cdbfe7d483d5 hugetlb: fix compile error on tile
date:   5 months ago
config: tile-allnoconfig (attached as .config)
compiler: tilegx-linux-gcc (GCC) 4.6.2
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout 888cdbc2c9a76a0e450f533b1957cdbfe7d483d5
        # save the attached .config to linux build tree
        make.cross ARCH=tile 

All errors (new ones prefixed by >>):

   arch/tile/built-in.o: In function `setup_arch':
>> (.init.text+0x15d8): undefined reference to `early_panic'
   arch/tile/built-in.o: In function `setup_arch':
   (.init.text+0x1610): undefined reference to `early_panic'
   arch/tile/built-in.o: In function `setup_arch':
   (.init.text+0x1800): undefined reference to `early_panic'
   arch/tile/built-in.o: In function `setup_arch':
   (.init.text+0x1828): undefined reference to `early_panic'
   arch/tile/built-in.o: In function `setup_arch':
   (.init.text+0x1bd8): undefined reference to `early_panic'
   arch/tile/built-in.o:(.init.text+0x1c18): more undefined references to `early_panic' follow

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 4026 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: undefined reference to `early_panic'
  2016-06-05  4:33 undefined reference to `early_panic' kbuild test robot
@ 2016-06-06 20:31 ` Andrew Morton
  2016-06-06 20:36   ` Chris Metcalf
                     ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Andrew Morton @ 2016-06-06 20:31 UTC (permalink / raw)
  To: kbuild test robot
  Cc: kbuild-all, linux-kernel, Dan Williams,
	Linux Memory Management List, Chris Metcalf

On Sun, 5 Jun 2016 12:33:29 +0800 kbuild test robot <fengguang.wu@intel.com> wrote:

> It's probably a bug fix that unveils the link errors.
> 
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head:   049ec1b5a76d34a6980cccdb7c0baeb4eed7a993
> commit: 888cdbc2c9a76a0e450f533b1957cdbfe7d483d5 hugetlb: fix compile error on tile
> date:   5 months ago
> config: tile-allnoconfig (attached as .config)
> compiler: tilegx-linux-gcc (GCC) 4.6.2
> reproduce:
>         wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         git checkout 888cdbc2c9a76a0e450f533b1957cdbfe7d483d5
>         # save the attached .config to linux build tree
>         make.cross ARCH=tile 
> 
> All errors (new ones prefixed by >>):
> 
>    arch/tile/built-in.o: In function `setup_arch':
> >> (.init.text+0x15d8): undefined reference to `early_panic'
>    arch/tile/built-in.o: In function `setup_arch':
>    (.init.text+0x1610): undefined reference to `early_panic'
>    arch/tile/built-in.o: In function `setup_arch':
>    (.init.text+0x1800): undefined reference to `early_panic'
>    arch/tile/built-in.o: In function `setup_arch':
>    (.init.text+0x1828): undefined reference to `early_panic'
>    arch/tile/built-in.o: In function `setup_arch':
>    (.init.text+0x1bd8): undefined reference to `early_panic'
>    arch/tile/built-in.o:(.init.text+0x1c18): more undefined references to `early_panic' follow

This?

From: Andrew Morton <akpm@linux-foundation.org>
Subject: tile: early_printk.o is always required

arch/tile/setup.o is always compiled, and it requires early_panic() and
hence early_printk(), so we must always build and link early_printk.o.

Reported-by: kbuild test robot <fengguang.wu@intel.com>
Cc: Chris Metcalf <cmetcalf@mellanox.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 arch/tile/Kconfig |    1 +
 1 file changed, 1 insertion(+)

diff -puN arch/tile/Kconfig~tile-early_printko-is-always-required arch/tile/Kconfig
--- a/arch/tile/Kconfig~tile-early_printko-is-always-required
+++ a/arch/tile/Kconfig
@@ -14,6 +14,7 @@ config TILE
 	select GENERIC_FIND_FIRST_BIT
 	select GENERIC_IRQ_PROBE
 	select GENERIC_IRQ_SHOW
+	select EARLY_PRINTK
 	select GENERIC_PENDING_IRQ if SMP
 	select GENERIC_STRNCPY_FROM_USER
 	select GENERIC_STRNLEN_USER
_

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: undefined reference to `early_panic'
  2016-06-06 20:31 ` Andrew Morton
@ 2016-06-06 20:36   ` Chris Metcalf
  2016-06-06 23:31   ` Stephen Rothwell
  2016-06-07  9:17   ` tile: early_printk.o is always required kbuild test robot
  2 siblings, 0 replies; 7+ messages in thread
From: Chris Metcalf @ 2016-06-06 20:36 UTC (permalink / raw)
  To: Andrew Morton, kbuild test robot
  Cc: kbuild-all, linux-kernel, Dan Williams, Linux Memory Management List

On 6/6/2016 4:31 PM, Andrew Morton wrote:
> On Sun, 5 Jun 2016 12:33:29 +0800 kbuild test robot <fengguang.wu@intel.com> wrote:
>
>> [...]
>>
>>     arch/tile/built-in.o: In function `setup_arch':
>>>> (.init.text+0x15d8): undefined reference to `early_panic'
>>   
> This?
>
> From: Andrew Morton <akpm@linux-foundation.org>
> Subject: tile: early_printk.o is always required
>
> arch/tile/setup.o is always compiled, and it requires early_panic() and
> hence early_printk(), so we must always build and link early_printk.o.
>
> [...]
>
> diff -puN arch/tile/Kconfig~tile-early_printko-is-always-required arch/tile/Kconfig
> --- a/arch/tile/Kconfig~tile-early_printko-is-always-required
> +++ a/arch/tile/Kconfig
> @@ -14,6 +14,7 @@ config TILE
>   	select GENERIC_FIND_FIRST_BIT
>   	select GENERIC_IRQ_PROBE
>   	select GENERIC_IRQ_SHOW
> +	select EARLY_PRINTK
>   	select GENERIC_PENDING_IRQ if SMP
>   	select GENERIC_STRNCPY_FROM_USER
>   	select GENERIC_STRNLEN_USER

Seems plausible; thanks.

Acked-by: Chris Metcalf <cmetcalf@mellanox.com>

-- 
Chris Metcalf, Mellanox Technologies
http://www.mellanox.com

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: undefined reference to `early_panic'
  2016-06-06 20:31 ` Andrew Morton
  2016-06-06 20:36   ` Chris Metcalf
@ 2016-06-06 23:31   ` Stephen Rothwell
  2016-06-07  9:17   ` tile: early_printk.o is always required kbuild test robot
  2 siblings, 0 replies; 7+ messages in thread
From: Stephen Rothwell @ 2016-06-06 23:31 UTC (permalink / raw)
  To: Andrew Morton
  Cc: kbuild test robot, kbuild-all, linux-kernel, Dan Williams,
	Linux Memory Management List, Chris Metcalf

Hi Andrew,

On Mon, 6 Jun 2016 13:31:20 -0700 Andrew Morton <akpm@linux-foundation.org> wrote:
>
> From: Andrew Morton <akpm@linux-foundation.org>
> Subject: tile: early_printk.o is always required

Added to linux-next today (will be dropped if it turns up elsewhere).

-- 
Cheers,
Stephen Rothwell

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tile: early_printk.o is always required
  2016-06-06 20:31 ` Andrew Morton
  2016-06-06 20:36   ` Chris Metcalf
  2016-06-06 23:31   ` Stephen Rothwell
@ 2016-06-07  9:17   ` kbuild test robot
  2016-06-07 19:52     ` Andrew Morton
  2 siblings, 1 reply; 7+ messages in thread
From: kbuild test robot @ 2016-06-07  9:17 UTC (permalink / raw)
  To: Andrew Morton
  Cc: kbuild-all, kbuild test robot, linux-kernel, Dan Williams,
	Linux Memory Management List, Chris Metcalf

[-- Attachment #1: Type: text/plain, Size: 1146 bytes --]

Hi,

[auto build test ERROR on tile/master]
[also build test ERROR on v4.7-rc2 next-20160606]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Andrew-Morton/tile-early_printk-o-is-always-required/20160607-043356
base:   https://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile.git master
config: tile-allnoconfig (attached as .config)
compiler: tilegx-linux-gcc (GCC) 4.6.2
reproduce:
        wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        make.cross ARCH=tile 

All errors (new ones prefixed by >>):

   arch/tile/built-in.o: In function `early_hv_write':
>> early_printk.c:(.text+0xc770): undefined reference to `tile_console_write'
   early_printk.c:(.text+0xc800): undefined reference to `tile_console_write'

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 4044 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: tile: early_printk.o is always required
  2016-06-07  9:17   ` tile: early_printk.o is always required kbuild test robot
@ 2016-06-07 19:52     ` Andrew Morton
  2016-06-07 20:56       ` [PATCH] tile: allow disabling CONFIG_EARLY_PRINTK Chris Metcalf
  0 siblings, 1 reply; 7+ messages in thread
From: Andrew Morton @ 2016-06-07 19:52 UTC (permalink / raw)
  To: kbuild test robot
  Cc: kbuild-all, kbuild test robot, linux-kernel, Dan Williams,
	Linux Memory Management List, Chris Metcalf

On Tue, 7 Jun 2016 17:17:49 +0800 kbuild test robot <lkp@intel.com> wrote:

> Hi,
> 
> [auto build test ERROR on tile/master]
> [also build test ERROR on v4.7-rc2 next-20160606]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> 
> url:    https://github.com/0day-ci/linux/commits/Andrew-Morton/tile-early_printk-o-is-always-required/20160607-043356
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile.git master
> config: tile-allnoconfig (attached as .config)
> compiler: tilegx-linux-gcc (GCC) 4.6.2
> reproduce:
>         wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
>         chmod +x ~/bin/make.cross
>         # save the attached .config to linux build tree
>         make.cross ARCH=tile 
> 
> All errors (new ones prefixed by >>):
> 
>    arch/tile/built-in.o: In function `early_hv_write':
> >> early_printk.c:(.text+0xc770): undefined reference to `tile_console_write'
>    early_printk.c:(.text+0xc800): undefined reference to `tile_console_write'

Which means we also need HVC_TILE which means we need TTY which means...

blah, I give up :)

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] tile: allow disabling CONFIG_EARLY_PRINTK
  2016-06-07 19:52     ` Andrew Morton
@ 2016-06-07 20:56       ` Chris Metcalf
  0 siblings, 0 replies; 7+ messages in thread
From: Chris Metcalf @ 2016-06-07 20:56 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel, kbuild-all, kbuild test robot,
	Dan Williams, Linux Memory Management List
  Cc: Chris Metcalf

In that case, any users of early_panic() end up calling panic().

Signed-off-by: Chris Metcalf <cmetcalf@mellanox.com>
---
I don't think this is a recent breakage, and it doesn't feel too
critical, so I'll just push it in the next merge window.

 arch/tile/include/asm/setup.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/arch/tile/include/asm/setup.h b/arch/tile/include/asm/setup.h
index e98909033e5b..2a0347af0702 100644
--- a/arch/tile/include/asm/setup.h
+++ b/arch/tile/include/asm/setup.h
@@ -25,7 +25,12 @@
 #define MAXMEM_PFN	PFN_DOWN(MAXMEM)
 
 int tile_console_write(const char *buf, int count);
+
+#ifdef CONFIG_EARLY_PRINTK
 void early_panic(const char *fmt, ...);
+#else
+#define early_panic panic
+#endif
 
 /* Init-time routine to do tile-specific per-cpu setup. */
 void setup_cpu(int boot);
-- 
2.7.2

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-06-07 20:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-05  4:33 undefined reference to `early_panic' kbuild test robot
2016-06-06 20:31 ` Andrew Morton
2016-06-06 20:36   ` Chris Metcalf
2016-06-06 23:31   ` Stephen Rothwell
2016-06-07  9:17   ` tile: early_printk.o is always required kbuild test robot
2016-06-07 19:52     ` Andrew Morton
2016-06-07 20:56       ` [PATCH] tile: allow disabling CONFIG_EARLY_PRINTK Chris Metcalf

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).