diff options
Diffstat (limited to 'arch/sh/kernel/entry-common.S')
-rw-r--r-- | arch/sh/kernel/entry-common.S | 54 |
1 files changed, 7 insertions, 47 deletions
diff --git a/arch/sh/kernel/entry-common.S b/arch/sh/kernel/entry-common.S index 5b7efc4016fa..d62359cfbbe2 100644 --- a/arch/sh/kernel/entry-common.S +++ b/arch/sh/kernel/entry-common.S | |||
@@ -308,15 +308,19 @@ ENTRY(system_call) | |||
308 | mov.l 1f, r9 | 308 | mov.l 1f, r9 |
309 | mov.l @r9, r8 ! Read from TRA (Trap Address) Register | 309 | mov.l @r9, r8 ! Read from TRA (Trap Address) Register |
310 | #endif | 310 | #endif |
311 | |||
312 | mov #OFF_TRA, r10 | ||
313 | add r15, r10 | ||
314 | mov.l r8, @r10 ! set TRA value to tra | ||
315 | |||
311 | /* | 316 | /* |
312 | * Check the trap type | 317 | * Check the trap type |
313 | */ | 318 | */ |
314 | mov #((0x20 << 2) - 1), r9 | 319 | mov #((0x20 << 2) - 1), r9 |
315 | cmp/hi r9, r8 | 320 | cmp/hi r9, r8 |
316 | bt/s debug_trap ! it's a debug trap.. | 321 | bt/s debug_trap ! it's a debug trap.. |
317 | mov #OFF_TRA, r9 | 322 | nop |
318 | add r15, r9 | 323 | |
319 | mov.l r8, @r9 ! set TRA value to tra | ||
320 | #ifdef CONFIG_TRACE_IRQFLAGS | 324 | #ifdef CONFIG_TRACE_IRQFLAGS |
321 | mov.l 5f, r10 | 325 | mov.l 5f, r10 |
322 | jsr @r10 | 326 | jsr @r10 |
@@ -371,47 +375,3 @@ syscall_exit: | |||
371 | #endif | 375 | #endif |
372 | 7: .long do_syscall_trace_enter | 376 | 7: .long do_syscall_trace_enter |
373 | 8: .long do_syscall_trace_leave | 377 | 8: .long do_syscall_trace_leave |
374 | |||
375 | #ifdef CONFIG_FUNCTION_TRACER | ||
376 | .align 2 | ||
377 | .globl _mcount | ||
378 | .type _mcount,@function | ||
379 | .globl mcount | ||
380 | .type mcount,@function | ||
381 | _mcount: | ||
382 | mcount: | ||
383 | mov.l r4, @-r15 | ||
384 | mov.l r5, @-r15 | ||
385 | mov.l r6, @-r15 | ||
386 | mov.l r7, @-r15 | ||
387 | sts.l pr, @-r15 | ||
388 | |||
389 | mov.l @(20,r15),r4 | ||
390 | sts pr, r5 | ||
391 | |||
392 | mov.l 1f, r6 | ||
393 | mov.l ftrace_stub, r7 | ||
394 | cmp/eq r6, r7 | ||
395 | bt skip_trace | ||
396 | |||
397 | mov.l @r6, r6 | ||
398 | jsr @r6 | ||
399 | nop | ||
400 | |||
401 | skip_trace: | ||
402 | |||
403 | lds.l @r15+, pr | ||
404 | mov.l @r15+, r7 | ||
405 | mov.l @r15+, r6 | ||
406 | mov.l @r15+, r5 | ||
407 | rts | ||
408 | mov.l @r15+, r4 | ||
409 | |||
410 | .align 2 | ||
411 | 1: .long ftrace_trace_function | ||
412 | |||
413 | .globl ftrace_stub | ||
414 | ftrace_stub: | ||
415 | rts | ||
416 | nop | ||
417 | #endif /* CONFIG_FUNCTION_TRACER */ | ||