Pull video into test branch
[linux-drm-fsl-dcu.git] / arch / s390 / kernel / head31.S
index 1b952a3664e2dc38c0e3684427ea8dc0337b54ca..eca507050e47db9e575df233afbda59b0ed45cc7 100644 (file)
@@ -131,10 +131,11 @@ startup_continue:
        .long   init_thread_union
 .Lpmask:
        .byte   0
-.align 8
+       .align  8
 .Lpcext:.long  0x00080000,0x80000000
 .Lcr:
        .long   0x00                    # place holder for cr0
+       .align  8
 .Lwaitsclp:
        .long 0x010a0000,0x80000000 + .Lsclph
 .Lrcp:
@@ -156,18 +157,21 @@ startup_continue:
        slr     %r4,%r4                 # set start of chunk to zero
        slr     %r5,%r5                 # set end of chunk to zero
        slr     %r6,%r6                 # set access code to zero
-       la      %r10, MEMORY_CHUNKS     # number of chunks
+       la      %r10,MEMORY_CHUNKS      # number of chunks
 .Lloop:
        tprot   0(%r5),0                # test protection of first byte
        ipm     %r7
        srl     %r7,28
        clr     %r6,%r7                 # compare cc with last access code
        be      .Lsame-.LPG1(%r13)
-       b       .Lchkmem-.LPG1(%r13)
+       lhi     %r8,0                   # no program checks
+       b       .Lsavchk-.LPG1(%r13)
 .Lsame:
        ar      %r5,%r1                 # add 128KB to end of chunk
        bno     .Lloop-.LPG1(%r13)      # r1 < 0x80000000 -> loop
 .Lchkmem:                              # > 2GB or tprot got a program check
+       lhi     %r8,1                   # set program check flag
+.Lsavchk:
        clr     %r4,%r5                 # chunk size > 0?
        be      .Lchkloop-.LPG1(%r13)
        st      %r4,0(%r3)              # store start address of chunk
@@ -176,8 +180,6 @@ startup_continue:
        st      %r0,4(%r3)              # store size of chunk
        st      %r6,8(%r3)              # store type of chunk
        la      %r3,12(%r3)
-       l       %r4,.Lmemsize-.LPG1(%r13)        # address of variable memory_size
-       st      %r5,0(%r4)              # store last end to memory size
        ahi     %r10,-1                 # update chunk number
 .Lchkloop:
        lr      %r6,%r7                 # set access code to last cc
@@ -191,8 +193,15 @@ startup_continue:
        je      .Ldonemem               # if not, leave
        chi     %r10,0                  # do we have chunks left?
        je      .Ldonemem
+       chi     %r8,1                   # program check ?
+       je      .Lpgmchk
+       lr      %r4,%r5                 # potential new chunk
+       alr     %r5,%r1                 # add 128KB to end of chunk
+       j       .Llpcnt
+.Lpgmchk:
        alr     %r5,%r1                 # add 128KB to end of chunk
        lr      %r4,%r5                 # potential new chunk
+.Llpcnt:
        clr     %r5,%r9                 # should we go on?
        jl      .Lloop
 .Ldonemem:
@@ -258,10 +267,10 @@ startup_continue:
 # find out if the diag 0x9c is available
 #
        mvc     __LC_PGM_NEW_PSW(8),.Lpcdiag9c-.LPG1(%r13)
-       stap   __LC_CPUID+4             # store cpu address
-       lh     %r1,__LC_CPUID+4
-       diag   %r1,0,0x9c               # test diag 0x9c
-       oi     2(%r12),1                # set diag9c flag
+       stap    __LC_CPUID+4            # store cpu address
+       lh      %r1,__LC_CPUID+4
+       diag    %r1,0,0x9c              # test diag 0x9c
+       oi      2(%r12),1               # set diag9c flag
 .Lchkdiag9c:
 
        lpsw  .Lentry-.LPG1(13)         # jump to _stext in primary-space,
@@ -292,7 +301,6 @@ startup_continue:
 .Lpcmvpg:.long 0x00080000,0x80000000 + .Lchkmvpg
 .Lpcidte:.long 0x00080000,0x80000000 + .Lchkidte
 .Lpcdiag9c:.long 0x00080000,0x80000000 + .Lchkdiag9c
-.Lmemsize:.long memory_size
 .Lmchunk:.long memory_chunk
 .Lmflags:.long machine_flags
 .Lbss_bgn:  .long __bss_start