diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2019-12-06 11:09:48 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2019-12-06 11:09:48 +0000 |
commit | b072de65078201ccdc67f363584ce0d7d7ca15e5 (patch) | |
tree | d253649ef2428a6af7931ef06c7e3cf32368857e | |
parent | c5080bed5dd969105c99ff16fc18c1ef8cebf451 (diff) |
Document uvm_vslock_device(9) and its DMA-reachable dance.
-rw-r--r-- | share/man/man9/physio.9 | 6 | ||||
-rw-r--r-- | share/man/man9/uvm_vslock.9 | 29 |
2 files changed, 24 insertions, 11 deletions
diff --git a/share/man/man9/physio.9 b/share/man/man9/physio.9 index c5ac534224e..ce60bcb2ef6 100644 --- a/share/man/man9/physio.9 +++ b/share/man/man9/physio.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: physio.9,v 1.9 2019/12/06 10:33:04 mpi Exp $ +.\" $OpenBSD: physio.9,v 1.10 2019/12/06 11:09:47 mpi Exp $ .\" $NetBSD: physio.9,v 1.5 1999/03/16 00:40:47 garbled Exp $ .\" .\" Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -64,9 +64,9 @@ needs to lock the appropriate data area into memory before each transaction with .Fa strategy (see -.Xr uvm_vslock 9 +.Xr uvm_vslock_device 9 and -.Xr uvm_vsunlock 9 ) . +.Xr uvm_vsunlock_device 9 ) . .Fn physio always awaits the completion of the entire requested transfer before returning, unless an error condition is detected earlier. diff --git a/share/man/man9/uvm_vslock.9 b/share/man/man9/uvm_vslock.9 index c7f1fb88565..b1bbb6d9dab 100644 --- a/share/man/man9/uvm_vslock.9 +++ b/share/man/man9/uvm_vslock.9 @@ -1,4 +1,4 @@ -.\" $OpenBSD: uvm_vslock.9,v 1.1 2019/12/06 10:42:33 mpi Exp $ +.\" $OpenBSD: uvm_vslock.9,v 1.2 2019/12/06 11:09:47 mpi Exp $ .\" $NetBSD: uvm.9,v 1.14 2000/06/29 06:08:44 mrg Exp $ .\" .\" Copyright (c) 1998 Matthew R. Green @@ -30,7 +30,9 @@ .Os .Sh NAME .Nm uvm_vslock , -.Nm uvm_vsunlock +.Nm uvm_vsunlock , +.Nm uvm_vslock_device , +.Nm uvm_vsunlock_device .Nd wire user memory for I/O .Sh SYNOPSIS .In uvm/uvm_extern.h @@ -39,12 +41,16 @@ "vm_prot_t access_type" .Ft void .Fn uvm_vsunlock "struct proc *p" "caddr_t addr" "size_t len" +.Ft int +.Fn uvm_vslock_device "struct proc *p" "void *addr" "size_t len" \ + "vm_prot_t access_type" "void **retp" +.Ft void +.Fn uvm_vsunlock_device "struct proc *p" "void *addr" "size_t len" "void *map" .Sh DESCRIPTION The .Fn uvm_vslock -and -.Fn uvm_vsunlock -functions control the wiring and unwiring of pages for process +family of functions +control the wiring and unwiring of pages for process .Fa p from .Fa addr @@ -52,9 +58,16 @@ to .Fa addr + len . The .Fa access_type -argument of -.Fn uvm_vslock -is passed to +argument is passed to .Xr uvm_fault 9 . +.Pp +.Fn uvm_vslock_device +also checks if the pages are DMA reachable. +When they aren't, it bounces their content into a newly created mapping +returned in +.Fa retp . +.Fn uvm_vsunlock_device +will release this memory mapping pointed by +.Fa map . .Sh SEE ALSO .Xr uvm_fault 9 |