Separate SegmentSlice from Segment

This commit is contained in:
Zhang Junyang
2024-09-04 10:54:56 +08:00
committed by Tate, Hongliang Tian
parent d930829866
commit 909639fd70
19 changed files with 434 additions and 214 deletions

View File

@ -152,9 +152,9 @@ impl DmaPage {
pool: Weak<DmaPool>,
) -> Result<Self, ostd::Error> {
let dma_stream = {
let vm_segment = FrameAllocOptions::new(1).alloc_contiguous()?;
let segment = FrameAllocOptions::new(1).alloc_contiguous()?;
DmaStream::map(vm_segment, direction, is_cache_coherent)
DmaStream::map(segment, direction, is_cache_coherent)
.map_err(|_| ostd::Error::AccessDenied)?
};