[PATCH v3 12/15] powerpc: ftrace_enabled helper
Christophe Leroy
christophe.leroy at c-s.fr
Tue Apr 7 15:45:15 AEST 2020
Le 07/04/2020 à 07:16, Nicholas Piggin a écrit :
> Signed-off-by: Nicholas Piggin <npiggin at gmail.com>
Reviewed-by: Christophe Leroy <christophe.leroy at c-s.fr>
> ---
> arch/powerpc/include/asm/ftrace.h | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/arch/powerpc/include/asm/ftrace.h b/arch/powerpc/include/asm/ftrace.h
> index f54a08a2cd70..bc76970b6ee5 100644
> --- a/arch/powerpc/include/asm/ftrace.h
> +++ b/arch/powerpc/include/asm/ftrace.h
> @@ -108,9 +108,23 @@ static inline void this_cpu_enable_ftrace(void)
> {
> get_paca()->ftrace_enabled = 1;
> }
> +
> +/* Disable ftrace on this CPU if possible (may not be implemented) */
> +static inline void this_cpu_set_ftrace_enabled(u8 ftrace_enabled)
> +{
> + get_paca()->ftrace_enabled = ftrace_enabled;
> +}
> +
> +static inline u8 this_cpu_get_ftrace_enabled(void)
> +{
> + return get_paca()->ftrace_enabled;
> +}
> +
> #else /* CONFIG_PPC64 */
> static inline void this_cpu_disable_ftrace(void) { }
> static inline void this_cpu_enable_ftrace(void) { }
> +static inline void this_cpu_set_ftrace_enabled(u8 ftrace_enabled) { }
> +static inline u8 this_cpu_get_ftrace_enabled(void) { return 1; }
> #endif /* CONFIG_PPC64 */
> #endif /* !__ASSEMBLY__ */
>
>
More information about the Linuxppc-dev
mailing list