[PATCH] ftrace: Make ftrace_regs abstract from direct use

Masami Hiramatsu (Google) mhiramat at kernel.org
Wed Oct 9 09:41:40 AEDT 2024


Hi Steve, 

> diff --git a/include/asm-generic/ftrace.h b/include/asm-generic/ftrace.h
> index 3a23028d69d2..ba7b7d6e55d6 100644
> --- a/include/asm-generic/ftrace.h
> +++ b/include/asm-generic/ftrace.h
> @@ -10,4 +10,17 @@
>   * common definitions are already in linux/ftrace.h.
>   */
>  
> +#ifndef CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS
> +struct __arch_ftrace_regs {
> +	struct pt_regs		regs;
> +};
> +
> +#define arch_ftrace_get_regs(fregs)					\
> +	({ struct __arch_fregs_regs *__f = (struct __arch_ftrace_regs *)(fregs); \
> +		&__f->regs;						\
> +	})
> +
> +struct ftrace_regs;
> +#define arch_ftrace_regs(fregs) ((struct __arch_ftrace_regs *)(fregs))
> +
>  #endif /* __ASM_GENERIC_FTRACE_H__ */

There seems no #endif for CONFIG_HAVE_DYNAMIC_FTRACE_WITH_ARGS.
I wonder how it passed the build. (#ifdef block does not affect over
the file boundary?

Thank you,

-- 
Masami Hiramatsu (Google) <mhiramat at kernel.org>


More information about the Linuxppc-dev mailing list