diff options
Diffstat (limited to 'arch/riscv/include/asm/types.h')
-rw-r--r-- | arch/riscv/include/asm/types.h | 37 |
1 files changed, 6 insertions, 31 deletions
diff --git a/arch/riscv/include/asm/types.h b/arch/riscv/include/asm/types.h index 9797206e5e..403cf9a48f 100644 --- a/arch/riscv/include/asm/types.h +++ b/arch/riscv/include/asm/types.h | |||
@@ -12,45 +12,20 @@ | |||
12 | #ifndef __ASM_RISCV_TYPES_H | 12 | #ifndef __ASM_RISCV_TYPES_H |
13 | #define __ASM_RISCV_TYPES_H | 13 | #define __ASM_RISCV_TYPES_H |
14 | 14 | ||
15 | typedef unsigned short umode_t; | 15 | #include <asm-generic/int-ll64.h> |
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 | 16 | ||
31 | #if defined(__GNUC__) && !defined(__STRICT_ANSI__) | 17 | typedef unsigned short umode_t; |
32 | typedef __signed__ long long __s64; | ||
33 | typedef unsigned long long __u64; | ||
34 | #endif | ||
35 | 18 | ||
36 | /* | 19 | /* |
37 | * These aren't exported outside the kernel to avoid name space clashes | 20 | * These aren't exported outside the kernel to avoid name space clashes |
38 | */ | 21 | */ |
39 | #ifdef __KERNEL__ | 22 | #ifdef __KERNEL__ |
40 | 23 | ||
41 | typedef signed char s8; | 24 | #ifdef CONFIG_ARCH_RV64I |
42 | typedef unsigned char u8; | 25 | #define BITS_PER_LONG 64 |
43 | 26 | #else | |
44 | typedef signed short s16; | ||
45 | typedef unsigned short u16; | ||
46 | |||
47 | typedef signed int s32; | ||
48 | typedef unsigned int u32; | ||
49 | |||
50 | typedef signed long long s64; | ||
51 | typedef unsigned long long u64; | ||
52 | |||
53 | #define BITS_PER_LONG 32 | 27 | #define BITS_PER_LONG 32 |
28 | #endif | ||
54 | 29 | ||
55 | #include <stddef.h> | 30 | #include <stddef.h> |
56 | 31 | ||