2013-03-27 11:44:34

by Chen Gang

[permalink] [raw]
Subject: [Suggestion] 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.


2013-03-27 11:55:34

by Catalin Marinas

[permalink] [raw]
Subject: Re: [Suggestion] ARM64:kernel: compiling issue for early_console.

On Wed, Mar 27, 2013 at 11:44:03AM +0000, Chen Gang wrote:
> 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).

--
Catalin

2013-03-27 12:03:33

by Chen Gang

[permalink] [raw]
Subject: Re: [Suggestion] ARM64:kernel: compiling issue for early_console.

On 2013年03月27日 19:55, Catalin Marinas wrote:
> On Wed, Mar 27, 2013 at 11:44:03AM +0000, Chen Gang wrote:
>> > 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 :-)

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

--
Chen Gang

Asianux Corporation

2013-04-03 08:13:51

by Chen Gang

[permalink] [raw]
Subject: Re: [Suggestion] ARM64:kernel: compiling issue for early_console.

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.


On 2013年03月27日 20:02, Chen Gang wrote:
> On 2013年03月27日 19:55, Catalin Marinas wrote:
>> On Wed, Mar 27, 2013 at 11:44:03AM +0000, Chen Gang wrote:
>>>> 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 :-)
>
>>
>> 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.
>


--
Chen Gang

Asianux Corporation

2013-04-03 11:39:44

by Christopher Covington

[permalink] [raw]
Subject: Re: [Suggestion] ARM64:kernel: compiling issue for early_console.

Hi Chen,

On 04/03/2013 04:13 AM, Chen Gang wrote:
> 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".

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

I'm sure a fix would be appreciated.

> On 2013年03月27日 20:02, Chen Gang wrote:
>> On 2013年03月27日 19:55, Catalin Marinas wrote:
>>> On Wed, Mar 27, 2013 at 11:44:03AM +0000, Chen Gang wrote:
>>>>> 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 :-)
>>
>>>
>>> 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

--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by the Linux Foundation.

2013-04-03 13:01:32

by Chen Gang

[permalink] [raw]
Subject: Re: [Suggestion] ARM64:kernel: compiling issue for early_console.

On 2013年04月03日 19:39, Christopher Covington wrote:
> 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.

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


>> > On 2013年03月27日 20:02, Chen Gang wrote:
>>> >> On 2013年03月27日 19:55, Catalin Marinas wrote:
>>>> >>>
>>>> >>> 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.


--
Chen Gang

Asianux Corporation

2013-04-17 09:11:01

by Chen Gang

[permalink] [raw]
Subject: Re: [Suggestion] ARM64:kernel: compiling issue for early_console.

On 2013年04月03日 21:00, Chen Gang wrote:
> On 2013年04月03日 19:39, Christopher Covington wrote:
>> 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.


>>>> 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).
>
>
>>>> On 2013年03月27日 20:02, Chen Gang wrote:
>>>>>> On 2013年03月27日 19:55, Catalin Marinas wrote:
>>>>>>>>
>>>>>>>> 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.
>
>


--
Chen Gang

Asianux Corporation

2013-04-19 10:53:52

by Chen Gang

[permalink] [raw]
Subject: [PATCH] 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).


Signed-off-by: Chen Gang <[email protected]>
---
arch/arm64/kernel/early_printk.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/kernel/early_printk.c
b/arch/arm64/kernel/early_printk.c
index ac974f4..fbb6e18 100644
--- a/arch/arm64/kernel/early_printk.c
+++ b/arch/arm64/kernel/early_printk.c
@@ -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;
}
--
1.7.7.6

2013-04-19 12:15:39

by Arnd Bergmann

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

On Friday 19 April 2013, Chen Gang wrote:
> 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).
>
>
> Signed-off-by: Chen Gang <[email protected]>

Acked-by: Arnd Bergmann <[email protected]>

2013-04-19 12:32:27

by Catalin Marinas

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

On Fri, Apr 19, 2013 at 11:53:07AM +0100, Chen Gang wrote:
> 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).
>
>
> Signed-off-by: Chen Gang <[email protected]>

Thanks for the patch.

--
Catalin

2013-04-20 01:55:22

by Chen Gang

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

On 2013年04月19日 20:31, Catalin Marinas wrote:
> On Fri, Apr 19, 2013 at 11:53:07AM +0100, Chen Gang wrote:
>> 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).
>>
>>
>> Signed-off-by: Chen Gang <[email protected]>
>
> Thanks for the patch.
>

:-)

--
Chen Gang

Asianux Corporation

2013-04-20 01:56:40

by Chen Gang

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

On 2013年04月19日 20:15, Arnd Bergmann wrote:
> On Friday 19 April 2013, Chen Gang wrote:
>> > 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).
>> >
>> >
>> > Signed-off-by: Chen Gang <[email protected]>
> Acked-by: Arnd Bergmann <[email protected]>
>
>

thanks

--
Chen Gang

Asianux Corporation