1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Copyright (C) 1994, 1995, 1996, 1999 by Ralf Baechle
4 * Copyright (C) 1999 Silicon Graphics, Inc.
5 */
6#ifndef _ASM_TYPES_H
7#define _ASM_TYPES_H
8
9#include <asm-generic/int-ll64.h>
10
11#ifndef __ASSEMBLY__
12
13typedef unsigned short umode_t;
14
15#endif /* __ASSEMBLY__ */
16
17/*
18 * These aren't exported outside the kernel to avoid name space clashes
19 */
20#ifdef __KERNEL__
21
22#define BITS_PER_LONG _MIPS_SZLONG
23
24#ifndef __ASSEMBLY__
25
26#if (defined(CONFIG_HIGHMEM) && defined(CONFIG_64BIT_PHYS_ADDR)) \
27    || defined(CONFIG_64BIT)
28typedef u64 dma_addr_t;
29
30typedef u64 phys_addr_t;
31typedef u64 phys_size_t;
32
33#else
34typedef u32 dma_addr_t;
35
36typedef u32 phys_addr_t;
37typedef u32 phys_size_t;
38
39#endif
40typedef u64 dma64_addr_t;
41
42/*
43 * Don't use phys_t.  You've been warned.
44 */
45#ifdef CONFIG_64BIT_PHYS_ADDR
46typedef unsigned long long phys_t;
47#else
48typedef unsigned long phys_t;
49#endif
50
51#endif /* __ASSEMBLY__ */
52
53#endif /* __KERNEL__ */
54
55#endif /* _ASM_TYPES_H */
56