12 Jun, 2009

1 commit

  • This provides a reliable way for asm-generic/types.h and other
    files to find out if it is running on a 32 or 64 bit platform.

    We cannot use CONFIG_64BIT for this in headers that are included
    from user space because CONFIG symbols are not available there.
    We also cannot do it inside of asm/types.h because some headers
    need the word size but cannot include types.h.

    The solution is to introduce a new header
    that defines both __BITS_PER_LONG for user space and
    BITS_PER_LONG for usage in the kernel. The asm-generic
    version falls back to 32 bit unless the architecture overrides
    it, which I did for all 64 bit platforms.

    Signed-off-by: Remis Lima Baima
    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     

26 Jul, 2008

1 commit

  • Several compilers offer "long long" without claiming to support C99.

    Considering how frequent __s64/__u64 are used our userspace headers are
    anyway unusable without __s64/__u64 available.

    Always offer __s64/__u64 to non-gcc non-C99 compilers - if they provide
    "long long" that makes the headers compiling and if they don't they are
    anyway screwed.

    Signed-off-by: Adrian Bunk
    Acked-by: H. Peter Anvin
    Cc: Harvey Harrison
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Adrian Bunk
     

03 May, 2008

2 commits

  • Add C99-style constructor macros for fixed types to
    . Since Linux uses names like "u64" instead of
    "uint64_t", the constructor macros are called U64_C() instead of
    UINT64_C() and so forth.

    These macros allow specific sizes to be specified as
    U64_C(0x123456789abcdef), without gcc issuing warnings as it will if
    one writes (u64)0x123456789abcdef.

    When used from assembly, these macros pass their argument unchanged.

    Signed-off-by: H. Peter Anvin

    H. Peter Anvin
     
  • This creates two generic files with common integer definitions; one
    where 64 bits is "long" (most 64-bit architectures) and one where 64
    bits is "long long" (all 32-bit architectures and x86-64.)

    Signed-off-by: H. Peter Anvin
    Cc: Anton Blanchard
    Cc: Ben Dooks
    Cc: Bryan Wu
    Cc: Chris Zankel
    Cc: David Howells
    Cc: David S. Miller
    Cc: Geert Uytterhoeven
    Cc: Grant Grundler
    Cc: H. Peter Anvin
    Cc: Haavard Skinnemoen
    Cc: Heiko Carstens
    Cc: Hirokazu Takata
    Cc: Ingo Molnar
    Cc: Ivan Kokshaysky
    Cc: Jesper Nilsson
    Cc: Koichi Yasutake
    Cc: Kyle McMartin
    Cc: Lennert Buytenhek
    Cc: Martin Schwidefsky
    Cc: Matthew Wilcox
    Cc: Mikael Starvik
    Cc: Paul Mackerras
    Cc: Paul Mundt
    Cc: Ralf Baechle
    Cc: Richard Henderson
    Cc: Roman Zippel
    Cc: Russell King
    Cc: Thomas Gleixner
    Cc: Tony Luck
    Cc: William L. Irwin
    Cc: Yoshinori Sato

    H. Peter Anvin