diff options
author | Helge Deller <deller@gmx.de> | 2016-05-23 17:23:26 -0400 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2016-05-23 17:44:44 -0400 |
commit | 5fece5ad24ab5b57f51f3f18bc9332545ea8705a (patch) | |
tree | c6151837e09b316402a71c831ee30ab599d38772 | |
parent | 90afe0a98e81f8d2cb1146368d86f67769956e58 (diff) |
parisc: Use long jump to reach ftrace_return_to_handler()
Depending on config options we will need to use a long jump to reach
ftrace_return_to_handler(). Additionally only compile the
parisc_return_to_handler code when CONFIG_FUNCTION_GRAPH_TRACER is set.
Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r-- | arch/parisc/kernel/entry.S | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/arch/parisc/kernel/entry.S b/arch/parisc/kernel/entry.S index 2b2b0df67be5..baa3d9d6e971 100644 --- a/arch/parisc/kernel/entry.S +++ b/arch/parisc/kernel/entry.S | |||
@@ -2019,6 +2019,7 @@ ftrace_stub: | |||
2019 | .procend | 2019 | .procend |
2020 | ENDPROC(mcount) | 2020 | ENDPROC(mcount) |
2021 | 2021 | ||
2022 | #ifdef CONFIG_FUNCTION_GRAPH_TRACER | ||
2022 | .align 8 | 2023 | .align 8 |
2023 | .globl return_to_handler | 2024 | .globl return_to_handler |
2024 | .type return_to_handler, @function | 2025 | .type return_to_handler, @function |
@@ -2040,11 +2041,17 @@ parisc_return_to_handler: | |||
2040 | #endif | 2041 | #endif |
2041 | 2042 | ||
2042 | /* call ftrace_return_to_handler(0) */ | 2043 | /* call ftrace_return_to_handler(0) */ |
2044 | .import ftrace_return_to_handler,code | ||
2045 | load32 ftrace_return_to_handler,%ret0 | ||
2046 | load32 .Lftrace_ret,%r2 | ||
2043 | #ifdef CONFIG_64BIT | 2047 | #ifdef CONFIG_64BIT |
2044 | ldo -16(%sp),%ret1 /* Reference param save area */ | 2048 | ldo -16(%sp),%ret1 /* Reference param save area */ |
2049 | bve (%ret0) | ||
2050 | #else | ||
2051 | bv %r0(%ret0) | ||
2045 | #endif | 2052 | #endif |
2046 | BL ftrace_return_to_handler,%r2 | ||
2047 | ldi 0,%r26 | 2053 | ldi 0,%r26 |
2054 | .Lftrace_ret: | ||
2048 | copy %ret0,%rp | 2055 | copy %ret0,%rp |
2049 | 2056 | ||
2050 | /* restore original return values */ | 2057 | /* restore original return values */ |
@@ -2062,6 +2069,8 @@ parisc_return_to_handler: | |||
2062 | .procend | 2069 | .procend |
2063 | ENDPROC(return_to_handler) | 2070 | ENDPROC(return_to_handler) |
2064 | 2071 | ||
2072 | #endif /* CONFIG_FUNCTION_GRAPH_TRACER */ | ||
2073 | |||
2065 | #endif /* CONFIG_FUNCTION_TRACER */ | 2074 | #endif /* CONFIG_FUNCTION_TRACER */ |
2066 | 2075 | ||
2067 | #ifdef CONFIG_IRQSTACKS | 2076 | #ifdef CONFIG_IRQSTACKS |