[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 23/23] s390/sclp: simplify calculation of rnmax
From: |
Cornelia Huck |
Subject: |
[Qemu-devel] [PULL 23/23] s390/sclp: simplify calculation of rnmax |
Date: |
Mon, 7 Sep 2015 16:48:37 +0200 |
From: David Hildenbrand <address@hidden>
rnmax can be directly calculated using machine->maxram_size.
Reviewed-by: Matthew Rosato <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>
---
hw/s390x/sclp.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
index 0a7f4dd..fd277e1 100644
--- a/hw/s390x/sclp.c
+++ b/hw/s390x/sclp.c
@@ -56,7 +56,6 @@ static void read_SCP_info(SCLPDevice *sclp, SCCB *sccb)
read_info->facilities = cpu_to_be64(SCLP_HAS_CPU_INFO |
SCLP_HAS_PCI_RECONFIG);
- rnmax = ram_size >> sclp->increment_size;
/* Memory Hotplug is only supported for the ccw machine type */
if (mhd) {
mhd->standby_subregion_size = MEM_SECTION_SIZE;
@@ -84,8 +83,6 @@ static void read_SCP_info(SCLPDevice *sclp, SCCB *sccb)
}
mhd->padded_ram_size = ram_size + mhd->pad_size;
mhd->rzm = 1 << mhd->increment_size;
- rnmax = ((ram_size + mhd->standby_mem_size + mhd->pad_size)
- >> mhd->increment_size);
read_info->facilities |= cpu_to_be64(SCLP_FC_ASSIGN_ATTACH_READ_STOR);
}
@@ -98,6 +95,7 @@ static void read_SCP_info(SCLPDevice *sclp, SCCB *sccb)
read_info->rnsize2 = cpu_to_be32(rnsize);
}
+ rnmax = machine->maxram_size >> sclp->increment_size;
if (rnmax < 0x10000) {
read_info->rnmax = cpu_to_be16(rnmax);
} else {
--
2.5.1
- [Qemu-devel] [PULL 16/23] s390/sclp: move sclp_service_interrupt into the sclp device, (continued)
- [Qemu-devel] [PULL 16/23] s390/sclp: move sclp_service_interrupt into the sclp device, Cornelia Huck, 2015/09/07
- [Qemu-devel] [PULL 14/23] s390/sclp: introduce a root sclp device, Cornelia Huck, 2015/09/07
- [Qemu-devel] [PULL 21/23] s390: unify allocation of initial memory, Cornelia Huck, 2015/09/07
- [Qemu-devel] [PULL 19/23] s390/sclp: ignore memory hotplug operations if it is disabled, Cornelia Huck, 2015/09/07
- [Qemu-devel] [PULL 15/23] s390/sclp: move sclp_execute related functions into the SCLP class, Cornelia Huck, 2015/09/07
- [Qemu-devel] [PULL 20/23] s390: move memory calculation into the sclp device, Cornelia Huck, 2015/09/07
- [Qemu-devel] [PULL 09/23] s390x/gdb: support reading/writing of control registers, Cornelia Huck, 2015/09/07
- [Qemu-devel] [PULL 13/23] s390/sclp: temporarily fix unassignment/reassignment of memory subregions, Cornelia Huck, 2015/09/07
- [Qemu-devel] [PULL 22/23] s390/sclp: store the increment_size in the sclp device, Cornelia Huck, 2015/09/07
- [Qemu-devel] [PULL 17/23] s390: no need to manually parse for slots and maxmem, Cornelia Huck, 2015/09/07
- [Qemu-devel] [PULL 23/23] s390/sclp: simplify calculation of rnmax,
Cornelia Huck <=
- Re: [Qemu-devel] [PULL 00/23] s390x: further patches, Peter Maydell, 2015/09/07