xref: /openbsd/sys/dev/pci/drm/include/linux/types.h (revision 7f4dd379)
1 /* Public domain. */
2 
3 #ifndef _LINUX_TYPES_H
4 #define _LINUX_TYPES_H
5 
6 #include <sys/types.h>
7 #include <sys/stdint.h>
8 /*
9  * sparc64 bus.h needs _null.h (indirect via param.h)
10  * sparc64 busop.h needs machine/ctlreg.h (indirect via param.h)
11  */
12 #include <sys/param.h>
13 #include <machine/bus.h>
14 
15 typedef int8_t   __s8;
16 typedef uint8_t  __u8;
17 typedef int16_t  __s16;
18 typedef uint16_t __u16;
19 typedef int32_t  __s32;
20 typedef uint32_t __u32;
21 typedef int64_t  __s64;
22 typedef uint64_t __u64;
23 
24 typedef int8_t   s8;
25 typedef uint8_t  u8;
26 typedef int16_t  s16;
27 typedef uint16_t u16;
28 typedef int32_t  s32;
29 typedef uint32_t u32;
30 typedef int64_t  s64;
31 typedef uint64_t u64;
32 
33 typedef uint16_t __le16;
34 typedef uint16_t __be16;
35 typedef uint32_t __le32;
36 typedef uint32_t __be32;
37 
38 typedef bus_addr_t dma_addr_t;
39 typedef bus_addr_t phys_addr_t;
40 typedef bus_addr_t resource_size_t;
41 
42 typedef off_t loff_t;
43 
44 typedef __ptrdiff_t ptrdiff_t;
45 
46 typedef unsigned int gfp_t;
47 
48 typedef unsigned long pgoff_t;
49 typedef int pgprot_t;
50 
51 typedef int atomic_t;
52 
53 struct list_head {
54 	struct list_head *next, *prev;
55 };
56 
57 struct hlist_node {
58 	struct hlist_node *next, **prev;
59 };
60 
61 struct hlist_head {
62 	struct hlist_node *first;
63 };
64 
65 #define DECLARE_BITMAP(x, y)	unsigned long x[BITS_TO_LONGS(y)];
66 
67 #endif /* _LINUX_TYPES_H_ */
68