]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] s390: 31 bit memory size limit
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 27 Jul 2005 18:45:05 +0000 (11:45 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 27 Jul 2005 23:26:05 +0000 (16:26 -0700)
Limit reported memory size to 2GB if running in 31 bit mode.

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>
arch/s390/kernel/head.S

index 928ca65e8bb2380456a45a431d1caf64209b3fad..d12cff11b4bcc242b35ec2198f320dab60606f32 100644 (file)
@@ -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