ARM64:kernel: compiling issue for early_console.
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.
Catalin Marinas
maintainerQuoted 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 fromarch/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
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 fromarch/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 2Is 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
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 fromarch/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 2Is 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
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 fromarch/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.
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
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
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
Re: [PATCH] ARM64: kernel: compiling issue, duplicate definition of early_console
Quoted 7 lines · Chen Gang
when compiling with allmodconfig.
early_consoleis already defined as an extern global pointer.need let it point to the object which we intend to (like ARM32 done).
Signed-off-by Chen Gang <[email protected]>
Re: [PATCH] ARM64: kernel: compiling issue, duplicate definition of early_console
Quoted 11 lines · Arnd Bergmann
Quoted 7 lines · Chen Gang
Quoted 7 lines
when compiling with allmodconfig.
early_consoleis already defined as an extern global pointer.need let it point to the object which we intend to (like ARM32 done).
Signed-off-by Chen Gang <[email protected]>Acked-by Arnd Bergmann <[email protected]>
thanks
Signature · 3 lines
Chen Gang Asianux Corporation
Catalin Marinas
maintainerRe: [PATCH] ARM64: kernel: compiling issue, duplicate definition of early_console
In reply to Chen GangQuoted 7 lines · Chen Gang
when compiling with allmodconfig.
early_consoleis already defined as an extern global pointer.need let it point to the object which we intend to (like ARM32 done).
Signed-off-by Chen Gang <[email protected]>
Thanks for the patch.
Signature · 1 line
Catalin
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_consoleis already defined as an extern global pointer.need let it point to the object which we intend to (like ARM32 done).
Signed-off-by Chen Gang <[email protected]>Thanks for the patch.
:-)
Signature · 3 lines
Chen Gang Asianux Corporation