aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2009-02-19 09:19:01 -0500
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2009-02-19 09:19:19 -0500
commit23d75d9cadd79bc9fd6553857d57c679cf18d4cb (patch)
tree647e18bd1a1ee86efe82dab68e446164c1ad13de /drivers/s390
parentd5cd0343d2878b66e25e044f644563c6bf708833 (diff)
[S390] fix "mem=" handling in case of standby memory
Standby memory detected with the sclp interface gets always registered with add_memory calls without considering the limitationt that the "mem=" kernel paramater implies. So fix this and only register standby memory that is below the specified limit. This fixes zfcpdump since it uses "mem=32M". In case there is appr. 2GB standby memory present all of usable memory would be used for the struct pages needed for standby memory. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/char/sclp_cmd.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c
index 506390496416..77ab6e34a100 100644
--- a/drivers/s390/char/sclp_cmd.c
+++ b/drivers/s390/char/sclp_cmd.c
@@ -19,6 +19,7 @@
19#include <linux/memory.h> 19#include <linux/memory.h>
20#include <asm/chpid.h> 20#include <asm/chpid.h>
21#include <asm/sclp.h> 21#include <asm/sclp.h>
22#include <asm/setup.h>
22 23
23#include "sclp.h" 24#include "sclp.h"
24 25
@@ -474,6 +475,10 @@ static void __init add_memory_merged(u16 rn)
474 goto skip_add; 475 goto skip_add;
475 if (start + size > VMEM_MAX_PHYS) 476 if (start + size > VMEM_MAX_PHYS)
476 size = VMEM_MAX_PHYS - start; 477 size = VMEM_MAX_PHYS - start;
478 if (memory_end_set && (start >= memory_end))
479 goto skip_add;
480 if (memory_end_set && (start + size > memory_end))
481 size = memory_end - start;
477 add_memory(0, start, size); 482 add_memory(0, start, size);
478skip_add: 483skip_add:
479 first_rn = rn; 484 first_rn = rn;