aboutsummaryrefslogtreecommitdiff
path: root/pc-bios/s390-ccw/virtio.c
diff options
context:
space:
mode:
Diffstat (limited to 'pc-bios/s390-ccw/virtio.c')
-rw-r--r--pc-bios/s390-ccw/virtio.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/pc-bios/s390-ccw/virtio.c b/pc-bios/s390-ccw/virtio.c
index 6ed3dc9cc2..c0540d1cd4 100644
--- a/pc-bios/s390-ccw/virtio.c
+++ b/pc-bios/s390-ccw/virtio.c
@@ -340,11 +340,6 @@ int virtio_get_block_size(void)
return blk_cfg.blk_size << blk_cfg.physical_block_exp;
}
-uint16_t virtio_get_cylinders(void)
-{
- return blk_cfg.geometry.cylinders;
-}
-
uint8_t virtio_get_heads(void)
{
return blk_cfg.geometry.heads;
@@ -355,6 +350,12 @@ uint8_t virtio_get_sectors(void)
return blk_cfg.geometry.sectors;
}
+uint64_t virtio_get_blocks(void)
+{
+ return blk_cfg.capacity /
+ (virtio_get_block_size() / VIRTIO_SECTOR_SIZE);
+}
+
void virtio_setup_block(struct subchannel_id schid)
{
struct vq_info_block info;