aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2005-06-21 20:16:30 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-21 22:07:34 -0400
commite9b9a04796eade5241452a913ec6f3433437b4f5 (patch)
tree9cd181fb9e905245dc07913c3a3e421d17ca6ac9 /arch/s390
parent447570cfde680d5bf09c47b9c8d1dcf5bcb18f10 (diff)
[PATCH] s390: memory detection > 32GB
The kernel takes a very long time to boot if the memory size is bigger then 32767 MB. The memory size is contained in a structure created by an sclp call. The kernel accesses the field with a LH instrution which performs a sign extension of a 16 bit word. In the case of a memory size with bit 2^15 set this results in a very large value and the memory detection just loops for a long time. In addition if more then 64 GB are used on a 64 bit system the memory size is read from an incorrect storage location. Use zero-extention to read the 16 bit memory size and the correct offset to read the 4 byte memory size on 64 bit. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch/s390')
-rw-r--r--arch/s390/kernel/head.S8
-rw-r--r--arch/s390/kernel/head64.S6
2 files changed, 7 insertions, 7 deletions
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S
index b804c55bd91..658e8de74f8 100644
--- a/arch/s390/kernel/head.S
+++ b/arch/s390/kernel/head.S
@@ -517,10 +517,10 @@ startup:basr %r13,0 # get base
517 l %r2, .Lrcp2-.LPG1(%r13) # try with Read SCP 517 l %r2, .Lrcp2-.LPG1(%r13) # try with Read SCP
518 b .Lservicecall-.LPG1(%r13) 518 b .Lservicecall-.LPG1(%r13)
519.Lprocsccb: 519.Lprocsccb:
520 lh %r1,.Lscpincr1-PARMAREA(%r4) # use this one if != 0 520 lhi %r1,0
521 chi %r1,0x00 521 icm %r1,3,.Lscpincr1-PARMAREA(%r4) # use this one if != 0
522 jne .Lscnd 522 jnz .Lscnd
523 l %r1,.Lscpincr2-PARMAREA(%r4) # otherwise use this one 523 l %r1,.Lscpincr2-PARMAREA+4(%r4) # otherwise use this one
524.Lscnd: 524.Lscnd:
525 xr %r3,%r3 # same logic 525 xr %r3,%r3 # same logic
526 ic %r3,.Lscpa1-PARMAREA(%r4) 526 ic %r3,.Lscpa1-PARMAREA(%r4)
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S
index 8366793bc37..8e2caf9dc18 100644
--- a/arch/s390/kernel/head64.S
+++ b/arch/s390/kernel/head64.S
@@ -518,9 +518,9 @@ startup:basr %r13,0 # get base
518 l %r2,.Lrcp2-.LPG1(%r13) # try with Read SCP 518 l %r2,.Lrcp2-.LPG1(%r13) # try with Read SCP
519 b .Lservicecall-.LPG1(%r13) 519 b .Lservicecall-.LPG1(%r13)
520.Lprocsccb: 520.Lprocsccb:
521 lh %r1,.Lscpincr1-PARMAREA(%r4) # use this one if != 0 521 lghi %r1,0
522 chi %r1,0x00 522 icm %r1,3,.Lscpincr1-PARMAREA(%r4) # use this one if != 0
523 jne .Lscnd 523 jnz .Lscnd
524 lg %r1,.Lscpincr2-PARMAREA(%r4) # otherwise use this one 524 lg %r1,.Lscpincr2-PARMAREA(%r4) # otherwise use this one
525.Lscnd: 525.Lscnd:
526 xr %r3,%r3 # same logic 526 xr %r3,%r3 # same logic