Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd/drm2 Teach drm_sysctl about uint, kludgily.



details:   https://anonhg.NetBSD.org/src/rev/ec3fcf53a284
branches:  trunk
changeset: 366217:ec3fcf53a284
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 13:57:24 2018 +0000

description:
Teach drm_sysctl about uint, kludgily.

diffstat:

 sys/external/bsd/drm2/drm/drm_sysctl.c            |  10 ++++++++--
 sys/external/bsd/drm2/include/linux/moduleparam.h |   3 ++-
 2 files changed, 10 insertions(+), 3 deletions(-)

diffs (62 lines):

diff -r 7a973b91c5b4 -r ec3fcf53a284 sys/external/bsd/drm2/drm/drm_sysctl.c
--- a/sys/external/bsd/drm2/drm/drm_sysctl.c    Mon Aug 27 13:57:11 2018 +0000
+++ b/sys/external/bsd/drm2/drm/drm_sysctl.c    Mon Aug 27 13:57:24 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_sysctl.c,v 1.6 2015/07/30 04:36:48 riastradh Exp $ */
+/*     $NetBSD: drm_sysctl.c,v 1.7 2018/08/27 13:57:24 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_sysctl.c,v 1.6 2015/07/30 04:36:48 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_sysctl.c,v 1.7 2018/08/27 13:57:24 riastradh Exp $");
 
 #include <sys/param.h>
 #include <sys/types.h>
@@ -67,6 +67,8 @@
                return *(bool *)p->ptr;
        case MTYPE_int:
                return *(int *)p->ptr;
+       case MTYPE_uint:
+               return *(unsigned *)p->ptr;
        default:
                aprint_error("unhandled module param type %d for %s\n",
                    p->type, p->name);
@@ -82,6 +84,8 @@
                return sizeof(bool);
        case MTYPE_int:
                return sizeof(int);
+       case MTYPE_uint:
+               return sizeof(unsigned);
        default:
                aprint_error("unhandled module param type %d for %s\n",
                    p->type, p->name);
@@ -100,6 +104,8 @@
                return CTLTYPE_INT;
        case MTYPE_charp:
                return CTLTYPE_STRING;
+       case MTYPE_uint:
+               return CTLTYPE_INT; /* XXX */
        default:
                aprint_error("unhandled module param type %d for %s\n",
                    p->type, p->name);
diff -r 7a973b91c5b4 -r ec3fcf53a284 sys/external/bsd/drm2/include/linux/moduleparam.h
--- a/sys/external/bsd/drm2/include/linux/moduleparam.h Mon Aug 27 13:57:11 2018 +0000
+++ b/sys/external/bsd/drm2/include/linux/moduleparam.h Mon Aug 27 13:57:24 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: moduleparam.h,v 1.7 2018/08/27 07:10:39 riastradh Exp $        */
+/*     $NetBSD: moduleparam.h,v 1.8 2018/08/27 13:57:24 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -45,6 +45,7 @@
 #define MTYPE_int      0
 #define MTYPE_bool     1
 #define MTYPE_charp    2
+#define MTYPE_uint     3
 
 #define        module_param_named(NAME, VAR, TYPE, MODE) \
 static __attribute__((__used__)) struct linux_module_param_info info_ ## NAME = { \



Home | Main Index | Thread Index | Old Index