Skip to contentSkip to conversation

ARM64:kernel: compiling issue for early_console.

Suggestion In review Chen Gang 4 participants 12 messages Mar 27, 2013 – Apr 20, 2013 arm64

lore
Share & tools
lore

Chen Gang

author
#0 lore raw

Hello Maintainers:

it is a compiling issue for early_console.

the make command:
make V=1 EXTRA_CFLAGS=-W ARCH=arm64 allmodconfig make V=1 EXTRA_CFLAGS=-W ARCH=arm64 menuconfig
set aarch64-linux-gnu- for tool chain prefix.
make V=1 EXTRA_CFLAGS=-W ARCH=arm64

the error message:
arch/arm64/kernel/early_printk.c: At top level:
arch/arm64/kernel/early_printk.c:98:23: error: conflicting types for ?early_console? In file included from arch/arm64/kernel/early_printk.c:20:0:
include/linux/console.h:145:24: note: previous declaration of ?early_console? was here make[1]: *** [arch/arm64/kernel/early_printk.o] Error 1
make: *** [arch/arm64/kernel] Error 2

I guess, we can just reference the 32-bit arm implementation is ok.
(it is in arch/arm/kernel/early_printk.c line 32..44)

if really just like what I guess, may I send related patch for it ?

:-)

gchen.

maintainer
#1 lore raw
Quoted 7 lines · Chen Gang

the error message:
arch/arm64/kernel/early_printk.c: At top level:
arch/arm64/kernel/early_printk.c:98:23: error: conflicting types for ?early_console? In file included from arch/arm64/kernel/early_printk.c:20:0:
include/linux/console.h:145:24: note: previous declaration of ?early_console? was here make[1]: *** [arch/arm64/kernel/early_printk.o] Error 1
make: *** [arch/arm64/kernel] Error 2

Is this in linux-next? Mainline seems fine.

I saw some patches from tglx on unifying the various early printk implementations, though not sure whether it's those patches causing it (in which case arm64 needs to be updated as well).

Signature · 1 line
Catalin
author
#2 lore raw
Quoted 9 lines · Catalin Marinas
Quoted 7 lines · Chen Gang
Quoted 7 lines

the error message:
arch/arm64/kernel/early_printk.c: At top level:
arch/arm64/kernel/early_printk.c:98:23: error: conflicting types for ?early_console? In file included from arch/arm64/kernel/early_printk.c:20:0:
include/linux/console.h:145:24: note: previous declaration of ?early_console? was here make[1]: *** [arch/arm64/kernel/early_printk.o] Error 1
make: *** [arch/arm64/kernel] Error 2

Is this in linux-next? Mainline seems fine.

yes, it is in next-20130326 at least :-)

Quoted 4 lines

I saw some patches from tglx on unifying the various early printk implementations, though not sure whether it's those patches causing it (in which case arm64 needs to be updated as well).

maybe, but we need check the details to prove it :-)

thanks.

Signature · 3 lines
Chen Gang

Asianux Corporation
author
#3 lore raw

Hello Maintainers:

it seems, this issue still exists in next-20130402.

have you already fixed it in another tree ?

if really no one fix it within this week, I should try (since I find it).

thanks.

gchen.

Quoted 23 lines · Chen Gang
Quoted 9 lines · Catalin Marinas
Quoted 7 lines · Chen Gang
Quoted 7 lines

the error message:
arch/arm64/kernel/early_printk.c: At top level:
arch/arm64/kernel/early_printk.c:98:23: error: conflicting types for ?early_console? In file included from arch/arm64/kernel/early_printk.c:20:0:
include/linux/console.h:145:24: note: previous declaration of ?early_console? was here make[1]: *** [arch/arm64/kernel/early_printk.o] Error 1
make: *** [arch/arm64/kernel] Error 2

Is this in linux-next? Mainline seems fine.

yes, it is in next-20130326 at least :-)

Quoted 4 lines

I saw some patches from tglx on unifying the various early printk implementations, though not sure whether it's those patches causing it (in which case arm64 needs to be updated as well).

maybe, but we need check the details to prove it :-)

thanks.

Signature · 3 lines
Chen Gang

Asianux Corporation
#4 lore raw

Hi Chen,

Quoted 5 lines · Chen Gang

Hello Maintainers:

it seems, this issue still exists in next-20130402.

have you already fixed it in another tree ?

Maybe somebody else does have a fix, but Catalin mentioned he was going on vacation for two weeks on March 28th in "[GIT PULL] Preparatory GIC patches for arm64 support".

Quoted 1 line

if really no one fix it within this week, I should try (since I find it).

I'm sure a fix would be appreciated.

Quoted 10 lines · Chen Gang
Quoted 9 lines · Catalin Marinas
Quoted 8 lines · Chen Gang
Quoted 7 lines
Quoted 7 lines

the error message:
arch/arm64/kernel/early_printk.c: At top level:
arch/arm64/kernel/early_printk.c:98:23: error: conflicting types for ?early_console? In file included from arch/arm64/kernel/early_printk.c:20:0:
include/linux/console.h:145:24: note: previous declaration of ?early_console? was here make[1]: *** [arch/arm64/kernel/early_printk.o] Error 1
make: *** [arch/arm64/kernel] Error 2

Quoted 8 lines
Quoted 8 lines
Quoted 1 line

Is this in linux-next? Mainline seems fine.

yes, it is in next-20130326 at least :-)

Quoted 4 lines

I saw some patches from tglx on unifying the various early printk implementations, though not sure whether it's those patches causing it (in which case arm64 needs to be updated as well).

I looked briefly and wasn't able to find this patchset.

Regards,
Christopher

Signature · 3 lines
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by the Linux Foundation.
author
#5 lore raw
Quoted 4 lines · Christopher Covington

Maybe somebody else does have a fix, but Catalin mentioned he was going on vacation for two weeks on March 28th in "[GIT PULL] Preparatory GIC patches for arm64 support".

ok, I can wait.

Quoted 3 lines
Quoted 1 line
Quoted 1 line

if really no one fix it within this week, I should try (since I find it).

I'm sure a fix would be appreciated.

ok, thanks. I prefer to wait (at least for the end of Catalin's vacation).

Quoted 7 lines
Quoted 6 lines
Quoted 6 lines · Chen Gang
Quoted 5 lines
Quoted 5 lines · Catalin Marinas
Quoted 4 lines
Quoted 4 lines

I saw some patches from tglx on unifying the various early printk implementations, though not sure whether it's those patches causing it (in which case arm64 needs to be updated as well).

I looked briefly and wasn't able to find this patchset.

ok, thank for your results.

Signature · 3 lines
Chen Gang

Asianux Corporation
author
#6 lore raw
Quoted 7 lines · Chen Gang
Quoted 4 lines · Christopher Covington

Maybe somebody else does have a fix, but Catalin mentioned he was going on vacation for two weeks on March 28th in "[GIT PULL] Preparatory GIC patches for arm64 support".

ok, I can wait.

could you have time to fix it ? (if have no time, I should fix it).

thanks.

Quoted 18 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line

if really no one fix it within this week, I should try (since I find it).

I'm sure a fix would be appreciated.

ok, thanks. I prefer to wait (at least for the end of Catalin's vacation).

Quoted 7 lines
Quoted 6 lines
Quoted 6 lines · Chen Gang
Quoted 5 lines
Quoted 5 lines · Catalin Marinas
Quoted 4 lines
Quoted 4 lines

I saw some patches from tglx on unifying the various early printk implementations, though not sure whether it's those patches causing it (in which case arm64 needs to be updated as well).

I looked briefly and wasn't able to find this patchset.

ok, thank for your results.

Signature · 3 lines
Chen Gang

Asianux Corporation
author
#7 lore raw

PATCH 1/1 ARM64: kernel: compiling issue, duplicate definition of early_console

when compiling with allmodconfig.
early_console is already defined as an extern global pointer.

need let it point to the object which we intend to (like ARM32 done).

---
 arch/arm64/kernel/early_printk.c |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
(quoted diff) +0 -0

b/arch/arm64/kernel/early_printk.c
index ac974f4..fbb6e18 100644

arch/arm64/kernel/early_printk.c +0 -0
@@ -95,7 +95,7 @@ static void early_write(struct console *con, const

char *s, unsigned n)
}
}

-static struct console early_console = {
+static struct console early_console_dev = {
.name = "earlycon",
.write = early_write,
.flags = CON_PRINTBUFFER | CON_BOOT,
@@ -145,7 +145,8 @@ static int __init setup_early_printk(char *buf)
early_base = early_io_map(paddr, EARLYCON_IOBASE);

printch = match->printch;
- register_console(&early_console);
+ early_console = &early_console_dev;
+ register_console(&early_console_dev);

return 0;
}

Signature · 1 line
1.7.7.6
Acked-by on v1 1/1
#8 lore raw

Re: [PATCH] ARM64: kernel: compiling issue, duplicate definition of early_console

Quoted 7 lines · Chen Gang

when compiling with allmodconfig.
early_console is already defined as an extern global pointer.

need let it point to the object which we intend to (like ARM32 done).

maintainer
#10 lore raw

Re: [PATCH] ARM64: kernel: compiling issue, duplicate definition of early_console

In reply to Chen Gang
Quoted 7 lines · Chen Gang

when compiling with allmodconfig.
early_console is already defined as an extern global pointer.

need let it point to the object which we intend to (like ARM32 done).

Thanks for the patch.

Signature · 1 line
Catalin
author
#11 lore raw

Re: [PATCH] ARM64: kernel: compiling issue, duplicate definition of early_console

Quoted 11 lines · Catalin Marinas
Quoted 7 lines · Chen Gang

when compiling with allmodconfig.
early_console is already defined as an extern global pointer.

need let it point to the object which we intend to (like ARM32 done).

Thanks for the patch.

:-)

Signature · 3 lines
Chen Gang

Asianux Corporation
author
#9 lore raw

Re: [PATCH] ARM64: kernel: compiling issue, duplicate definition of early_console

In reply to Arnd Bergmann
Quoted 11 lines · Arnd Bergmann
Quoted 7 lines · Chen Gang
Quoted 7 lines

when compiling with allmodconfig.
early_console is already defined as an extern global pointer.

need let it point to the object which we intend to (like ARM32 done).

thanks

Signature · 3 lines
Chen Gang

Asianux Corporation