Source-Changes-HG archive

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

[src/trunk]: src/sys/external/bsd provide pr_notice



details:   https://anonhg.NetBSD.org/src/rev/6d0a63119d6d
branches:  trunk
changeset: 365723:6d0a63119d6d
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 06:19:05 2018 +0000

description:
provide pr_notice
avoid needing unregister_oom_notifier
use intel_register_dsm_handler(dev), as older drm does
provide dummy async_schedule
provide atomic_or
match side-loading


Author: coypu <coypu%sdf.org@localhost>
Committer: Taylor R Campbell <riastradh%NetBSD.org@localhost>

diffstat:

 sys/external/bsd/common/include/linux/printk.h |   3 ++-
 sys/external/bsd/drm2/dist/drm/i915/i915_dma.c |   8 ++++++--
 sys/external/bsd/drm2/include/linux/async.h    |  10 +++++++++-
 sys/external/bsd/drm2/include/linux/atomic.h   |   8 +++++++-
 sys/external/bsd/drm2/include/linux/sched.h    |   3 ++-
 5 files changed, 26 insertions(+), 6 deletions(-)

diffs (115 lines):

diff -r 65c429f31fd9 -r 6d0a63119d6d sys/external/bsd/common/include/linux/printk.h
--- a/sys/external/bsd/common/include/linux/printk.h    Mon Aug 27 06:18:51 2018 +0000
+++ b/sys/external/bsd/common/include/linux/printk.h    Mon Aug 27 06:19:05 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: printk.h,v 1.1 2018/08/27 06:06:10 riastradh Exp $     */
+/*     $NetBSD: printk.h,v 1.2 2018/08/27 06:19:05 riastradh Exp $     */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -43,6 +43,7 @@
 #define        pr_info         printf  /* XXX */
 #define        pr_info_once    printf  /* XXX */
 #define        pr_warn_once    printf  /* XXX */
+#define        pr_notice       printf  /* XXX */
 #define        KERN_DEBUG      "drm kern debug: "
 #define        KERN_INFO       "drm kern info: "
 #define        KERN_WARNING    "drm kern warning: "
diff -r 65c429f31fd9 -r 6d0a63119d6d sys/external/bsd/drm2/dist/drm/i915/i915_dma.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c    Mon Aug 27 06:18:51 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_dma.c    Mon Aug 27 06:19:05 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_dma.c,v 1.19 2018/08/27 04:58:23 riastradh Exp $  */
+/*     $NetBSD: i915_dma.c,v 1.20 2018/08/27 06:19:05 riastradh Exp $  */
 
 /* i915_dma.c -- DMA support for the I915 -*- linux-c -*-
  */
@@ -29,7 +29,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_dma.c,v 1.19 2018/08/27 04:58:23 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_dma.c,v 1.20 2018/08/27 06:19:05 riastradh Exp $");
 
 #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
 
@@ -1145,7 +1145,9 @@
        intel_power_domains_fini(dev_priv);
        drm_vblank_cleanup(dev);
 out_gem_unload:
+#ifndef __NetBSD__
        WARN_ON(unregister_oom_notifier(&dev_priv->mm.oom_notifier));
+#endif
        unregister_shrinker(&dev_priv->mm.shrinker);
        /* XXX i915_gem_unload */
 #ifdef __NetBSD__
@@ -1229,7 +1231,9 @@
 
        i915_teardown_sysfs(dev);
 
+#ifndef __NetBSD__
        WARN_ON(unregister_oom_notifier(&dev_priv->mm.oom_notifier));
+#endif
        unregister_shrinker(&dev_priv->mm.shrinker);
 
        io_mapping_free(dev_priv->gtt.mappable);
diff -r 65c429f31fd9 -r 6d0a63119d6d sys/external/bsd/drm2/include/linux/async.h
--- a/sys/external/bsd/drm2/include/linux/async.h       Mon Aug 27 06:18:51 2018 +0000
+++ b/sys/external/bsd/drm2/include/linux/async.h       Mon Aug 27 06:19:05 2018 +0000
@@ -1,8 +1,16 @@
 #ifndef _LINUX_ASYNC_H_
 #define _LINUX_ASYNC_H_
 
+#include <sys/param.h> /* panic */
+
 typedef struct async_cookie_t {
 
 } async_cookie_t;
+
+static inline void
+async_schedule(void (*func)(void *, async_cookie_t), void *cookie)
+{
+       panic("XXX defer function");
+}
+
 #endif /* _LINUX_ASYNC_H_ */
-
diff -r 65c429f31fd9 -r 6d0a63119d6d sys/external/bsd/drm2/include/linux/atomic.h
--- a/sys/external/bsd/drm2/include/linux/atomic.h      Mon Aug 27 06:18:51 2018 +0000
+++ b/sys/external/bsd/drm2/include/linux/atomic.h      Mon Aug 27 06:19:05 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: atomic.h,v 1.7 2014/07/17 14:30:33 riastradh Exp $     */
+/*     $NetBSD: atomic.h,v 1.8 2018/08/27 06:19:05 riastradh Exp $     */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -108,6 +108,12 @@
 }
 
 static inline void
+atomic_or(int value, atomic_t *atomic)
+{
+       atomic_or_uint(&atomic->a_u.au_uint, value);
+}
+
+static inline void
 atomic_set_mask(unsigned long mask, atomic_t *atomic)
 {
        atomic_or_uint(&atomic->a_u.au_uint, mask);
diff -r 65c429f31fd9 -r 6d0a63119d6d sys/external/bsd/drm2/include/linux/sched.h
--- a/sys/external/bsd/drm2/include/linux/sched.h       Mon Aug 27 06:18:51 2018 +0000
+++ b/sys/external/bsd/drm2/include/linux/sched.h       Mon Aug 27 06:19:05 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: sched.h,v 1.7 2018/08/27 06:17:30 riastradh Exp $      */
+/*     $NetBSD: sched.h,v 1.8 2018/08/27 06:19:05 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -38,6 +38,7 @@
 
 #include <asm/param.h>
 #include <asm/barrier.h>
+#include <asm/processor.h>
 #include <linux/errno.h>
 
 #define        TASK_COMM_LEN   MAXCOMLEN



Home | Main Index | Thread Index | Old Index