asm-generic: introduce asm/bitsperlong.h
authorArnd Bergmann <arnd@arndb.de>
Wed, 13 May 2009 22:56:25 +0000 (22:56 +0000)
committerArnd Bergmann <arnd@klappe2.(none)>
Thu, 11 Jun 2009 19:02:14 +0000 (21:02 +0200)
commitc31ae4bb4a9fa4606a74c0a4fb61b74f804e861e
tree7694b1a05bc1ac660ac26eb9997200556ccd3933
parent63b852a6b67d0820d388b0ecd0da83ccb4048b8d
asm-generic: introduce asm/bitsperlong.h

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 <asm/bitsperlong.h>
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 <remis.developer@googlemail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
33 files changed:
arch/alpha/include/asm/bitsperlong.h [new file with mode: 0644]
arch/alpha/include/asm/types.h
arch/arm/include/asm/bitsperlong.h [new file with mode: 0644]
arch/avr32/include/asm/bitsperlong.h [new file with mode: 0644]
arch/blackfin/include/asm/bitsperlong.h [new file with mode: 0644]
arch/cris/include/asm/bitsperlong.h [new file with mode: 0644]
arch/frv/include/asm/bitsperlong.h [new file with mode: 0644]
arch/h8300/include/asm/bitsperlong.h [new file with mode: 0644]
arch/ia64/include/asm/bitsperlong.h [new file with mode: 0644]
arch/ia64/include/asm/types.h
arch/m32r/include/asm/bitsperlong.h [new file with mode: 0644]
arch/m68k/include/asm/bitsperlong.h [new file with mode: 0644]
arch/microblaze/include/asm/bitsperlong.h [new file with mode: 0644]
arch/mips/include/asm/bitsperlong.h [new file with mode: 0644]
arch/mips/include/asm/types.h
arch/mn10300/include/asm/bitsperlong.h [new file with mode: 0644]
arch/parisc/include/asm/bitsperlong.h [new file with mode: 0644]
arch/parisc/include/asm/types.h
arch/powerpc/include/asm/bitsperlong.h [new file with mode: 0644]
arch/powerpc/include/asm/types.h
arch/s390/include/asm/bitsperlong.h [new file with mode: 0644]
arch/s390/include/asm/types.h
arch/sh/include/asm/bitsperlong.h [new file with mode: 0644]
arch/sparc/include/asm/bitsperlong.h [new file with mode: 0644]
arch/sparc/include/asm/types.h
arch/x86/include/asm/bitsperlong.h [new file with mode: 0644]
arch/x86/include/asm/types.h
arch/xtensa/include/asm/bitsperlong.h [new file with mode: 0644]
include/asm-generic/Kbuild
include/asm-generic/Kbuild.asm
include/asm-generic/bitsperlong.h [new file with mode: 0644]
include/asm-generic/int-l64.h
include/asm-generic/int-ll64.h