@@ -1530,21 +1530,21 @@ static void virtio_mem_refresh_config(struct virtio_mem *vm)
1530
1530
uint64_t new_plugged_size , usable_region_size , end_addr ;
1531
1531
1532
1532
/* the plugged_size is just a reflection of what _we_ did previously */
1533
- virtio_cread (vm -> vdev , struct virtio_mem_config , plugged_size ,
1534
- & new_plugged_size );
1533
+ virtio_cread_le (vm -> vdev , struct virtio_mem_config , plugged_size ,
1534
+ & new_plugged_size );
1535
1535
if (WARN_ON_ONCE (new_plugged_size != vm -> plugged_size ))
1536
1536
vm -> plugged_size = new_plugged_size ;
1537
1537
1538
1538
/* calculate the last usable memory block id */
1539
- virtio_cread (vm -> vdev , struct virtio_mem_config ,
1540
- usable_region_size , & usable_region_size );
1539
+ virtio_cread_le (vm -> vdev , struct virtio_mem_config ,
1540
+ usable_region_size , & usable_region_size );
1541
1541
end_addr = vm -> addr + usable_region_size ;
1542
1542
end_addr = min (end_addr , phys_limit );
1543
1543
vm -> last_usable_mb_id = virtio_mem_phys_to_mb_id (end_addr ) - 1 ;
1544
1544
1545
1545
/* see if there is a request to change the size */
1546
- virtio_cread (vm -> vdev , struct virtio_mem_config , requested_size ,
1547
- & vm -> requested_size );
1546
+ virtio_cread_le (vm -> vdev , struct virtio_mem_config , requested_size ,
1547
+ & vm -> requested_size );
1548
1548
1549
1549
dev_info (& vm -> vdev -> dev , "plugged size: 0x%llx" , vm -> plugged_size );
1550
1550
dev_info (& vm -> vdev -> dev , "requested size: 0x%llx" , vm -> requested_size );
@@ -1677,16 +1677,16 @@ static int virtio_mem_init(struct virtio_mem *vm)
1677
1677
}
1678
1678
1679
1679
/* Fetch all properties that can't change. */
1680
- virtio_cread (vm -> vdev , struct virtio_mem_config , plugged_size ,
1681
- & vm -> plugged_size );
1682
- virtio_cread (vm -> vdev , struct virtio_mem_config , block_size ,
1683
- & vm -> device_block_size );
1684
- virtio_cread (vm -> vdev , struct virtio_mem_config , node_id ,
1685
- & node_id );
1680
+ virtio_cread_le (vm -> vdev , struct virtio_mem_config , plugged_size ,
1681
+ & vm -> plugged_size );
1682
+ virtio_cread_le (vm -> vdev , struct virtio_mem_config , block_size ,
1683
+ & vm -> device_block_size );
1684
+ virtio_cread_le (vm -> vdev , struct virtio_mem_config , node_id ,
1685
+ & node_id );
1686
1686
vm -> nid = virtio_mem_translate_node_id (vm , node_id );
1687
- virtio_cread (vm -> vdev , struct virtio_mem_config , addr , & vm -> addr );
1688
- virtio_cread (vm -> vdev , struct virtio_mem_config , region_size ,
1689
- & vm -> region_size );
1687
+ virtio_cread_le (vm -> vdev , struct virtio_mem_config , addr , & vm -> addr );
1688
+ virtio_cread_le (vm -> vdev , struct virtio_mem_config , region_size ,
1689
+ & vm -> region_size );
1690
1690
1691
1691
/*
1692
1692
* We always hotplug memory in memory block granularity. This way,
0 commit comments