diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2007-10-11 16:11:12 -0400 |
---|---|---|
committer | Peter Zijlstra <a.p.zijlstra@chello.nl> | 2007-10-11 16:11:12 -0400 |
commit | 523b44cff279c42c79f7bda709e2fefc30f20a59 (patch) | |
tree | 544c308d3e5e397b5b101968d617185e4cfdb291 /arch/s390/kernel | |
parent | 10cd706d180b62a61aace5b440247c8785026ac1 (diff) |
lockdep: s390: connect the sysexit hook
Run the lockdep_sys_exit hook before returning to user space.
Reviewed-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/s390/kernel')
-rw-r--r-- | arch/s390/kernel/entry.S | 12 | ||||
-rw-r--r-- | arch/s390/kernel/entry64.S | 9 |
2 files changed, 21 insertions, 0 deletions
diff --git a/arch/s390/kernel/entry.S b/arch/s390/kernel/entry.S index f3bceb165321..139ca153d5cc 100644 --- a/arch/s390/kernel/entry.S +++ b/arch/s390/kernel/entry.S | |||
@@ -68,9 +68,15 @@ STACK_SIZE = 1 << STACK_SHIFT | |||
68 | l %r1,BASED(.Ltrace_irq_off) | 68 | l %r1,BASED(.Ltrace_irq_off) |
69 | basr %r14,%r1 | 69 | basr %r14,%r1 |
70 | .endm | 70 | .endm |
71 | |||
72 | .macro LOCKDEP_SYS_EXIT | ||
73 | l %r1,BASED(.Llockdep_sys_exit) | ||
74 | basr %r14,%r1 | ||
75 | .endm | ||
71 | #else | 76 | #else |
72 | #define TRACE_IRQS_ON | 77 | #define TRACE_IRQS_ON |
73 | #define TRACE_IRQS_OFF | 78 | #define TRACE_IRQS_OFF |
79 | #define LOCKDEP_SYS_EXIT | ||
74 | #endif | 80 | #endif |
75 | 81 | ||
76 | /* | 82 | /* |
@@ -260,6 +266,7 @@ sysc_return: | |||
260 | bno BASED(sysc_leave) | 266 | bno BASED(sysc_leave) |
261 | tm __TI_flags+3(%r9),_TIF_WORK_SVC | 267 | tm __TI_flags+3(%r9),_TIF_WORK_SVC |
262 | bnz BASED(sysc_work) # there is work to do (signals etc.) | 268 | bnz BASED(sysc_work) # there is work to do (signals etc.) |
269 | LOCKDEP_SYS_EXIT | ||
263 | sysc_leave: | 270 | sysc_leave: |
264 | RESTORE_ALL __LC_RETURN_PSW,1 | 271 | RESTORE_ALL __LC_RETURN_PSW,1 |
265 | 272 | ||
@@ -283,6 +290,7 @@ sysc_work: | |||
283 | bo BASED(sysc_restart) | 290 | bo BASED(sysc_restart) |
284 | tm __TI_flags+3(%r9),_TIF_SINGLE_STEP | 291 | tm __TI_flags+3(%r9),_TIF_SINGLE_STEP |
285 | bo BASED(sysc_singlestep) | 292 | bo BASED(sysc_singlestep) |
293 | LOCKDEP_SYS_EXIT | ||
286 | b BASED(sysc_leave) | 294 | b BASED(sysc_leave) |
287 | 295 | ||
288 | # | 296 | # |
@@ -572,6 +580,7 @@ io_return: | |||
572 | #endif | 580 | #endif |
573 | tm __TI_flags+3(%r9),_TIF_WORK_INT | 581 | tm __TI_flags+3(%r9),_TIF_WORK_INT |
574 | bnz BASED(io_work) # there is work to do (signals etc.) | 582 | bnz BASED(io_work) # there is work to do (signals etc.) |
583 | LOCKDEP_SYS_EXIT | ||
575 | io_leave: | 584 | io_leave: |
576 | RESTORE_ALL __LC_RETURN_PSW,0 | 585 | RESTORE_ALL __LC_RETURN_PSW,0 |
577 | io_done: | 586 | io_done: |
@@ -618,6 +627,7 @@ io_work_loop: | |||
618 | bo BASED(io_reschedule) | 627 | bo BASED(io_reschedule) |
619 | tm __TI_flags+3(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) | 628 | tm __TI_flags+3(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) |
620 | bnz BASED(io_sigpending) | 629 | bnz BASED(io_sigpending) |
630 | LOCKDEP_SYS_EXIT | ||
621 | b BASED(io_leave) | 631 | b BASED(io_leave) |
622 | 632 | ||
623 | # | 633 | # |
@@ -1040,6 +1050,8 @@ cleanup_io_leave_insn: | |||
1040 | .Ltrace_irq_on: .long trace_hardirqs_on | 1050 | .Ltrace_irq_on: .long trace_hardirqs_on |
1041 | .Ltrace_irq_off: | 1051 | .Ltrace_irq_off: |
1042 | .long trace_hardirqs_off | 1052 | .long trace_hardirqs_off |
1053 | .Llockdep_sys_exit: | ||
1054 | .long lockdep_sys_exit | ||
1043 | #endif | 1055 | #endif |
1044 | .Lcritical_start: | 1056 | .Lcritical_start: |
1045 | .long __critical_start + 0x80000000 | 1057 | .long __critical_start + 0x80000000 |
diff --git a/arch/s390/kernel/entry64.S b/arch/s390/kernel/entry64.S index 9c0d5cc8269d..05e26d1fdf40 100644 --- a/arch/s390/kernel/entry64.S +++ b/arch/s390/kernel/entry64.S | |||
@@ -66,9 +66,14 @@ _TIF_WORK_INT = (_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK | _TIF_NEED_RESCHED | \ | |||
66 | .macro TRACE_IRQS_OFF | 66 | .macro TRACE_IRQS_OFF |
67 | brasl %r14,trace_hardirqs_off | 67 | brasl %r14,trace_hardirqs_off |
68 | .endm | 68 | .endm |
69 | |||
70 | .macro LOCKDEP_SYS_EXIT | ||
71 | brasl %r14,lockdep_sys_exit | ||
72 | .endm | ||
69 | #else | 73 | #else |
70 | #define TRACE_IRQS_ON | 74 | #define TRACE_IRQS_ON |
71 | #define TRACE_IRQS_OFF | 75 | #define TRACE_IRQS_OFF |
76 | #define LOCKDEP_SYS_EXIT | ||
72 | #endif | 77 | #endif |
73 | 78 | ||
74 | .macro STORE_TIMER lc_offset | 79 | .macro STORE_TIMER lc_offset |
@@ -255,6 +260,7 @@ sysc_return: | |||
255 | jno sysc_leave | 260 | jno sysc_leave |
256 | tm __TI_flags+7(%r9),_TIF_WORK_SVC | 261 | tm __TI_flags+7(%r9),_TIF_WORK_SVC |
257 | jnz sysc_work # there is work to do (signals etc.) | 262 | jnz sysc_work # there is work to do (signals etc.) |
263 | LOCKDEP_SYS_EXIT | ||
258 | sysc_leave: | 264 | sysc_leave: |
259 | RESTORE_ALL __LC_RETURN_PSW,1 | 265 | RESTORE_ALL __LC_RETURN_PSW,1 |
260 | 266 | ||
@@ -278,6 +284,7 @@ sysc_work: | |||
278 | jo sysc_restart | 284 | jo sysc_restart |
279 | tm __TI_flags+7(%r9),_TIF_SINGLE_STEP | 285 | tm __TI_flags+7(%r9),_TIF_SINGLE_STEP |
280 | jo sysc_singlestep | 286 | jo sysc_singlestep |
287 | LOCKDEP_SYS_EXIT | ||
281 | j sysc_leave | 288 | j sysc_leave |
282 | 289 | ||
283 | # | 290 | # |
@@ -558,6 +565,7 @@ io_return: | |||
558 | #endif | 565 | #endif |
559 | tm __TI_flags+7(%r9),_TIF_WORK_INT | 566 | tm __TI_flags+7(%r9),_TIF_WORK_INT |
560 | jnz io_work # there is work to do (signals etc.) | 567 | jnz io_work # there is work to do (signals etc.) |
568 | LOCKDEP_SYS_EXIT | ||
561 | io_leave: | 569 | io_leave: |
562 | RESTORE_ALL __LC_RETURN_PSW,0 | 570 | RESTORE_ALL __LC_RETURN_PSW,0 |
563 | io_done: | 571 | io_done: |
@@ -605,6 +613,7 @@ io_work_loop: | |||
605 | jo io_reschedule | 613 | jo io_reschedule |
606 | tm __TI_flags+7(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) | 614 | tm __TI_flags+7(%r9),(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK) |
607 | jnz io_sigpending | 615 | jnz io_sigpending |
616 | LOCKDEP_SYS_EXIT | ||
608 | j io_leave | 617 | j io_leave |
609 | 618 | ||
610 | # | 619 | # |