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/linux Remove broken drm2 vm_mm...
details: https://anonhg.NetBSD.org/src/rev/5e5f7b45303c
branches: trunk
changeset: 337507:5e5f7b45303c
user: riastradh <riastradh%NetBSD.org@localhost>
date: Fri Apr 17 15:02:50 2015 +0000
description:
Remove broken drm2 vm_mmap stub. Can't possibly have ever worked.
diffstat:
sys/external/bsd/drm2/include/linux/mm.h | 59 +++----------------------------
1 files changed, 7 insertions(+), 52 deletions(-)
diffs (87 lines):
diff -r b4949e91eba9 -r 5e5f7b45303c sys/external/bsd/drm2/include/linux/mm.h
--- a/sys/external/bsd/drm2/include/linux/mm.h Fri Apr 17 13:43:55 2015 +0000
+++ b/sys/external/bsd/drm2/include/linux/mm.h Fri Apr 17 15:02:50 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mm.h,v 1.4 2014/12/14 23:48:58 chs Exp $ */
+/* $NetBSD: mm.h,v 1.5 2015/04/17 15:02:50 riastradh Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -32,18 +32,12 @@
#ifndef _LINUX_MM_H_
#define _LINUX_MM_H_
-#include <sys/kauth.h>
-#include <sys/file.h>
-#include <sys/mman.h>
-#include <sys/proc.h>
-#include <sys/vnode.h>
-
-#include <miscfs/specfs/specdev.h>
-
#include <uvm/uvm_extern.h>
#include <asm/page.h>
+struct file;
+
/* XXX Ugh bletch! Whattakludge! Linux's sense is reversed... */
#undef PAGE_MASK
#define PAGE_MASK (~(PAGE_SIZE-1))
@@ -67,52 +61,13 @@
/* XXX Fill in more as needed. */
}
-/*
- * ###################################################################
- * ############### XXX THIS NEEDS SERIOUS SCRUTINY XXX ###############
- * ###################################################################
- */
-
-/*
- * XXX unsigned long is a loser but will probably work accidentally.
- * XXX struct file might not map quite right between Linux and NetBSD.
- * XXX This is large enough it should take its own file.
- */
-
static inline unsigned long
-vm_mmap(struct file *file, unsigned long base, unsigned long size,
- unsigned long prot, unsigned long flags, unsigned long token)
+vm_mmap(struct file *file __unused, unsigned long base __unused,
+ unsigned long size __unused, unsigned long prot __unused,
+ unsigned long flags __unused, unsigned long token __unused)
{
- struct vnode *vp;
- void *addr;
- int error;
- /*
- * Cargo-culted from sys_mmap. Various conditions kasserted
- * rather than checked for expedience and safey.
- */
-
- KASSERT(base == 0);
- KASSERT(prot == (PROT_READ | PROT_WRITE));
- KASSERT(flags == MAP_SHARED);
-
- KASSERT(file->f_type == DTYPE_VNODE);
- vp = file->f_data;
-
- KASSERT(vp->v_type == VCHR);
- KASSERT((file->f_flag & (FREAD | FWRITE)) == (FREAD | FWRITE));
-
- /* XXX pax_mprotect? pax_aslr? */
-
- addr = NULL;
- error = uvm_mmap_dev(curproc, &addr, size, vp->v_rdev, (off_t)base);
- if (error)
- goto out;
-
- KASSERT((uintptr_t)addr <= -1024UL); /* XXX Kludgerosity! */
-
-out: /* XXX errno NetBSD->Linux (kludgerific) */
- return (error? (-error) : (unsigned long)addr);
+ return -ENODEV;
}
#endif /* _LINUX_MM_H_ */
Home |
Main Index |
Thread Index |
Old Index