mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2026-08-05 02:19:16 +00:00
arch: do not hardcode MMIO region length in MmioDeviceInfo
Add a field for its length and fix up users. Things work just because all hardcoded values agree with each other. This is prone to breakage. No functional change. Signed-off-by: Wei Liu <liuwe@microsoft.com>
This commit is contained in:
@@ -158,6 +158,7 @@ impl fmt::Display for DeviceType {
|
||||
#[cfg(target_arch = "aarch64")]
|
||||
pub struct MmioDeviceInfo {
|
||||
pub addr: u64,
|
||||
pub len: u64,
|
||||
pub irq: u32,
|
||||
}
|
||||
|
||||
@@ -180,6 +181,6 @@ impl DeviceInfoForFdt for MmioDeviceInfo {
|
||||
self.irq
|
||||
}
|
||||
fn length(&self) -> u64 {
|
||||
4096
|
||||
self.len
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user