aboutsummaryrefslogtreecommitdiff
path: root/hw/s390x/sclp.c
diff options
context:
space:
mode:
authorDavid Hildenbrand <dahi@linux.vnet.ibm.com>2015-06-01 13:04:03 +0200
committerCornelia Huck <cornelia.huck@de.ibm.com>2015-09-07 16:10:44 +0200
commitbd80a8ad555c2b5f79591b29edcf8196b8a5109b (patch)
treecaf35a1de04b6bb8b36595220d5912af4fad0aeb /hw/s390x/sclp.c
parent71a2fd355d8fa429bcc04740c260635e084255f2 (diff)
s390/sclp: simplify calculation of rnmax
rnmax can be directly calculated using machine->maxram_size. Reviewed-by: Matthew Rosato <mjrosato@linux.vnet.ibm.com> Signed-off-by: David Hildenbrand <dahi@linux.vnet.ibm.com> Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Diffstat (limited to 'hw/s390x/sclp.c')
-rw-r--r--hw/s390x/sclp.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/hw/s390x/sclp.c b/hw/s390x/sclp.c
index 0a7f4dd2f7..fd277e1bf0 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 {