Hi Masahiro,

On 22 December 2014 at 03:16, Masahiro Yamada <[email protected]> wrote:
> Linux expects "unsigned long" has the same bit-width as the pointer,
> i.e. the size of "unsigned long" is 4 on 32-bit compilers (ILP32)
> and it is 8 on 64-bit compilers (LLP64).
> It provides us the convenience in return of the limitation that
> LP64 data model is not supported.
>
> U-Boot used to follow Linux's way, but it does not now.
>
> Including <stdint.h> means the width of "long" type is provided by
> the compiler.
>
> Use __SIZEOF_LONG__ instead of hard-coding BITS_PER_LONG.
>

>From what I can tell the size of the types is no different with and
without stdint.h. It is just the names of the typedefs that are used
for each type that changes. So if we follow the kernel approach, maybe
this patch isn't needed either?

> Signed-off-by: Masahiro Yamada <[email protected]>
> Cc: Gabe Black <[email protected]>
> Cc: Simon Glass <[email protected]>
> Cc: Bill Richardson <[email protected]>
> Cc: Tom Rini <[email protected]>
> ---
>
>  arch/arc/include/asm/types.h        | 4 ++++
>  arch/arm/include/asm/types.h        | 4 ++++
>  arch/avr32/include/asm/types.h      | 4 ++++
>  arch/blackfin/include/asm/types.h   | 4 ++++
>  arch/m68k/include/asm/types.h       | 4 ++++
>  arch/microblaze/include/asm/types.h | 4 ++++
>  arch/mips/include/asm/types.h       | 4 ++++
>  arch/nds32/include/asm/types.h      | 4 ++++
>  arch/nios2/include/asm/types.h      | 4 ++++
>  arch/openrisc/include/asm/types.h   | 4 ++++
>  arch/powerpc/include/asm/types.h    | 4 ++++
>  arch/sandbox/include/asm/types.h    | 4 ++++
>  arch/sh/include/asm/types.h         | 4 ++++
>  arch/sparc/include/asm/types.h      | 4 ++++
>  arch/x86/include/asm/types.h        | 4 ++++
>  15 files changed, 60 insertions(+)
>

[snip]

Regards,
Simon
_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to