aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'arch/riscv/include/asm/types.h')
-rw-r--r--arch/riscv/include/asm/types.h37
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
15typedef 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
22typedef __signed__ char __s8;
23typedef unsigned char __u8;
24
25typedef __signed__ short __s16;
26typedef unsigned short __u16;
27
28typedef __signed__ int __s32;
29typedef unsigned int __u32;
30 16
31#if defined(__GNUC__) && !defined(__STRICT_ANSI__) 17typedef unsigned short umode_t;
32typedef __signed__ long long __s64;
33typedef 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
41typedef signed char s8; 24#ifdef CONFIG_ARCH_RV64I
42typedef unsigned char u8; 25#define BITS_PER_LONG 64
43 26#else
44typedef signed short s16;
45typedef unsigned short u16;
46
47typedef signed int s32;
48typedef unsigned int u32;
49
50typedef signed long long s64;
51typedef 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