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/include/drm use VM_FREELIST_DEFAULT on...



details:   https://anonhg.NetBSD.org/src/rev/d73a44ef00c5
branches:  trunk
changeset: 811222:d73a44ef00c5
user:      jmcneill <jmcneill%NetBSD.org@localhost>
date:      Sat Oct 17 21:11:06 2015 +0000

description:
use VM_FREELIST_DEFAULT on arm

diffstat:

 sys/external/bsd/drm2/include/drm/bus_dma_hacks.h |  16 ++++++++++------
 1 files changed, 10 insertions(+), 6 deletions(-)

diffs (41 lines):

diff -r 50a918de8751 -r d73a44ef00c5 sys/external/bsd/drm2/include/drm/bus_dma_hacks.h
--- a/sys/external/bsd/drm2/include/drm/bus_dma_hacks.h Sat Oct 17 21:09:49 2015 +0000
+++ b/sys/external/bsd/drm2/include/drm/bus_dma_hacks.h Sat Oct 17 21:11:06 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus_dma_hacks.h,v 1.7 2014/07/26 14:27:40 riastradh Exp $      */
+/*     $NetBSD: bus_dma_hacks.h,v 1.8 2015/10/17 21:11:06 jmcneill Exp $       */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -40,14 +40,14 @@
 #include <uvm/uvm.h>
 #include <uvm/uvm_extern.h>
 
-/* XXX This is x86-specific bollocks.  */
-#if !defined(__i386__) && !defined(__x86_64__)
+#if defined(__i386__) || defined(__x86_64__)
+#include <x86/bus_private.h>
+#include <x86/machdep.h>
+#elif defined(__arm__)
+#else
 #error DRM GEM/TTM need new MI bus_dma APIs!  Halp!
 #endif
 
-#include <x86/bus_private.h>
-#include <x86/machdep.h>
-
 static inline int
 bus_dmamem_wire_uvm_object(bus_dma_tag_t tag, struct uvm_object *uobj,
     off_t start, bus_size_t size, struct pglist *pages, bus_size_t alignment,
@@ -116,7 +116,11 @@
 static inline int
 bus_dmamem_pgfl(bus_dma_tag_t tag)
 {
+#if defined(__i386__) || defined(__x86_64__)
        return x86_select_freelist(tag->_bounce_alloc_hi - 1);
+#else
+       return VM_FREELIST_DEFAULT;
+#endif
 }
 
 static inline int



Home | Main Index | Thread Index | Old Index