Module Name: src
Committed By: riastradh
Date: Sun Dec 19 01:19:30 UTC 2021
Added Files:
src/sys/external/bsd/common/include/linux: types.h
Removed Files:
src/sys/external/bsd/drm2/include/linux: types.h
Log Message:
Move <linux/types.h> to common.
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/sys/external/bsd/common/include/linux/types.h
cvs rdiff -u -r1.9 -r0 src/sys/external/bsd/drm2/include/linux/types.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: src/sys/external/bsd/common/include/linux/types.h
diff -u /dev/null src/sys/external/bsd/common/include/linux/types.h:1.1
--- /dev/null Sun Dec 19 01:19:30 2021
+++ src/sys/external/bsd/common/include/linux/types.h Sun Dec 19 01:19:30 2021
@@ -0,0 +1,98 @@
+/* $NetBSD: types.h,v 1.1 2021/12/19 01:19:30 riastradh Exp $ */
+
+/*-
+ * Copyright (c) 2013 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Taylor R. Campbell.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+ * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+ * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef _LINUX_TYPES_H_
+#define _LINUX_TYPES_H_
+
+#include <sys/types.h>
+#include <sys/bus.h>
+#include <sys/stdint.h>
+
+typedef uint8_t u8;
+typedef uint16_t u16;
+typedef uint32_t u32;
+typedef uint64_t u64;
+
+typedef uint8_t __u8;
+typedef uint16_t __u16;
+typedef uint32_t __u32;
+typedef uint64_t __u64;
+
+typedef int8_t s8;
+typedef int16_t s16;
+typedef int32_t s32;
+typedef int64_t s64;
+
+typedef int8_t __s8;
+typedef int16_t __s16;
+typedef int32_t __s32;
+typedef int64_t __s64;
+
+typedef uint16_t __le16;
+typedef uint32_t __le32;
+typedef uint64_t __le64;
+
+typedef uint16_t __be16;
+typedef uint32_t __be32;
+typedef uint64_t __be64;
+
+#define S8_C INT8_C
+#define S16_C INT16_C
+#define S32_C INT32_C
+#define S64_C INT64_C
+
+#define U8_C UINT8_C
+#define U16_C UINT16_C
+#define U32_C UINT32_C
+#define U64_C UINT64_C
+
+/*
+ * This is used for absolute bus addresses, so it has to be bus_addr_t
+ * and not bus_size_t; bus_addr_t is sometimes wider than bus_size_t.
+ */
+typedef bus_addr_t resource_size_t;
+
+typedef paddr_t phys_addr_t;
+
+/* XXX Is this the right type? */
+typedef unsigned long long cycles_t;
+
+/* XXX Not sure this is correct. */
+typedef off_t loff_t;
+
+#define DECLARE_BITMAP(NAME, BITS) \
+ unsigned long NAME[((BITS) + ((NBBY*sizeof(unsigned long)) - 1)) / \
+ (NBBY*sizeof(unsigned long))]
+
+/* Definition copied in <linux/kernel.h> for convenience. */
+#define __user
+
+#endif /* _LINUX_TYPES_H_ */