PERFORCE change 80708 for review
Peter Wemm
peter at FreeBSD.org
Thu Jul 21 21:47:55 GMT 2005
http://perforce.freebsd.org/chv.cgi?CH=80708
Change 80708 by peter at peter_daintree on 2005/07/21 21:47:49
Remove the temporary hack that used direct maps instead of
temporary ephemeral mappings.
Affected files ...
.. //depot/projects/hammer/sys/amd64/amd64/uio_machdep.c#8 edit
Differences ...
==== //depot/projects/hammer/sys/amd64/amd64/uio_machdep.c#8 (text+ko) ====
@@ -48,10 +48,6 @@
#include <vm/vm.h>
#include <vm/vm_page.h>
-#ifdef NODMAP
-#include <vm/vm_extern.h>
-#include <vm/vm_kern.h>
-#endif
#include <machine/vmparam.h>
@@ -69,17 +65,11 @@
size_t cnt;
int error = 0;
int save = 0;
-#ifdef NODMAP
- vm_offset_t kva;
-#endif
KASSERT(uio->uio_rw == UIO_READ || uio->uio_rw == UIO_WRITE,
("uiomove_fromphys: mode"));
KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread,
("uiomove_fromphys proc"));
-#ifdef NODMAP
- kva = kmem_alloc_nofault(kernel_map, PAGE_SIZE);
-#endif
save = td->td_pflags & TDP_DEADLKTREAT;
td->td_pflags |= TDP_DEADLKTREAT;
while (n > 0 && uio->uio_resid) {
@@ -94,13 +84,8 @@
cnt = n;
page_offset = offset & PAGE_MASK;
cnt = min(cnt, PAGE_SIZE - page_offset);
-#ifdef NODMAP
- pmap_qenter(kva, &ma[offset >> PAGE_SHIFT], 1);
- cp = (char *)kva + page_offset;
-#else
cp = (char *)PHYS_TO_DMAP(ma[offset >> PAGE_SHIFT]->phys_addr) +
page_offset;
-#endif
switch (uio->uio_segflg) {
case UIO_USERSPACE:
if (ticks - PCPU_GET(switchticks) >= hogticks)
@@ -131,9 +116,5 @@
out:
if (save == 0)
td->td_pflags &= ~TDP_DEADLKTREAT;
-#ifdef NODMAP
- pmap_qremove(kva, 1);
- kmem_free(kernel_map, kva, PAGE_SIZE);
-#endif
return (error);
}
More information about the p4-projects
mailing list