From: Heiko Carstens Date: Wed, 27 Jul 2005 18:45:05 +0000 (-0700) Subject: [PATCH] s390: 31 bit memory size limit X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f878e4367580f37327e68ce2c6861245077f0904;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git [PATCH] s390: 31 bit memory size limit Limit reported memory size to 2GB if running in 31 bit mode. Signed-off-by: Martin Schwidefsky Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S index 928ca65e8bb2..d12cff11b4bc 100644 --- a/arch/s390/kernel/head.S +++ b/arch/s390/kernel/head.S @@ -535,8 +535,13 @@ startup:basr %r13,0 # get base lhi %r1,0 icm %r1,3,.Lscpincr1-PARMAREA(%r4) # use this one if != 0 jnz .Lscnd - l %r1,.Lscpincr2-PARMAREA+4(%r4) # otherwise use this one + lhi %r1,0x800 # otherwise report 2GB .Lscnd: + lhi %r3,0x800 # limit reported memory size to 2GB + cr %r1,%r3 + jl .Lno2gb + lr %r1,%r3 +.Lno2gb: xr %r3,%r3 # same logic ic %r3,.Lscpa1-PARMAREA(%r4) chi %r3,0x00