Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/common/include/linux Define u64_to_user_ptr.



details:   https://anonhg.NetBSD.org/src/rev/97377b49ad60
branches:  trunk
changeset: 1027818:97377b49ad60
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 00:49:08 2021 +0000

description:
Define u64_to_user_ptr.

diffstat:

 sys/external/bsd/common/include/linux/kernel.h |  9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r 87d5dce0d934 -r 97377b49ad60 sys/external/bsd/common/include/linux/kernel.h
--- a/sys/external/bsd/common/include/linux/kernel.h    Sun Dec 19 00:49:00 2021 +0000
+++ b/sys/external/bsd/common/include/linux/kernel.h    Sun Dec 19 00:49:08 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kernel.h,v 1.31 2021/12/19 00:48:23 riastradh Exp $    */
+/*     $NetBSD: kernel.h,v 1.32 2021/12/19 00:49:08 riastradh Exp $    */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -249,4 +249,11 @@
        return str;
 }
 
+static inline void __user *
+u64_to_user_ptr(uint64_t addr)
+{
+
+       return (void __user *)(uintptr_t)addr;
+}
+
 #endif  /* _LINUX_KERNEL_H_ */



Home | Main Index | Thread Index | Old Index