aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ia64/kernel/entry.S
diff options
context:
space:
mode:
Diffstat (limited to 'arch/ia64/kernel/entry.S')
-rw-r--r--arch/ia64/kernel/entry.S51
1 files changed, 51 insertions, 0 deletions
diff --git a/arch/ia64/kernel/entry.S b/arch/ia64/kernel/entry.S
index c2f7d798e2a5..e0be92a6abb0 100644
--- a/arch/ia64/kernel/entry.S
+++ b/arch/ia64/kernel/entry.S
@@ -1406,6 +1406,56 @@ GLOBAL_ENTRY(unw_init_running)
1406END(unw_init_running) 1406END(unw_init_running)
1407 1407
1408#ifdef CONFIG_FUNCTION_TRACER 1408#ifdef CONFIG_FUNCTION_TRACER
1409#ifdef CONFIG_DYNAMIC_FTRACE
1410GLOBAL_ENTRY(_mcount)
1411 br ftrace_stub
1412END(_mcount)
1413
1414.here:
1415 br.ret.sptk.many b0
1416
1417GLOBAL_ENTRY(ftrace_caller)
1418 alloc out0 = ar.pfs, 8, 0, 4, 0
1419 mov out3 = r0
1420 ;;
1421 mov out2 = b0
1422 add r3 = 0x20, r3
1423 mov out1 = r1;
1424 br.call.sptk.many b0 = ftrace_patch_gp
1425 //this might be called from module, so we must patch gp
1426ftrace_patch_gp:
1427 movl gp=__gp
1428 mov b0 = r3
1429 ;;
1430.global ftrace_call;
1431ftrace_call:
1432{
1433 .mlx
1434 nop.m 0x0
1435 movl r3 = .here;;
1436}
1437 alloc loc0 = ar.pfs, 4, 4, 2, 0
1438 ;;
1439 mov loc1 = b0
1440 mov out0 = b0
1441 mov loc2 = r8
1442 mov loc3 = r15
1443 ;;
1444 adds out0 = -MCOUNT_INSN_SIZE, out0
1445 mov out1 = in2
1446 mov b6 = r3
1447
1448 br.call.sptk.many b0 = b6
1449 ;;
1450 mov ar.pfs = loc0
1451 mov b0 = loc1
1452 mov r8 = loc2
1453 mov r15 = loc3
1454 br ftrace_stub
1455 ;;
1456END(ftrace_caller)
1457
1458#else
1409GLOBAL_ENTRY(_mcount) 1459GLOBAL_ENTRY(_mcount)
1410 movl r2 = ftrace_stub 1460 movl r2 = ftrace_stub
1411 movl r3 = ftrace_trace_function;; 1461 movl r3 = ftrace_trace_function;;
@@ -1435,6 +1485,7 @@ GLOBAL_ENTRY(_mcount)
1435 br ftrace_stub 1485 br ftrace_stub
1436 ;; 1486 ;;
1437END(_mcount) 1487END(_mcount)
1488#endif
1438 1489
1439GLOBAL_ENTRY(ftrace_stub) 1490GLOBAL_ENTRY(ftrace_stub)
1440 mov r3 = b0 1491 mov r3 = b0