projects
/
linux-block.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[S390] fix "mem=" handling in case of standby memory
[linux-block.git]
/
drivers
/
s390
/
char
/
sclp_cmd.c
diff --git
a/drivers/s390/char/sclp_cmd.c
b/drivers/s390/char/sclp_cmd.c
index 506390496416ea1163d12919042a6f0d0d34df34..77ab6e34a100b758bc3047888e78f1962a90146d 100644
(file)
--- a/
drivers/s390/char/sclp_cmd.c
+++ b/
drivers/s390/char/sclp_cmd.c
@@
-19,6
+19,7
@@
#include <linux/memory.h>
#include <asm/chpid.h>
#include <asm/sclp.h>
#include <linux/memory.h>
#include <asm/chpid.h>
#include <asm/sclp.h>
+#include <asm/setup.h>
#include "sclp.h"
#include "sclp.h"
@@
-474,6
+475,10
@@
static void __init add_memory_merged(u16 rn)
goto skip_add;
if (start + size > VMEM_MAX_PHYS)
size = VMEM_MAX_PHYS - start;
goto skip_add;
if (start + size > VMEM_MAX_PHYS)
size = VMEM_MAX_PHYS - start;
+ if (memory_end_set && (start >= memory_end))
+ goto skip_add;
+ if (memory_end_set && (start + size > memory_end))
+ size = memory_end - start;
add_memory(0, start, size);
skip_add:
first_rn = rn;
add_memory(0, start, size);
skip_add:
first_rn = rn;