o) Back out my previous change to SWARM; some of it was to address an issue

that turned out to be unrelated, and the rest was, as pointed out by Neel,
   just wrong-headed.
o) Tweak mem.c to fix use of /dev/kmem for direct-mapped addresses.
This commit is contained in:
jmallett 2010-04-17 01:49:50 +00:00
parent 5605409291
commit 175b654e30
2 changed files with 12 additions and 15 deletions

View File

@ -19,13 +19,8 @@ options CFE_CONSOLE
options CFE_ENV
options ALT_BREAK_TO_DEBUGGER
# Don't build any modules yet.
makeoptions MODULES_OVERRIDE=""
makeoptions TARGET_BIG_ENDIAN=defined
makeoptions LDSCRIPT_NAME= ldscript.mips.cfe
makeoptions KERNLOADADDR=0x81000000
#cpu CPU_MIPS64
#options ISA_MIPS64
#makeoptions ARCH_FLAGS="-march=mips64 -mgp64 -mabi=o64"

View File

@ -120,21 +120,23 @@ memrw(struct cdev *dev, struct uio *uio, int flags)
* Make sure that all the pages are currently resident
* so that we don't create any zero-fill pages.
*/
if (va >= VM_MIN_KERNEL_ADDRESS &&
eva <= VM_MAX_KERNEL_ADDRESS) {
for (; va < eva; va += PAGE_SIZE)
if (pmap_extract(kernel_pmap, va) == 0)
return (EFAULT);
for (; va < eva; va += PAGE_SIZE)
if (pmap_extract(kernel_pmap, va) == 0)
prot = (uio->uio_rw == UIO_READ)
? VM_PROT_READ : VM_PROT_WRITE;
va = uio->uio_offset;
if (kernacc((void *) va, iov->iov_len, prot)
== FALSE)
return (EFAULT);
prot = (uio->uio_rw == UIO_READ)
? VM_PROT_READ : VM_PROT_WRITE;
}
va = uio->uio_offset;
if (kernacc((void *) va, iov->iov_len, prot)
== FALSE)
return (EFAULT);
error = uiomove((void *)va, iov->iov_len, uio);
continue;
}
}