Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-inttypes

* git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-inttypes: (24 commits)
Make constants in kernel/timeconst.h fixed 64 bits
types: add C99-style constructors to <asm-generic/int-*.h>
xtensa: types: use <asm-generic/int-*.h> for the xtensa architecture
x86: types: use <asm-generic/int-*.h> for the x86 architecture
v850: types: use <asm-generic/int-*.h> for the v850 architecture
sparc64: types: use <asm-generic/int-*.h> for the sparc64 architecture
sparc: types: use <asm-generic/int-*.h> for the sparc architecture
sh: types: use <asm-generic/int-*.h> for the sh architecture
s390: types: use <asm-generic/int-*.h> for the s390 architecture
powerpc: types: use <asm-generic/int-*.h> for the powerpc architecture
parisc: types: use <asm-generic/int-*.h> for the parisc architecture
mn10300: types: use <asm-generic/int-*.h> for the mn10300 architecture
mips: types: use <asm-generic/int-*.h> for the mips architecture
m68k: types: use <asm-generic/int-*.h> for the m68k architecture
m32r: types: use <asm-generic/int-*.h> for the m32r architecture
ia64: types: use <asm-generic/int-*.h> for the ia64 architecture
h8300: types: use <asm-generic/int-*.h> for the h8300 architecture
frv: types: use <asm-generic/int-*.h> for the frv architecture
cris: types: use <asm-generic/int-*.h> for the cris architecture
blackfin: types: use <asm-generic/int-*.h> for the blackfin architecture
...

+249 -773
+1 -35
include/asm-alpha/types.h
··· 8 8 * not a major issue. However, for interoperability, libraries still 9 9 * need to be careful to avoid a name clashes. 10 10 */ 11 + #include <asm-generic/int-l64.h> 11 12 12 13 #ifndef __ASSEMBLY__ 13 14 14 15 typedef unsigned int umode_t; 15 - 16 - /* 17 - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 18 - * header files exported to user space 19 - */ 20 - 21 - typedef __signed__ char __s8; 22 - typedef unsigned char __u8; 23 - 24 - typedef __signed__ short __s16; 25 - typedef unsigned short __u16; 26 - 27 - typedef __signed__ int __s32; 28 - typedef unsigned int __u32; 29 - 30 - typedef __signed__ long __s64; 31 - typedef unsigned long __u64; 32 16 33 17 #endif /* __ASSEMBLY__ */ 34 18 ··· 23 39 24 40 #define BITS_PER_LONG 64 25 41 26 - #ifndef __ASSEMBLY__ 27 - 28 - typedef signed char s8; 29 - typedef unsigned char u8; 30 - 31 - typedef signed short s16; 32 - typedef unsigned short u16; 33 - 34 - typedef signed int s32; 35 - typedef unsigned int u32; 36 - 37 - typedef signed long s64; 38 - typedef unsigned long u64; 39 - 40 - typedef u64 dma_addr_t; 41 - typedef u64 dma64_addr_t; 42 - 43 - #endif /* __ASSEMBLY__ */ 44 42 #endif /* __KERNEL__ */ 45 43 #endif /* _ALPHA_TYPES_H */
+2 -31
include/asm-arm/types.h
··· 1 1 #ifndef __ASM_ARM_TYPES_H 2 2 #define __ASM_ARM_TYPES_H 3 3 4 + #include <asm-generic/int-ll64.h> 5 + 4 6 #ifndef __ASSEMBLY__ 5 7 6 8 typedef unsigned short umode_t; 7 - 8 - /* 9 - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 10 - * header files exported to user space 11 - */ 12 - 13 - typedef __signed__ char __s8; 14 - typedef unsigned char __u8; 15 - 16 - typedef __signed__ short __s16; 17 - typedef unsigned short __u16; 18 - 19 - typedef __signed__ int __s32; 20 - typedef unsigned int __u32; 21 - 22 - #if defined(__GNUC__) 23 - __extension__ typedef __signed__ long long __s64; 24 - __extension__ typedef unsigned long long __u64; 25 - #endif 26 9 27 10 #endif /* __ASSEMBLY__ */ 28 11 ··· 17 34 #define BITS_PER_LONG 32 18 35 19 36 #ifndef __ASSEMBLY__ 20 - 21 - typedef signed char s8; 22 - typedef unsigned char u8; 23 - 24 - typedef signed short s16; 25 - typedef unsigned short u16; 26 - 27 - typedef signed int s32; 28 - typedef unsigned int u32; 29 - 30 - typedef signed long long s64; 31 - typedef unsigned long long u64; 32 37 33 38 /* Dma addresses are 32-bits wide. */ 34 39
+2 -30
include/asm-avr32/types.h
··· 8 8 #ifndef __ASM_AVR32_TYPES_H 9 9 #define __ASM_AVR32_TYPES_H 10 10 11 + #include <asm-generic/int-ll64.h> 12 + 11 13 #ifndef __ASSEMBLY__ 12 14 13 15 typedef unsigned short umode_t; 14 - 15 - /* 16 - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 17 - * header files exported to user space 18 - */ 19 - typedef __signed__ char __s8; 20 - typedef unsigned char __u8; 21 - 22 - typedef __signed__ short __s16; 23 - typedef unsigned short __u16; 24 - 25 - typedef __signed__ int __s32; 26 - typedef unsigned int __u32; 27 - 28 - #if defined(__GNUC__) 29 - __extension__ typedef __signed__ long long __s64; 30 - __extension__ typedef unsigned long long __u64; 31 - #endif 32 16 33 17 #endif /* __ASSEMBLY__ */ 34 18 ··· 24 40 #define BITS_PER_LONG 32 25 41 26 42 #ifndef __ASSEMBLY__ 27 - 28 - typedef signed char s8; 29 - typedef unsigned char u8; 30 - 31 - typedef signed short s16; 32 - typedef unsigned short u16; 33 - 34 - typedef signed int s32; 35 - typedef unsigned int u32; 36 - 37 - typedef signed long long s64; 38 - typedef unsigned long long u64; 39 43 40 44 /* Dma addresses are 32-bits wide. */ 41 45
+2 -32
include/asm-blackfin/types.h
··· 8 8 * not a major issue. However, for interoperability, libraries still 9 9 * need to be careful to avoid a name clashes. 10 10 */ 11 + #include <asm-generic/int-ll64.h> 12 + 11 13 #ifndef __ASSEMBLY__ 12 14 13 15 typedef unsigned short umode_t; 14 - 15 - /* 16 - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 17 - * header files exported to user space 18 - */ 19 - 20 - typedef __signed__ char __s8; 21 - typedef unsigned char __u8; 22 - 23 - typedef __signed__ short __s16; 24 - typedef unsigned short __u16; 25 - 26 - typedef __signed__ int __s32; 27 - typedef unsigned int __u32; 28 - 29 - /* HK0617 -- Changes to unsigned long temporarily */ 30 - #if defined(__GNUC__) 31 - __extension__ typedef __signed__ long long __s64; 32 - __extension__ typedef unsigned long long __u64; 33 - #endif 34 16 35 17 #endif /* __ASSEMBLY__ */ 36 18 /* ··· 23 41 #define BITS_PER_LONG 32 24 42 25 43 #ifndef __ASSEMBLY__ 26 - 27 - typedef signed char s8; 28 - typedef unsigned char u8; 29 - 30 - typedef signed short s16; 31 - typedef unsigned short u16; 32 - 33 - typedef signed int s32; 34 - typedef unsigned int u32; 35 - 36 - typedef signed long long s64; 37 - typedef unsigned long long u64; 38 44 39 45 /* Dma addresses are 32-bits wide. */ 40 46
+2 -31
include/asm-cris/types.h
··· 1 1 #ifndef _ETRAX_TYPES_H 2 2 #define _ETRAX_TYPES_H 3 3 4 + #include <asm-generic/int-ll64.h> 5 + 4 6 #ifndef __ASSEMBLY__ 5 7 6 8 typedef unsigned short umode_t; 7 - 8 - /* 9 - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 10 - * header files exported to user space 11 - */ 12 - 13 - typedef __signed__ char __s8; 14 - typedef unsigned char __u8; 15 - 16 - typedef __signed__ short __s16; 17 - typedef unsigned short __u16; 18 - 19 - typedef __signed__ int __s32; 20 - typedef unsigned int __u32; 21 - 22 - #if defined(__GNUC__) 23 - __extension__ typedef __signed__ long long __s64; 24 - __extension__ typedef unsigned long long __u64; 25 - #endif 26 9 27 10 #endif /* __ASSEMBLY__ */ 28 11 ··· 17 34 #define BITS_PER_LONG 32 18 35 19 36 #ifndef __ASSEMBLY__ 20 - 21 - typedef signed char s8; 22 - typedef unsigned char u8; 23 - 24 - typedef signed short s16; 25 - typedef unsigned short u16; 26 - 27 - typedef signed int s32; 28 - typedef unsigned int u32; 29 - 30 - typedef signed long long s64; 31 - typedef unsigned long long u64; 32 37 33 38 /* Dma addresses are 32-bits wide, just like our other addresses. */ 34 39
+2 -32
include/asm-frv/types.h
··· 12 12 #ifndef _ASM_TYPES_H 13 13 #define _ASM_TYPES_H 14 14 15 + #include <asm-generic/int-ll64.h> 16 + 15 17 #ifndef __ASSEMBLY__ 16 18 17 19 typedef unsigned short umode_t; 18 - 19 - /* 20 - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 21 - * header files exported to user space 22 - */ 23 - 24 - typedef __signed__ char __s8; 25 - typedef unsigned char __u8; 26 - 27 - typedef __signed__ short __s16; 28 - typedef unsigned short __u16; 29 - 30 - typedef __signed__ int __s32; 31 - typedef unsigned int __u32; 32 - 33 - #if defined(__GNUC__) 34 - __extension__ typedef __signed__ long long __s64; 35 - __extension__ typedef unsigned long long __u64; 36 - #endif 37 20 38 21 #endif /* __ASSEMBLY__ */ 39 22 ··· 28 45 #define BITS_PER_LONG 32 29 46 30 47 #ifndef __ASSEMBLY__ 31 - 32 - 33 - typedef signed char s8; 34 - typedef unsigned char u8; 35 - 36 - typedef signed short s16; 37 - typedef unsigned short u16; 38 - 39 - typedef signed int s32; 40 - typedef unsigned int u32; 41 - 42 - typedef signed long long s64; 43 - typedef unsigned long long u64; 44 48 45 49 /* Dma addresses are 32-bits wide. */ 46 50
+2
include/asm-generic/Kbuild
··· 7 7 header-y += signal.h 8 8 header-y += statfs.h 9 9 10 + unifdef-y += int-l64.h 11 + unifdef-y += int-ll64.h 10 12 unifdef-y += resource.h 11 13 unifdef-y += siginfo.h
+71
include/asm-generic/int-l64.h
··· 1 + /* 2 + * asm-generic/int-l64.h 3 + * 4 + * Integer declarations for architectures which use "long" 5 + * for 64-bit types. 6 + */ 7 + 8 + #ifndef _ASM_GENERIC_INT_L64_H 9 + #define _ASM_GENERIC_INT_L64_H 10 + 11 + #ifndef __ASSEMBLY__ 12 + /* 13 + * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 14 + * header files exported to user space 15 + */ 16 + 17 + typedef __signed__ char __s8; 18 + typedef unsigned char __u8; 19 + 20 + typedef __signed__ short __s16; 21 + typedef unsigned short __u16; 22 + 23 + typedef __signed__ int __s32; 24 + typedef unsigned int __u32; 25 + 26 + typedef __signed__ long __s64; 27 + typedef unsigned long __u64; 28 + 29 + #endif /* __ASSEMBLY__ */ 30 + 31 + #ifdef __KERNEL__ 32 + 33 + #ifndef __ASSEMBLY__ 34 + 35 + typedef signed char s8; 36 + typedef unsigned char u8; 37 + 38 + typedef signed short s16; 39 + typedef unsigned short u16; 40 + 41 + typedef signed int s32; 42 + typedef unsigned int u32; 43 + 44 + typedef signed long s64; 45 + typedef unsigned long u64; 46 + 47 + #define S8_C(x) x 48 + #define U8_C(x) x ## U 49 + #define S16_C(x) x 50 + #define U16_C(x) x ## U 51 + #define S32_C(x) x 52 + #define U32_C(x) x ## U 53 + #define S64_C(x) x ## L 54 + #define U64_C(x) x ## UL 55 + 56 + #else /* __ASSEMBLY__ */ 57 + 58 + #define S8_C(x) x 59 + #define U8_C(x) x 60 + #define S16_C(x) x 61 + #define U16_C(x) x 62 + #define S32_C(x) x 63 + #define U32_C(x) x 64 + #define S64_C(x) x 65 + #define U64_C(x) x 66 + 67 + #endif /* __ASSEMBLY__ */ 68 + 69 + #endif /* __KERNEL__ */ 70 + 71 + #endif /* _ASM_GENERIC_INT_L64_H */
+76
include/asm-generic/int-ll64.h
··· 1 + /* 2 + * asm-generic/int-ll64.h 3 + * 4 + * Integer declarations for architectures which use "long long" 5 + * for 64-bit types. 6 + */ 7 + 8 + #ifndef _ASM_GENERIC_INT_LL64_H 9 + #define _ASM_GENERIC_INT_LL64_H 10 + 11 + #ifndef __ASSEMBLY__ 12 + /* 13 + * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 14 + * header files exported to user space 15 + */ 16 + 17 + typedef __signed__ char __s8; 18 + typedef unsigned char __u8; 19 + 20 + typedef __signed__ short __s16; 21 + typedef unsigned short __u16; 22 + 23 + typedef __signed__ int __s32; 24 + typedef unsigned int __u32; 25 + 26 + #ifdef __GNUC__ 27 + __extension__ typedef __signed__ long long __s64; 28 + __extension__ typedef unsigned long long __u64; 29 + #elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L 30 + typedef __signed__ long long __s64; 31 + typedef unsigned long long __u64; 32 + #endif 33 + 34 + #endif /* __ASSEMBLY__ */ 35 + 36 + #ifdef __KERNEL__ 37 + 38 + #ifndef __ASSEMBLY__ 39 + 40 + typedef signed char s8; 41 + typedef unsigned char u8; 42 + 43 + typedef signed short s16; 44 + typedef unsigned short u16; 45 + 46 + typedef signed int s32; 47 + typedef unsigned int u32; 48 + 49 + typedef signed long long s64; 50 + typedef unsigned long long u64; 51 + 52 + #define S8_C(x) x 53 + #define U8_C(x) x ## U 54 + #define S16_C(x) x 55 + #define U16_C(x) x ## U 56 + #define S32_C(x) x 57 + #define U32_C(x) x ## U 58 + #define S64_C(x) x ## LL 59 + #define U64_C(x) x ## ULL 60 + 61 + #else /* __ASSEMBLY__ */ 62 + 63 + #define S8_C(x) x 64 + #define U8_C(x) x 65 + #define S16_C(x) x 66 + #define U16_C(x) x 67 + #define S32_C(x) x 68 + #define U32_C(x) x 69 + #define S64_C(x) x 70 + #define U64_C(x) x 71 + 72 + #endif /* __ASSEMBLY__ */ 73 + 74 + #endif /* __KERNEL__ */ 75 + 76 + #endif /* _ASM_GENERIC_INT_LL64_H */
+2 -31
include/asm-h8300/types.h
··· 1 1 #ifndef _H8300_TYPES_H 2 2 #define _H8300_TYPES_H 3 3 4 + #include <asm-generic/int-ll64.h> 5 + 4 6 #if !defined(__ASSEMBLY__) 5 7 6 8 /* ··· 16 14 typedef unsigned short umode_t; 17 15 18 16 /* 19 - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 20 - * header files exported to user space 21 - */ 22 - 23 - typedef __signed__ char __s8; 24 - typedef unsigned char __u8; 25 - 26 - typedef __signed__ short __s16; 27 - typedef unsigned short __u16; 28 - 29 - typedef __signed__ int __s32; 30 - typedef unsigned int __u32; 31 - 32 - #if defined(__GNUC__) 33 - __extension__ typedef __signed__ long long __s64; 34 - __extension__ typedef unsigned long long __u64; 35 - #endif 36 - 37 - /* 38 17 * These aren't exported outside the kernel to avoid name space clashes 39 18 */ 40 19 #ifdef __KERNEL__ 41 - 42 - typedef signed char s8; 43 - typedef unsigned char u8; 44 - 45 - typedef signed short s16; 46 - typedef unsigned short u16; 47 - 48 - typedef signed int s32; 49 - typedef unsigned int u32; 50 - 51 - typedef signed long long s64; 52 - typedef unsigned long long u64; 53 20 54 21 #define BITS_PER_LONG 32 55 22
+2 -29
include/asm-ia64/types.h
··· 13 13 * David Mosberger-Tang <davidm@hpl.hp.com>, Hewlett-Packard Co 14 14 */ 15 15 16 + #include <asm-generic/int-l64.h> 17 + 16 18 #ifdef __ASSEMBLY__ 17 19 # define __IA64_UL(x) (x) 18 20 # define __IA64_UL_CONST(x) x ··· 30 28 typedef unsigned int umode_t; 31 29 32 30 /* 33 - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 34 - * header files exported to user space 35 - */ 36 - 37 - typedef __signed__ char __s8; 38 - typedef unsigned char __u8; 39 - 40 - typedef __signed__ short __s16; 41 - typedef unsigned short __u16; 42 - 43 - typedef __signed__ int __s32; 44 - typedef unsigned int __u32; 45 - 46 - typedef __signed__ long __s64; 47 - typedef unsigned long __u64; 48 - 49 - /* 50 31 * These aren't exported outside the kernel to avoid name space clashes 51 32 */ 52 33 # ifdef __KERNEL__ 53 - 54 - typedef __s8 s8; 55 - typedef __u8 u8; 56 - 57 - typedef __s16 s16; 58 - typedef __u16 u16; 59 - 60 - typedef __s32 s32; 61 - typedef __u32 u32; 62 - 63 - typedef __s64 s64; 64 - typedef __u64 u64; 65 34 66 35 #define BITS_PER_LONG 64 67 36
+2 -30
include/asm-m32r/types.h
··· 1 1 #ifndef _ASM_M32R_TYPES_H 2 2 #define _ASM_M32R_TYPES_H 3 3 4 + #include <asm-generic/int-ll64.h> 5 + 4 6 #ifndef __ASSEMBLY__ 5 7 6 8 typedef unsigned short umode_t; 7 9 8 - /* 9 - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 10 - * header files exported to user space 11 - */ 12 - 13 - typedef __signed__ char __s8; 14 - typedef unsigned char __u8; 15 - 16 - typedef __signed__ short __s16; 17 - typedef unsigned short __u16; 18 - 19 - typedef __signed__ int __s32; 20 - typedef unsigned int __u32; 21 - 22 - #if defined(__GNUC__) 23 - __extension__ typedef __signed__ long long __s64; 24 - __extension__ typedef unsigned long long __u64; 25 - #endif 26 10 #endif /* __ASSEMBLY__ */ 27 11 28 12 /* ··· 17 33 #define BITS_PER_LONG 32 18 34 19 35 #ifndef __ASSEMBLY__ 20 - 21 - typedef signed char s8; 22 - typedef unsigned char u8; 23 - 24 - typedef signed short s16; 25 - typedef unsigned short u16; 26 - 27 - typedef signed int s32; 28 - typedef unsigned int u32; 29 - 30 - typedef signed long long s64; 31 - typedef unsigned long long u64; 32 36 33 37 /* DMA addresses are 32-bits wide. */ 34 38
+1 -31
include/asm-m68k/types.h
··· 8 8 * not a major issue. However, for interoperability, libraries still 9 9 * need to be careful to avoid a name clashes. 10 10 */ 11 + #include <asm-generic/int-ll64.h> 11 12 12 13 #ifndef __ASSEMBLY__ 13 14 14 15 typedef unsigned short umode_t; 15 - 16 - /* 17 - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 18 - * header files exported to user space 19 - */ 20 - 21 - typedef __signed__ char __s8; 22 - typedef unsigned char __u8; 23 - 24 - typedef __signed__ short __s16; 25 - typedef unsigned short __u16; 26 - 27 - typedef __signed__ int __s32; 28 - typedef unsigned int __u32; 29 - 30 - #if defined(__GNUC__) 31 - __extension__ typedef __signed__ long long __s64; 32 - __extension__ typedef unsigned long long __u64; 33 - #endif 34 16 35 17 #endif /* __ASSEMBLY__ */ 36 18 ··· 24 42 #define BITS_PER_LONG 32 25 43 26 44 #ifndef __ASSEMBLY__ 27 - 28 - typedef signed char s8; 29 - typedef unsigned char u8; 30 - 31 - typedef signed short s16; 32 - typedef unsigned short u16; 33 - 34 - typedef signed int s32; 35 - typedef unsigned int u32; 36 - 37 - typedef signed long long s64; 38 - typedef unsigned long long u64; 39 45 40 46 /* DMA addresses are always 32-bits wide */ 41 47
+6 -50
include/asm-mips/types.h
··· 9 9 #ifndef _ASM_TYPES_H 10 10 #define _ASM_TYPES_H 11 11 12 + #if _MIPS_SZLONG == 64 13 + # include <asm-generic/int-l64.h> 14 + #else 15 + # include <asm-generic/int-ll64.h> 16 + #endif 17 + 12 18 #ifndef __ASSEMBLY__ 13 19 14 20 typedef unsigned short umode_t; 15 - 16 - /* 17 - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 18 - * header files exported to user space 19 - */ 20 - 21 - typedef __signed__ char __s8; 22 - typedef unsigned char __u8; 23 - 24 - typedef __signed__ short __s16; 25 - typedef unsigned short __u16; 26 - 27 - typedef __signed__ int __s32; 28 - typedef unsigned int __u32; 29 - 30 - #if (_MIPS_SZLONG == 64) 31 - 32 - typedef __signed__ long __s64; 33 - typedef unsigned long __u64; 34 - 35 - #else 36 - 37 - #if defined(__GNUC__) 38 - __extension__ typedef __signed__ long long __s64; 39 - __extension__ typedef unsigned long long __u64; 40 - #endif 41 21 42 22 #endif 43 23 ··· 31 51 #define BITS_PER_LONG _MIPS_SZLONG 32 52 33 53 #ifndef __ASSEMBLY__ 34 - 35 - 36 - typedef __signed char s8; 37 - typedef unsigned char u8; 38 - 39 - typedef __signed short s16; 40 - typedef unsigned short u16; 41 - 42 - typedef __signed int s32; 43 - typedef unsigned int u32; 44 - 45 - #if (_MIPS_SZLONG == 64) 46 - 47 - typedef __signed__ long s64; 48 - typedef unsigned long u64; 49 - 50 - #else 51 - 52 - #if defined(__GNUC__) && !defined(__STRICT_ANSI__) 53 - typedef __signed__ long long s64; 54 - typedef unsigned long long u64; 55 - #endif 56 - 57 - #endif 58 54 59 55 #if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \ 60 56 || defined(CONFIG_64BIT)
+2 -31
include/asm-mn10300/types.h
··· 11 11 #ifndef _ASM_TYPES_H 12 12 #define _ASM_TYPES_H 13 13 14 + #include <asm-generic/int-ll64.h> 15 + 14 16 #ifndef __ASSEMBLY__ 15 17 16 18 typedef unsigned short umode_t; 17 - 18 - /* 19 - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 20 - * header files exported to user space 21 - */ 22 - 23 - typedef __signed__ char __s8; 24 - typedef unsigned char __u8; 25 - 26 - typedef __signed__ short __s16; 27 - typedef unsigned short __u16; 28 - 29 - typedef __signed__ int __s32; 30 - typedef unsigned int __u32; 31 - 32 - #if defined(__GNUC__) && !defined(__STRICT_ANSI__) 33 - typedef __signed__ long long __s64; 34 - typedef unsigned long long __u64; 35 - #endif 36 19 37 20 #endif /* __ASSEMBLY__ */ 38 21 ··· 27 44 #define BITS_PER_LONG 32 28 45 29 46 #ifndef __ASSEMBLY__ 30 - 31 - typedef signed char s8; 32 - typedef unsigned char u8; 33 - 34 - typedef signed short s16; 35 - typedef unsigned short u16; 36 - 37 - typedef signed int s32; 38 - typedef unsigned int u32; 39 - 40 - typedef signed long long s64; 41 - typedef unsigned long long u64; 42 47 43 48 /* Dma addresses are 32-bits wide. */ 44 49 typedef u32 dma_addr_t;
+2 -31
include/asm-parisc/types.h
··· 1 1 #ifndef _PARISC_TYPES_H 2 2 #define _PARISC_TYPES_H 3 3 4 + #include <asm-generic/int-ll64.h> 5 + 4 6 #ifndef __ASSEMBLY__ 5 7 6 8 typedef unsigned short umode_t; 7 - 8 - /* 9 - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 10 - * header files exported to user space 11 - */ 12 - 13 - typedef __signed__ char __s8; 14 - typedef unsigned char __u8; 15 - 16 - typedef __signed__ short __s16; 17 - typedef unsigned short __u16; 18 - 19 - typedef __signed__ int __s32; 20 - typedef unsigned int __u32; 21 - 22 - #if defined(__GNUC__) 23 - __extension__ typedef __signed__ long long __s64; 24 - __extension__ typedef unsigned long long __u64; 25 - #endif 26 9 27 10 #endif /* __ASSEMBLY__ */ 28 11 ··· 23 40 #endif 24 41 25 42 #ifndef __ASSEMBLY__ 26 - 27 - typedef signed char s8; 28 - typedef unsigned char u8; 29 - 30 - typedef signed short s16; 31 - typedef unsigned short u16; 32 - 33 - typedef signed int s32; 34 - typedef unsigned int u32; 35 - 36 - typedef signed long long s64; 37 - typedef unsigned long long u64; 38 43 39 44 /* Dma addresses are 32-bits wide. */ 40 45
+6 -42
include/asm-powerpc/types.h
··· 1 1 #ifndef _ASM_POWERPC_TYPES_H 2 2 #define _ASM_POWERPC_TYPES_H 3 3 4 + #ifdef __powerpc64__ 5 + # include <asm-generic/int-l64.h> 6 + #else 7 + # include <asm-generic/int-ll64.h> 8 + #endif 9 + 4 10 #ifndef __ASSEMBLY__ 5 11 6 12 /* ··· 28 22 typedef unsigned short umode_t; 29 23 #endif 30 24 31 - /* 32 - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 33 - * header files exported to user space 34 - */ 35 - 36 - typedef __signed__ char __s8; 37 - typedef unsigned char __u8; 38 - 39 - typedef __signed__ short __s16; 40 - typedef unsigned short __u16; 41 - 42 - typedef __signed__ int __s32; 43 - typedef unsigned int __u32; 44 - 45 - #ifdef __powerpc64__ 46 - typedef __signed__ long __s64; 47 - typedef unsigned long __u64; 48 - #else 49 - #if defined(__GNUC__) 50 - __extension__ typedef __signed__ long long __s64; 51 - __extension__ typedef unsigned long long __u64; 52 - #endif 53 - #endif /* __powerpc64__ */ 54 - 55 25 typedef struct { 56 26 __u32 u[4]; 57 27 } __attribute__((aligned(16))) __vector128; ··· 45 63 #endif 46 64 47 65 #ifndef __ASSEMBLY__ 48 - 49 - 50 - typedef signed char s8; 51 - typedef unsigned char u8; 52 - 53 - typedef signed short s16; 54 - typedef unsigned short u16; 55 - 56 - typedef signed int s32; 57 - typedef unsigned int u32; 58 - 59 - #ifdef __powerpc64__ 60 - typedef signed long s64; 61 - typedef unsigned long u64; 62 - #else 63 - typedef signed long long s64; 64 - typedef unsigned long long u64; 65 - #endif 66 66 67 67 typedef __vector128 vector128; 68 68
+6 -42
include/asm-s390/types.h
··· 9 9 #ifndef _S390_TYPES_H 10 10 #define _S390_TYPES_H 11 11 12 + #ifndef __s390x__ 13 + # include <asm-generic/int-l64.h> 14 + #else 15 + # include <asm-generic/int-ll64.h> 16 + #endif 17 + 12 18 #ifndef __ASSEMBLY__ 13 19 14 20 typedef unsigned short umode_t; 15 - 16 - /* 17 - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 18 - * header files exported to user space 19 - */ 20 - 21 - typedef __signed__ char __s8; 22 - typedef unsigned char __u8; 23 - 24 - typedef __signed__ short __s16; 25 - typedef unsigned short __u16; 26 - 27 - typedef __signed__ int __s32; 28 - typedef unsigned int __u32; 29 - 30 - #ifndef __s390x__ 31 - #if defined(__GNUC__) 32 - __extension__ typedef __signed__ long long __s64; 33 - __extension__ typedef unsigned long long __u64; 34 - #endif 35 - #else /* __s390x__ */ 36 - typedef __signed__ long __s64; 37 - typedef unsigned long __u64; 38 - #endif 39 21 40 22 /* A address type so that arithmetic can be done on it & it can be upgraded to 41 23 64 bit when necessary ··· 39 57 #endif 40 58 41 59 #ifndef __ASSEMBLY__ 42 - 43 - 44 - typedef signed char s8; 45 - typedef unsigned char u8; 46 - 47 - typedef signed short s16; 48 - typedef unsigned short u16; 49 - 50 - typedef signed int s32; 51 - typedef unsigned int u32; 52 - 53 - #ifndef __s390x__ 54 - typedef signed long long s64; 55 - typedef unsigned long long u64; 56 - #else /* __s390x__ */ 57 - typedef signed long s64; 58 - typedef unsigned long u64; 59 - #endif /* __s390x__ */ 60 60 61 61 typedef u32 dma_addr_t; 62 62
+2 -32
include/asm-sh/types.h
··· 1 1 #ifndef __ASM_SH_TYPES_H 2 2 #define __ASM_SH_TYPES_H 3 3 4 + #include <asm-generic/int-ll64.h> 5 + 4 6 #ifndef __ASSEMBLY__ 5 7 6 8 typedef unsigned short umode_t; 7 - 8 - /* 9 - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 10 - * header files exported to user space 11 - */ 12 - 13 - typedef __signed__ char __s8; 14 - typedef unsigned char __u8; 15 - 16 - typedef __signed__ short __s16; 17 - typedef unsigned short __u16; 18 - 19 - typedef __signed__ int __s32; 20 - typedef unsigned int __u32; 21 - 22 - #if defined(__GNUC__) 23 - __extension__ typedef __signed__ long long __s64; 24 - __extension__ typedef unsigned long long __u64; 25 - #endif 26 9 27 10 #endif /* __ASSEMBLY__ */ 28 11 ··· 17 34 #define BITS_PER_LONG 32 18 35 19 36 #ifndef __ASSEMBLY__ 20 - 21 - 22 - typedef __signed__ char s8; 23 - typedef unsigned char u8; 24 - 25 - typedef __signed__ short s16; 26 - typedef unsigned short u16; 27 - 28 - typedef __signed__ int s32; 29 - typedef unsigned int u32; 30 - 31 - typedef __signed__ long long s64; 32 - typedef unsigned long long u64; 33 37 34 38 /* Dma addresses are 32-bits wide. */ 35 39
+1 -29
include/asm-sparc/types.h
··· 3 3 #define _SPARC_TYPES_H 4 4 5 5 /* 6 - * _xx is ok: it doesn't pollute the POSIX namespace. Use these in the 7 - * header files exported to user space. 8 - */ 9 - 10 - /* 11 6 * This file is never included by application software unless 12 7 * explicitly requested (e.g., via linux/types.h) in which case the 13 8 * application is Linux specific so (user-) name space pollution is 14 9 * not a major issue. However, for interoperability, libraries still 15 10 * need to be careful to avoid a name clashes. 16 11 */ 12 + #include <asm-generic/int-ll64.h> 17 13 18 14 #ifndef __ASSEMBLY__ 19 15 20 16 typedef unsigned short umode_t; 21 - 22 - typedef __signed__ char __s8; 23 - typedef unsigned char __u8; 24 - 25 - typedef __signed__ short __s16; 26 - typedef unsigned short __u16; 27 - 28 - typedef __signed__ int __s32; 29 - typedef unsigned int __u32; 30 - 31 - typedef __signed__ long long __s64; 32 - typedef unsigned long long __u64; 33 17 34 18 #endif /* __ASSEMBLY__ */ 35 19 ··· 22 38 #define BITS_PER_LONG 32 23 39 24 40 #ifndef __ASSEMBLY__ 25 - 26 - typedef __signed__ char s8; 27 - typedef unsigned char u8; 28 - 29 - typedef __signed__ short s16; 30 - typedef unsigned short u16; 31 - 32 - typedef __signed__ int s32; 33 - typedef unsigned int u32; 34 - 35 - typedef __signed__ long long s64; 36 - typedef unsigned long long u64; 37 41 38 42 typedef u32 dma_addr_t; 39 43 typedef u32 dma64_addr_t;
+1 -29
include/asm-sparc64/types.h
··· 9 9 * not a major issue. However, for interoperability, libraries still 10 10 * need to be careful to avoid a name clashes. 11 11 */ 12 + #include <asm-generic/int-l64.h> 12 13 13 14 #ifndef __ASSEMBLY__ 14 15 15 16 typedef unsigned short umode_t; 16 - 17 - /* 18 - * _xx is ok: it doesn't pollute the POSIX namespace. Use these in the 19 - * header files exported to user space. 20 - */ 21 - 22 - typedef __signed__ char __s8; 23 - typedef unsigned char __u8; 24 - 25 - typedef __signed__ short __s16; 26 - typedef unsigned short __u16; 27 - 28 - typedef __signed__ int __s32; 29 - typedef unsigned int __u32; 30 - 31 - typedef __signed__ long __s64; 32 - typedef unsigned long __u64; 33 17 34 18 #endif /* __ASSEMBLY__ */ 35 19 ··· 22 38 #define BITS_PER_LONG 64 23 39 24 40 #ifndef __ASSEMBLY__ 25 - 26 - typedef __signed__ char s8; 27 - typedef unsigned char u8; 28 - 29 - typedef __signed__ short s16; 30 - typedef unsigned short u16; 31 - 32 - typedef __signed__ int s32; 33 - typedef unsigned int u32; 34 - 35 - typedef __signed__ long s64; 36 - typedef unsigned long u64; 37 41 38 42 /* Dma addresses come in generic and 64-bit flavours. */ 39 43
+1 -31
include/asm-v850/types.h
··· 10 10 * not a major issue. However, for interoperability, libraries still 11 11 * need to be careful to avoid a name clashes. 12 12 */ 13 + #include <asm-generic/int-ll64.h> 13 14 14 15 typedef unsigned short umode_t; 15 - 16 - /* 17 - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 18 - * header files exported to user space 19 - */ 20 - 21 - typedef __signed__ char __s8; 22 - typedef unsigned char __u8; 23 - 24 - typedef __signed__ short __s16; 25 - typedef unsigned short __u16; 26 - 27 - typedef __signed__ int __s32; 28 - typedef unsigned int __u32; 29 - 30 - #if defined(__GNUC__) 31 - __extension__ typedef __signed__ long long __s64; 32 - __extension__ typedef unsigned long long __u64; 33 - #endif 34 16 35 17 #endif /* !__ASSEMBLY__ */ 36 18 ··· 24 42 #define BITS_PER_LONG 32 25 43 26 44 #ifndef __ASSEMBLY__ 27 - 28 - typedef signed char s8; 29 - typedef unsigned char u8; 30 - 31 - typedef signed short s16; 32 - typedef unsigned short u16; 33 - 34 - typedef signed int s32; 35 - typedef unsigned int u32; 36 - 37 - typedef signed long long s64; 38 - typedef unsigned long long u64; 39 45 40 46 /* Dma addresses are 32-bits wide. */ 41 47
+2 -36
include/asm-x86/types.h
··· 1 1 #ifndef _ASM_X86_TYPES_H 2 2 #define _ASM_X86_TYPES_H 3 3 4 + #include <asm-generic/int-ll64.h> 5 + 4 6 #ifndef __ASSEMBLY__ 5 7 6 8 typedef unsigned short umode_t; 7 - 8 - /* 9 - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 10 - * header files exported to user space 11 - */ 12 - 13 - typedef __signed__ char __s8; 14 - typedef unsigned char __u8; 15 - 16 - typedef __signed__ short __s16; 17 - typedef unsigned short __u16; 18 - 19 - typedef __signed__ int __s32; 20 - typedef unsigned int __u32; 21 - 22 - #ifdef __i386__ 23 - # ifdef __GNUC__ 24 - __extension__ typedef __signed__ long long __s64; 25 - __extension__ typedef unsigned long long __u64; 26 - # endif 27 - #else 28 - typedef __signed__ long long __s64; 29 - typedef unsigned long long __u64; 30 - #endif 31 9 32 10 #endif /* __ASSEMBLY__ */ 33 11 ··· 21 43 #endif 22 44 23 45 #ifndef __ASSEMBLY__ 24 - 25 - typedef signed char s8; 26 - typedef unsigned char u8; 27 - 28 - typedef signed short s16; 29 - typedef unsigned short u16; 30 - 31 - typedef signed int s32; 32 - typedef unsigned int u32; 33 - 34 - typedef signed long long s64; 35 - typedef unsigned long long u64; 36 46 37 47 typedef u64 dma64_addr_t; 38 48 #if defined(CONFIG_X86_64) || defined(CONFIG_HIGHMEM64G)
+1 -32
include/asm-xtensa/types.h
··· 11 11 #ifndef _XTENSA_TYPES_H 12 12 #define _XTENSA_TYPES_H 13 13 14 + #include <asm-generic/int-ll64.h> 14 15 15 16 #ifdef __ASSEMBLY__ 16 17 # define __XTENSA_UL(x) (x) ··· 26 25 typedef unsigned short umode_t; 27 26 28 27 /* 29 - * __xx is ok: it doesn't pollute the POSIX namespace. Use these in the 30 - * header files exported to user space 31 - */ 32 - 33 - typedef __signed__ char __s8; 34 - typedef unsigned char __u8; 35 - 36 - typedef __signed__ short __s16; 37 - typedef unsigned short __u16; 38 - 39 - typedef __signed__ int __s32; 40 - typedef unsigned int __u32; 41 - 42 - #if defined(__GNUC__) 43 - __extension__ typedef __signed__ long long __s64; 44 - __extension__ typedef unsigned long long __u64; 45 - #endif 46 - 47 - /* 48 28 * These aren't exported outside the kernel to avoid name space clashes 49 29 */ 50 30 #ifdef __KERNEL__ 51 - 52 - typedef __signed__ char s8; 53 - typedef unsigned char u8; 54 - 55 - typedef __signed__ short s16; 56 - typedef unsigned short u16; 57 - 58 - typedef __signed__ int s32; 59 - typedef unsigned int u32; 60 - 61 - typedef __signed__ long long s64; 62 - typedef unsigned long long u64; 63 - 64 31 65 32 #define BITS_PER_LONG 32 66 33
+4 -4
kernel/time.c
··· 246 246 return (j + (HZ / MSEC_PER_SEC) - 1)/(HZ / MSEC_PER_SEC); 247 247 #else 248 248 # if BITS_PER_LONG == 32 249 - return ((u64)HZ_TO_MSEC_MUL32 * j) >> HZ_TO_MSEC_SHR32; 249 + return (HZ_TO_MSEC_MUL32 * j) >> HZ_TO_MSEC_SHR32; 250 250 # else 251 251 return (j * HZ_TO_MSEC_NUM) / HZ_TO_MSEC_DEN; 252 252 # endif ··· 262 262 return (j + (HZ / USEC_PER_SEC) - 1)/(HZ / USEC_PER_SEC); 263 263 #else 264 264 # if BITS_PER_LONG == 32 265 - return ((u64)HZ_TO_USEC_MUL32 * j) >> HZ_TO_USEC_SHR32; 265 + return (HZ_TO_USEC_MUL32 * j) >> HZ_TO_USEC_SHR32; 266 266 # else 267 267 return (j * HZ_TO_USEC_NUM) / HZ_TO_USEC_DEN; 268 268 # endif ··· 476 476 if (HZ > MSEC_PER_SEC && m > jiffies_to_msecs(MAX_JIFFY_OFFSET)) 477 477 return MAX_JIFFY_OFFSET; 478 478 479 - return ((u64)MSEC_TO_HZ_MUL32 * m + MSEC_TO_HZ_ADJ32) 479 + return (MSEC_TO_HZ_MUL32 * m + MSEC_TO_HZ_ADJ32) 480 480 >> MSEC_TO_HZ_SHR32; 481 481 #endif 482 482 } ··· 491 491 #elif HZ > USEC_PER_SEC && !(HZ % USEC_PER_SEC) 492 492 return u * (HZ / USEC_PER_SEC); 493 493 #else 494 - return ((u64)USEC_TO_HZ_MUL32 * u + USEC_TO_HZ_ADJ32) 494 + return (USEC_TO_HZ_MUL32 * u + USEC_TO_HZ_ADJ32) 495 495 >> USEC_TO_HZ_SHR32; 496 496 #endif 497 497 }
+48 -72
kernel/timeconst.pl
··· 1 1 #!/usr/bin/perl 2 2 # ----------------------------------------------------------------------- 3 3 # 4 - # Copyright 2007 rPath, Inc. - All Rights Reserved 4 + # Copyright 2007-2008 rPath, Inc. - All Rights Reserved 5 5 # 6 6 # This file is part of the Linux kernel, and is made available under 7 7 # the terms of the GNU General Public License version 2 or (at your ··· 20 20 %canned_values = ( 21 21 24 => [ 22 22 '0xa6aaaaab','0x2aaaaaa',26, 23 - '0xa6aaaaaaaaaaaaab','0x2aaaaaaaaaaaaaa',58, 24 23 125,3, 25 24 '0xc49ba5e4','0x1fbe76c8b4',37, 26 - '0xc49ba5e353f7ceda','0x1fbe76c8b439581062',69, 27 25 3,125, 28 26 '0xa2c2aaab','0xaaaa',16, 29 - '0xa2c2aaaaaaaaaaab','0xaaaaaaaaaaaa',48, 30 27 125000,3, 31 28 '0xc9539b89','0x7fffbce4217d',47, 32 - '0xc9539b8887229e91','0x7fffbce4217d2849cb25',79, 33 29 3,125000, 34 30 ], 32 => [ 35 31 '0xfa000000','0x6000000',27, 36 - '0xfa00000000000000','0x600000000000000',59, 37 32 125,4, 38 33 '0x83126e98','0xfdf3b645a',36, 39 - '0x83126e978d4fdf3c','0xfdf3b645a1cac0831',68, 40 34 4,125, 41 35 '0xf4240000','0x0',17, 42 - '0xf424000000000000','0x0',49, 43 36 31250,1, 44 37 '0x8637bd06','0x3fff79c842fa',46, 45 - '0x8637bd05af6c69b6','0x3fff79c842fa5093964a',78, 46 38 1,31250, 47 39 ], 48 => [ 48 40 '0xa6aaaaab','0x6aaaaaa',27, 49 - '0xa6aaaaaaaaaaaaab','0x6aaaaaaaaaaaaaa',59, 50 41 125,6, 51 42 '0xc49ba5e4','0xfdf3b645a',36, 52 - '0xc49ba5e353f7ceda','0xfdf3b645a1cac0831',68, 53 43 6,125, 54 44 '0xa2c2aaab','0x15555',17, 55 - '0xa2c2aaaaaaaaaaab','0x1555555555555',49, 56 45 62500,3, 57 46 '0xc9539b89','0x3fffbce4217d',46, 58 - '0xc9539b8887229e91','0x3fffbce4217d2849cb25',78, 59 47 3,62500, 60 48 ], 64 => [ 61 49 '0xfa000000','0xe000000',28, 62 - '0xfa00000000000000','0xe00000000000000',60, 63 50 125,8, 64 51 '0x83126e98','0x7ef9db22d',35, 65 - '0x83126e978d4fdf3c','0x7ef9db22d0e560418',67, 66 52 8,125, 67 53 '0xf4240000','0x0',18, 68 - '0xf424000000000000','0x0',50, 69 54 15625,1, 70 55 '0x8637bd06','0x1fff79c842fa',45, 71 - '0x8637bd05af6c69b6','0x1fff79c842fa5093964a',77, 72 56 1,15625, 73 57 ], 100 => [ 74 58 '0xa0000000','0x0',28, 75 - '0xa000000000000000','0x0',60, 76 59 10,1, 77 60 '0xcccccccd','0x733333333',35, 78 - '0xcccccccccccccccd','0x73333333333333333',67, 79 61 1,10, 80 62 '0x9c400000','0x0',18, 81 - '0x9c40000000000000','0x0',50, 82 63 10000,1, 83 64 '0xd1b71759','0x1fff2e48e8a7',45, 84 - '0xd1b71758e219652c','0x1fff2e48e8a71de69ad4',77, 85 65 1,10000, 86 66 ], 122 => [ 87 67 '0x8325c53f','0xfbcda3a',28, 88 - '0x8325c53ef368eb05','0xfbcda3ac10c9714',60, 89 68 500,61, 90 69 '0xf9db22d1','0x7fbe76c8b',35, 91 - '0xf9db22d0e560418a','0x7fbe76c8b43958106',67, 92 70 61,500, 93 71 '0x8012e2a0','0x3ef36',18, 94 - '0x8012e29f79b47583','0x3ef368eb04325',50, 95 72 500000,61, 96 73 '0xffda4053','0x1ffffbce4217',45, 97 - '0xffda4052d666a983','0x1ffffbce4217d2849cb2',77, 98 74 61,500000, 99 75 ], 128 => [ 100 76 '0xfa000000','0x1e000000',29, 101 - '0xfa00000000000000','0x1e00000000000000',61, 102 77 125,16, 103 78 '0x83126e98','0x3f7ced916',34, 104 - '0x83126e978d4fdf3c','0x3f7ced916872b020c',66, 105 79 16,125, 106 80 '0xf4240000','0x40000',19, 107 - '0xf424000000000000','0x4000000000000',51, 108 81 15625,2, 109 82 '0x8637bd06','0xfffbce4217d',44, 110 - '0x8637bd05af6c69b6','0xfffbce4217d2849cb25',76, 111 83 2,15625, 112 84 ], 200 => [ 113 85 '0xa0000000','0x0',29, 114 - '0xa000000000000000','0x0',61, 115 86 5,1, 116 87 '0xcccccccd','0x333333333',34, 117 - '0xcccccccccccccccd','0x33333333333333333',66, 118 88 1,5, 119 89 '0x9c400000','0x0',19, 120 - '0x9c40000000000000','0x0',51, 121 90 5000,1, 122 91 '0xd1b71759','0xfff2e48e8a7',44, 123 - '0xd1b71758e219652c','0xfff2e48e8a71de69ad4',76, 124 92 1,5000, 125 93 ], 250 => [ 126 94 '0x80000000','0x0',29, 127 - '0x8000000000000000','0x0',61, 128 95 4,1, 129 96 '0x80000000','0x180000000',33, 130 - '0x8000000000000000','0x18000000000000000',65, 131 97 1,4, 132 98 '0xfa000000','0x0',20, 133 - '0xfa00000000000000','0x0',52, 134 99 4000,1, 135 100 '0x83126e98','0x7ff7ced9168',43, 136 - '0x83126e978d4fdf3c','0x7ff7ced916872b020c4',75, 137 101 1,4000, 138 102 ], 256 => [ 139 103 '0xfa000000','0x3e000000',30, 140 - '0xfa00000000000000','0x3e00000000000000',62, 141 104 125,32, 142 105 '0x83126e98','0x1fbe76c8b',33, 143 - '0x83126e978d4fdf3c','0x1fbe76c8b43958106',65, 144 106 32,125, 145 107 '0xf4240000','0xc0000',20, 146 - '0xf424000000000000','0xc000000000000',52, 147 108 15625,4, 148 109 '0x8637bd06','0x7ffde7210be',43, 149 - '0x8637bd05af6c69b6','0x7ffde7210be9424e592',75, 150 110 4,15625, 151 111 ], 300 => [ 152 112 '0xd5555556','0x2aaaaaaa',30, 153 - '0xd555555555555556','0x2aaaaaaaaaaaaaaa',62, 154 113 10,3, 155 114 '0x9999999a','0x1cccccccc',33, 156 - '0x999999999999999a','0x1cccccccccccccccc',65, 157 115 3,10, 158 116 '0xd0555556','0xaaaaa',20, 159 - '0xd055555555555556','0xaaaaaaaaaaaaa',52, 160 117 10000,3, 161 118 '0x9d495183','0x7ffcb923a29',43, 162 - '0x9d495182a9930be1','0x7ffcb923a29c779a6b5',75, 163 119 3,10000, 164 120 ], 512 => [ 165 121 '0xfa000000','0x7e000000',31, 166 - '0xfa00000000000000','0x7e00000000000000',63, 167 122 125,64, 168 123 '0x83126e98','0xfdf3b645',32, 169 - '0x83126e978d4fdf3c','0xfdf3b645a1cac083',64, 170 124 64,125, 171 125 '0xf4240000','0x1c0000',21, 172 - '0xf424000000000000','0x1c000000000000',53, 173 126 15625,8, 174 127 '0x8637bd06','0x3ffef39085f',42, 175 - '0x8637bd05af6c69b6','0x3ffef39085f4a1272c9',74, 176 128 8,15625, 177 129 ], 1000 => [ 178 130 '0x80000000','0x0',31, 179 - '0x8000000000000000','0x0',63, 180 131 1,1, 181 132 '0x80000000','0x0',31, 182 - '0x8000000000000000','0x0',63, 183 133 1,1, 184 134 '0xfa000000','0x0',22, 185 - '0xfa00000000000000','0x0',54, 186 135 1000,1, 187 136 '0x83126e98','0x1ff7ced9168',41, 188 - '0x83126e978d4fdf3c','0x1ff7ced916872b020c4',73, 189 137 1,1000, 190 138 ], 1024 => [ 191 139 '0xfa000000','0xfe000000',32, 192 - '0xfa00000000000000','0xfe00000000000000',64, 193 140 125,128, 194 141 '0x83126e98','0x7ef9db22',31, 195 - '0x83126e978d4fdf3c','0x7ef9db22d0e56041',63, 196 142 128,125, 197 143 '0xf4240000','0x3c0000',22, 198 - '0xf424000000000000','0x3c000000000000',54, 199 144 15625,16, 200 145 '0x8637bd06','0x1fff79c842f',41, 201 - '0x8637bd05af6c69b6','0x1fff79c842fa5093964',73, 202 146 16,15625, 203 147 ], 1200 => [ 204 148 '0xd5555556','0xd5555555',32, 205 - '0xd555555555555556','0xd555555555555555',64, 206 149 5,6, 207 150 '0x9999999a','0x66666666',31, 208 - '0x999999999999999a','0x6666666666666666',63, 209 151 6,5, 210 152 '0xd0555556','0x2aaaaa',22, 211 - '0xd055555555555556','0x2aaaaaaaaaaaaa',54, 212 153 2500,3, 213 154 '0x9d495183','0x1ffcb923a29',41, 214 - '0x9d495182a9930be1','0x1ffcb923a29c779a6b5',73, 215 155 3,2500, 216 156 ] 217 157 ); ··· 204 264 return 0; 205 265 } 206 266 267 + # Generate a hex value if the result fits in 64 bits; 268 + # otherwise skip. 269 + sub bignum_hex($) { 270 + my($x) = @_; 271 + my $s = $x->as_hex(); 272 + 273 + return (length($s) > 18) ? undef : $s; 274 + } 275 + 207 276 # Provides mul, adj, and shr factors for a specific 208 277 # (bit, time, hz) combination 209 278 sub muladj($$$) { ··· 220 271 my $s = fmuls($b, $t, $hz); 221 272 my $m = fmul($s, $t, $hz); 222 273 my $a = fadj($s, $t, $hz); 223 - return ($m->as_hex(), $a->as_hex(), $s); 274 + return (bignum_hex($m), bignum_hex($a), $s); 224 275 } 225 276 226 277 # Provides numerator, denominator values ··· 237 288 238 289 # HZ_TO_xx 239 290 push(@val, muladj(32, $t, $hz)); 240 - push(@val, muladj(64, $t, $hz)); 241 291 push(@val, numden($t, $hz)); 242 292 243 293 # xx_TO_HZ 244 294 push(@val, muladj(32, $hz, $t)); 245 - push(@val, muladj(64, $hz, $t)); 246 295 push(@val, numden($hz, $t)); 247 296 248 297 return @val; ··· 265 318 return @val; 266 319 } 267 320 321 + sub outputval($$) 322 + { 323 + my($name, $val) = @_; 324 + my $csuf; 325 + 326 + if (defined($val)) { 327 + if ($name !~ /SHR/) { 328 + $val = "U64_C($val)"; 329 + } 330 + printf "#define %-23s %s\n", $name.$csuf, $val.$csuf; 331 + } 332 + } 333 + 268 334 sub output($@) 269 335 { 270 336 my($hz, @val) = @_; ··· 291 331 print "\n"; 292 332 293 333 print "#include <linux/param.h>\n"; 334 + print "#include <linux/types.h>\n"; 294 335 295 336 print "\n"; 296 337 print "#if HZ != $hz\n"; ··· 301 340 302 341 foreach $pfx ('HZ_TO_MSEC','MSEC_TO_HZ', 303 342 'HZ_TO_USEC','USEC_TO_HZ') { 304 - foreach $bit (32, 64) { 343 + foreach $bit (32) { 305 344 foreach $suf ('MUL', 'ADJ', 'SHR') { 306 - printf "#define %-23s %s\n", 307 - "${pfx}_$suf$bit", shift(@val); 345 + outputval("${pfx}_$suf$bit", shift(@val)); 308 346 } 309 347 } 310 348 foreach $suf ('NUM', 'DEN') { 311 - printf "#define %-23s %s\n", 312 - "${pfx}_$suf", shift(@val); 349 + outputval("${pfx}_$suf", shift(@val)); 313 350 } 314 351 } 315 352 316 353 print "\n"; 317 354 print "#endif /* KERNEL_TIMECONST_H */\n"; 355 + } 356 + 357 + # Pretty-print Perl values 358 + sub perlvals(@) { 359 + my $v; 360 + my @l = (); 361 + 362 + foreach $v (@_) { 363 + if (!defined($v)) { 364 + push(@l, 'undef'); 365 + } elsif ($v =~ /^0x/) { 366 + push(@l, "\'".$v."\'"); 367 + } else { 368 + push(@l, $v.''); 369 + } 370 + } 371 + return join(',', @l); 318 372 } 319 373 320 374 ($hz) = @ARGV; ··· 349 373 print "$pf$hz => [\n"; 350 374 while (scalar(@values)) { 351 375 my $bit; 352 - foreach $bit (32, 64) { 376 + foreach $bit (32) { 353 377 my $m = shift(@values); 354 378 my $a = shift(@values); 355 379 my $s = shift(@values); 356 - print "\t\t\'",$m,"\',\'",$a,"\',",$s,",\n"; 380 + print "\t\t", perlvals($m,$a,$s), ",\n"; 357 381 } 358 382 my $n = shift(@values); 359 383 my $d = shift(@values); 360 - print "\t\t",$n,',',$d,",\n"; 384 + print "\t\t", perlvals($n,$d), ",\n"; 361 385 } 362 386 print "\t]"; 363 387 $pf = ', ';