diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-29 14:01:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-29 14:01:17 -0400 |
commit | b026188e8214ce87790730a56f3017d0bd222751 (patch) | |
tree | b4d1e482b1f77360768a5c8e565bfd311ed74232 /arch/s390/kernel | |
parent | 1903ac54f8536b11478e4f01c339e10b538f59e0 (diff) | |
parent | 94bb063312d872d9269deb2e5c0c7c6d5b0318e1 (diff) |
Merge branch 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.osdl.marist.edu/pub/scm/linux-2.6: (28 commits)
[S390] rework of channel measurement facility.
[S390] appldata enhancements.
[S390] Add vmpanic parameter.
[S390] add PAV support to the dasd driver.
[S390] remove export of sys_call_table
[S390] remove unused macros from binfmt_elf32.c
[S390] fix duplicate export of overflow{ug}id
[S390] cio chpid offline.
[S390] avenrun export in appdata_base.c
Convert s390_collect_crw_info() in s390mach.c from being started
[S390] dasd eer data format.
[S390] preempt_count initialization.
[S390] head.S code moving.
[S390] dasd whitespace and other cosmetics.
[S390] virtual cpu accounting vs. machine checks.
[S390] add __cpuinit to appldata cpu hotplug notifier.
[S390] dasd_eckd_dump_sense bug.
[S390] missing check in dasd_eer_open.
[S390] modular 3270 driver.
[S390] console_unblank woes.
...
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/binfmt_elf32.c | 5 | ||||
-rw-r--r-- | arch/s390/kernel/entry.S | 80 | ||||
-rw-r--r-- | arch/s390/kernel/entry64.S | 80 | ||||
-rw-r--r-- | arch/s390/kernel/head.S | 22 | ||||
-rw-r--r-- | arch/s390/kernel/head31.S | 77 | ||||
-rw-r--r-- | arch/s390/kernel/head64.S | 79 | ||||
-rw-r--r-- | arch/s390/kernel/s390_ksyms.c | 2 | ||||
-rw-r--r-- | arch/s390/kernel/setup.c | 55 | ||||
-rw-r--r-- | arch/s390/kernel/traps.c | 8 |
9 files changed, 259 insertions, 149 deletions
diff --git a/arch/s390/kernel/binfmt_elf32.c b/arch/s390/kernel/binfmt_elf32.c index 1f451c2cb071..12a6311e9838 100644 --- a/arch/s390/kernel/binfmt_elf32.c +++ b/arch/s390/kernel/binfmt_elf32.c | |||
@@ -177,11 +177,6 @@ struct elf_prpsinfo32 | |||
177 | 177 | ||
178 | #include <linux/highuid.h> | 178 | #include <linux/highuid.h> |
179 | 179 | ||
180 | #undef NEW_TO_OLD_UID | ||
181 | #undef NEW_TO_OLD_GID | ||
182 | #define NEW_TO_OLD_UID(uid) ((uid) > 65535) ? (u16)overflowuid : (u16)(uid) | ||
183 | #define NEW_TO_OLD_GID(gid) ((gid) > 65535) ? (u16)overflowgid : (u16)(gid) | ||
184 | |||
185 | #define elf_addr_t u32 | 180 | #define elf_addr_t u32 |
186 | /* | 181 | /* |
187 | #define init_elf_binfmt init_elf32_binfmt | 182 | #define init_elf_binfmt init_elf32_binfmt |
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index b2448487854c..aa8b52c2140f 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -93,13 +93,22 @@ STACK_SIZE = 1 << STACK_SHIFT | |||
93 | l %r13,__LC_SVC_NEW_PSW+4 # load &system_call to %r13 | 93 | l %r13,__LC_SVC_NEW_PSW+4 # load &system_call to %r13 |
94 | .endm | 94 | .endm |
95 | 95 | ||
96 | .macro SAVE_ALL psworg,savearea,sync | 96 | .macro SAVE_ALL_SYNC psworg,savearea |
97 | la %r12,\psworg | 97 | la %r12,\psworg |
98 | .if \sync | ||
99 | tm \psworg+1,0x01 # test problem state bit | 98 | tm \psworg+1,0x01 # test problem state bit |
100 | bz BASED(2f) # skip stack setup save | 99 | bz BASED(2f) # skip stack setup save |
101 | l %r15,__LC_KERNEL_STACK # problem state -> load ksp | 100 | l %r15,__LC_KERNEL_STACK # problem state -> load ksp |
102 | .else | 101 | #ifdef CONFIG_CHECK_STACK |
102 | b BASED(3f) | ||
103 | 2: tml %r15,STACK_SIZE - CONFIG_STACK_GUARD | ||
104 | bz BASED(stack_overflow) | ||
105 | 3: | ||
106 | #endif | ||
107 | 2: | ||
108 | .endm | ||
109 | |||
110 | .macro SAVE_ALL_ASYNC psworg,savearea | ||
111 | la %r12,\psworg | ||
103 | tm \psworg+1,0x01 # test problem state bit | 112 | tm \psworg+1,0x01 # test problem state bit |
104 | bnz BASED(1f) # from user -> load async stack | 113 | bnz BASED(1f) # from user -> load async stack |
105 | clc \psworg+4(4),BASED(.Lcritical_end) | 114 | clc \psworg+4(4),BASED(.Lcritical_end) |
@@ -115,7 +124,6 @@ STACK_SIZE = 1 << STACK_SHIFT | |||
115 | sra %r14,STACK_SHIFT | 124 | sra %r14,STACK_SHIFT |
116 | be BASED(2f) | 125 | be BASED(2f) |
117 | 1: l %r15,__LC_ASYNC_STACK | 126 | 1: l %r15,__LC_ASYNC_STACK |
118 | .endif | ||
119 | #ifdef CONFIG_CHECK_STACK | 127 | #ifdef CONFIG_CHECK_STACK |
120 | b BASED(3f) | 128 | b BASED(3f) |
121 | 2: tml %r15,STACK_SIZE - CONFIG_STACK_GUARD | 129 | 2: tml %r15,STACK_SIZE - CONFIG_STACK_GUARD |
@@ -196,7 +204,7 @@ system_call: | |||
196 | STORE_TIMER __LC_SYNC_ENTER_TIMER | 204 | STORE_TIMER __LC_SYNC_ENTER_TIMER |
197 | sysc_saveall: | 205 | sysc_saveall: |
198 | SAVE_ALL_BASE __LC_SAVE_AREA | 206 | SAVE_ALL_BASE __LC_SAVE_AREA |
199 | SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 | 207 | SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
200 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA | 208 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
201 | lh %r7,0x8a # get svc number from lowcore | 209 | lh %r7,0x8a # get svc number from lowcore |
202 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 210 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
@@ -425,7 +433,7 @@ pgm_check_handler: | |||
425 | SAVE_ALL_BASE __LC_SAVE_AREA | 433 | SAVE_ALL_BASE __LC_SAVE_AREA |
426 | tm __LC_PGM_INT_CODE+1,0x80 # check whether we got a per exception | 434 | tm __LC_PGM_INT_CODE+1,0x80 # check whether we got a per exception |
427 | bnz BASED(pgm_per) # got per exception -> special case | 435 | bnz BASED(pgm_per) # got per exception -> special case |
428 | SAVE_ALL __LC_PGM_OLD_PSW,__LC_SAVE_AREA,1 | 436 | SAVE_ALL_SYNC __LC_PGM_OLD_PSW,__LC_SAVE_AREA |
429 | CREATE_STACK_FRAME __LC_PGM_OLD_PSW,__LC_SAVE_AREA | 437 | CREATE_STACK_FRAME __LC_PGM_OLD_PSW,__LC_SAVE_AREA |
430 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 438 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
431 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? | 439 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? |
@@ -464,7 +472,7 @@ pgm_per: | |||
464 | # Normal per exception | 472 | # Normal per exception |
465 | # | 473 | # |
466 | pgm_per_std: | 474 | pgm_per_std: |
467 | SAVE_ALL __LC_PGM_OLD_PSW,__LC_SAVE_AREA,1 | 475 | SAVE_ALL_SYNC __LC_PGM_OLD_PSW,__LC_SAVE_AREA |
468 | CREATE_STACK_FRAME __LC_PGM_OLD_PSW,__LC_SAVE_AREA | 476 | CREATE_STACK_FRAME __LC_PGM_OLD_PSW,__LC_SAVE_AREA |
469 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 477 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
470 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? | 478 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? |
@@ -490,7 +498,7 @@ pgm_no_vtime2: | |||
490 | # it was a single stepped SVC that is causing all the trouble | 498 | # it was a single stepped SVC that is causing all the trouble |
491 | # | 499 | # |
492 | pgm_svcper: | 500 | pgm_svcper: |
493 | SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 | 501 | SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
494 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA | 502 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
495 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 503 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
496 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? | 504 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? |
@@ -519,7 +527,7 @@ io_int_handler: | |||
519 | STORE_TIMER __LC_ASYNC_ENTER_TIMER | 527 | STORE_TIMER __LC_ASYNC_ENTER_TIMER |
520 | stck __LC_INT_CLOCK | 528 | stck __LC_INT_CLOCK |
521 | SAVE_ALL_BASE __LC_SAVE_AREA+16 | 529 | SAVE_ALL_BASE __LC_SAVE_AREA+16 |
522 | SAVE_ALL __LC_IO_OLD_PSW,__LC_SAVE_AREA+16,0 | 530 | SAVE_ALL_ASYNC __LC_IO_OLD_PSW,__LC_SAVE_AREA+16 |
523 | CREATE_STACK_FRAME __LC_IO_OLD_PSW,__LC_SAVE_AREA+16 | 531 | CREATE_STACK_FRAME __LC_IO_OLD_PSW,__LC_SAVE_AREA+16 |
524 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 532 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
525 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? | 533 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? |
@@ -631,7 +639,7 @@ ext_int_handler: | |||
631 | STORE_TIMER __LC_ASYNC_ENTER_TIMER | 639 | STORE_TIMER __LC_ASYNC_ENTER_TIMER |
632 | stck __LC_INT_CLOCK | 640 | stck __LC_INT_CLOCK |
633 | SAVE_ALL_BASE __LC_SAVE_AREA+16 | 641 | SAVE_ALL_BASE __LC_SAVE_AREA+16 |
634 | SAVE_ALL __LC_EXT_OLD_PSW,__LC_SAVE_AREA+16,0 | 642 | SAVE_ALL_ASYNC __LC_EXT_OLD_PSW,__LC_SAVE_AREA+16 |
635 | CREATE_STACK_FRAME __LC_EXT_OLD_PSW,__LC_SAVE_AREA+16 | 643 | CREATE_STACK_FRAME __LC_EXT_OLD_PSW,__LC_SAVE_AREA+16 |
636 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 644 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
637 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? | 645 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? |
@@ -657,21 +665,31 @@ __critical_end: | |||
657 | .globl mcck_int_handler | 665 | .globl mcck_int_handler |
658 | mcck_int_handler: | 666 | mcck_int_handler: |
659 | spt __LC_CPU_TIMER_SAVE_AREA # revalidate cpu timer | 667 | spt __LC_CPU_TIMER_SAVE_AREA # revalidate cpu timer |
660 | mvc __LC_ASYNC_ENTER_TIMER(8),__LC_CPU_TIMER_SAVE_AREA | ||
661 | lm %r0,%r15,__LC_GPREGS_SAVE_AREA # revalidate gprs | 668 | lm %r0,%r15,__LC_GPREGS_SAVE_AREA # revalidate gprs |
662 | SAVE_ALL_BASE __LC_SAVE_AREA+32 | 669 | SAVE_ALL_BASE __LC_SAVE_AREA+32 |
663 | la %r12,__LC_MCK_OLD_PSW | 670 | la %r12,__LC_MCK_OLD_PSW |
664 | tm __LC_MCCK_CODE,0x80 # system damage? | 671 | tm __LC_MCCK_CODE,0x80 # system damage? |
665 | bo BASED(mcck_int_main) # yes -> rest of mcck code invalid | 672 | bo BASED(mcck_int_main) # yes -> rest of mcck code invalid |
666 | tm __LC_MCCK_CODE+5,0x02 # stored cpu timer value valid? | ||
667 | bo BASED(0f) | ||
668 | spt __LC_LAST_UPDATE_TIMER # revalidate cpu timer | ||
669 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 673 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
670 | mvc __LC_ASYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER | 674 | mvc __LC_SAVE_AREA+52(8),__LC_ASYNC_ENTER_TIMER |
671 | mvc __LC_SYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER | 675 | mvc __LC_ASYNC_ENTER_TIMER(8),__LC_CPU_TIMER_SAVE_AREA |
672 | mvc __LC_EXIT_TIMER(8),__LC_LAST_UPDATE_TIMER | 676 | tm __LC_MCCK_CODE+5,0x02 # stored cpu timer value valid? |
677 | bo BASED(1f) | ||
678 | la %r14,__LC_SYNC_ENTER_TIMER | ||
679 | clc 0(8,%r14),__LC_ASYNC_ENTER_TIMER | ||
680 | bl BASED(0f) | ||
681 | la %r14,__LC_ASYNC_ENTER_TIMER | ||
682 | 0: clc 0(8,%r14),__LC_EXIT_TIMER | ||
683 | bl BASED(0f) | ||
684 | la %r14,__LC_EXIT_TIMER | ||
685 | 0: clc 0(8,%r14),__LC_LAST_UPDATE_TIMER | ||
686 | bl BASED(0f) | ||
687 | la %r14,__LC_LAST_UPDATE_TIMER | ||
688 | 0: spt 0(%r14) | ||
689 | mvc __LC_ASYNC_ENTER_TIMER(8),0(%r14) | ||
690 | 1: | ||
673 | #endif | 691 | #endif |
674 | 0: tm __LC_MCCK_CODE+2,0x09 # mwp + ia of old psw valid? | 692 | tm __LC_MCCK_CODE+2,0x09 # mwp + ia of old psw valid? |
675 | bno BASED(mcck_int_main) # no -> skip cleanup critical | 693 | bno BASED(mcck_int_main) # no -> skip cleanup critical |
676 | tm __LC_MCK_OLD_PSW+1,0x01 # test problem state bit | 694 | tm __LC_MCK_OLD_PSW+1,0x01 # test problem state bit |
677 | bnz BASED(mcck_int_main) # from user -> load async stack | 695 | bnz BASED(mcck_int_main) # from user -> load async stack |
@@ -691,7 +709,7 @@ mcck_int_main: | |||
691 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 709 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
692 | tm __LC_MCCK_CODE+2,0x08 # mwp of old psw valid? | 710 | tm __LC_MCCK_CODE+2,0x08 # mwp of old psw valid? |
693 | bno BASED(mcck_no_vtime) # no -> skip cleanup critical | 711 | bno BASED(mcck_no_vtime) # no -> skip cleanup critical |
694 | tm __LC_MCK_OLD_PSW+1,0x01 # interrupting from user ? | 712 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? |
695 | bz BASED(mcck_no_vtime) | 713 | bz BASED(mcck_no_vtime) |
696 | UPDATE_VTIME __LC_EXIT_TIMER,__LC_ASYNC_ENTER_TIMER,__LC_USER_TIMER | 714 | UPDATE_VTIME __LC_EXIT_TIMER,__LC_ASYNC_ENTER_TIMER,__LC_USER_TIMER |
697 | UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER | 715 | UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER |
@@ -715,6 +733,20 @@ mcck_no_vtime: | |||
715 | l %r1,BASED(.Ls390_handle_mcck) | 733 | l %r1,BASED(.Ls390_handle_mcck) |
716 | basr %r14,%r1 # call machine check handler | 734 | basr %r14,%r1 # call machine check handler |
717 | mcck_return: | 735 | mcck_return: |
736 | mvc __LC_RETURN_MCCK_PSW(8),SP_PSW(%r15) # move return PSW | ||
737 | ni __LC_RETURN_MCCK_PSW+1,0xfd # clear wait state bit | ||
738 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
739 | mvc __LC_ASYNC_ENTER_TIMER(8),__LC_SAVE_AREA+52 | ||
740 | tm __LC_RETURN_MCCK_PSW+1,0x01 # returning to user ? | ||
741 | bno BASED(0f) | ||
742 | lm %r0,%r15,SP_R0(%r15) # load gprs 0-15 | ||
743 | stpt __LC_EXIT_TIMER | ||
744 | lpsw __LC_RETURN_MCCK_PSW # back to caller | ||
745 | 0: | ||
746 | #endif | ||
747 | lm %r0,%r15,SP_R0(%r15) # load gprs 0-15 | ||
748 | lpsw __LC_RETURN_MCCK_PSW # back to caller | ||
749 | |||
718 | RESTORE_ALL __LC_RETURN_MCCK_PSW,0 | 750 | RESTORE_ALL __LC_RETURN_MCCK_PSW,0 |
719 | 751 | ||
720 | #ifdef CONFIG_SMP | 752 | #ifdef CONFIG_SMP |
@@ -781,6 +813,8 @@ cleanup_table_sysc_leave: | |||
781 | .long sysc_leave + 0x80000000, sysc_work_loop + 0x80000000 | 813 | .long sysc_leave + 0x80000000, sysc_work_loop + 0x80000000 |
782 | cleanup_table_sysc_work_loop: | 814 | cleanup_table_sysc_work_loop: |
783 | .long sysc_work_loop + 0x80000000, sysc_reschedule + 0x80000000 | 815 | .long sysc_work_loop + 0x80000000, sysc_reschedule + 0x80000000 |
816 | cleanup_table_io_return: | ||
817 | .long io_return + 0x80000000, io_leave + 0x80000000 | ||
784 | cleanup_table_io_leave: | 818 | cleanup_table_io_leave: |
785 | .long io_leave + 0x80000000, io_done + 0x80000000 | 819 | .long io_leave + 0x80000000, io_done + 0x80000000 |
786 | cleanup_table_io_work_loop: | 820 | cleanup_table_io_work_loop: |
@@ -807,6 +841,11 @@ cleanup_critical: | |||
807 | clc 4(4,%r12),BASED(cleanup_table_sysc_work_loop+4) | 841 | clc 4(4,%r12),BASED(cleanup_table_sysc_work_loop+4) |
808 | bl BASED(cleanup_sysc_return) | 842 | bl BASED(cleanup_sysc_return) |
809 | 0: | 843 | 0: |
844 | clc 4(4,%r12),BASED(cleanup_table_io_return) | ||
845 | bl BASED(0f) | ||
846 | clc 4(4,%r12),BASED(cleanup_table_io_return+4) | ||
847 | bl BASED(cleanup_io_return) | ||
848 | 0: | ||
810 | clc 4(4,%r12),BASED(cleanup_table_io_leave) | 849 | clc 4(4,%r12),BASED(cleanup_table_io_leave) |
811 | bl BASED(0f) | 850 | bl BASED(0f) |
812 | clc 4(4,%r12),BASED(cleanup_table_io_leave+4) | 851 | clc 4(4,%r12),BASED(cleanup_table_io_leave+4) |
@@ -839,7 +878,7 @@ cleanup_system_call: | |||
839 | mvc __LC_SAVE_AREA(16),0(%r12) | 878 | mvc __LC_SAVE_AREA(16),0(%r12) |
840 | 0: st %r13,4(%r12) | 879 | 0: st %r13,4(%r12) |
841 | st %r12,__LC_SAVE_AREA+48 # argh | 880 | st %r12,__LC_SAVE_AREA+48 # argh |
842 | SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 | 881 | SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
843 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA | 882 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
844 | l %r12,__LC_SAVE_AREA+48 # argh | 883 | l %r12,__LC_SAVE_AREA+48 # argh |
845 | st %r15,12(%r12) | 884 | st %r15,12(%r12) |
@@ -980,7 +1019,6 @@ cleanup_io_leave_insn: | |||
980 | .long cleanup_critical | 1019 | .long cleanup_critical |
981 | 1020 | ||
982 | #define SYSCALL(esa,esame,emu) .long esa | 1021 | #define SYSCALL(esa,esame,emu) .long esa |
983 | .globl sys_call_table | ||
984 | sys_call_table: | 1022 | sys_call_table: |
985 | #include "syscalls.S" | 1023 | #include "syscalls.S" |
986 | #undef SYSCALL | 1024 | #undef SYSCALL |
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 2ac095bc0e25..f3222a1b2861 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -87,13 +87,22 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \ | |||
87 | larl %r13,system_call | 87 | larl %r13,system_call |
88 | .endm | 88 | .endm |
89 | 89 | ||
90 | .macro SAVE_ALL psworg,savearea,sync | 90 | .macro SAVE_ALL_SYNC psworg,savearea |
91 | la %r12,\psworg | 91 | la %r12,\psworg |
92 | .if \sync | ||
93 | tm \psworg+1,0x01 # test problem state bit | 92 | tm \psworg+1,0x01 # test problem state bit |
94 | jz 2f # skip stack setup save | 93 | jz 2f # skip stack setup save |
95 | lg %r15,__LC_KERNEL_STACK # problem state -> load ksp | 94 | lg %r15,__LC_KERNEL_STACK # problem state -> load ksp |
96 | .else | 95 | #ifdef CONFIG_CHECK_STACK |
96 | j 3f | ||
97 | 2: tml %r15,STACK_SIZE - CONFIG_STACK_GUARD | ||
98 | jz stack_overflow | ||
99 | 3: | ||
100 | #endif | ||
101 | 2: | ||
102 | .endm | ||
103 | |||
104 | .macro SAVE_ALL_ASYNC psworg,savearea | ||
105 | la %r12,\psworg | ||
97 | tm \psworg+1,0x01 # test problem state bit | 106 | tm \psworg+1,0x01 # test problem state bit |
98 | jnz 1f # from user -> load kernel stack | 107 | jnz 1f # from user -> load kernel stack |
99 | clc \psworg+8(8),BASED(.Lcritical_end) | 108 | clc \psworg+8(8),BASED(.Lcritical_end) |
@@ -108,7 +117,6 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \ | |||
108 | srag %r14,%r14,STACK_SHIFT | 117 | srag %r14,%r14,STACK_SHIFT |
109 | jz 2f | 118 | jz 2f |
110 | 1: lg %r15,__LC_ASYNC_STACK # load async stack | 119 | 1: lg %r15,__LC_ASYNC_STACK # load async stack |
111 | .endif | ||
112 | #ifdef CONFIG_CHECK_STACK | 120 | #ifdef CONFIG_CHECK_STACK |
113 | j 3f | 121 | j 3f |
114 | 2: tml %r15,STACK_SIZE - CONFIG_STACK_GUARD | 122 | 2: tml %r15,STACK_SIZE - CONFIG_STACK_GUARD |
@@ -187,7 +195,7 @@ system_call: | |||
187 | STORE_TIMER __LC_SYNC_ENTER_TIMER | 195 | STORE_TIMER __LC_SYNC_ENTER_TIMER |
188 | sysc_saveall: | 196 | sysc_saveall: |
189 | SAVE_ALL_BASE __LC_SAVE_AREA | 197 | SAVE_ALL_BASE __LC_SAVE_AREA |
190 | SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 | 198 | SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
191 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA | 199 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
192 | llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore | 200 | llgh %r7,__LC_SVC_INT_CODE # get svc number from lowcore |
193 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 201 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
@@ -446,7 +454,7 @@ pgm_check_handler: | |||
446 | SAVE_ALL_BASE __LC_SAVE_AREA | 454 | SAVE_ALL_BASE __LC_SAVE_AREA |
447 | tm __LC_PGM_INT_CODE+1,0x80 # check whether we got a per exception | 455 | tm __LC_PGM_INT_CODE+1,0x80 # check whether we got a per exception |
448 | jnz pgm_per # got per exception -> special case | 456 | jnz pgm_per # got per exception -> special case |
449 | SAVE_ALL __LC_PGM_OLD_PSW,__LC_SAVE_AREA,1 | 457 | SAVE_ALL_SYNC __LC_PGM_OLD_PSW,__LC_SAVE_AREA |
450 | CREATE_STACK_FRAME __LC_PGM_OLD_PSW,__LC_SAVE_AREA | 458 | CREATE_STACK_FRAME __LC_PGM_OLD_PSW,__LC_SAVE_AREA |
451 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 459 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
452 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? | 460 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? |
@@ -485,7 +493,7 @@ pgm_per: | |||
485 | # Normal per exception | 493 | # Normal per exception |
486 | # | 494 | # |
487 | pgm_per_std: | 495 | pgm_per_std: |
488 | SAVE_ALL __LC_PGM_OLD_PSW,__LC_SAVE_AREA,1 | 496 | SAVE_ALL_SYNC __LC_PGM_OLD_PSW,__LC_SAVE_AREA |
489 | CREATE_STACK_FRAME __LC_PGM_OLD_PSW,__LC_SAVE_AREA | 497 | CREATE_STACK_FRAME __LC_PGM_OLD_PSW,__LC_SAVE_AREA |
490 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 498 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
491 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? | 499 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? |
@@ -511,7 +519,7 @@ pgm_no_vtime2: | |||
511 | # it was a single stepped SVC that is causing all the trouble | 519 | # it was a single stepped SVC that is causing all the trouble |
512 | # | 520 | # |
513 | pgm_svcper: | 521 | pgm_svcper: |
514 | SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 | 522 | SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
515 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA | 523 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
516 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 524 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
517 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? | 525 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? |
@@ -539,7 +547,7 @@ io_int_handler: | |||
539 | STORE_TIMER __LC_ASYNC_ENTER_TIMER | 547 | STORE_TIMER __LC_ASYNC_ENTER_TIMER |
540 | stck __LC_INT_CLOCK | 548 | stck __LC_INT_CLOCK |
541 | SAVE_ALL_BASE __LC_SAVE_AREA+32 | 549 | SAVE_ALL_BASE __LC_SAVE_AREA+32 |
542 | SAVE_ALL __LC_IO_OLD_PSW,__LC_SAVE_AREA+32,0 | 550 | SAVE_ALL_ASYNC __LC_IO_OLD_PSW,__LC_SAVE_AREA+32 |
543 | CREATE_STACK_FRAME __LC_IO_OLD_PSW,__LC_SAVE_AREA+32 | 551 | CREATE_STACK_FRAME __LC_IO_OLD_PSW,__LC_SAVE_AREA+32 |
544 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 552 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
545 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? | 553 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? |
@@ -647,7 +655,7 @@ ext_int_handler: | |||
647 | STORE_TIMER __LC_ASYNC_ENTER_TIMER | 655 | STORE_TIMER __LC_ASYNC_ENTER_TIMER |
648 | stck __LC_INT_CLOCK | 656 | stck __LC_INT_CLOCK |
649 | SAVE_ALL_BASE __LC_SAVE_AREA+32 | 657 | SAVE_ALL_BASE __LC_SAVE_AREA+32 |
650 | SAVE_ALL __LC_EXT_OLD_PSW,__LC_SAVE_AREA+32,0 | 658 | SAVE_ALL_ASYNC __LC_EXT_OLD_PSW,__LC_SAVE_AREA+32 |
651 | CREATE_STACK_FRAME __LC_EXT_OLD_PSW,__LC_SAVE_AREA+32 | 659 | CREATE_STACK_FRAME __LC_EXT_OLD_PSW,__LC_SAVE_AREA+32 |
652 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 660 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
653 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? | 661 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? |
@@ -672,21 +680,32 @@ __critical_end: | |||
672 | mcck_int_handler: | 680 | mcck_int_handler: |
673 | la %r1,4095 # revalidate r1 | 681 | la %r1,4095 # revalidate r1 |
674 | spt __LC_CPU_TIMER_SAVE_AREA-4095(%r1) # revalidate cpu timer | 682 | spt __LC_CPU_TIMER_SAVE_AREA-4095(%r1) # revalidate cpu timer |
675 | mvc __LC_ASYNC_ENTER_TIMER(8),__LC_CPU_TIMER_SAVE_AREA-4095(%r1) | ||
676 | lmg %r0,%r15,__LC_GPREGS_SAVE_AREA-4095(%r1)# revalidate gprs | 683 | lmg %r0,%r15,__LC_GPREGS_SAVE_AREA-4095(%r1)# revalidate gprs |
677 | SAVE_ALL_BASE __LC_SAVE_AREA+64 | 684 | SAVE_ALL_BASE __LC_SAVE_AREA+64 |
678 | la %r12,__LC_MCK_OLD_PSW | 685 | la %r12,__LC_MCK_OLD_PSW |
679 | tm __LC_MCCK_CODE,0x80 # system damage? | 686 | tm __LC_MCCK_CODE,0x80 # system damage? |
680 | jo mcck_int_main # yes -> rest of mcck code invalid | 687 | jo mcck_int_main # yes -> rest of mcck code invalid |
681 | tm __LC_MCCK_CODE+5,0x02 # stored cpu timer value valid? | ||
682 | jo 0f | ||
683 | spt __LC_LAST_UPDATE_TIMER | ||
684 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 688 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
685 | mvc __LC_ASYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER | 689 | la %r14,4095 |
686 | mvc __LC_SYNC_ENTER_TIMER(8),__LC_LAST_UPDATE_TIMER | 690 | mvc __LC_SAVE_AREA+104(8),__LC_ASYNC_ENTER_TIMER |
687 | mvc __LC_EXIT_TIMER(8),__LC_LAST_UPDATE_TIMER | 691 | mvc __LC_ASYNC_ENTER_TIMER(8),__LC_CPU_TIMER_SAVE_AREA-4095(%r14) |
692 | tm __LC_MCCK_CODE+5,0x02 # stored cpu timer value valid? | ||
693 | jo 1f | ||
694 | la %r14,__LC_SYNC_ENTER_TIMER | ||
695 | clc 0(8,%r14),__LC_ASYNC_ENTER_TIMER | ||
696 | jl 0f | ||
697 | la %r14,__LC_ASYNC_ENTER_TIMER | ||
698 | 0: clc 0(8,%r14),__LC_EXIT_TIMER | ||
699 | jl 0f | ||
700 | la %r14,__LC_EXIT_TIMER | ||
701 | 0: clc 0(8,%r14),__LC_LAST_UPDATE_TIMER | ||
702 | jl 0f | ||
703 | la %r14,__LC_LAST_UPDATE_TIMER | ||
704 | 0: spt 0(%r14) | ||
705 | mvc __LC_ASYNC_ENTER_TIMER(8),0(%r14) | ||
706 | 1: | ||
688 | #endif | 707 | #endif |
689 | 0: tm __LC_MCCK_CODE+2,0x09 # mwp + ia of old psw valid? | 708 | tm __LC_MCCK_CODE+2,0x09 # mwp + ia of old psw valid? |
690 | jno mcck_int_main # no -> skip cleanup critical | 709 | jno mcck_int_main # no -> skip cleanup critical |
691 | tm __LC_MCK_OLD_PSW+1,0x01 # test problem state bit | 710 | tm __LC_MCK_OLD_PSW+1,0x01 # test problem state bit |
692 | jnz mcck_int_main # from user -> load kernel stack | 711 | jnz mcck_int_main # from user -> load kernel stack |
@@ -705,7 +724,7 @@ mcck_int_main: | |||
705 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | 724 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING |
706 | tm __LC_MCCK_CODE+2,0x08 # mwp of old psw valid? | 725 | tm __LC_MCCK_CODE+2,0x08 # mwp of old psw valid? |
707 | jno mcck_no_vtime # no -> no timer update | 726 | jno mcck_no_vtime # no -> no timer update |
708 | tm __LC_MCK_OLD_PSW+1,0x01 # interrupting from user ? | 727 | tm SP_PSW+1(%r15),0x01 # interrupting from user ? |
709 | jz mcck_no_vtime | 728 | jz mcck_no_vtime |
710 | UPDATE_VTIME __LC_EXIT_TIMER,__LC_ASYNC_ENTER_TIMER,__LC_USER_TIMER | 729 | UPDATE_VTIME __LC_EXIT_TIMER,__LC_ASYNC_ENTER_TIMER,__LC_USER_TIMER |
711 | UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER | 730 | UPDATE_VTIME __LC_LAST_UPDATE_TIMER,__LC_EXIT_TIMER,__LC_SYSTEM_TIMER |
@@ -727,7 +746,17 @@ mcck_no_vtime: | |||
727 | jno mcck_return | 746 | jno mcck_return |
728 | brasl %r14,s390_handle_mcck | 747 | brasl %r14,s390_handle_mcck |
729 | mcck_return: | 748 | mcck_return: |
730 | RESTORE_ALL __LC_RETURN_MCCK_PSW,0 | 749 | mvc __LC_RETURN_MCCK_PSW(16),SP_PSW(%r15) # move return PSW |
750 | ni __LC_RETURN_MCCK_PSW+1,0xfd # clear wait state bit | ||
751 | lmg %r0,%r15,SP_R0(%r15) # load gprs 0-15 | ||
752 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
753 | mvc __LC_ASYNC_ENTER_TIMER(8),__LC_SAVE_AREA+104 | ||
754 | tm __LC_RETURN_MCCK_PSW+1,0x01 # returning to user ? | ||
755 | jno 0f | ||
756 | stpt __LC_EXIT_TIMER | ||
757 | 0: | ||
758 | #endif | ||
759 | lpswe __LC_RETURN_MCCK_PSW # back to caller | ||
731 | 760 | ||
732 | #ifdef CONFIG_SMP | 761 | #ifdef CONFIG_SMP |
733 | /* | 762 | /* |
@@ -789,6 +818,8 @@ cleanup_table_sysc_leave: | |||
789 | .quad sysc_leave, sysc_work_loop | 818 | .quad sysc_leave, sysc_work_loop |
790 | cleanup_table_sysc_work_loop: | 819 | cleanup_table_sysc_work_loop: |
791 | .quad sysc_work_loop, sysc_reschedule | 820 | .quad sysc_work_loop, sysc_reschedule |
821 | cleanup_table_io_return: | ||
822 | .quad io_return, io_leave | ||
792 | cleanup_table_io_leave: | 823 | cleanup_table_io_leave: |
793 | .quad io_leave, io_done | 824 | .quad io_leave, io_done |
794 | cleanup_table_io_work_loop: | 825 | cleanup_table_io_work_loop: |
@@ -815,6 +846,11 @@ cleanup_critical: | |||
815 | clc 8(8,%r12),BASED(cleanup_table_sysc_work_loop+8) | 846 | clc 8(8,%r12),BASED(cleanup_table_sysc_work_loop+8) |
816 | jl cleanup_sysc_return | 847 | jl cleanup_sysc_return |
817 | 0: | 848 | 0: |
849 | clc 8(8,%r12),BASED(cleanup_table_io_return) | ||
850 | jl 0f | ||
851 | clc 8(8,%r12),BASED(cleanup_table_io_return+8) | ||
852 | jl cleanup_io_return | ||
853 | 0: | ||
818 | clc 8(8,%r12),BASED(cleanup_table_io_leave) | 854 | clc 8(8,%r12),BASED(cleanup_table_io_leave) |
819 | jl 0f | 855 | jl 0f |
820 | clc 8(8,%r12),BASED(cleanup_table_io_leave+8) | 856 | clc 8(8,%r12),BASED(cleanup_table_io_leave+8) |
@@ -847,7 +883,7 @@ cleanup_system_call: | |||
847 | mvc __LC_SAVE_AREA(32),0(%r12) | 883 | mvc __LC_SAVE_AREA(32),0(%r12) |
848 | 0: stg %r13,8(%r12) | 884 | 0: stg %r13,8(%r12) |
849 | stg %r12,__LC_SAVE_AREA+96 # argh | 885 | stg %r12,__LC_SAVE_AREA+96 # argh |
850 | SAVE_ALL __LC_SVC_OLD_PSW,__LC_SAVE_AREA,1 | 886 | SAVE_ALL_SYNC __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
851 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA | 887 | CREATE_STACK_FRAME __LC_SVC_OLD_PSW,__LC_SAVE_AREA |
852 | lg %r12,__LC_SAVE_AREA+96 # argh | 888 | lg %r12,__LC_SAVE_AREA+96 # argh |
853 | stg %r15,24(%r12) | 889 | stg %r15,24(%r12) |
@@ -957,7 +993,6 @@ cleanup_io_leave_insn: | |||
957 | .quad __critical_end | 993 | .quad __critical_end |
958 | 994 | ||
959 | #define SYSCALL(esa,esame,emu) .long esame | 995 | #define SYSCALL(esa,esame,emu) .long esame |
960 | .globl sys_call_table | ||
961 | sys_call_table: | 996 | sys_call_table: |
962 | #include "syscalls.S" | 997 | #include "syscalls.S" |
963 | #undef SYSCALL | 998 | #undef SYSCALL |
@@ -965,7 +1000,6 @@ sys_call_table: | |||
965 | #ifdef CONFIG_COMPAT | 1000 | #ifdef CONFIG_COMPAT |
966 | 1001 | ||
967 | #define SYSCALL(esa,esame,emu) .long emu | 1002 | #define SYSCALL(esa,esame,emu) .long emu |
968 | .globl sys_call_table_emu | ||
969 | sys_call_table_emu: | 1003 | sys_call_table_emu: |
970 | #include "syscalls.S" | 1004 | #include "syscalls.S" |
971 | #undef SYSCALL | 1005 | #undef SYSCALL |
diff --git a/arch/s390/kernel/head.S b/arch/s390/kernel/head.S index ea88d066bf04..538c82da49b1 100644 --- a/arch/s390/kernel/head.S +++ b/arch/s390/kernel/head.S | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * arch/s390/kernel/head.S | 2 | * arch/s390/kernel/head.S |
3 | * | 3 | * |
4 | * (C) Copyright IBM Corp. 1999, 2005 | 4 | * Copyright (C) IBM Corp. 1999,2006 |
5 | * | 5 | * |
6 | * Author(s): Hartmut Penner <hp@de.ibm.com> | 6 | * Author(s): Hartmut Penner <hp@de.ibm.com> |
7 | * Martin Schwidefsky <schwidefsky@de.ibm.com> | 7 | * Martin Schwidefsky <schwidefsky@de.ibm.com> |
@@ -482,24 +482,23 @@ start: | |||
482 | 482 | ||
483 | .macro GET_IPL_DEVICE | 483 | .macro GET_IPL_DEVICE |
484 | .Lget_ipl_device: | 484 | .Lget_ipl_device: |
485 | basr %r12,0 | 485 | l %r1,0xb8 # get sid |
486 | .LGID: l %r1,0xb8 # get sid | ||
487 | sll %r1,15 # test if subchannel is enabled | 486 | sll %r1,15 # test if subchannel is enabled |
488 | srl %r1,31 | 487 | srl %r1,31 |
489 | ltr %r1,%r1 | 488 | ltr %r1,%r1 |
490 | bz 0(%r14) # subchannel disabled | 489 | bz 2f-.LPG1(%r13) # subchannel disabled |
491 | l %r1,0xb8 | 490 | l %r1,0xb8 |
492 | la %r5,.Lipl_schib-.LGID(%r12) | 491 | la %r5,.Lipl_schib-.LPG1(%r13) |
493 | stsch 0(%r5) # get schib of subchannel | 492 | stsch 0(%r5) # get schib of subchannel |
494 | bnz 0(%r14) # schib not available | 493 | bnz 2f-.LPG1(%r13) # schib not available |
495 | tm 5(%r5),0x01 # devno valid? | 494 | tm 5(%r5),0x01 # devno valid? |
496 | bno 0(%r14) | 495 | bno 2f-.LPG1(%r13) |
497 | la %r6,ipl_parameter_flags-.LGID(%r12) | 496 | la %r6,ipl_parameter_flags-.LPG1(%r13) |
498 | oi 3(%r6),0x01 # set flag | 497 | oi 3(%r6),0x01 # set flag |
499 | la %r2,ipl_devno-.LGID(%r12) | 498 | la %r2,ipl_devno-.LPG1(%r13) |
500 | mvc 0(2,%r2),6(%r5) # store devno | 499 | mvc 0(2,%r2),6(%r5) # store devno |
501 | tm 4(%r5),0x80 # qdio capable device? | 500 | tm 4(%r5),0x80 # qdio capable device? |
502 | bno 0(%r14) | 501 | bno 2f-.LPG1(%r13) |
503 | oi 3(%r6),0x02 # set flag | 502 | oi 3(%r6),0x02 # set flag |
504 | 503 | ||
505 | # copy ipl parameters | 504 | # copy ipl parameters |
@@ -523,7 +522,7 @@ start: | |||
523 | ar %r2,%r1 | 522 | ar %r2,%r1 |
524 | sr %r0,%r4 | 523 | sr %r0,%r4 |
525 | jne 1b | 524 | jne 1b |
526 | b 0(%r14) | 525 | b 2f-.LPG1(%r13) |
527 | 526 | ||
528 | .align 4 | 527 | .align 4 |
529 | .Lipl_schib: | 528 | .Lipl_schib: |
@@ -537,6 +536,7 @@ ipl_parameter_flags: | |||
537 | .globl ipl_devno | 536 | .globl ipl_devno |
538 | ipl_devno: | 537 | ipl_devno: |
539 | .word 0 | 538 | .word 0 |
539 | 2: | ||
540 | .endm | 540 | .endm |
541 | 541 | ||
542 | #ifdef CONFIG_64BIT | 542 | #ifdef CONFIG_64BIT |
diff --git a/arch/s390/kernel/head31.S b/arch/s390/kernel/head31.S index 2d3b089bfb83..d00de17b3778 100644 --- a/arch/s390/kernel/head31.S +++ b/arch/s390/kernel/head31.S | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * arch/s390/kernel/head31.S | 2 | * arch/s390/kernel/head31.S |
3 | * | 3 | * |
4 | * (C) Copyright IBM Corp. 2005 | 4 | * Copyright (C) IBM Corp. 2005,2006 |
5 | * | 5 | * |
6 | * Author(s): Hartmut Penner <hp@de.ibm.com> | 6 | * Author(s): Hartmut Penner <hp@de.ibm.com> |
7 | * Martin Schwidefsky <schwidefsky@de.ibm.com> | 7 | * Martin Schwidefsky <schwidefsky@de.ibm.com> |
@@ -16,12 +16,31 @@ | |||
16 | # or linload or SALIPL | 16 | # or linload or SALIPL |
17 | # | 17 | # |
18 | .org 0x10000 | 18 | .org 0x10000 |
19 | startup:basr %r13,0 # get base | 19 | startup:basr %r13,0 # get base |
20 | .LPG1: l %r1, .Lget_ipl_device_addr-.LPG1(%r13) | 20 | .LPG0: l %r13,0f-.LPG0(%r13) |
21 | basr %r14, %r1 | 21 | b 0(%r13) |
22 | 0: .long startup_continue | ||
23 | |||
24 | # | ||
25 | # params at 10400 (setup.h) | ||
26 | # | ||
27 | .org PARMAREA | ||
28 | .long 0,0 # IPL_DEVICE | ||
29 | .long 0,RAMDISK_ORIGIN # INITRD_START | ||
30 | .long 0,RAMDISK_SIZE # INITRD_SIZE | ||
31 | |||
32 | .org COMMAND_LINE | ||
33 | .byte "root=/dev/ram0 ro" | ||
34 | .byte 0 | ||
35 | |||
36 | .org 0x11000 | ||
37 | |||
38 | startup_continue: | ||
39 | basr %r13,0 # get base | ||
40 | .LPG1: GET_IPL_DEVICE | ||
22 | lctl %c0,%c15,.Lctl-.LPG1(%r13) # load control registers | 41 | lctl %c0,%c15,.Lctl-.LPG1(%r13) # load control registers |
23 | la %r12,_pstart-.LPG1(%r13) # pointer to parameter area | 42 | l %r12,.Lparmaddr-.LPG1(%r13) # pointer to parameter area |
24 | # move IPL device to lowcore | 43 | # move IPL device to lowcore |
25 | mvc __LC_IPLDEV(4),IPL_DEVICE-PARMAREA(%r12) | 44 | mvc __LC_IPLDEV(4),IPL_DEVICE-PARMAREA(%r12) |
26 | 45 | ||
27 | # | 46 | # |
@@ -51,8 +70,8 @@ startup:basr %r13,0 # get base | |||
51 | a %r1,__LC_EXT_NEW_PSW+4 # set handler | 70 | a %r1,__LC_EXT_NEW_PSW+4 # set handler |
52 | st %r1,__LC_EXT_NEW_PSW+4 | 71 | st %r1,__LC_EXT_NEW_PSW+4 |
53 | 72 | ||
54 | la %r4,_pstart-.LPG1(%r13) # %r4 is our index for sccb stuff | 73 | l %r4,.Lsccbaddr-.LPG1(%r13) # %r4 is our index for sccb stuff |
55 | la %r1, .Lsccb-PARMAREA(%r4) # our sccb | 74 | lr %r1,%r4 # our sccb |
56 | .insn rre,0xb2200000,%r2,%r1 # service call | 75 | .insn rre,0xb2200000,%r2,%r1 # service call |
57 | ipm %r1 | 76 | ipm %r1 |
58 | srl %r1,28 # get cc code | 77 | srl %r1,28 # get cc code |
@@ -63,7 +82,7 @@ startup:basr %r13,0 # get base | |||
63 | be .Lservicecall-.LPG1(%r13) | 82 | be .Lservicecall-.LPG1(%r13) |
64 | lpsw .Lwaitsclp-.LPG1(%r13) | 83 | lpsw .Lwaitsclp-.LPG1(%r13) |
65 | .Lsclph: | 84 | .Lsclph: |
66 | lh %r1,.Lsccbr-PARMAREA(%r4) | 85 | lh %r1,.Lsccbr-.Lsccb(%r4) |
67 | chi %r1,0x10 # 0x0010 is the sucess code | 86 | chi %r1,0x10 # 0x0010 is the sucess code |
68 | je .Lprocsccb # let's process the sccb | 87 | je .Lprocsccb # let's process the sccb |
69 | chi %r1,0x1f0 | 88 | chi %r1,0x1f0 |
@@ -74,7 +93,7 @@ startup:basr %r13,0 # get base | |||
74 | b .Lservicecall-.LPG1(%r13) | 93 | b .Lservicecall-.LPG1(%r13) |
75 | .Lprocsccb: | 94 | .Lprocsccb: |
76 | lhi %r1,0 | 95 | lhi %r1,0 |
77 | icm %r1,3,.Lscpincr1-PARMAREA(%r4) # use this one if != 0 | 96 | icm %r1,3,.Lscpincr1-.Lsccb(%r4) # use this one if != 0 |
78 | jnz .Lscnd | 97 | jnz .Lscnd |
79 | lhi %r1,0x800 # otherwise report 2GB | 98 | lhi %r1,0x800 # otherwise report 2GB |
80 | .Lscnd: | 99 | .Lscnd: |
@@ -84,10 +103,10 @@ startup:basr %r13,0 # get base | |||
84 | lr %r1,%r3 | 103 | lr %r1,%r3 |
85 | .Lno2gb: | 104 | .Lno2gb: |
86 | xr %r3,%r3 # same logic | 105 | xr %r3,%r3 # same logic |
87 | ic %r3,.Lscpa1-PARMAREA(%r4) | 106 | ic %r3,.Lscpa1-.Lsccb(%r4) |
88 | chi %r3,0x00 | 107 | chi %r3,0x00 |
89 | jne .Lcompmem | 108 | jne .Lcompmem |
90 | l %r3,.Lscpa2-PARMAREA(%r13) | 109 | l %r3,.Lscpa2-.Lsccb(%r4) |
91 | .Lcompmem: | 110 | .Lcompmem: |
92 | mr %r2,%r1 # mem in MB on 128-bit | 111 | mr %r2,%r1 # mem in MB on 128-bit |
93 | l %r1,.Lonemb-.LPG1(%r13) | 112 | l %r1,.Lonemb-.LPG1(%r13) |
@@ -95,8 +114,6 @@ startup:basr %r13,0 # get base | |||
95 | b .Lfchunk-.LPG1(%r13) | 114 | b .Lfchunk-.LPG1(%r13) |
96 | 115 | ||
97 | .align 4 | 116 | .align 4 |
98 | .Lget_ipl_device_addr: | ||
99 | .long .Lget_ipl_device | ||
100 | .Lpmask: | 117 | .Lpmask: |
101 | .byte 0 | 118 | .byte 0 |
102 | .align 8 | 119 | .align 8 |
@@ -242,6 +259,8 @@ startup:basr %r13,0 # get base | |||
242 | .long 0 # cr13: home space segment table | 259 | .long 0 # cr13: home space segment table |
243 | .long 0xc0000000 # cr14: machine check handling off | 260 | .long 0xc0000000 # cr14: machine check handling off |
244 | .long 0 # cr15: linkage stack operations | 261 | .long 0 # cr15: linkage stack operations |
262 | .Lduct: .long 0,0,0,0,0,0,0,0 | ||
263 | .long 0,0,0,0,0,0,0,0 | ||
245 | .Lpcmem:.long 0x00080000,0x80000000 + .Lchkmem | 264 | .Lpcmem:.long 0x00080000,0x80000000 + .Lchkmem |
246 | .Lpcfpu:.long 0x00080000,0x80000000 + .Lchkfpu | 265 | .Lpcfpu:.long 0x00080000,0x80000000 + .Lchkfpu |
247 | .Lpccsp:.long 0x00080000,0x80000000 + .Lchkcsp | 266 | .Lpccsp:.long 0x00080000,0x80000000 + .Lchkcsp |
@@ -252,25 +271,9 @@ startup:basr %r13,0 # get base | |||
252 | .Lmflags:.long machine_flags | 271 | .Lmflags:.long machine_flags |
253 | .Lbss_bgn: .long __bss_start | 272 | .Lbss_bgn: .long __bss_start |
254 | .Lbss_end: .long _end | 273 | .Lbss_end: .long _end |
255 | 274 | .Lparmaddr: .long PARMAREA | |
256 | .org PARMAREA-64 | 275 | .Lsccbaddr: .long .Lsccb |
257 | .Lduct: .long 0,0,0,0,0,0,0,0 | 276 | .align 4096 |
258 | .long 0,0,0,0,0,0,0,0 | ||
259 | |||
260 | # | ||
261 | # params at 10400 (setup.h) | ||
262 | # | ||
263 | .org PARMAREA | ||
264 | .global _pstart | ||
265 | _pstart: | ||
266 | .long 0,0 # IPL_DEVICE | ||
267 | .long 0,RAMDISK_ORIGIN # INITRD_START | ||
268 | .long 0,RAMDISK_SIZE # INITRD_SIZE | ||
269 | |||
270 | .org COMMAND_LINE | ||
271 | .byte "root=/dev/ram0 ro" | ||
272 | .byte 0 | ||
273 | .org 0x11000 | ||
274 | .Lsccb: | 277 | .Lsccb: |
275 | .hword 0x1000 # length, one page | 278 | .hword 0x1000 # length, one page |
276 | .byte 0x00,0x00,0x00 | 279 | .byte 0x00,0x00,0x00 |
@@ -287,18 +290,14 @@ _pstart: | |||
287 | .Lscpincr2: | 290 | .Lscpincr2: |
288 | .quad 0x00 | 291 | .quad 0x00 |
289 | .fill 3984,1,0 | 292 | .fill 3984,1,0 |
290 | .org 0x12000 | 293 | .align 4096 |
291 | .global _pend | ||
292 | _pend: | ||
293 | |||
294 | GET_IPL_DEVICE | ||
295 | 294 | ||
296 | #ifdef CONFIG_SHARED_KERNEL | 295 | #ifdef CONFIG_SHARED_KERNEL |
297 | .org 0x100000 | 296 | .org 0x100000 |
298 | #endif | 297 | #endif |
299 | 298 | ||
300 | # | 299 | # |
301 | # startup-code, running in virtual mode | 300 | # startup-code, running in absolute addressing mode |
302 | # | 301 | # |
303 | .globl _stext | 302 | .globl _stext |
304 | _stext: basr %r13,0 # get base | 303 | _stext: basr %r13,0 # get base |
diff --git a/arch/s390/kernel/head64.S b/arch/s390/kernel/head64.S index f08c06f45d5c..47744fcca930 100644 --- a/arch/s390/kernel/head64.S +++ b/arch/s390/kernel/head64.S | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * arch/s390/kernel/head64.S | 2 | * arch/s390/kernel/head64.S |
3 | * | 3 | * |
4 | * (C) Copyright IBM Corp. 1999,2005 | 4 | * Copyright (C) IBM Corp. 1999,2006 |
5 | * | 5 | * |
6 | * Author(s): Hartmut Penner <hp@de.ibm.com> | 6 | * Author(s): Hartmut Penner <hp@de.ibm.com> |
7 | * Martin Schwidefsky <schwidefsky@de.ibm.com> | 7 | * Martin Schwidefsky <schwidefsky@de.ibm.com> |
@@ -15,18 +15,37 @@ | |||
15 | # this is called either by the ipl loader or directly by PSW restart | 15 | # this is called either by the ipl loader or directly by PSW restart |
16 | # or linload or SALIPL | 16 | # or linload or SALIPL |
17 | # | 17 | # |
18 | .org 0x10000 | 18 | .org 0x10000 |
19 | startup:basr %r13,0 # get base | 19 | startup:basr %r13,0 # get base |
20 | .LPG0: l %r13,0f-.LPG0(%r13) | ||
21 | b 0(%r13) | ||
22 | 0: .long startup_continue | ||
23 | |||
24 | # | ||
25 | # params at 10400 (setup.h) | ||
26 | # | ||
27 | .org PARMAREA | ||
28 | .quad 0 # IPL_DEVICE | ||
29 | .quad RAMDISK_ORIGIN # INITRD_START | ||
30 | .quad RAMDISK_SIZE # INITRD_SIZE | ||
31 | |||
32 | .org COMMAND_LINE | ||
33 | .byte "root=/dev/ram0 ro" | ||
34 | .byte 0 | ||
35 | |||
36 | .org 0x11000 | ||
37 | |||
38 | startup_continue: | ||
39 | basr %r13,0 # get base | ||
20 | .LPG1: sll %r13,1 # remove high order bit | 40 | .LPG1: sll %r13,1 # remove high order bit |
21 | srl %r13,1 | 41 | srl %r13,1 |
22 | l %r1,.Lget_ipl_device_addr-.LPG1(%r13) | 42 | GET_IPL_DEVICE |
23 | basr %r14,%r1 | ||
24 | lhi %r1,1 # mode 1 = esame | 43 | lhi %r1,1 # mode 1 = esame |
25 | slr %r0,%r0 # set cpuid to zero | 44 | slr %r0,%r0 # set cpuid to zero |
26 | sigp %r1,%r0,0x12 # switch to esame mode | 45 | sigp %r1,%r0,0x12 # switch to esame mode |
27 | sam64 # switch to 64 bit mode | 46 | sam64 # switch to 64 bit mode |
28 | lctlg %c0,%c15,.Lctl-.LPG1(%r13) # load control registers | 47 | lctlg %c0,%c15,.Lctl-.LPG1(%r13) # load control registers |
29 | larl %r12,_pstart # pointer to parameter area | 48 | lg %r12,.Lparmaddr-.LPG1(%r13)# pointer to parameter area |
30 | # move IPL device to lowcore | 49 | # move IPL device to lowcore |
31 | mvc __LC_IPLDEV(4),IPL_DEVICE+4-PARMAREA(%r12) | 50 | mvc __LC_IPLDEV(4),IPL_DEVICE+4-PARMAREA(%r12) |
32 | 51 | ||
@@ -55,8 +74,8 @@ startup:basr %r13,0 # get base | |||
55 | larl %r1,.Lsclph | 74 | larl %r1,.Lsclph |
56 | stg %r1,__LC_EXT_NEW_PSW+8 # set handler | 75 | stg %r1,__LC_EXT_NEW_PSW+8 # set handler |
57 | 76 | ||
58 | larl %r4,_pstart # %r4 is our index for sccb stuff | 77 | larl %r4,.Lsccb # %r4 is our index for sccb stuff |
59 | la %r1,.Lsccb-PARMAREA(%r4) # our sccb | 78 | lgr %r1,%r4 # our sccb |
60 | .insn rre,0xb2200000,%r2,%r1 # service call | 79 | .insn rre,0xb2200000,%r2,%r1 # service call |
61 | ipm %r1 | 80 | ipm %r1 |
62 | srl %r1,28 # get cc code | 81 | srl %r1,28 # get cc code |
@@ -67,7 +86,7 @@ startup:basr %r13,0 # get base | |||
67 | be .Lservicecall-.LPG1(%r13) | 86 | be .Lservicecall-.LPG1(%r13) |
68 | lpswe .Lwaitsclp-.LPG1(%r13) | 87 | lpswe .Lwaitsclp-.LPG1(%r13) |
69 | .Lsclph: | 88 | .Lsclph: |
70 | lh %r1,.Lsccbr-PARMAREA(%r4) | 89 | lh %r1,.Lsccbr-.Lsccb(%r4) |
71 | chi %r1,0x10 # 0x0010 is the sucess code | 90 | chi %r1,0x10 # 0x0010 is the sucess code |
72 | je .Lprocsccb # let's process the sccb | 91 | je .Lprocsccb # let's process the sccb |
73 | chi %r1,0x1f0 | 92 | chi %r1,0x1f0 |
@@ -78,15 +97,15 @@ startup:basr %r13,0 # get base | |||
78 | b .Lservicecall-.LPG1(%r13) | 97 | b .Lservicecall-.LPG1(%r13) |
79 | .Lprocsccb: | 98 | .Lprocsccb: |
80 | lghi %r1,0 | 99 | lghi %r1,0 |
81 | icm %r1,3,.Lscpincr1-PARMAREA(%r4) # use this one if != 0 | 100 | icm %r1,3,.Lscpincr1-.Lsccb(%r4) # use this one if != 0 |
82 | jnz .Lscnd | 101 | jnz .Lscnd |
83 | lg %r1,.Lscpincr2-PARMAREA(%r4) # otherwise use this one | 102 | lg %r1,.Lscpincr2-.Lsccb(%r4) # otherwise use this one |
84 | .Lscnd: | 103 | .Lscnd: |
85 | xr %r3,%r3 # same logic | 104 | xr %r3,%r3 # same logic |
86 | ic %r3,.Lscpa1-PARMAREA(%r4) | 105 | ic %r3,.Lscpa1-.Lsccb(%r4) |
87 | chi %r3,0x00 | 106 | chi %r3,0x00 |
88 | jne .Lcompmem | 107 | jne .Lcompmem |
89 | l %r3,.Lscpa2-PARMAREA(%r13) | 108 | l %r3,.Lscpa2-.Lsccb(%r4) |
90 | .Lcompmem: | 109 | .Lcompmem: |
91 | mlgr %r2,%r1 # mem in MB on 128-bit | 110 | mlgr %r2,%r1 # mem in MB on 128-bit |
92 | l %r1,.Lonemb-.LPG1(%r13) | 111 | l %r1,.Lonemb-.LPG1(%r13) |
@@ -94,8 +113,6 @@ startup:basr %r13,0 # get base | |||
94 | b .Lfchunk-.LPG1(%r13) | 113 | b .Lfchunk-.LPG1(%r13) |
95 | 114 | ||
96 | .align 4 | 115 | .align 4 |
97 | .Lget_ipl_device_addr: | ||
98 | .long .Lget_ipl_device | ||
99 | .Lpmask: | 116 | .Lpmask: |
100 | .byte 0 | 117 | .byte 0 |
101 | .align 8 | 118 | .align 8 |
@@ -242,29 +259,16 @@ startup:basr %r13,0 # get base | |||
242 | .quad 0 # cr13: home space segment table | 259 | .quad 0 # cr13: home space segment table |
243 | .quad 0xc0000000 # cr14: machine check handling off | 260 | .quad 0xc0000000 # cr14: machine check handling off |
244 | .quad 0 # cr15: linkage stack operations | 261 | .quad 0 # cr15: linkage stack operations |
262 | .Lduct: .long 0,0,0,0,0,0,0,0 | ||
263 | .long 0,0,0,0,0,0,0,0 | ||
245 | .Lpcmsk:.quad 0x0000000180000000 | 264 | .Lpcmsk:.quad 0x0000000180000000 |
246 | .L4malign:.quad 0xffffffffffc00000 | 265 | .L4malign:.quad 0xffffffffffc00000 |
247 | .Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8 | 266 | .Lscan2g:.quad 0x80000000 + 0x20000 - 8 # 2GB + 128K - 8 |
248 | .Lnop: .long 0x07000700 | 267 | .Lnop: .long 0x07000700 |
268 | .Lparmaddr: | ||
269 | .quad PARMAREA | ||
249 | 270 | ||
250 | .org PARMAREA-64 | 271 | .align 4096 |
251 | .Lduct: .long 0,0,0,0,0,0,0,0 | ||
252 | .long 0,0,0,0,0,0,0,0 | ||
253 | |||
254 | # | ||
255 | # params at 10400 (setup.h) | ||
256 | # | ||
257 | .org PARMAREA | ||
258 | .global _pstart | ||
259 | _pstart: | ||
260 | .quad 0 # IPL_DEVICE | ||
261 | .quad RAMDISK_ORIGIN # INITRD_START | ||
262 | .quad RAMDISK_SIZE # INITRD_SIZE | ||
263 | |||
264 | .org COMMAND_LINE | ||
265 | .byte "root=/dev/ram0 ro" | ||
266 | .byte 0 | ||
267 | .org 0x11000 | ||
268 | .Lsccb: | 272 | .Lsccb: |
269 | .hword 0x1000 # length, one page | 273 | .hword 0x1000 # length, one page |
270 | .byte 0x00,0x00,0x00 | 274 | .byte 0x00,0x00,0x00 |
@@ -281,18 +285,14 @@ _pstart: | |||
281 | .Lscpincr2: | 285 | .Lscpincr2: |
282 | .quad 0x00 | 286 | .quad 0x00 |
283 | .fill 3984,1,0 | 287 | .fill 3984,1,0 |
284 | .org 0x12000 | 288 | .align 4096 |
285 | .global _pend | ||
286 | _pend: | ||
287 | |||
288 | GET_IPL_DEVICE | ||
289 | 289 | ||
290 | #ifdef CONFIG_SHARED_KERNEL | 290 | #ifdef CONFIG_SHARED_KERNEL |
291 | .org 0x100000 | 291 | .org 0x100000 |
292 | #endif | 292 | #endif |
293 | 293 | ||
294 | # | 294 | # |
295 | # startup-code, running in virtual mode | 295 | # startup-code, running in absolute addressing mode |
296 | # | 296 | # |
297 | .globl _stext | 297 | .globl _stext |
298 | _stext: basr %r13,0 # get base | 298 | _stext: basr %r13,0 # get base |
@@ -326,4 +326,3 @@ _stext: basr %r13,0 # get base | |||
326 | .align 8 | 326 | .align 8 |
327 | .Ldw: .quad 0x0002000180000000,0x0000000000000000 | 327 | .Ldw: .quad 0x0002000180000000,0x0000000000000000 |
328 | .Laregs: .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 | 328 | .Laregs: .long 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 |
329 | |||
diff --git a/arch/s390/kernel/s390_ksyms.c b/arch/s390/kernel/s390_ksyms.c index 4176c77670c4..0886e739d122 100644 --- a/arch/s390/kernel/s390_ksyms.c +++ b/arch/s390/kernel/s390_ksyms.c | |||
@@ -46,8 +46,6 @@ EXPORT_SYMBOL(__down_interruptible); | |||
46 | */ | 46 | */ |
47 | extern int dump_fpu (struct pt_regs * regs, s390_fp_regs *fpregs); | 47 | extern int dump_fpu (struct pt_regs * regs, s390_fp_regs *fpregs); |
48 | EXPORT_SYMBOL(dump_fpu); | 48 | EXPORT_SYMBOL(dump_fpu); |
49 | EXPORT_SYMBOL(overflowuid); | ||
50 | EXPORT_SYMBOL(overflowgid); | ||
51 | EXPORT_SYMBOL(empty_zero_page); | 49 | EXPORT_SYMBOL(empty_zero_page); |
52 | 50 | ||
53 | /* | 51 | /* |
diff --git a/arch/s390/kernel/setup.c b/arch/s390/kernel/setup.c index b282034452a4..2b2551e3510b 100644 --- a/arch/s390/kernel/setup.c +++ b/arch/s390/kernel/setup.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/seq_file.h> | 37 | #include <linux/seq_file.h> |
38 | #include <linux/kernel_stat.h> | 38 | #include <linux/kernel_stat.h> |
39 | #include <linux/device.h> | 39 | #include <linux/device.h> |
40 | #include <linux/notifier.h> | ||
40 | 41 | ||
41 | #include <asm/uaccess.h> | 42 | #include <asm/uaccess.h> |
42 | #include <asm/system.h> | 43 | #include <asm/system.h> |
@@ -115,6 +116,7 @@ void __devinit cpu_init (void) | |||
115 | */ | 116 | */ |
116 | char vmhalt_cmd[128] = ""; | 117 | char vmhalt_cmd[128] = ""; |
117 | char vmpoff_cmd[128] = ""; | 118 | char vmpoff_cmd[128] = ""; |
119 | char vmpanic_cmd[128] = ""; | ||
118 | 120 | ||
119 | static inline void strncpy_skip_quote(char *dst, char *src, int n) | 121 | static inline void strncpy_skip_quote(char *dst, char *src, int n) |
120 | { | 122 | { |
@@ -146,6 +148,38 @@ static int __init vmpoff_setup(char *str) | |||
146 | 148 | ||
147 | __setup("vmpoff=", vmpoff_setup); | 149 | __setup("vmpoff=", vmpoff_setup); |
148 | 150 | ||
151 | static int vmpanic_notify(struct notifier_block *self, unsigned long event, | ||
152 | void *data) | ||
153 | { | ||
154 | if (MACHINE_IS_VM && strlen(vmpanic_cmd) > 0) | ||
155 | cpcmd(vmpanic_cmd, NULL, 0, NULL); | ||
156 | |||
157 | return NOTIFY_OK; | ||
158 | } | ||
159 | |||
160 | #define PANIC_PRI_VMPANIC 0 | ||
161 | |||
162 | static struct notifier_block vmpanic_nb = { | ||
163 | .notifier_call = vmpanic_notify, | ||
164 | .priority = PANIC_PRI_VMPANIC | ||
165 | }; | ||
166 | |||
167 | static int __init vmpanic_setup(char *str) | ||
168 | { | ||
169 | static int register_done __initdata = 0; | ||
170 | |||
171 | strncpy_skip_quote(vmpanic_cmd, str, 127); | ||
172 | vmpanic_cmd[127] = 0; | ||
173 | if (!register_done) { | ||
174 | register_done = 1; | ||
175 | atomic_notifier_chain_register(&panic_notifier_list, | ||
176 | &vmpanic_nb); | ||
177 | } | ||
178 | return 1; | ||
179 | } | ||
180 | |||
181 | __setup("vmpanic=", vmpanic_setup); | ||
182 | |||
149 | /* | 183 | /* |
150 | * condev= and conmode= setup parameter. | 184 | * condev= and conmode= setup parameter. |
151 | */ | 185 | */ |
@@ -289,19 +323,34 @@ void (*_machine_power_off)(void) = do_machine_power_off_nonsmp; | |||
289 | 323 | ||
290 | void machine_restart(char *command) | 324 | void machine_restart(char *command) |
291 | { | 325 | { |
292 | console_unblank(); | 326 | if (!in_interrupt() || oops_in_progress) |
327 | /* | ||
328 | * Only unblank the console if we are called in enabled | ||
329 | * context or a bust_spinlocks cleared the way for us. | ||
330 | */ | ||
331 | console_unblank(); | ||
293 | _machine_restart(command); | 332 | _machine_restart(command); |
294 | } | 333 | } |
295 | 334 | ||
296 | void machine_halt(void) | 335 | void machine_halt(void) |
297 | { | 336 | { |
298 | console_unblank(); | 337 | if (!in_interrupt() || oops_in_progress) |
338 | /* | ||
339 | * Only unblank the console if we are called in enabled | ||
340 | * context or a bust_spinlocks cleared the way for us. | ||
341 | */ | ||
342 | console_unblank(); | ||
299 | _machine_halt(); | 343 | _machine_halt(); |
300 | } | 344 | } |
301 | 345 | ||
302 | void machine_power_off(void) | 346 | void machine_power_off(void) |
303 | { | 347 | { |
304 | console_unblank(); | 348 | if (!in_interrupt() || oops_in_progress) |
349 | /* | ||
350 | * Only unblank the console if we are called in enabled | ||
351 | * context or a bust_spinlocks cleared the way for us. | ||
352 | */ | ||
353 | console_unblank(); | ||
305 | _machine_power_off(); | 354 | _machine_power_off(); |
306 | } | 355 | } |
307 | 356 | ||
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index a46793beeddd..b7630436f693 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c | |||
@@ -150,13 +150,11 @@ void show_stack(struct task_struct *task, unsigned long *sp) | |||
150 | unsigned long *stack; | 150 | unsigned long *stack; |
151 | int i; | 151 | int i; |
152 | 152 | ||
153 | // debugging aid: "show_stack(NULL);" prints the | ||
154 | // back trace for this cpu. | ||
155 | |||
156 | if (!sp) | 153 | if (!sp) |
157 | sp = task ? (unsigned long *) task->thread.ksp : __r15; | 154 | stack = task ? (unsigned long *) task->thread.ksp : __r15; |
155 | else | ||
156 | stack = sp; | ||
158 | 157 | ||
159 | stack = sp; | ||
160 | for (i = 0; i < kstack_depth_to_print; i++) { | 158 | for (i = 0; i < kstack_depth_to_print; i++) { |
161 | if (((addr_t) stack & (THREAD_SIZE-1)) == 0) | 159 | if (((addr_t) stack & (THREAD_SIZE-1)) == 0) |
162 | break; | 160 | break; |