diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2019-05-13 05:28:25 +0200 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2019-07-08 19:04:48 +0200 |
commit | d6d5f19e21d98c0607ff029e4e2e508d4cdd1d5a (patch) | |
tree | 1780d36ac99c16f8ed506948a020017e84a89a9f /arch/xtensa/kernel/mcount.S | |
parent | xtensa: One function call less in bootmem_init() (diff) | |
download | linux-d6d5f19e21d98c0607ff029e4e2e508d4cdd1d5a.tar.xz linux-d6d5f19e21d98c0607ff029e4e2e508d4cdd1d5a.zip |
xtensa: abstract 'entry' and 'retw' in assembly code
Provide abi_entry, abi_entry_default, abi_ret and abi_ret_default macros
that allocate aligned stack frame in windowed and call0 ABIs.
Provide XTENSA_SPILL_STACK_RESERVE macro that specifies required stack
frame size when register spilling is involved.
Replace all uses of 'entry' and 'retw' with the above macros.
This makes most of the xtensa assembly code ready for XEA3 and call0 ABI.
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Diffstat (limited to 'arch/xtensa/kernel/mcount.S')
-rw-r--r-- | arch/xtensa/kernel/mcount.S | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/xtensa/kernel/mcount.S b/arch/xtensa/kernel/mcount.S index 0eeda2e4a25e..5e4619f52858 100644 --- a/arch/xtensa/kernel/mcount.S +++ b/arch/xtensa/kernel/mcount.S @@ -11,6 +11,7 @@ */ #include <linux/linkage.h> +#include <asm/asmmacro.h> #include <asm/ftrace.h> /* @@ -21,13 +22,13 @@ ENTRY(_mcount) - entry a1, 16 + abi_entry_default movi a4, ftrace_trace_function l32i a4, a4, 0 movi a3, ftrace_stub bne a3, a4, 1f - retw + abi_ret_default 1: xor a7, a2, a1 movi a3, 0x3fffffff @@ -40,11 +41,11 @@ ENTRY(_mcount) addi a6, a6, -MCOUNT_INSN_SIZE callx4 a4 - retw + abi_ret_default ENDPROC(_mcount) ENTRY(ftrace_stub) - entry a1, 16 - retw + abi_entry_default + abi_ret_default ENDPROC(ftrace_stub) |