aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/entry.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/s390/kernel/entry.S')
-rw-r--r--arch/s390/kernel/entry.S60
1 files changed, 39 insertions, 21 deletions
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index 0476174dfff..02ec8fe7d03 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -9,8 +9,8 @@
9 * Heiko Carstens <heiko.carstens@de.ibm.com> 9 * Heiko Carstens <heiko.carstens@de.ibm.com>
10 */ 10 */
11 11
12#include <linux/linkage.h>
13#include <linux/init.h> 12#include <linux/init.h>
13#include <linux/linkage.h>
14#include <asm/cache.h> 14#include <asm/cache.h>
15#include <asm/errno.h> 15#include <asm/errno.h>
16#include <asm/ptrace.h> 16#include <asm/ptrace.h>
@@ -197,8 +197,7 @@ STACK_SIZE = 1 << STACK_SHIFT
197 * Returns: 197 * Returns:
198 * gpr2 = prev 198 * gpr2 = prev
199 */ 199 */
200 .globl __switch_to 200ENTRY(__switch_to)
201__switch_to:
202 basr %r1,0 201 basr %r1,0
2030: l %r4,__THREAD_info(%r2) # get thread_info of prev 2020: l %r4,__THREAD_info(%r2) # get thread_info of prev
204 l %r5,__THREAD_info(%r3) # get thread_info of next 203 l %r5,__THREAD_info(%r3) # get thread_info of next
@@ -224,8 +223,7 @@ __critical_start:
224 * are executed with interrupts enabled. 223 * are executed with interrupts enabled.
225 */ 224 */
226 225
227 .globl system_call 226ENTRY(system_call)
228system_call:
229 stpt __LC_SYNC_ENTER_TIMER 227 stpt __LC_SYNC_ENTER_TIMER
230sysc_saveall: 228sysc_saveall:
231 SAVE_ALL_SVC __LC_SVC_OLD_PSW,__LC_SAVE_AREA 229 SAVE_ALL_SVC __LC_SVC_OLD_PSW,__LC_SAVE_AREA
@@ -388,8 +386,7 @@ sysc_tracenogo:
388# 386#
389# a new process exits the kernel with ret_from_fork 387# a new process exits the kernel with ret_from_fork
390# 388#
391 .globl ret_from_fork 389ENTRY(ret_from_fork)
392ret_from_fork:
393 l %r13,__LC_SVC_NEW_PSW+4 390 l %r13,__LC_SVC_NEW_PSW+4
394 l %r12,__LC_THREAD_INFO # load pointer to thread_info struct 391 l %r12,__LC_THREAD_INFO # load pointer to thread_info struct
395 tm SP_PSW+1(%r15),0x01 # forking a kernel thread ? 392 tm SP_PSW+1(%r15),0x01 # forking a kernel thread ?
@@ -405,8 +402,7 @@ ret_from_fork:
405# kernel_execve function needs to deal with pt_regs that is not 402# kernel_execve function needs to deal with pt_regs that is not
406# at the usual place 403# at the usual place
407# 404#
408 .globl kernel_execve 405ENTRY(kernel_execve)
409kernel_execve:
410 stm %r12,%r15,48(%r15) 406 stm %r12,%r15,48(%r15)
411 lr %r14,%r15 407 lr %r14,%r15
412 l %r13,__LC_SVC_NEW_PSW+4 408 l %r13,__LC_SVC_NEW_PSW+4
@@ -438,8 +434,7 @@ kernel_execve:
438 * Program check handler routine 434 * Program check handler routine
439 */ 435 */
440 436
441 .globl pgm_check_handler 437ENTRY(pgm_check_handler)
442pgm_check_handler:
443/* 438/*
444 * First we need to check for a special case: 439 * First we need to check for a special case:
445 * Single stepping an instruction that disables the PER event mask will 440 * Single stepping an instruction that disables the PER event mask will
@@ -565,8 +560,7 @@ kernel_per:
565 * IO interrupt handler routine 560 * IO interrupt handler routine
566 */ 561 */
567 562
568 .globl io_int_handler 563ENTRY(io_int_handler)
569io_int_handler:
570 stck __LC_INT_CLOCK 564 stck __LC_INT_CLOCK
571 stpt __LC_ASYNC_ENTER_TIMER 565 stpt __LC_ASYNC_ENTER_TIMER
572 SAVE_ALL_ASYNC __LC_IO_OLD_PSW,__LC_SAVE_AREA+16 566 SAVE_ALL_ASYNC __LC_IO_OLD_PSW,__LC_SAVE_AREA+16
@@ -703,8 +697,7 @@ io_notify_resume:
703 * External interrupt handler routine 697 * External interrupt handler routine
704 */ 698 */
705 699
706 .globl ext_int_handler 700ENTRY(ext_int_handler)
707ext_int_handler:
708 stck __LC_INT_CLOCK 701 stck __LC_INT_CLOCK
709 stpt __LC_ASYNC_ENTER_TIMER 702 stpt __LC_ASYNC_ENTER_TIMER
710 SAVE_ALL_ASYNC __LC_EXT_OLD_PSW,__LC_SAVE_AREA+16 703 SAVE_ALL_ASYNC __LC_EXT_OLD_PSW,__LC_SAVE_AREA+16
@@ -731,8 +724,7 @@ __critical_end:
731 * Machine check handler routines 724 * Machine check handler routines
732 */ 725 */
733 726
734 .globl mcck_int_handler 727ENTRY(mcck_int_handler)
735mcck_int_handler:
736 stck __LC_MCCK_CLOCK 728 stck __LC_MCCK_CLOCK
737 spt __LC_CPU_TIMER_SAVE_AREA # revalidate cpu timer 729 spt __LC_CPU_TIMER_SAVE_AREA # revalidate cpu timer
738 lm %r0,%r15,__LC_GPREGS_SAVE_AREA # revalidate gprs 730 lm %r0,%r15,__LC_GPREGS_SAVE_AREA # revalidate gprs
@@ -818,8 +810,7 @@ mcck_return:
818 */ 810 */
819#ifdef CONFIG_SMP 811#ifdef CONFIG_SMP
820 __CPUINIT 812 __CPUINIT
821 .globl restart_int_handler 813ENTRY(restart_int_handler)
822restart_int_handler:
823 basr %r1,0 814 basr %r1,0
824restart_base: 815restart_base:
825 spt restart_vtime-restart_base(%r1) 816 spt restart_vtime-restart_base(%r1)
@@ -848,8 +839,7 @@ restart_vtime:
848/* 839/*
849 * If we do not run with SMP enabled, let the new CPU crash ... 840 * If we do not run with SMP enabled, let the new CPU crash ...
850 */ 841 */
851 .globl restart_int_handler 842ENTRY(restart_int_handler)
852restart_int_handler:
853 basr %r1,0 843 basr %r1,0
854restart_base: 844restart_base:
855 lpsw restart_crash-restart_base(%r1) 845 lpsw restart_crash-restart_base(%r1)
@@ -859,6 +849,34 @@ restart_crash:
859restart_go: 849restart_go:
860#endif 850#endif
861 851
852#
853# PSW restart interrupt handler
854#
855ENTRY(psw_restart_int_handler)
856 st %r15,__LC_SAVE_AREA_64(%r0) # save r15
857 basr %r15,0
8580: l %r15,.Lrestart_stack-0b(%r15) # load restart stack
859 l %r15,0(%r15)
860 ahi %r15,-SP_SIZE # make room for pt_regs
861 stm %r0,%r14,SP_R0(%r15) # store gprs %r0-%r14 to stack
862 mvc SP_R15(4,%r15),__LC_SAVE_AREA_64(%r0)# store saved %r15 to stack
863 mvc SP_PSW(8,%r15),__LC_RST_OLD_PSW(%r0) # store restart old psw
864 xc __SF_BACKCHAIN(4,%r15),__SF_BACKCHAIN(%r15) # set backchain to 0
865 basr %r14,0
8661: l %r14,.Ldo_restart-1b(%r14)
867 basr %r14,%r14
868
869 basr %r14,0 # load disabled wait PSW if
8702: lpsw restart_psw_crash-2b(%r14) # do_restart returns
871 .align 4
872.Ldo_restart:
873 .long do_restart
874.Lrestart_stack:
875 .long restart_stack
876 .align 8
877restart_psw_crash:
878 .long 0x000a0000,0x00000000 + restart_psw_crash
879
862 .section .kprobes.text, "ax" 880 .section .kprobes.text, "ax"
863 881
864#ifdef CONFIG_CHECK_STACK 882#ifdef CONFIG_CHECK_STACK