]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - arch/sh/lib/mcount.S
sh: Kill off dcache writeback from copy_page().
[mv-sheeva.git] / arch / sh / lib / mcount.S
index bd3ec648beccb79f256ef66af693395de4506dc4..84a57761f17e90ee8cfdfd71dfce2b02480002a4 100644 (file)
@@ -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
        .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
@@ -192,6 +195,10 @@ ftrace_call:
 #endif /* CONFIG_FUNCTION_GRAPH_TRACER */
 #endif /* CONFIG_DYNAMIC_FTRACE */
 
+       .align 2
+.Lfunction_trace_stop:
+       .long   function_trace_stop
+
 /*
  * NOTE: From here on the locations of the .Lftrace_stub label and
  * ftrace_stub itself are fixed. Adding additional data here will skew
@@ -199,7 +206,6 @@ ftrace_call:
  * Place new labels either after the ftrace_stub body, or before
  * ftrace_caller. You have been warned.
  */
-       .align 2
 .Lftrace_stub:
        .long   ftrace_stub
 
@@ -208,40 +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
-.Lfunction_trace_stop:
-       .long   function_trace_stop
-.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:
@@ -303,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 */