Lines Matching refs:vaddr

95     fn create_region(&self, vaddr: VirtAddr) -> MmioBuddyAddrRegion {  in create_region()
98 let region: MmioBuddyAddrRegion = MmioBuddyAddrRegion::new(vaddr); in create_region()
115 fn give_back_block(&self, vaddr: VirtAddr, exp: u32) -> Result<i32, SystemError> { in give_back_block()
117 if (vaddr.data() & ((1 << exp) - 1)) != 0 { in give_back_block()
120 let region: MmioBuddyAddrRegion = self.create_region(vaddr); in give_back_block()
141 let vaddr = self.calculate_block_vaddr(region.vaddr, exp - 1); in split_block() localVariable
142 let new_region: MmioBuddyAddrRegion = self.create_region(vaddr); in split_block()
325 fn calculate_block_vaddr(&self, vaddr: VirtAddr, exp: u32) -> VirtAddr { in calculate_block_vaddr()
326 return VirtAddr::new(vaddr.data() ^ (1 << exp as usize)); in calculate_block_vaddr()
343 vaddr: VirtAddr, in pop_buddy_block()
351 let buddy_vaddr = self.calculate_block_vaddr(vaddr, exp); in pop_buddy_block()
356 .drain_filter(|x| x.vaddr == buddy_vaddr) in pop_buddy_block()
414 let vaddr: VirtAddr = list_guard.list.back().unwrap().vaddr; in merge_all_exp() localVariable
416 match self.pop_buddy_block(vaddr, exp, list_guard) { in merge_all_exp()
456 if region_1.vaddr != self.calculate_block_vaddr(region_2.vaddr, exp) { in merge_blocks()
511 unsafe { *res_vaddr = region.vaddr.data() as u64 }; in create_mmio()
531 pub fn release_mmio(&self, vaddr: VirtAddr, length: usize) -> Result<i32, SystemError> { in release_mmio()
532 assert!(vaddr.check_aligned(MMArch::PAGE_SIZE)); in release_mmio()
534 if vaddr < self.pool_start_addr in release_mmio()
535 || vaddr.data() >= self.pool_start_addr.data() + self.pool_size in release_mmio()
556 .unmap(vaddr + i * MMArch::PAGE_SIZE, true) in release_mmio()
569 vaddr: VirtAddr, field
572 pub fn new(vaddr: VirtAddr) -> Self { in new()
573 return MmioBuddyAddrRegion { vaddr }; in new()
577 pub fn vaddr(&self) -> VirtAddr { in vaddr() method
578 return self.vaddr; in vaddr()
662 pub extern "C" fn mmio_release(vaddr: u64, length: u64) -> i32 { in mmio_release()
664 .release_mmio(VirtAddr::new(vaddr as usize), length as usize) in mmio_release()