Lines Matching +full:0 +full:x00000000 +full:- +full:0 +full:x03ffffff

1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 2007-2008 Steven Rostedt <srostedt@redhat.com>
18 #include <asm/asm-offsets.h>
24 #include <asm-generic/sections.h>
40 #define JAL 0x0c000000 /* jump & link: ip --> ra, jump to target */
41 #define ADDR_MASK 0x03ffffff /* op_code|addr : 31...26|25 ....0 */
42 #define JUMP_RANGE_MASK ((1UL << 28) - 1)
44 #define INSN_NOP 0x00000000 /* nop */
59 buf = (u32 *)&insn_la_mcount[0]; in ftrace_dyn_arch_init_insns()
81 return -EFAULT; in ftrace_modify_code()
85 return 0; in ftrace_modify_code()
96 return -EFAULT; in ftrace_modify_code_2()
101 return -EFAULT; in ftrace_modify_code_2()
103 ip -= 4; in ftrace_modify_code_2()
106 return 0; in ftrace_modify_code_2()
117 return -EFAULT; in ftrace_modify_code_2r()
119 ip -= 4; in ftrace_modify_code_2r()
122 return -EFAULT; in ftrace_modify_code_2r()
126 return 0; in ftrace_modify_code_2r()
136 * jal _mcount --> nop
137 * sub sp, sp, 8 --> nop (CONFIG_32BIT)
143 * lui v1, hi_16bit_of_mcount --> b 1f (0x10000005)
144 * addiu v1, v1, low_16bit_of_mcount --> nop (CONFIG_32BIT)
152 * lui v1, hi_16bit_of_mcount --> b 1f (0x10000004)
153 * addiu v1, v1, low_16bit_of_mcount --> nop (CONFIG_32BIT)
160 #define INSN_B_1F (0x10000000 | MCOUNT_OFFSET_INSNS)
166 unsigned long ip = rec->ip; in ftrace_make_nop()
190 unsigned long ip = rec->ip; in ftrace_make_call()
192 new = core_kernel_text(ip) ? insn_jal_ftrace_caller : insn_la_mcount[0]; in ftrace_make_call()
221 return 0; in ftrace_dyn_arch_init()
247 #define S_RA_SP (0xafbf << 16) /* s{d,w} ra, offset(sp) */
248 #define S_R_SP (0xafb0 << 16) /* s{d,w} R, offset(sp) */
249 #define OFFSET_MASK 0xffff /* stack offset range: 0 ~ PT_SIZE */
263 ip = self_ra - (core_kernel_text(self_ra) ? 16 : 24); in ftrace_get_parent_ra_addr()
266 * search the text until finding the non-store instruction or "s{d,w} in ftrace_get_parent_ra_addr()
274 return 0; in ftrace_get_parent_ra_addr()
276 * If we hit the non-store instruction before finding where the in ftrace_get_parent_ra_addr()
284 ip -= 4; in ftrace_get_parent_ra_addr()
292 return 0; in ftrace_get_parent_ra_addr()
296 return 0; in ftrace_get_parent_ra_addr()
316 if (unlikely(atomic_read(&current->tracing_graph_pause))) in prepare_ftrace_return()
326 * For a non-leaf function, it does save the return address to its own in prepare_ftrace_return()
330 * If gcc >= 4.5, with the new -mmcount-ra-address option, for a in prepare_ftrace_return()
331 * non-leaf function, the location of the return address will be saved in prepare_ftrace_return()
345 * If fails when getting the stack address of the non-leaf function's in prepare_ftrace_return()
363 self_ra -= (MCOUNT_INSN_SIZE * insns); in prepare_ftrace_return()
379 return (unsigned long)sys_call_table[nr - __NR_O32_Linux]; in arch_syscall_addr()
389 return (unsigned long)sysn32_call_table[nr - __NR_N32_Linux]; in arch_syscall_addr()
392 return (unsigned long)sys_call_table[nr - __NR_64_Linux]; in arch_syscall_addr()
395 return (unsigned long)sys32_call_table[nr - __NR_O32_Linux]; in arch_syscall_addr()