Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1342564

Re: [PATCH 09/12] powerpc/ftrace: Use generic ftrace_modify_all_code()

From Balbir Singh <bsingharora@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH 09/12] powerpc/ftrace: Use generic ftrace_modify_all_code()
Date 2016-02-25 02:20 +0100
Message-ID <r5SL0-4FT-9@gated-at.bofh.it> (permalink)
References <r5IBX-5Pl-7@gated-at.bofh.it> <r5ILE-5T6-33@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw



On 25/02/16 01:28, Michael Ellerman wrote:
> From: Torsten Duwe <duwe@lst.de>
>
> Convert powerpc's arch_ftrace_update_code() from its own version to use
> the generic default functionality (without stop_machine -- our
> instructions are properly aligned and the replacements atomic).
>
> With this we gain error checking and the much-needed function_trace_op
> handling.
>
> Signed-off-by: Torsten Duwe <duwe@suse.de>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
> ---
>  arch/powerpc/kernel/ftrace.c | 17 +++++------------
>  1 file changed, 5 insertions(+), 12 deletions(-)
>
> diff --git a/arch/powerpc/kernel/ftrace.c b/arch/powerpc/kernel/ftrace.c
> index c6408a399ac6..56e5bd53c323 100644
> --- a/arch/powerpc/kernel/ftrace.c
> +++ b/arch/powerpc/kernel/ftrace.c
> @@ -527,20 +527,13 @@ void ftrace_replace_code(int enable)
>  	}
>  }
>  
> +/*
> + * Use the default ftrace_modify_all_code, but without
> + * stop_machine().
> + */
>  void arch_ftrace_update_code(int command)
>  {
> -	if (command & FTRACE_UPDATE_CALLS)
> -		ftrace_replace_code(1);
> -	else if (command & FTRACE_DISABLE_CALLS)
> -		ftrace_replace_code(0);
> -
> -	if (command & FTRACE_UPDATE_TRACE_FUNC)
> -		ftrace_update_ftrace_func(ftrace_trace_function);
> -
> -	if (command & FTRACE_START_FUNC_RET)
> -		ftrace_enable_ftrace_graph_caller();
> -	else if (command & FTRACE_STOP_FUNC_RET)
> -		ftrace_disable_ftrace_graph_caller();
> +	ftrace_modify_all_code(command);
>  }
>  
>  int __init ftrace_dyn_arch_init(void)
Reviewed-by: Balbir Singh <bsingharora@gmail.com>

Balbir

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 01/12] powerpc/module: Only try to generate the ftrace_caller() stub once Michael Ellerman <mpe@ellerman.id.au> - 2016-02-24 15:30 +0100
  [PATCH 02/12] powerpc/module: Mark module stubs with a magic value Michael Ellerman <mpe@ellerman.id.au> - 2016-02-24 15:40 +0100
    Re: [PATCH 02/12] powerpc/module: Mark module stubs with a magic  value Balbir Singh <bsingharora@gmail.com> - 2016-02-25 01:10 +0100
      Re: [PATCH 02/12] powerpc/module: Mark module stubs with a magic  value Michael Ellerman <mpe@ellerman.id.au> - 2016-02-25 07:50 +0100
    Re: [PATCH 02/12] powerpc/module: Mark module stubs with a magic  value Torsten Duwe <duwe@lst.de> - 2016-02-25 14:20 +0100
      Re: [PATCH 02/12] powerpc/module: Mark module stubs with a magic  value Michael Ellerman <mpe@ellerman.id.au> - 2016-02-26 11:40 +0100
  [PATCH 06/12] powerpc/module: Rework is_early_mcount_callsite() Michael Ellerman <mpe@ellerman.id.au> - 2016-02-24 15:40 +0100
    Re: [PATCH 06/12] powerpc/module: Rework is_early_mcount_callsite() Balbir Singh <bsingharora@gmail.com> - 2016-02-25 00:40 +0100
      Re: [PATCH 06/12] powerpc/module: Rework is_early_mcount_callsite() Michael Ellerman <mpe@ellerman.id.au> - 2016-02-25 11:30 +0100
        Re: [PATCH 06/12] powerpc/module: Rework is_early_mcount_callsite() Torsten Duwe <duwe@lst.de> - 2016-02-25 15:10 +0100
  [PATCH 05/12] powerpc/ftrace: ftrace_graph_caller() needs to save/restore toc Michael Ellerman <mpe@ellerman.id.au> - 2016-02-24 15:40 +0100
    Re: [PATCH 05/12] powerpc/ftrace: ftrace_graph_caller() needs to  save/restore toc Balbir Singh <bsingharora@gmail.com> - 2016-02-25 01:40 +0100
      Re: [PATCH 05/12] powerpc/ftrace: ftrace_graph_caller() needs to  save/restore toc Michael Ellerman <mpe@ellerman.id.au> - 2016-02-25 11:50 +0100
      Re: [PATCH 05/12] powerpc/ftrace: ftrace_graph_caller() needs to  save/restore toc Torsten Duwe <duwe@lst.de> - 2016-02-25 15:10 +0100
  [PATCH 10/12] powerpc/ftrace: FTRACE_WITH_REGS configuration variables Michael Ellerman <mpe@ellerman.id.au> - 2016-02-24 15:40 +0100
    Re: [PATCH 10/12] powerpc/ftrace: FTRACE_WITH_REGS configuration  variables Balbir Singh <bsingharora@gmail.com> - 2016-02-25 02:20 +0100
      Re: [PATCH 10/12] powerpc/ftrace: FTRACE_WITH_REGS configuration  variables Torsten Duwe <duwe@lst.de> - 2016-02-25 15:40 +0100
  [PATCH 07/12] powerpc/ftrace: FTRACE_WITH_REGS implementation for ppc64le Michael Ellerman <mpe@ellerman.id.au> - 2016-02-24 15:40 +0100
    Re: [PATCH 07/12] powerpc/ftrace: FTRACE_WITH_REGS implementation for  ppc64le Balbir Singh <bsingharora@gmail.com> - 2016-02-25 01:50 +0100
      Re: [PATCH 07/12] powerpc/ftrace: FTRACE_WITH_REGS implementation  for ppc64le Torsten Duwe <duwe@lst.de> - 2016-02-25 16:20 +0100
        Re: [PATCH 07/12] powerpc/ftrace: FTRACE_WITH_REGS implementation  for ppc64le Michael Ellerman <mpe@ellerman.id.au> - 2016-02-26 11:20 +0100
  [PATCH 09/12] powerpc/ftrace: Use generic ftrace_modify_all_code() Michael Ellerman <mpe@ellerman.id.au> - 2016-02-24 15:40 +0100
    Re: [PATCH 09/12] powerpc/ftrace: Use generic  ftrace_modify_all_code() Balbir Singh <bsingharora@gmail.com> - 2016-02-25 02:20 +0100
  [PATCH 03/12] powerpc/module: Create a special stub for ftrace_caller() Michael Ellerman <mpe@ellerman.id.au> - 2016-02-24 15:40 +0100
    Re: [PATCH 03/12] powerpc/module: Create a special stub for  ftrace_caller() Balbir Singh <bsingharora@gmail.com> - 2016-02-25 01:10 +0100
      Re: [PATCH 03/12] powerpc/module: Create a special stub for  ftrace_caller() Michael Ellerman <mpe@ellerman.id.au> - 2016-02-25 11:50 +0100
      Re: [PATCH 03/12] powerpc/module: Create a special stub for  ftrace_caller() Torsten Duwe <duwe@lst.de> - 2016-02-25 14:40 +0100
        Re: [PATCH 03/12] powerpc/module: Create a special stub for  ftrace_caller() Michael Ellerman <mpe@ellerman.id.au> - 2016-02-26 11:40 +0100
  Re: [PATCH 01/12] powerpc/module: Only try to generate the  ftrace_caller() stub once Balbir Singh <bsingharora@gmail.com> - 2016-02-25 01:00 +0100
    Re: [PATCH 01/12] powerpc/module: Only try to generate the  ftrace_caller() stub once Balbir Singh <bsingharora@gmail.com> - 2016-02-25 05:40 +0100
  Re: [PATCH 01/12] powerpc/module: Only try to generate the  ftrace_caller() stub once Torsten Duwe <duwe@lst.de> - 2016-02-25 14:10 +0100
  Re: [PATCH 01/12] powerpc/module: Only try to generate the  ftrace_caller() stub once Kamalesh Babulal <kamalesh@linux.vnet.ibm.com> - 2016-02-25 15:40 +0100

csiph-web