aboutsummaryrefslogtreecommitdiffstats
path: root/arch/s390/kernel/entry.S
diff options
context:
space:
mode:
authorChristian Borntraeger <borntraeger@de.ibm.com>2009-11-13 09:43:54 -0500
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2009-11-13 09:45:03 -0500
commitbcc6525fb23d2cec7ffdf908d98826a66823bcb2 (patch)
treebf5bc71446c3ad861db386ca68e9221309f6ca8b /arch/s390/kernel/entry.S
parent8b94c1ed4d8232a452aa9db0f5ac9141d942590f (diff)
[S390] s390: fix single stepping on svc0
On s390 there are two ways of specifying the system call number for the svc instruction. The standard way is to use the immediate field in the instruction (or to use EXecute for values unknown during assemble time). This can encode 256 system calls. The kernel ABI also allows to put the system call number in r1 and then execute svc 0 to enable system call numbers > 255. It turns out that single stepping svc 0 is broken, since the PER program check handler uses r1. We have to use a different register. Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'arch/s390/kernel/entry.S')
-rw-r--r--arch/s390/kernel/entry.S8
1 files changed, 4 insertions, 4 deletions
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S
index f43d2ee54464..48215d15762b 100644
--- a/arch/s390/kernel/entry.S
+++ b/arch/s390/kernel/entry.S
@@ -565,10 +565,10 @@ pgm_svcper:
565 lh %r7,0x8a # get svc number from lowcore 565 lh %r7,0x8a # get svc number from lowcore
566 l %r9,__LC_THREAD_INFO # load pointer to thread_info struct 566 l %r9,__LC_THREAD_INFO # load pointer to thread_info struct
567 TRACE_IRQS_OFF 567 TRACE_IRQS_OFF
568 l %r1,__TI_task(%r9) 568 l %r8,__TI_task(%r9)
569 mvc __THREAD_per+__PER_atmid(2,%r1),__LC_PER_ATMID 569 mvc __THREAD_per+__PER_atmid(2,%r8),__LC_PER_ATMID
570 mvc __THREAD_per+__PER_address(4,%r1),__LC_PER_ADDRESS 570 mvc __THREAD_per+__PER_address(4,%r8),__LC_PER_ADDRESS
571 mvc __THREAD_per+__PER_access_id(1,%r1),__LC_PER_ACCESS_ID 571 mvc __THREAD_per+__PER_access_id(1,%r8),__LC_PER_ACCESS_ID
572 oi __TI_flags+3(%r9),_TIF_SINGLE_STEP # set TIF_SINGLE_STEP 572 oi __TI_flags+3(%r9),_TIF_SINGLE_STEP # set TIF_SINGLE_STEP
573 TRACE_IRQS_ON 573 TRACE_IRQS_ON
574 stosm __SF_EMPTY(%r15),0x03 # reenable interrupts 574 stosm __SF_EMPTY(%r15),0x03 # reenable interrupts