Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd Add LIST_HEAD to <linux/nbsd-namespace.h> too.



details:   https://anonhg.NetBSD.org/src/rev/d75fa9468c21
branches:  trunk
changeset: 744846:d75fa9468c21
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Fri Feb 14 04:38:48 2020 +0000

description:
Add LIST_HEAD to <linux/nbsd-namespace.h> too.

diffstat:

 sys/external/bsd/common/include/linux/list.h                                              |   4 ++-
 sys/external/bsd/drm2/dist/drm/drm_edid.c                                                 |   8 +++--
 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c                                      |  10 ++++--
 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_gem.c                                      |  14 +++++-----
 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/timer/nouveau_nvkm_subdev_timer_base.c |   8 +++--
 sys/external/bsd/drm2/include/linux/nbsd-namespace.h                                      |   4 ++-
 6 files changed, 29 insertions(+), 19 deletions(-)

diffs (187 lines):

diff -r fc420e5b3506 -r d75fa9468c21 sys/external/bsd/common/include/linux/list.h
--- a/sys/external/bsd/common/include/linux/list.h      Fri Feb 14 04:38:36 2020 +0000
+++ b/sys/external/bsd/common/include/linux/list.h      Fri Feb 14 04:38:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: list.h,v 1.18 2018/08/27 13:56:58 riastradh Exp $      */
+/*     $NetBSD: list.h,v 1.19 2020/02/14 04:38:48 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -61,6 +61,8 @@
 
 #define        LIST_HEAD_INIT(name)    { .prev = &(name), .next = &(name) }
 
+#define        LINUX_LIST_HEAD(name)   struct list_head name = LIST_HEAD_INIT(name)
+
 static inline void
 INIT_LIST_HEAD(struct list_head *head)
 {
diff -r fc420e5b3506 -r d75fa9468c21 sys/external/bsd/drm2/dist/drm/drm_edid.c
--- a/sys/external/bsd/drm2/dist/drm/drm_edid.c Fri Feb 14 04:38:36 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/drm_edid.c Fri Feb 14 04:38:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: drm_edid.c,v 1.6 2018/08/27 04:58:19 riastradh Exp $   */
+/*     $NetBSD: drm_edid.c,v 1.7 2020/02/14 04:38:48 riastradh Exp $   */
 
 /*
  * Copyright (c) 2006 Luc Verhaegen (quirks list)
@@ -30,7 +30,7 @@
  * DEALINGS IN THE SOFTWARE.
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_edid.c,v 1.6 2018/08/27 04:58:19 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_edid.c,v 1.7 2020/02/14 04:38:48 riastradh Exp $");
 
 #include <linux/kernel.h>
 #include <linux/slab.h>
@@ -48,6 +48,8 @@
 #include <drm/drm_edid.h>
 #include <drm/drm_displayid.h>
 
+#include <linux/nbsd-namespace.h>
+
 #define version_greater(edid, maj, min) \
        (((edid)->version > (maj)) || \
         ((edid)->version == (maj) && (edid)->revision > (min)))
@@ -2673,7 +2675,7 @@
 {
        struct drm_device *dev = connector->dev;
        struct drm_display_mode *mode, *tmp;
-       struct list_head list = LIST_HEAD_INIT(list);
+       LIST_HEAD(list);
        int modes = 0;
 
        /* Don't add CEA modes if the CEA extension block is missing */
diff -r fc420e5b3506 -r d75fa9468c21 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c      Fri Feb 14 04:38:36 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_drm.c      Fri Feb 14 04:38:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_drm.c,v 1.18 2020/02/14 04:35:20 riastradh Exp $       */
+/*     $NetBSD: nouveau_drm.c,v 1.19 2020/02/14 04:38:48 riastradh Exp $       */
 
 /*
  * Copyright 2012 Red Hat Inc.
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_drm.c,v 1.18 2020/02/14 04:35:20 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_drm.c,v 1.19 2020/02/14 04:38:48 riastradh Exp $");
 
 #include <linux/console.h>
 #include <linux/delay.h>
@@ -61,7 +61,11 @@
 #include "nouveau_platform.h"
 #include "nouveau_ttm.h"
 
+#ifdef __NetBSD__
+#include <sys/file.h>
+#include <sys/ioccom.h>
 #include <linux/nbsd-namespace.h>
+#endif
 
 MODULE_PARM_DESC(config, "option string to pass to driver core");
 char *nouveau_config;
@@ -949,8 +953,6 @@
 };
 
 #ifdef __NetBSD__
-#include <sys/file.h>
-#include <sys/ioccom.h>
 static int                     /* XXX expose to ioc32 */
 nouveau_ioctl_override(struct file *fp, unsigned long cmd, void *data)
 {
diff -r fc420e5b3506 -r d75fa9468c21 sys/external/bsd/drm2/dist/drm/nouveau/nouveau_gem.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_gem.c      Fri Feb 14 04:38:36 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nouveau_gem.c      Fri Feb 14 04:38:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_gem.c,v 1.9 2019/01/27 02:08:42 pgoyette Exp $ */
+/*     $NetBSD: nouveau_gem.c,v 1.10 2020/02/14 04:38:48 riastradh Exp $       */
 
 /*
  * Copyright (C) 2008 Ben Skeggs.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_gem.c,v 1.9 2019/01/27 02:08:42 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_gem.c,v 1.10 2020/02/14 04:38:48 riastradh Exp $");
 
 #include <linux/err.h>         /* XXX */
 
@@ -39,6 +39,8 @@
 #include "nouveau_ttm.h"
 #include "nouveau_gem.h"
 
+#include <linux/nbsd-namespace.h>
+
 void
 nouveau_gem_object_del(struct drm_gem_object *gem)
 {
@@ -381,11 +383,9 @@
        int trycnt = 0;
        int ret = -EINVAL, i;
        struct nouveau_bo *res_bo = NULL;
-       struct list_head gart_list, vram_list, both_list;
-
-       INIT_LIST_HEAD(&gart_list);
-       INIT_LIST_HEAD(&vram_list);
-       INIT_LIST_HEAD(&both_list);
+       LIST_HEAD(gart_list);
+       LIST_HEAD(vram_list);
+       LIST_HEAD(both_list);
 
        ww_acquire_init(&op->ticket, &reservation_ww_class);
 retry:
diff -r fc420e5b3506 -r d75fa9468c21 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/timer/nouveau_nvkm_subdev_timer_base.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/timer/nouveau_nvkm_subdev_timer_base.c Fri Feb 14 04:38:36 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/timer/nouveau_nvkm_subdev_timer_base.c Fri Feb 14 04:38:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nouveau_nvkm_subdev_timer_base.c,v 1.2 2018/08/27 04:58:35 riastradh Exp $     */
+/*     $NetBSD: nouveau_nvkm_subdev_timer_base.c,v 1.3 2020/02/14 04:38:48 riastradh Exp $     */
 
 /*
  * Copyright 2012 Red Hat Inc.
@@ -24,10 +24,12 @@
  * Authors: Ben Skeggs
  */
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_timer_base.c,v 1.2 2018/08/27 04:58:35 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_timer_base.c,v 1.3 2020/02/14 04:38:48 riastradh Exp $");
 
 #include "priv.h"
 
+#include <linux/nbsd-namespace.h>
+
 u64
 nvkm_timer_read(struct nvkm_timer *tmr)
 {
@@ -39,7 +41,7 @@
 {
        struct nvkm_alarm *alarm, *atemp;
        unsigned long flags;
-       struct list_head exec = LIST_HEAD_INIT(exec);
+       LIST_HEAD(exec);
 
        /* Process pending alarms. */
        spin_lock_irqsave(&tmr->lock, flags);
diff -r fc420e5b3506 -r d75fa9468c21 sys/external/bsd/drm2/include/linux/nbsd-namespace.h
--- a/sys/external/bsd/drm2/include/linux/nbsd-namespace.h      Fri Feb 14 04:38:36 2020 +0000
+++ b/sys/external/bsd/drm2/include/linux/nbsd-namespace.h      Fri Feb 14 04:38:48 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: nbsd-namespace.h,v 1.1 2020/02/14 04:35:20 riastradh Exp $     */
+/*     $NetBSD: nbsd-namespace.h,v 1.2 2020/02/14 04:38:48 riastradh Exp $     */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -36,8 +36,10 @@
  */
 
 #undef ALIGN
+#undef LIST_HEAD
 
 #define        ALIGN           round_up
+#define        LIST_HEAD       LINUX_LIST_HEAD
 #define        mutex_destroy   linux_mutex_destroy
 #define        mutex_init      linux_mutex_init
 



Home | Main Index | Thread Index | Old Index