[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <56CE4B2E.7070505@gmail.com>
Date: Thu, 25 Feb 2016 11:30:38 +1100
From: Balbir Singh <bsingharora@...il.com>
To: Michael Ellerman <mpe@...erman.id.au>, linuxppc-dev@...abs.org
Cc: duwe@....de, linux-kernel@...r.kernel.org, rostedt@...dmis.org,
kamalesh@...ux.vnet.ibm.com, pmladek@...e.com, jeyu@...hat.com,
jkosina@...e.cz, live-patching@...r.kernel.org, mbenes@...e.cz
Subject: Re: [PATCH 05/12] powerpc/ftrace: ftrace_graph_caller() needs to
save/restore toc
On 25/02/16 01:28, Michael Ellerman wrote:
> Signed-off-by: Michael Ellerman <mpe@...erman.id.au>
> ---
> arch/powerpc/kernel/entry_64.S | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> Squash.
>
> diff --git a/arch/powerpc/kernel/entry_64.S b/arch/powerpc/kernel/entry_64.S
> index 2a7313cfbc7d..9e77a2c8f218 100644
> --- a/arch/powerpc/kernel/entry_64.S
> +++ b/arch/powerpc/kernel/entry_64.S
> @@ -1237,6 +1237,11 @@ _GLOBAL(ftrace_graph_caller)
> std r5, 64(r1)
> std r4, 56(r1)
> std r3, 48(r1)
> +
> + /* Save callee's TOC in the ABI compliant location */
> + std r2, 24(r1)
R2_STACK_OFFSET for readability?
> + ld r2, PACATOC(r13) /* get kernel TOC in r2 */
> +
> mfctr r4 /* ftrace_caller has moved local addr here */
> std r4, 40(r1)
> mflr r3 /* ftrace_caller has restored LR from stack */
> @@ -1262,6 +1267,9 @@ _GLOBAL(ftrace_graph_caller)
> ld r4, 56(r1)
> ld r3, 48(r1)
>
> + /* Restore callee's TOC */
> + ld r2, 24(r1)
> +
> addi r1, r1, 112
> mflr r0
> std r0, LRSAVE(r1)
Reviewed-by: Balbir Singh <bsingharora@...il.com>
Balbir Singh.
Powered by blists - more mailing lists