From fa14fbe77a8c3a8f554efb5cc1496404381ab2e8 Mon Sep 17 00:00:00 2001 From: Paul Mundt Date: Sat, 11 Jul 2009 21:06:53 +0900 Subject: [PATCH] --- yaml --- r: 163331 b: refs/heads/master c: e460ab27b6c3ea313762169713086529d5bfb8bc h: refs/heads/master i: 163329: 5033ca82855e8c2c4c3bff2b66e6157c331b6c97 163327: 40cb03442d8cd24476b518974646aee9399ba7c8 v: v3 --- [refs] | 2 +- trunk/arch/sh/lib/mcount.S | 76 ++++++++++++++++++++------------------ 2 files changed, 41 insertions(+), 37 deletions(-) diff --git a/[refs] b/[refs] index c431eeef1d73..1d3b0df50798 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a470b95e99ea77ef1e307ff181e59a4a16caa4f4 +refs/heads/master: e460ab27b6c3ea313762169713086529d5bfb8bc diff --git a/trunk/arch/sh/lib/mcount.S b/trunk/arch/sh/lib/mcount.S index 9e397aafc165..84a57761f17e 100644 --- a/trunk/arch/sh/lib/mcount.S +++ b/trunk/arch/sh/lib/mcount.S @@ -1,7 +1,7 @@ /* * arch/sh/lib/mcount.S * - * Copyright (C) 2008 Paul Mundt + * Copyright (C) 2008, 2009 Paul Mundt * Copyright (C) 2008, 2009 Matt Fleming * * This file is subject to the terms and conditions of the GNU General Public @@ -86,13 +86,18 @@ .type mcount,@function _mcount: mcount: + STACK_CHECK() + +#ifndef CONFIG_FUNCTION_TRACER + rts + nop +#else #ifndef CONFIG_DYNAMIC_FTRACE mov.l .Lfunction_trace_stop, r0 mov.l @r0, r0 tst r0, r0 bf ftrace_stub #endif - STACK_CHECK() MCOUNT_ENTER() @@ -174,8 +179,6 @@ ftrace_caller: tst r0, r0 bf ftrace_stub - STACK_CHECK() - MCOUNT_ENTER() .globl ftrace_call @@ -211,38 +214,6 @@ ftrace_stub: rts nop -#ifdef CONFIG_STACK_DEBUG - .globl stack_panic -stack_panic: - mov.l .Ldump_stack, r0 - jsr @r0 - nop - - mov.l .Lpanic, r0 - jsr @r0 - mov.l .Lpanic_s, r4 - - rts - nop - - .align 2 -.L_ebss: - .long _ebss -.L_init_thread_union: - .long init_thread_union -.Lpanic: - .long panic -.Lpanic_s: - .long .Lpanic_str -.Ldump_stack: - .long dump_stack - - .section .rodata - .align 2 -.Lpanic_str: - .string "Stack error" -#endif /* CONFIG_STACK_DEBUG */ - #ifdef CONFIG_FUNCTION_GRAPH_TRACER .globl ftrace_graph_caller ftrace_graph_caller: @@ -304,3 +275,36 @@ return_to_handler: .Lftrace_return_to_handler: .long ftrace_return_to_handler #endif /* CONFIG_FUNCTION_GRAPH_TRACER */ +#endif /* CONFIG_FUNCTION_TRACER */ + +#ifdef CONFIG_STACK_DEBUG + .globl stack_panic +stack_panic: + mov.l .Ldump_stack, r0 + jsr @r0 + nop + + mov.l .Lpanic, r0 + jsr @r0 + mov.l .Lpanic_s, r4 + + rts + nop + + .align 2 +.L_ebss: + .long _ebss +.L_init_thread_union: + .long init_thread_union +.Lpanic: + .long panic +.Lpanic_s: + .long .Lpanic_str +.Ldump_stack: + .long dump_stack + + .section .rodata + .align 2 +.Lpanic_str: + .string "Stack error" +#endif /* CONFIG_STACK_DEBUG */