All of lore.kernel.org
 help / color / mirror / Atom feed
* Build failure -- powerpc/boot: Add OPAL console to epapr wrappers
@ 2017-03-24 17:00 Daniel Walker
  2017-03-25  2:16 ` Oliver O'Halloran
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Walker @ 2017-03-24 17:00 UTC (permalink / raw)
  To: Oliver O'Halloran, Benjamin Herrenschmidt, Michael Ellerman,
	linuxppc-dev, xe-linux-external

I get this build failure,


In file included from arch/powerpc/boot/fdt.c:51:
../arch/powerpc/boot/libfdt_env.h:9: error: redefinition of typedef 
'uint32_t'
../arch/powerpc/boot/types.h:20: note: previous declaration of 
'uint32_t' was here
../arch/powerpc/boot/libfdt_env.h:10: error: redefinition of typedef 
'uint64_t'
../arch/powerpc/boot/types.h:21: note: previous declaration of 
'uint64_t' was here
make[2]: *** [arch/powerpc/boot/fdt.o] Error 1
make[1]: *** [uImage] Error 2
make[1]: Leaving directory `/nobackup/danielwa/linux/t1040'
make: *** [sub-make] Error 2


and it bisects to ,


commit 656ad58ef19e2a763fa5c938b20ae0f6b8d67242
Author: Oliver O'Halloran <oohall@gmail.com>
Date:   Fri Jul 1 00:34:37 2016 +1000

     powerpc/boot: Add OPAL console to epapr wrappers

     This patch adds an OPAL console backend to the powerpc boot wrapper so
     that decompression failures inside the wrapper can be reported to the
     user. This is important since it typically indicates data corruption in
     the firmware and other nasty things.

     Currently this only works when building a little endian kernel. When
     compiling a 64 bit BE kernel the wrapper is always build 32 bit to be
     compatible with some 32 bit firmwares. BE support will be added at a
     later date. Another limitation of this is that only the "raw" type of
     OPAL console is supported, however machines that provide a hvsi console
     also provide a raw console so this is not an issue in practice.

     Actually-written-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
     Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
     [mpe: Move #ifdef __powerpc64__ to avoid warnings on 32-bit]
     Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>


I can provide a config file if needed. My apologies if this was already 
reported.


Daniel

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

* Re: Build failure -- powerpc/boot: Add OPAL console to epapr wrappers
  2017-03-24 17:00 Build failure -- powerpc/boot: Add OPAL console to epapr wrappers Daniel Walker
@ 2017-03-25  2:16 ` Oliver O'Halloran
  2017-03-27 17:11   ` Daniel Walker
  0 siblings, 1 reply; 5+ messages in thread
From: Oliver O'Halloran @ 2017-03-25  2:16 UTC (permalink / raw)
  To: Daniel Walker
  Cc: Benjamin Herrenschmidt, Michael Ellerman, linuxppc-dev,
	xe-linux-external

On Sat, Mar 25, 2017 at 4:00 AM, Daniel Walker <danielwa@cisco.com> wrote:
> I get this build failure,
>
>
> In file included from arch/powerpc/boot/fdt.c:51:
> ../arch/powerpc/boot/libfdt_env.h:9: error: redefinition of typedef
> 'uint32_t'
> ../arch/powerpc/boot/types.h:20: note: previous declaration of 'uint32_t'
> was here
> ../arch/powerpc/boot/libfdt_env.h:10: error: redefinition of typedef
> 'uint64_t'
> ../arch/powerpc/boot/types.h:21: note: previous declaration of 'uint64_t'
> was here
> make[2]: *** [arch/powerpc/boot/fdt.o] Error 1
> make[1]: *** [uImage] Error 2
> make[1]: Leaving directory `/nobackup/danielwa/linux/t1040'
> make: *** [sub-make] Error 2
>
>
> and it bisects to ,
>
>
> commit 656ad58ef19e2a763fa5c938b20ae0f6b8d67242
> Author: Oliver O'Halloran <oohall@gmail.com>
> Date:   Fri Jul 1 00:34:37 2016 +1000
>
>     powerpc/boot: Add OPAL console to epapr wrappers
>
>     This patch adds an OPAL console backend to the powerpc boot wrapper so
>     that decompression failures inside the wrapper can be reported to the
>     user. This is important since it typically indicates data corruption in
>     the firmware and other nasty things.
>
>     Currently this only works when building a little endian kernel. When
>     compiling a 64 bit BE kernel the wrapper is always build 32 bit to be
>     compatible with some 32 bit firmwares. BE support will be added at a
>     later date. Another limitation of this is that only the "raw" type of
>     OPAL console is supported, however machines that provide a hvsi console
>     also provide a raw console so this is not an issue in practice.
>
>     Actually-written-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>     Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
>     [mpe: Move #ifdef __powerpc64__ to avoid warnings on 32-bit]
>     Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>
>
> I can provide a config file if needed. My apologies if this was already
> reported.

Thanks for the report, I don't think this is a known bug. mpe's build
testing is pretty thorough so I'm surprised this wasn't caught sooner.

A config file and the version of gcc that you're using would be useful.

Oliver

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

* Re: Build failure -- powerpc/boot: Add OPAL console to epapr wrappers
  2017-03-25  2:16 ` Oliver O'Halloran
@ 2017-03-27 17:11   ` Daniel Walker
  2017-03-28  9:35     ` Michael Ellerman
  0 siblings, 1 reply; 5+ messages in thread
From: Daniel Walker @ 2017-03-27 17:11 UTC (permalink / raw)
  To: Oliver O'Halloran
  Cc: Benjamin Herrenschmidt, Michael Ellerman, linuxppc-dev,
	xe-linux-external

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

On 03/24/2017 07:16 PM, Oliver O'Halloran wrote:
> On Sat, Mar 25, 2017 at 4:00 AM, Daniel Walker <danielwa@cisco.com> wrote:
>> I get this build failure,
>>
>>
>> In file included from arch/powerpc/boot/fdt.c:51:
>> ../arch/powerpc/boot/libfdt_env.h:9: error: redefinition of typedef
>> 'uint32_t'
>> ../arch/powerpc/boot/types.h:20: note: previous declaration of 'uint32_t'
>> was here
>> ../arch/powerpc/boot/libfdt_env.h:10: error: redefinition of typedef
>> 'uint64_t'
>> ../arch/powerpc/boot/types.h:21: note: previous declaration of 'uint64_t'
>> was here
>> make[2]: *** [arch/powerpc/boot/fdt.o] Error 1
>> make[1]: *** [uImage] Error 2
>> make[1]: Leaving directory `/nobackup/danielwa/linux/t1040'
>> make: *** [sub-make] Error 2
>>
>>
>> and it bisects to ,
>>
>>
>> commit 656ad58ef19e2a763fa5c938b20ae0f6b8d67242
>> Author: Oliver O'Halloran <oohall@gmail.com>
>> Date:   Fri Jul 1 00:34:37 2016 +1000
>>
>>      powerpc/boot: Add OPAL console to epapr wrappers
>>
>>      This patch adds an OPAL console backend to the powerpc boot wrapper so
>>      that decompression failures inside the wrapper can be reported to the
>>      user. This is important since it typically indicates data corruption in
>>      the firmware and other nasty things.
>>
>>      Currently this only works when building a little endian kernel. When
>>      compiling a 64 bit BE kernel the wrapper is always build 32 bit to be
>>      compatible with some 32 bit firmwares. BE support will be added at a
>>      later date. Another limitation of this is that only the "raw" type of
>>      OPAL console is supported, however machines that provide a hvsi console
>>      also provide a raw console so this is not an issue in practice.
>>
>>      Actually-written-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>>      Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
>>      [mpe: Move #ifdef __powerpc64__ to avoid warnings on 32-bit]
>>      Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>>
>>
>> I can provide a config file if needed. My apologies if this was already
>> reported.
> Thanks for the report, I don't think this is a known bug. mpe's build
> testing is pretty thorough so I'm surprised this wasn't caught sooner.
>
> A config file and the version of gcc that you're using would be useful.
>
> Oliver


Config attached , it's for a Fresecale t1042 machine. The GCC is custom 
based on 4.4.1 .


Daniel


[-- Attachment #2: t1042.config.gz --]
[-- Type: application/gzip, Size: 20934 bytes --]

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

* Re: Build failure -- powerpc/boot: Add OPAL console to epapr wrappers
  2017-03-27 17:11   ` Daniel Walker
@ 2017-03-28  9:35     ` Michael Ellerman
  2017-03-28 14:01       ` Daniel Walker
  0 siblings, 1 reply; 5+ messages in thread
From: Michael Ellerman @ 2017-03-28  9:35 UTC (permalink / raw)
  To: Daniel Walker, Oliver O'Halloran
  Cc: Benjamin Herrenschmidt, linuxppc-dev, xe-linux-external

Daniel Walker <danielwa@cisco.com> writes:

> On 03/24/2017 07:16 PM, Oliver O'Halloran wrote:
>> On Sat, Mar 25, 2017 at 4:00 AM, Daniel Walker <danielwa@cisco.com> wrote:
>>> I get this build failure,
>>>
>>>
>>> In file included from arch/powerpc/boot/fdt.c:51:
>>> ../arch/powerpc/boot/libfdt_env.h:9: error: redefinition of typedef
>>> 'uint32_t'
>>> ../arch/powerpc/boot/types.h:20: note: previous declaration of 'uint32_t'
>>> was here
>>> ../arch/powerpc/boot/libfdt_env.h:10: error: redefinition of typedef
>>> 'uint64_t'
>>> ../arch/powerpc/boot/types.h:21: note: previous declaration of 'uint64_t'
>>> was here
>>> make[2]: *** [arch/powerpc/boot/fdt.o] Error 1
>>> make[1]: *** [uImage] Error 2
>>> make[1]: Leaving directory `/nobackup/danielwa/linux/t1040'
>>> make: *** [sub-make] Error 2
>>>
>>>
>>> and it bisects to ,
>>>
>>>
>>> commit 656ad58ef19e2a763fa5c938b20ae0f6b8d67242
>>> Author: Oliver O'Halloran <oohall@gmail.com>
>>> Date:   Fri Jul 1 00:34:37 2016 +1000
>>>
>>>      powerpc/boot: Add OPAL console to epapr wrappers
>>>
>>>      This patch adds an OPAL console backend to the powerpc boot wrapper so
>>>      that decompression failures inside the wrapper can be reported to the
>>>      user. This is important since it typically indicates data corruption in
>>>      the firmware and other nasty things.
>>>
>>>      Currently this only works when building a little endian kernel. When
>>>      compiling a 64 bit BE kernel the wrapper is always build 32 bit to be
>>>      compatible with some 32 bit firmwares. BE support will be added at a
>>>      later date. Another limitation of this is that only the "raw" type of
>>>      OPAL console is supported, however machines that provide a hvsi console
>>>      also provide a raw console so this is not an issue in practice.
>>>
>>>      Actually-written-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>>>      Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
>>>      [mpe: Move #ifdef __powerpc64__ to avoid warnings on 32-bit]
>>>      Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>>>
>>>
>>> I can provide a config file if needed. My apologies if this was already
>>> reported.
>> Thanks for the report, I don't think this is a known bug. mpe's build
>> testing is pretty thorough so I'm surprised this wasn't caught sooner.
>>
>> A config file and the version of gcc that you're using would be useful.
>
>
> Config attached , it's for a Fresecale t1042 machine. The GCC is custom 
> based on 4.4.1 .

o_O

So only an 8 year old compiler! :D

I can't reproduce here with 4.6.3 sorry, which is the oldest I have handy.

Can you debug it a bit further at your end? I assume your toolchain is
built with libc?

cheers

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

* Re: Build failure -- powerpc/boot: Add OPAL console to epapr wrappers
  2017-03-28  9:35     ` Michael Ellerman
@ 2017-03-28 14:01       ` Daniel Walker
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Walker @ 2017-03-28 14:01 UTC (permalink / raw)
  To: Michael Ellerman, Oliver O'Halloran
  Cc: Benjamin Herrenschmidt, linuxppc-dev, xe-linux-external

On 03/28/2017 02:35 AM, Michael Ellerman wrote:
> Daniel Walker <danielwa@cisco.com> writes:
>
>> On 03/24/2017 07:16 PM, Oliver O'Halloran wrote:
>>> On Sat, Mar 25, 2017 at 4:00 AM, Daniel Walker <danielwa@cisco.com> wrote:
>>>> I get this build failure,
>>>>
>>>>
>>>> In file included from arch/powerpc/boot/fdt.c:51:
>>>> ../arch/powerpc/boot/libfdt_env.h:9: error: redefinition of typedef
>>>> 'uint32_t'
>>>> ../arch/powerpc/boot/types.h:20: note: previous declaration of 'uint32_t'
>>>> was here
>>>> ../arch/powerpc/boot/libfdt_env.h:10: error: redefinition of typedef
>>>> 'uint64_t'
>>>> ../arch/powerpc/boot/types.h:21: note: previous declaration of 'uint64_t'
>>>> was here
>>>> make[2]: *** [arch/powerpc/boot/fdt.o] Error 1
>>>> make[1]: *** [uImage] Error 2
>>>> make[1]: Leaving directory `/nobackup/danielwa/linux/t1040'
>>>> make: *** [sub-make] Error 2
>>>>
>>>>
>>>> and it bisects to ,
>>>>
>>>>
>>>> commit 656ad58ef19e2a763fa5c938b20ae0f6b8d67242
>>>> Author: Oliver O'Halloran <oohall@gmail.com>
>>>> Date:   Fri Jul 1 00:34:37 2016 +1000
>>>>
>>>>       powerpc/boot: Add OPAL console to epapr wrappers
>>>>
>>>>       This patch adds an OPAL console backend to the powerpc boot wrapper so
>>>>       that decompression failures inside the wrapper can be reported to the
>>>>       user. This is important since it typically indicates data corruption in
>>>>       the firmware and other nasty things.
>>>>
>>>>       Currently this only works when building a little endian kernel. When
>>>>       compiling a 64 bit BE kernel the wrapper is always build 32 bit to be
>>>>       compatible with some 32 bit firmwares. BE support will be added at a
>>>>       later date. Another limitation of this is that only the "raw" type of
>>>>       OPAL console is supported, however machines that provide a hvsi console
>>>>       also provide a raw console so this is not an issue in practice.
>>>>
>>>>       Actually-written-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
>>>>       Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
>>>>       [mpe: Move #ifdef __powerpc64__ to avoid warnings on 32-bit]
>>>>       Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
>>>>
>>>>
>>>> I can provide a config file if needed. My apologies if this was already
>>>> reported.
>>> Thanks for the report, I don't think this is a known bug. mpe's build
>>> testing is pretty thorough so I'm surprised this wasn't caught sooner.
>>>
>>> A config file and the version of gcc that you're using would be useful.
>>
>> Config attached , it's for a Fresecale t1042 machine. The GCC is custom
>> based on 4.4.1 .
> o_O
>
> So only an 8 year old compiler! :D
>
> I can't reproduce here with 4.6.3 sorry, which is the oldest I have handy.
>
> Can you debug it a bit further at your end? I assume your toolchain is
> built with libc?
>
> cheers


It appears to be fairly straight forward,


In file included from arch/powerpc/boot/fdt.c:51:
../arch/powerpc/boot/libfdt_env.h:9: error: redefinition of typedef 
'uint32_t'
../arch/powerpc/boot/types.h:20: note: previous declaration of 
'uint32_t' was here
../arch/powerpc/boot/libfdt_env.h:10: error: redefinition of typedef 
'uint64_t'
../arch/powerpc/boot/types.h:21: note: previous declaration of 
'uint64_t' was here


So in types.h you added a couple new types "unit32_t" and "uint64_t" , 
but alas libfdt_env.h is already defining those and includes types.h . 
So now libfdt_env.h ends up having two types with the same name. I 
suppose it's possible that newer compilers ignore this issue if the 
types are identical which in this case they are.

To fix this I removed the typedefs from libfdt_env.h , if you make a 
patch like that I can test it.

Daniel

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

end of thread, other threads:[~2017-03-28 14:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-24 17:00 Build failure -- powerpc/boot: Add OPAL console to epapr wrappers Daniel Walker
2017-03-25  2:16 ` Oliver O'Halloran
2017-03-27 17:11   ` Daniel Walker
2017-03-28  9:35     ` Michael Ellerman
2017-03-28 14:01       ` Daniel Walker

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.