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/drm skip clflush on arm
details: https://anonhg.NetBSD.org/src/rev/b1d968dd999e
branches: trunk
changeset: 341081:b1d968dd999e
user: jmcneill <jmcneill%NetBSD.org@localhost>
date: Sat Oct 17 21:11:56 2015 +0000
description:
skip clflush on arm
diffstat:
sys/external/bsd/drm2/drm/drm_cache.c | 23 +++++++++++++++++------
1 files changed, 17 insertions(+), 6 deletions(-)
diffs (89 lines):
diff -r 20346b074c62 -r b1d968dd999e sys/external/bsd/drm2/drm/drm_cache.c
--- a/sys/external/bsd/drm2/drm/drm_cache.c Sat Oct 17 21:11:06 2015 +0000
+++ b/sys/external/bsd/drm2/drm/drm_cache.c Sat Oct 17 21:11:56 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: drm_cache.c,v 1.7 2015/10/17 15:13:19 jmcneill Exp $ */
+/* $NetBSD: drm_cache.c,v 1.8 2015/10/17 21:11:56 jmcneill Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,8 +30,9 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: drm_cache.c,v 1.7 2015/10/17 15:13:19 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: drm_cache.c,v 1.8 2015/10/17 21:11:56 jmcneill Exp $");
+#include <sys/param.h>
#include <sys/types.h>
#include <sys/xcall.h>
@@ -41,27 +42,34 @@
#include <drm/drmP.h>
+#if !defined(__arm__)
+#define DRM_CLFLUSH 1
+#endif
+
+#if defined(DRM_CLFLUSH)
static bool drm_md_clflush_finegrained_p(void);
static void drm_md_clflush_all(void);
static void drm_md_clflush_page(struct page *);
static void drm_md_clflush_virt_range(const void *, size_t);
+#endif
void
drm_clflush_pages(struct page **pages, unsigned long npages)
{
-
+#if defined(DRM_CLFLUSH)
if (drm_md_clflush_finegrained_p()) {
while (npages--)
drm_md_clflush_page(pages[npages]);
} else {
drm_md_clflush_all();
}
+#endif
}
void
drm_clflush_pglist(struct pglist *list)
{
-
+#if defined(DRM_CLFLUSH)
if (drm_md_clflush_finegrained_p()) {
struct vm_page *page;
@@ -71,26 +79,29 @@
} else {
drm_md_clflush_all();
}
+#endif
}
void
drm_clflush_page(struct page *page)
{
-
+#if defined(DRM_CLFLUSH)
if (drm_md_clflush_finegrained_p())
drm_md_clflush_page(page);
else
drm_md_clflush_all();
+#endif
}
void
drm_clflush_virt_range(const void *vaddr, size_t nbytes)
{
-
+#if defined(DRM_CLFLUSH)
if (drm_md_clflush_finegrained_p())
drm_md_clflush_virt_range(vaddr, nbytes);
else
drm_md_clflush_all();
+#endif
}
#if defined(__i386__) || defined(__x86_64__)
Home |
Main Index |
Thread Index |
Old Index