Avoid generic_const_exprs feature

This commit is contained in:
Ruihan Li
2025-03-02 23:53:46 +08:00
committed by Tate, Hongliang Tian
parent b08e655a76
commit 0d36375dfa
14 changed files with 73 additions and 118 deletions

View File

@ -2,7 +2,7 @@
use aster_util::safe_ptr::SafePtr;
use bitflags::bitflags;
use ostd::{io_mem::IoMem, Pod};
use ostd::{io_mem::IoMem, mm::PodOnce, Pod};
use crate::transport::VirtioTransport;
@ -32,6 +32,8 @@ pub struct VirtioVsockConfig {
pub guest_cid_high: u32,
}
impl PodOnce for VirtioVsockConfig {}
impl VirtioVsockConfig {
pub(crate) fn new(transport: &dyn VirtioTransport) -> SafePtr<Self, IoMem> {
let memory = transport.device_config_mem().unwrap();

View File

@ -13,7 +13,7 @@ use aster_util::{field_ptr, safe_ptr::SafePtr};
use bitflags::bitflags;
use log::debug;
use ostd::{
mm::{DmaCoherent, FrameAllocOptions},
mm::{DmaCoherent, FrameAllocOptions, PodOnce},
offset_of, Pod,
};
@ -445,6 +445,8 @@ bitflags! {
}
}
impl PodOnce for DescFlags {}
/// The driver uses the available ring to offer buffers to the device:
/// each ring entry refers to the head of a descriptor chain.
/// It is only written by the driver and read by the device.
@ -487,3 +489,5 @@ bitflags! {
const VIRTQ_AVAIL_F_NO_INTERRUPT = 1;
}
}
impl PodOnce for AvailFlags {}