aboutsummaryrefslogtreecommitdiff
path: root/arch/s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2006-12-04 15:40:42 +0100
committerMartin Schwidefsky <schwidefsky@de.ibm.com>2006-12-04 15:40:42 +0100
commitd57de5a36791cb1b7285649c62f183b0d3505f7d (patch)
treea1449e94cfaa5490aebd7f2980229a7b67a26023 /arch/s390
parent29b08d2bae854f66d3cfd5f57aaf2e7c2c7fce32 (diff)
[S390] Use diag260 for memory size detection.
Avoid the tprot loop if diag260 works and reports that there are no holes in memory. The tprot instruction can lead to a significant delay in the ipl process if the virtual guest has a lot of memory and the host is under memory pressure. Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/head64.S17
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S
index 42f54d48244..cc6dbc57eb9 100644
--- a/arch/s390/kernel/head64.S
+++ b/arch/s390/kernel/head64.S
@@ -70,7 +70,22 @@ startup_continue:
sgr %r5,%r5 # set src,length and pad to zero
mvcle %r2,%r4,0 # clear mem
jo .-4 # branch back, if not finish
+ # set program check new psw mask
+ mvc __LC_PGM_NEW_PSW(8),.Lpcmsk-.LPG1(%r13)
+ larl %r1,.Lslowmemdetect # set program check address
+ stg %r1,__LC_PGM_NEW_PSW+8
+ lghi %r1,0xc
+ diag %r0,%r1,0x260 # get memory size of virtual machine
+ cgr %r0,%r1 # different? -> old detection routine
+ jne .Lslowmemdetect
+ aghi %r1,1 # size is one more than end
+ larl %r2,memory_chunk
+ stg %r1,8(%r2) # store size of chunk
+ larl %r2,memory_size
+ stg %r1,0(%r2) # set memory size
+ j .Ldonemem
+.Lslowmemdetect:
l %r2,.Lrcp-.LPG1(%r13) # Read SCP forced command word
.Lservicecall:
stosm .Lpmask-.LPG1(%r13),0x01 # authorize ext interrupts
@@ -139,8 +154,6 @@ startup_continue:
.int 0x100000
.Lfchunk:
- # set program check new psw mask
- mvc __LC_PGM_NEW_PSW(8),.Lpcmsk-.LPG1(%r13)
#
# find memory chunks.