diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2006-09-20 09:59:15 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2006-09-20 09:59:15 -0400 |
commit | e87bfe51b5ca2db99dd680bbb1e8fe3c94b607df (patch) | |
tree | abbffd8e3ca0edcbe5a0e36e1e94deb9a3b10adc /arch/s390/kernel/head.S | |
parent | 1375fc1fb0434a26f93c59b1b9f3fdb8bf90bba5 (diff) |
[S390] convert some assembler to C.
Convert GET_IPL_DEVICE assembler macro to C function.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/head.S')
-rw-r--r-- | arch/s390/kernel/head.S | 59 |
1 files changed, 0 insertions, 59 deletions
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S index a6e9bdb53591..0f1db268a8a9 100644 --- a/arch/s390/kernel/head.S +++ b/arch/s390/kernel/head.S | |||
@@ -481,65 +481,6 @@ start: | |||
481 | .byte 0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7 | 481 | .byte 0xf0,0xf1,0xf2,0xf3,0xf4,0xf5,0xf6,0xf7 |
482 | .byte 0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff | 482 | .byte 0xf8,0xf9,0xfa,0xfb,0xfc,0xfd,0xfe,0xff |
483 | 483 | ||
484 | .macro GET_IPL_DEVICE | ||
485 | .Lget_ipl_device: | ||
486 | l %r1,0xb8 # get sid | ||
487 | sll %r1,15 # test if subchannel is enabled | ||
488 | srl %r1,31 | ||
489 | ltr %r1,%r1 | ||
490 | bz 2f-.LPG1(%r13) # subchannel disabled | ||
491 | l %r1,0xb8 | ||
492 | la %r5,.Lipl_schib-.LPG1(%r13) | ||
493 | stsch 0(%r5) # get schib of subchannel | ||
494 | bnz 2f-.LPG1(%r13) # schib not available | ||
495 | tm 5(%r5),0x01 # devno valid? | ||
496 | bno 2f-.LPG1(%r13) | ||
497 | la %r6,ipl_parameter_flags-.LPG1(%r13) | ||
498 | oi 3(%r6),0x01 # set flag | ||
499 | la %r2,ipl_devno-.LPG1(%r13) | ||
500 | mvc 0(2,%r2),6(%r5) # store devno | ||
501 | tm 4(%r5),0x80 # qdio capable device? | ||
502 | bno 2f-.LPG1(%r13) | ||
503 | oi 3(%r6),0x02 # set flag | ||
504 | |||
505 | # copy ipl parameters | ||
506 | |||
507 | lhi %r0,4096 | ||
508 | l %r2,20(%r0) # get address of parameter list | ||
509 | lhi %r3,IPL_PARMBLOCK_ORIGIN | ||
510 | st %r3,20(%r0) | ||
511 | lhi %r4,1 | ||
512 | cr %r2,%r3 # start parameters < destination ? | ||
513 | jl 0f | ||
514 | lhi %r1,1 # copy direction is upwards | ||
515 | j 1f | ||
516 | 0: lhi %r1,-1 # copy direction is downwards | ||
517 | ar %r2,%r0 | ||
518 | ar %r3,%r0 | ||
519 | ar %r2,%r1 | ||
520 | ar %r3,%r1 | ||
521 | 1: mvc 0(1,%r3),0(%r2) # finally copy ipl parameters | ||
522 | ar %r3,%r1 | ||
523 | ar %r2,%r1 | ||
524 | sr %r0,%r4 | ||
525 | jne 1b | ||
526 | b 2f-.LPG1(%r13) | ||
527 | |||
528 | .align 4 | ||
529 | .Lipl_schib: | ||
530 | .rept 13 | ||
531 | .long 0 | ||
532 | .endr | ||
533 | |||
534 | .globl ipl_parameter_flags | ||
535 | ipl_parameter_flags: | ||
536 | .long 0 | ||
537 | .globl ipl_devno | ||
538 | ipl_devno: | ||
539 | .word 0 | ||
540 | 2: | ||
541 | .endm | ||
542 | |||
543 | #ifdef CONFIG_64BIT | 484 | #ifdef CONFIG_64BIT |
544 | #include "head64.S" | 485 | #include "head64.S" |
545 | #else | 486 | #else |