summaryrefslogtreecommitdiff
path: root/arch/sandbox/include/asm/types.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/sandbox/include/asm/types.h')
-rw-r--r--arch/sandbox/include/asm/types.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/arch/sandbox/include/asm/types.h b/arch/sandbox/include/asm/types.h
new file mode 100644
index 0000000..c1a5d2a
--- /dev/null
+++ b/arch/sandbox/include/asm/types.h
@@ -0,0 +1,39 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (c) 2011 The Chromium OS Authors.
+ */
+
+#ifndef __ASM_SANDBOX_TYPES_H
+#define __ASM_SANDBOX_TYPES_H
+
+#include <asm-generic/int-ll64.h>
+
+typedef unsigned short umode_t;
+
+/*
+ * These aren't exported outside the kernel to avoid name space clashes
+ */
+#ifdef __KERNEL__
+
+/*
+ * Number of bits in a C 'long' on this architecture.
+ */
+#ifdef CONFIG_PHYS_64BIT
+#define BITS_PER_LONG 64
+#else /* CONFIG_PHYS_64BIT */
+#define BITS_PER_LONG 32
+#endif /* CONFIG_PHYS_64BIT */
+
+#ifdef CONFIG_PHYS_64BIT
+typedef unsigned long long dma_addr_t;
+typedef u64 phys_addr_t;
+typedef u64 phys_size_t;
+#else /* CONFIG_PHYS_64BIT */
+typedef unsigned long dma_addr_t;
+typedef u32 phys_addr_t;
+typedef u32 phys_size_t;
+#endif /* CONFIG_PHYS_64BIT */
+
+#endif /* __KERNEL__ */
+
+#endif