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 linux: Shim fs_reclaim_acquire/release...



details:   https://anonhg.NetBSD.org/src/rev/83d7c740c129
branches:  trunk
changeset: 1028749:83d7c740c129
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sun Dec 19 11:55:58 2021 +0000

description:
linux: Shim fs_reclaim_acquire/release to reduce diff.

diffstat:

 sys/external/bsd/drm2/dist/drm/i915/i915_vma.c |   6 ++----
 sys/external/bsd/drm2/include/linux/sched/mm.h |  14 +++++++++++++-
 2 files changed, 15 insertions(+), 5 deletions(-)

diffs (66 lines):

diff -r 5844cd249e37 -r 83d7c740c129 sys/external/bsd/drm2/dist/drm/i915/i915_vma.c
--- a/sys/external/bsd/drm2/dist/drm/i915/i915_vma.c    Sun Dec 19 11:55:47 2021 +0000
+++ b/sys/external/bsd/drm2/dist/drm/i915/i915_vma.c    Sun Dec 19 11:55:58 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: i915_vma.c,v 1.6 2021/12/19 11:37:41 riastradh Exp $   */
+/*     $NetBSD: i915_vma.c,v 1.7 2021/12/19 11:55:58 riastradh Exp $   */
 
 /*
  * Copyright © 2016 Intel Corporation
@@ -25,7 +25,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: i915_vma.c,v 1.6 2021/12/19 11:37:41 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: i915_vma.c,v 1.7 2021/12/19 11:55:58 riastradh Exp $");
 
 #include <linux/sched/mm.h>
 #include <drm/drm_gem.h>
@@ -175,14 +175,12 @@
 
        i915_active_init(&vma->active, __i915_vma_active, __i915_vma_retire);
 
-#ifndef __NetBSD__             /* XXX fs reclaim */
        /* Declare ourselves safe for use inside shrinkers */
        if (IS_ENABLED(CONFIG_LOCKDEP)) {
                fs_reclaim_acquire(GFP_KERNEL);
                might_lock(&vma->active.mutex);
                fs_reclaim_release(GFP_KERNEL);
        }
-#endif
 
        INIT_LIST_HEAD(&vma->closed_link);
 
diff -r 5844cd249e37 -r 83d7c740c129 sys/external/bsd/drm2/include/linux/sched/mm.h
--- a/sys/external/bsd/drm2/include/linux/sched/mm.h    Sun Dec 19 11:55:47 2021 +0000
+++ b/sys/external/bsd/drm2/include/linux/sched/mm.h    Sun Dec 19 11:55:58 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mm.h,v 1.2 2021/12/19 11:33:50 riastradh Exp $ */
+/*     $NetBSD: mm.h,v 1.3 2021/12/19 11:55:58 riastradh Exp $ */
 
 /*-
  * Copyright (c) 2021 The NetBSD Foundation, Inc.
@@ -33,6 +33,8 @@
 
 #include <uvm/uvm_extern.h>
 
+#include <linux/gfp.h>
+
 static inline void
 mmgrab(struct vmspace *vm)
 {
@@ -45,4 +47,14 @@
        uvmspace_free(vm);
 }
 
+static inline void
+fs_reclaim_acquire(gfp_t gfp)
+{
+}
+
+static inline void
+fs_reclaim_release(gfp_t gfp)
+{
+}
+
 #endif /* _LINUX_SCHED_MM_H_ */



Home | Main Index | Thread Index | Old Index