Merged from sys/i386/isa/isa_dma.c revision 1.7.
This commit is contained in:
parent
d80add6a08
commit
0389b45e3b
@ -56,6 +56,8 @@
|
||||
#include <sys/bus.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/module.h>
|
||||
#ifdef PC98
|
||||
#include <machine/md_var.h>
|
||||
@ -285,7 +287,12 @@ isa_dmastart(int flags, caddr_t addr, u_int nbytes, int chan)
|
||||
}
|
||||
|
||||
/* translate to physical */
|
||||
mtx_lock(&vm_mtx); /*
|
||||
* XXX: need to hold for longer period to
|
||||
* ensure that mappings don't change
|
||||
*/
|
||||
phys = pmap_extract(pmap_kernel(), (vm_offset_t)addr);
|
||||
mtx_unlock(&vm_mtx);
|
||||
|
||||
if (flags & ISADMA_RAW) {
|
||||
dma_auto_mode |= (1 << chan);
|
||||
@ -433,7 +440,9 @@ isa_dmarangecheck(caddr_t va, u_int length, int chan)
|
||||
|
||||
endva = (vm_offset_t)round_page((vm_offset_t)va + length);
|
||||
for (; va < (caddr_t) endva ; va += PAGE_SIZE) {
|
||||
mtx_lock(&vm_mtx);
|
||||
phys = trunc_page(pmap_extract(pmap_kernel(), (vm_offset_t)va));
|
||||
mtx_unlock(&vm_mtx);
|
||||
#ifdef EPSON_BOUNCEDMA
|
||||
#define ISARAM_END 0xf00000
|
||||
#else
|
||||
|
@ -56,6 +56,8 @@
|
||||
#include <sys/bus.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/malloc.h>
|
||||
#include <sys/lock.h>
|
||||
#include <sys/mutex.h>
|
||||
#include <sys/module.h>
|
||||
#ifdef PC98
|
||||
#include <machine/md_var.h>
|
||||
@ -285,7 +287,12 @@ isa_dmastart(int flags, caddr_t addr, u_int nbytes, int chan)
|
||||
}
|
||||
|
||||
/* translate to physical */
|
||||
mtx_lock(&vm_mtx); /*
|
||||
* XXX: need to hold for longer period to
|
||||
* ensure that mappings don't change
|
||||
*/
|
||||
phys = pmap_extract(pmap_kernel(), (vm_offset_t)addr);
|
||||
mtx_unlock(&vm_mtx);
|
||||
|
||||
if (flags & ISADMA_RAW) {
|
||||
dma_auto_mode |= (1 << chan);
|
||||
@ -433,7 +440,9 @@ isa_dmarangecheck(caddr_t va, u_int length, int chan)
|
||||
|
||||
endva = (vm_offset_t)round_page((vm_offset_t)va + length);
|
||||
for (; va < (caddr_t) endva ; va += PAGE_SIZE) {
|
||||
mtx_lock(&vm_mtx);
|
||||
phys = trunc_page(pmap_extract(pmap_kernel(), (vm_offset_t)va));
|
||||
mtx_unlock(&vm_mtx);
|
||||
#ifdef EPSON_BOUNCEDMA
|
||||
#define ISARAM_END 0xf00000
|
||||
#else
|
||||
|
Loading…
x
Reference in New Issue
Block a user