aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/char')
-rw-r--r--drivers/s390/char/sclp_cmd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c
index cd798386b622..178836ec252b 100644
--- a/drivers/s390/char/sclp_cmd.c
+++ b/drivers/s390/char/sclp_cmd.c
@@ -561,6 +561,8 @@ static void __init sclp_add_standby_memory(void)
561 add_memory_merged(0); 561 add_memory_merged(0);
562} 562}
563 563
564#define MEM_SCT_SIZE (1UL << SECTION_SIZE_BITS)
565
564static void __init insert_increment(u16 rn, int standby, int assigned) 566static void __init insert_increment(u16 rn, int standby, int assigned)
565{ 567{
566 struct memory_increment *incr, *new_incr; 568 struct memory_increment *incr, *new_incr;
@@ -573,7 +575,7 @@ static void __init insert_increment(u16 rn, int standby, int assigned)
573 new_incr->rn = rn; 575 new_incr->rn = rn;
574 new_incr->standby = standby; 576 new_incr->standby = standby;
575 if (!standby) 577 if (!standby)
576 new_incr->usecount = 1; 578 new_incr->usecount = rzm > MEM_SCT_SIZE ? rzm/MEM_SCT_SIZE : 1;
577 last_rn = 0; 579 last_rn = 0;
578 prev = &sclp_mem_list; 580 prev = &sclp_mem_list;
579 list_for_each_entry(incr, &sclp_mem_list, list) { 581 list_for_each_entry(incr, &sclp_mem_list, list) {