diff options
| author | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2002-12-30 10:14:32 -0600 |
|---|---|---|
| committer | Kai Germaschewski <kai@tp1.ruhr-uni-bochum.de> | 2002-12-30 10:14:32 -0600 |
| commit | be74f368e44605c4bf0cf3c4c2696f380ae22a29 (patch) | |
| tree | 4c4b7df02410136a64608f86b00936efcf3fb54e /include | |
| parent | f5a46614de328e867f778e4dffa71b48eb29340f (diff) | |
kbuild: Fix kallsyms on 64 bit archs
The generated .tmp_kallsyms.S needs to use .long / .quad for
32/64 bit archs. To know which arch we're compiling for, we
use the preprocessor and BITS_PER_LONG from <asm/types.h>.
Unfortunately, asm/types.h was not safe to include from assembler
files, so lots of #ifndef __ASSEMBLY__ needed to be added - should
be fine now, untested for != i386, though.
Diffstat (limited to 'include')
| -rw-r--r-- | include/asm-alpha/types.h | 11 | ||||
| -rw-r--r-- | include/asm-arm/types.h | 12 | ||||
| -rw-r--r-- | include/asm-cris/types.h | 12 | ||||
| -rw-r--r-- | include/asm-i386/types.h | 12 | ||||
| -rw-r--r-- | include/asm-ia64/types.h | 5 | ||||
| -rw-r--r-- | include/asm-m68k/types.h | 12 | ||||
| -rw-r--r-- | include/asm-m68knommu/types.h | 12 | ||||
| -rw-r--r-- | include/asm-mips/types.h | 12 | ||||
| -rw-r--r-- | include/asm-mips64/types.h | 12 | ||||
| -rw-r--r-- | include/asm-parisc/types.h | 20 | ||||
| -rw-r--r-- | include/asm-ppc/types.h | 24 | ||||
| -rw-r--r-- | include/asm-ppc64/types.h | 11 | ||||
| -rw-r--r-- | include/asm-s390/types.h | 13 | ||||
| -rw-r--r-- | include/asm-s390x/types.h | 12 | ||||
| -rw-r--r-- | include/asm-sh/types.h | 12 | ||||
| -rw-r--r-- | include/asm-sparc/types.h | 12 | ||||
| -rw-r--r-- | include/asm-sparc64/types.h | 12 | ||||
| -rw-r--r-- | include/asm-v850/types.h | 12 | ||||
| -rw-r--r-- | include/asm-x86_64/types.h | 12 |
19 files changed, 189 insertions, 51 deletions
diff --git a/include/asm-alpha/types.h b/include/asm-alpha/types.h index cc8a6dfe1978..f5716139ec89 100644 --- a/include/asm-alpha/types.h +++ b/include/asm-alpha/types.h @@ -9,6 +9,8 @@ * need to be careful to avoid a name clashes. */ +#ifndef __ASSEMBLY__ + typedef unsigned int umode_t; /* @@ -28,11 +30,17 @@ typedef unsigned int __u32; typedef __signed__ long __s64; typedef unsigned long __u64; +#endif /* __ASSEMBLY__ */ + /* * These aren't exported outside the kernel to avoid name space clashes */ #ifdef __KERNEL__ +#define BITS_PER_LONG 64 + +#ifndef __ASSEMBLY__ + typedef signed char s8; typedef unsigned char u8; @@ -45,10 +53,9 @@ typedef unsigned int u32; typedef signed long s64; typedef unsigned long u64; -#define BITS_PER_LONG 64 - typedef u64 dma_addr_t; typedef u64 dma64_addr_t; +#endif /* __ASSEMBLY__ */ #endif /* __KERNEL__ */ #endif /* _ALPHA_TYPES_H */ diff --git a/include/asm-arm/types.h b/include/asm-arm/types.h index 7b66b95e5451..22992ee0627a 100644 --- a/include/asm-arm/types.h +++ b/include/asm-arm/types.h @@ -1,6 +1,8 @@ #ifndef __ASM_ARM_TYPES_H #define __ASM_ARM_TYPES_H +#ifndef __ASSEMBLY__ + typedef unsigned short umode_t; /* @@ -22,11 +24,17 @@ typedef __signed__ long long __s64; typedef unsigned long long __u64; #endif +#endif /* __ASSEMBLY__ */ + /* * These aren't exported outside the kernel to avoid name space clashes */ #ifdef __KERNEL__ +#define BITS_PER_LONG 32 + +#ifndef __ASSEMBLY__ + typedef signed char s8; typedef unsigned char u8; @@ -39,13 +47,13 @@ typedef unsigned int u32; typedef signed long long s64; typedef unsigned long long u64; -#define BITS_PER_LONG 32 - /* Dma addresses are 32-bits wide. */ typedef u32 dma_addr_t; typedef u32 dma64_addr_t; +#endif /* __ASSEMBLY__ */ + #endif /* __KERNEL__ */ #endif diff --git a/include/asm-cris/types.h b/include/asm-cris/types.h index 787ff7b1d86e..25425c09ddbc 100644 --- a/include/asm-cris/types.h +++ b/include/asm-cris/types.h @@ -1,6 +1,8 @@ #ifndef _ETRAX_TYPES_H #define _ETRAX_TYPES_H +#ifndef __ASSEMBLY__ + typedef unsigned short umode_t; /* @@ -22,11 +24,17 @@ typedef __signed__ long long __s64; typedef unsigned long long __u64; #endif +#endif /* __ASSEMBLY__ */ + /* * These aren't exported outside the kernel to avoid name space clashes */ #ifdef __KERNEL__ +#define BITS_PER_LONG 32 + +#ifndef __ASSEMBLY__ + typedef signed char s8; typedef unsigned char u8; @@ -39,12 +47,12 @@ typedef unsigned int u32; typedef signed long long s64; typedef unsigned long long u64; -#define BITS_PER_LONG 32 - /* Dma addresses are 32-bits wide, just like our other addresses. */ typedef u32 dma_addr_t; +#endif /* __ASSEMBLY__ */ + #endif /* __KERNEL__ */ #endif diff --git a/include/asm-i386/types.h b/include/asm-i386/types.h index 6175dba50238..b0d095271284 100644 --- a/include/asm-i386/types.h +++ b/include/asm-i386/types.h @@ -1,6 +1,8 @@ #ifndef _I386_TYPES_H #define _I386_TYPES_H +#ifndef __ASSEMBLY__ + typedef unsigned short umode_t; /* @@ -22,11 +24,17 @@ typedef __signed__ long long __s64; typedef unsigned long long __u64; #endif +#endif /* __ASSEMBLY__ */ + /* * These aren't exported outside the kernel to avoid name space clashes */ #ifdef __KERNEL__ +#define BITS_PER_LONG 32 + +#ifndef __ASSEMBLY__ + #include <linux/config.h> typedef signed char s8; @@ -41,8 +49,6 @@ typedef unsigned int u32; typedef signed long long s64; typedef unsigned long long u64; -#define BITS_PER_LONG 32 - /* DMA addresses come in generic and 64-bit flavours. */ #ifdef CONFIG_HIGHMEM @@ -57,6 +63,8 @@ typedef u64 sector_t; #define HAVE_SECTOR_T #endif +#endif /* __ASSEMBLY__ */ + #endif /* __KERNEL__ */ #endif diff --git a/include/asm-ia64/types.h b/include/asm-ia64/types.h index 52d0b3b47c81..cbdc4247a4c9 100644 --- a/include/asm-ia64/types.h +++ b/include/asm-ia64/types.h @@ -14,6 +14,11 @@ #ifdef __ASSEMBLY__ # define __IA64_UL(x) (x) # define __IA64_UL_CONST(x) x + +# ifdef __KERNEL__ +# define BITS_PER_LONG 64 +# endif + #else # define __IA64_UL(x) ((unsigned long)(x)) # define __IA64_UL_CONST(x) x##UL diff --git a/include/asm-m68k/types.h b/include/asm-m68k/types.h index 92104425be80..b5a1febc97d4 100644 --- a/include/asm-m68k/types.h +++ b/include/asm-m68k/types.h @@ -9,6 +9,8 @@ * need to be careful to avoid a name clashes. */ +#ifndef __ASSEMBLY__ + typedef unsigned short umode_t; /* @@ -30,11 +32,17 @@ typedef __signed__ long long __s64; typedef unsigned long long __u64; #endif +#endif /* __ASSEMBLY__ */ + /* * These aren't exported outside the kernel to avoid name space clashes */ #ifdef __KERNEL__ +#define BITS_PER_LONG 32 + +#ifndef __ASSEMBLY__ + typedef signed char s8; typedef unsigned char u8; @@ -47,13 +55,13 @@ typedef unsigned int u32; typedef signed long long s64; typedef unsigned long long u64; -#define BITS_PER_LONG 32 - /* DMA addresses are always 32-bits wide */ typedef u32 dma_addr_t; typedef u32 dma64_addr_t; +#endif /* __ASSEMBLY__ */ + #endif /* __KERNEL__ */ #endif /* _M68K_TYPES_H */ diff --git a/include/asm-m68knommu/types.h b/include/asm-m68knommu/types.h index 74d147dd6ba8..e1153959754e 100644 --- a/include/asm-m68knommu/types.h +++ b/include/asm-m68knommu/types.h @@ -9,6 +9,8 @@ * need to be careful to avoid a name clashes. */ +#ifndef __ASSEMBLY__ + typedef unsigned short umode_t; /* @@ -30,11 +32,17 @@ typedef __signed__ long long __s64; typedef unsigned long long __u64; #endif +#endif /* __ASSEMBLY__ */ + /* * These aren't exported outside the kernel to avoid name space clashes */ #ifdef __KERNEL__ +#define BITS_PER_LONG 32 + +#ifndef __ASSEMBLY__ + typedef signed char s8; typedef unsigned char u8; @@ -47,12 +55,12 @@ typedef unsigned int u32; typedef signed long long s64; typedef unsigned long long u64; -#define BITS_PER_LONG 32 - /* Dma addresses are 32-bits wide. */ typedef u32 dma_addr_t; +#endif /* __ASSEMBLY__ */ + #endif /* __KERNEL__ */ #endif /* _M68K_TYPES_H */ diff --git a/include/asm-mips/types.h b/include/asm-mips/types.h index 638f75163c36..d4796beca3f5 100644 --- a/include/asm-mips/types.h +++ b/include/asm-mips/types.h @@ -10,6 +10,8 @@ #ifndef _ASM_TYPES_H #define _ASM_TYPES_H +#ifndef __ASSEMBLY__ + typedef unsigned short umode_t; /* @@ -40,11 +42,17 @@ typedef unsigned long long __u64; #endif +#endif /* __ASSEMBLY__ */ + /* * These aren't exported outside the kernel to avoid name space clashes */ #ifdef __KERNEL__ +#define BITS_PER_LONG _MIPS_SZLONG + +#ifndef __ASSEMBLY__ + typedef __signed char s8; typedef unsigned char u8; @@ -68,10 +76,10 @@ typedef unsigned long long u64; #endif -#define BITS_PER_LONG _MIPS_SZLONG - typedef unsigned long dma_addr_t; +#endif /* __ASSEMBLY__ */ + #endif /* __KERNEL__ */ #endif /* _ASM_TYPES_H */ diff --git a/include/asm-mips64/types.h b/include/asm-mips64/types.h index 26dd2a505a72..5cba0f4857f1 100644 --- a/include/asm-mips64/types.h +++ b/include/asm-mips64/types.h @@ -9,6 +9,8 @@ #ifndef _ASM_TYPES_H #define _ASM_TYPES_H +#ifndef __ASSEMBLY__ + typedef unsigned int umode_t; /* @@ -39,11 +41,17 @@ typedef unsigned long long __u64; #endif +#endif /* __ASSEMBLY__ */ + /* * These aren't exported outside the kernel to avoid name space clashes */ #ifdef __KERNEL__ +#define BITS_PER_LONG _MIPS_SZLONG + +#ifndef __ASSEMBLY__ + typedef __signed char s8; typedef unsigned char u8; @@ -67,10 +75,10 @@ typedef unsigned long long u64; #endif -#define BITS_PER_LONG _MIPS_SZLONG - typedef unsigned long dma_addr_t; +#endif /* __ASSEMBLY__ */ + #endif /* __KERNEL__ */ #endif /* _ASM_TYPES_H */ diff --git a/include/asm-parisc/types.h b/include/asm-parisc/types.h index 86fb267f2ab7..d21b9d0d63ea 100644 --- a/include/asm-parisc/types.h +++ b/include/asm-parisc/types.h @@ -1,6 +1,8 @@ #ifndef _PARISC_TYPES_H #define _PARISC_TYPES_H +#ifndef __ASSEMBLY__ + typedef unsigned short umode_t; /* @@ -22,11 +24,21 @@ typedef __signed__ long long __s64; typedef unsigned long long __u64; #endif +#endif /* __ASSEMBLY__ */ + /* * These aren't exported outside the kernel to avoid name space clashes */ #ifdef __KERNEL__ +#ifdef __LP64__ +#define BITS_PER_LONG 64 +#else +#define BITS_PER_LONG 32 +#endif + +#ifndef __ASSEMBLY__ + typedef signed char s8; typedef unsigned char u8; @@ -39,17 +51,13 @@ typedef unsigned int u32; typedef signed long long s64; typedef unsigned long long u64; -#ifdef __LP64__ -#define BITS_PER_LONG 64 -#else -#define BITS_PER_LONG 32 -#endif - /* Dma addresses are 32-bits wide. */ typedef u32 dma_addr_t; typedef u64 dma64_addr_t; +#endif /* __ASSEMBLY__ */ + #endif /* __KERNEL__ */ #endif diff --git a/include/asm-ppc/types.h b/include/asm-ppc/types.h index 26dd36dec197..3c74a27697d5 100644 --- a/include/asm-ppc/types.h +++ b/include/asm-ppc/types.h @@ -21,10 +21,22 @@ typedef struct { __u32 u[4]; } __attribute((aligned(16))) __vector128; +/* + * XXX allowed outside of __KERNEL__ for now, until glibc gets + * a proper set of asm headers of its own. -- paulus + */ +typedef unsigned short umode_t; + +#endif /* __ASSEMBLY__ */ + #ifdef __KERNEL__ /* * These aren't exported outside the kernel to avoid name space clashes */ +#define BITS_PER_LONG 32 + +#ifndef __ASSEMBLY__ + typedef signed char s8; typedef unsigned char u8; @@ -39,8 +51,6 @@ typedef unsigned long long u64; typedef __vector128 vector128; -#define BITS_PER_LONG 32 - /* DMA addresses are 32-bits wide */ typedef u32 dma_addr_t; typedef u64 dma64_addr_t; @@ -50,14 +60,8 @@ typedef u64 sector_t; #define HAVE_SECTOR_T #endif -#endif /* __KERNEL__ */ - -/* - * XXX allowed outside of __KERNEL__ for now, until glibc gets - * a proper set of asm headers of its own. -- paulus - */ -typedef unsigned short umode_t; - #endif /* __ASSEMBLY__ */ +#endif /* __KERNEL__ */ + #endif diff --git a/include/asm-ppc64/types.h b/include/asm-ppc64/types.h index a2a362bd5a71..08b5757e3d07 100644 --- a/include/asm-ppc64/types.h +++ b/include/asm-ppc64/types.h @@ -39,10 +39,16 @@ typedef struct { __u32 u[4]; } __attribute((aligned(16))) __vector128; +#endif /* __ASSEMBLY__ */ + #ifdef __KERNEL__ /* * These aren't exported outside the kernel to avoid name space clashes */ +#define BITS_PER_LONG 64 + +#ifndef __ASSEMBLY__ + typedef signed char s8; typedef unsigned char u8; @@ -57,12 +63,11 @@ typedef unsigned long u64; typedef __vector128 vector128; -#define BITS_PER_LONG 64 - typedef u32 dma_addr_t; typedef u64 dma64_addr_t; -#endif /* __KERNEL__ */ #endif /* __ASSEMBLY__ */ +#endif /* __KERNEL__ */ + #endif /* _PPC64_TYPES_H */ diff --git a/include/asm-s390/types.h b/include/asm-s390/types.h index 0f4c3fdf5a93..dc52bf8a7acb 100644 --- a/include/asm-s390/types.h +++ b/include/asm-s390/types.h @@ -9,6 +9,8 @@ #ifndef _S390_TYPES_H #define _S390_TYPES_H +#ifndef __ASSEMBLY__ + typedef unsigned short umode_t; /* @@ -34,11 +36,18 @@ typedef unsigned long long __u64; */ typedef __u32 addr_t; typedef __s32 saddr_t; + +#endif /* __ASSEMBLY__ */ + /* * These aren't exported outside the kernel to avoid name space clashes */ #ifdef __KERNEL__ +#define BITS_PER_LONG 32 + +#ifndef __ASSEMBLY__ + typedef signed char s8; typedef unsigned char u8; @@ -51,8 +60,6 @@ typedef unsigned int u32; typedef signed long long s64; typedef unsigned long long u64; -#define BITS_PER_LONG 32 - typedef u32 dma_addr_t; typedef union { @@ -68,5 +75,7 @@ typedef u64 sector_t; #define HAVE_SECTOR_T #endif +#endif /* __ASSEMBLY__ */ + #endif /* __KERNEL__ */ #endif diff --git a/include/asm-s390x/types.h b/include/asm-s390x/types.h index b8436bf5d54f..2ee9dcb2260b 100644 --- a/include/asm-s390x/types.h +++ b/include/asm-s390x/types.h @@ -9,6 +9,8 @@ #ifndef _S390_TYPES_H #define _S390_TYPES_H +#ifndef __ASSEMBLY__ + typedef unsigned short umode_t; /* @@ -36,11 +38,17 @@ typedef unsigned long __u64; typedef unsigned long addr_t; typedef signed long saddr_t; +#endif /* __ASSEMBLY__ */ + /* * These aren't exported outside the kernel to avoid name space clashes */ #ifdef __KERNEL__ +#define BITS_PER_LONG 64 + +#ifndef __ASSEMBLY__ + typedef signed char s8; typedef unsigned char u8; @@ -53,9 +61,9 @@ typedef unsigned int u32; typedef signed long s64; typedef unsigned long u64; -#define BITS_PER_LONG 64 - typedef u32 dma_addr_t; +#endif /* __ASSEMBLY__ */ + #endif /* __KERNEL__ */ #endif diff --git a/include/asm-sh/types.h b/include/asm-sh/types.h index cb0f9f83af4f..c65c391e3f5c 100644 --- a/include/asm-sh/types.h +++ b/include/asm-sh/types.h @@ -1,6 +1,8 @@ #ifndef __ASM_SH_TYPES_H #define __ASM_SH_TYPES_H +#ifndef __ASSEMBLY__ + typedef unsigned short umode_t; /* @@ -22,11 +24,17 @@ typedef __signed__ long long __s64; typedef unsigned long long __u64; #endif +#endif /* __ASSEMBLY__ */ + /* * These aren't exported outside the kernel to avoid name space clashes */ #ifdef __KERNEL__ +#define BITS_PER_LONG 32 + +#ifndef __ASSEMBLY__ + typedef __signed__ char s8; typedef unsigned char u8; @@ -39,12 +47,12 @@ typedef unsigned int u32; typedef __signed__ long long s64; typedef unsigned long long u64; -#define BITS_PER_LONG 32 - /* Dma addresses are 32-bits wide. */ typedef u32 dma_addr_t; +#endif /* __ASSEMBLY__ */ + #endif /* __KERNEL__ */ #endif /* __ASM_SH_TYPES_H */ diff --git a/include/asm-sparc/types.h b/include/asm-sparc/types.h index 8e726708e1cd..42fc6ed98156 100644 --- a/include/asm-sparc/types.h +++ b/include/asm-sparc/types.h @@ -15,6 +15,8 @@ * need to be careful to avoid a name clashes. */ +#ifndef __ASSEMBLY__ + typedef unsigned short umode_t; typedef __signed__ char __s8; @@ -29,8 +31,14 @@ typedef unsigned int __u32; typedef __signed__ long long __s64; typedef unsigned long long __u64; +#endif /* __ASSEMBLY__ */ + #ifdef __KERNEL__ +#define BITS_PER_LONG 32 + +#ifndef __ASSEMBLY__ + typedef __signed__ char s8; typedef unsigned char u8; @@ -43,11 +51,11 @@ typedef unsigned int u32; typedef __signed__ long long s64; typedef unsigned long long u64; -#define BITS_PER_LONG 32 - typedef u32 dma_addr_t; typedef u32 dma64_addr_t; +#endif /* __ASSEMBLY__ */ + #endif /* __KERNEL__ */ #endif /* defined(_SPARC_TYPES_H) */ diff --git a/include/asm-sparc64/types.h b/include/asm-sparc64/types.h index e993f2af43bc..d0ee7f105838 100644 --- a/include/asm-sparc64/types.h +++ b/include/asm-sparc64/types.h @@ -10,6 +10,8 @@ * need to be careful to avoid a name clashes. */ +#ifndef __ASSEMBLY__ + typedef unsigned short umode_t; /* @@ -29,8 +31,14 @@ typedef unsigned int __u32; typedef __signed__ long __s64; typedef unsigned long __u64; +#endif /* __ASSEMBLY__ */ + #ifdef __KERNEL__ +#define BITS_PER_LONG 64 + +#ifndef __ASSEMBLY__ + typedef __signed__ char s8; typedef unsigned char u8; @@ -43,13 +51,13 @@ typedef unsigned int u32; typedef __signed__ long s64; typedef unsigned long u64; -#define BITS_PER_LONG 64 - /* Dma addresses come in generic and 64-bit flavours. */ typedef u32 dma_addr_t; typedef u64 dma64_addr_t; +#endif /* __ASSEMBLY__ */ + #endif /* __KERNEL__ */ #endif /* defined(_SPARC64_TYPES_H) */ diff --git a/include/asm-v850/types.h b/include/asm-v850/types.h index 6d144379f13e..dcef57196875 100644 --- a/include/asm-v850/types.h +++ b/include/asm-v850/types.h @@ -32,11 +32,17 @@ typedef __signed__ long long __s64; typedef unsigned long long __u64; #endif +#endif /* !__ASSEMBLY__ */ + /* * These aren't exported outside the kernel to avoid name space clashes */ #ifdef __KERNEL__ +#define BITS_PER_LONG 32 + +#ifndef __ASSEMBLY__ + typedef signed char s8; typedef unsigned char u8; @@ -49,14 +55,12 @@ typedef unsigned int u32; typedef signed long long s64; typedef unsigned long long u64; -#define BITS_PER_LONG 32 - /* Dma addresses are 32-bits wide. */ typedef u32 dma_addr_t; -#endif /* __KERNEL__ */ - #endif /* !__ASSEMBLY__ */ +#endif /* __KERNEL__ */ + #endif /* __V850_TYPES_H__ */ diff --git a/include/asm-x86_64/types.h b/include/asm-x86_64/types.h index 8192e910bb4b..5b2dc01b7969 100644 --- a/include/asm-x86_64/types.h +++ b/include/asm-x86_64/types.h @@ -1,6 +1,8 @@ #ifndef _X86_64_TYPES_H #define _X86_64_TYPES_H +#ifndef __ASSEMBLY__ + typedef unsigned short umode_t; /* @@ -20,11 +22,17 @@ typedef unsigned int __u32; typedef __signed__ long long __s64; typedef unsigned long long __u64; +#endif /* __ASSEMBLY__ */ + /* * These aren't exported outside the kernel to avoid name space clashes */ #ifdef __KERNEL__ +#define BITS_PER_LONG 64 + +#ifndef __ASSEMBLY__ + typedef signed char s8; typedef unsigned char u8; @@ -37,8 +45,6 @@ typedef unsigned int u32; typedef signed long long s64; typedef unsigned long long u64; -#define BITS_PER_LONG 64 - typedef u64 dma64_addr_t; typedef u64 dma_addr_t; @@ -47,6 +53,8 @@ typedef u64 sector_t; #define HAVE_SECTOR_T #endif +#endif /* __ASSEMBLY__ */ + #endif /* __KERNEL__ */ #endif |
