@@ -32,7 +32,7 @@ impl<H: PagingHandler> Backend<H> {
3232 // allocate all possible physical frames for populated mapping.
3333 for addr in PageIter4K :: new ( start, start + size) . unwrap ( ) {
3434 if H :: alloc_frame ( )
35- . and_then ( |frame| pt. map ( addr, frame, PageSize :: Size4K , flags) . ok ( ) )
35+ . and_then ( |frame| pt. cursor ( ) . map ( addr, frame, PageSize :: Size4K , flags) . ok ( ) )
3636 . is_none ( )
3737 {
3838 return false ;
@@ -41,15 +41,15 @@ impl<H: PagingHandler> Backend<H> {
4141 true
4242 } else {
4343 // Map to a empty entry for on-demand mapping.
44- pt. map_region (
45- start ,
46- |_va| PhysAddr :: from ( 0 ) ,
47- size ,
48- MappingFlags :: empty ( ) ,
49- false ,
50- false ,
51- )
52- . is_ok ( )
44+ pt. cursor ( )
45+ . map_region (
46+ start ,
47+ |_va| PhysAddr :: from ( 0 ) ,
48+ size ,
49+ MappingFlags :: empty ( ) ,
50+ false ,
51+ )
52+ . is_ok ( )
5353 }
5454 }
5555
@@ -62,7 +62,7 @@ impl<H: PagingHandler> Backend<H> {
6262 ) -> bool {
6363 debug ! ( "unmap_alloc: [{:#x}, {:#x})" , start, start + size) ;
6464 for addr in PageIter4K :: new ( start, start + size) . unwrap ( ) {
65- if let Ok ( ( frame, page_size , _ ) ) = pt. unmap ( addr) {
65+ if let Ok ( ( frame, _ , page_size ) ) = pt. cursor ( ) . unmap ( addr) {
6666 // Deallocate the physical frame if there is a mapping in the
6767 // page table.
6868 if page_size. is_huge ( ) {
@@ -88,9 +88,9 @@ impl<H: PagingHandler> Backend<H> {
8888 } else {
8989 // Allocate a physical frame lazily and map it to the fault address.
9090 // `vaddr` does not need to be aligned. It will be automatically
91- // aligned during `pt.remap` regardless of the page size.
91+ // aligned during `pt.cursor(). remap` regardless of the page size.
9292 H :: alloc_frame ( )
93- . and_then ( |frame| pt. remap ( vaddr, frame, orig_flags) . ok ( ) )
93+ . and_then ( |frame| pt. cursor ( ) . remap ( vaddr, frame, orig_flags) . ok ( ) )
9494 . is_some ( )
9595 }
9696 }
0 commit comments