Skip to content

Commit

Permalink
fix(virtio/mmio): remove MmioRegisterLayout::get_config
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Kröning <martin.kroening@eonerc.rwth-aachen.de>
  • Loading branch information
mkroening committed May 28, 2024
1 parent d1fc372 commit edef28a
Showing 1 changed file with 0 additions and 19 deletions.
19 changes: 0 additions & 19 deletions src/drivers/virtio/transport/mmio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -584,24 +584,6 @@ impl MmioRegisterLayout {
}
}

pub fn get_config(&mut self) -> [u32; 3] {
// see Virtio specification v1.1 - 2.4.1
unsafe {
loop {
let before = read_volatile(&self.config_generation);
fence(Ordering::SeqCst);
let config = read_volatile(&self.config);
fence(Ordering::SeqCst);
let after = read_volatile(&self.config_generation);
fence(Ordering::SeqCst);

if before == after {
return config;
}
}
}
}

pub fn print_information(&mut self) {
infoheader!(" MMIO RREGISTER LAYOUT INFORMATION ");

Expand All @@ -619,7 +601,6 @@ impl MmioRegisterLayout {
infoentry!("Device status", "{:#X}", unsafe {
read_volatile(&self.status)
});
infoentry!("Configuration space", "{:#X?}", self.get_config());

infofooter!();
}
Expand Down

0 comments on commit edef28a

Please sign in to comment.