From: Michael Ellerman <patch-notifications@ellerman•id.au>
To: Michael Ellerman <mpe@ellerman•id.au>, <linuxppc-dev@ozlabs•org>
Cc: duwe@lst•de, aneesh.kumar@linux•vnet.ibm.com,
Anton Blanchard <anton@samba•org>
Subject: Re: [1/2] powerpc/ftrace: Separate the heuristics for checking call sites
Date: Fri, 22 Jul 2016 15:50:42 +1000 (AEST) [thread overview]
Message-ID: <3rwfrf4yxkz9srZ@ozlabs.org> (raw)
In-Reply-To: <1468903711-5869-1-git-send-email-mpe@ellerman.id.au>
On Tue, 2016-19-07 at 04:48:30 UTC, Michael Ellerman wrote:
> In __ftrace_make_nop() (the 64-bit version), we have code to deal with
> two ftrace ABIs. There is the original ABI, which looks mostly like a
> function call, and then the mprofile-kernel ABI which is just a branch.
>
> The code tries to handle both cases, by looking for the presence of a
> load to restore the TOC pointer (PPC_INST_LD_TOC). If we detect the TOC
> load, we assume the call site is for an mcount() call using the old ABI.
> That means we patch the mcount() call with a b +8, to branch over the
> TOC load.
>
> However if the kernel was built with mprofile-kernel, then there will
> never be a call site using the original ftrace ABI. If for some reason
> we do see a TOC load, then it's there for a good reason, and we should
> not jump over it.
>
> So split the code, using the existing CC_USING_MPROFILE_KERNEL. Kernels
> built with mprofile-kernel will only look for, and expect, the new ABI,
> and similarly for the original ABI.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman•id.au>
Applied to powerpc next.
https://git.kernel.org/powerpc/c/9d636109511a000882f8dff4ea
cheers
prev parent reply other threads:[~2016-07-22 5:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-07-19 4:48 [PATCH 1/2] powerpc/ftrace: Separate the heuristics for checking call sites Michael Ellerman
2016-07-19 4:48 ` [PATCH 2/2] powerpc/modules: Never restore r2 for a mprofile-kernel style mcount() call Michael Ellerman
2016-07-22 5:50 ` [2/2] " Michael Ellerman
2016-07-19 5:44 ` [PATCH 1/2] powerpc/ftrace: Separate the heuristics for checking call sites Madhavan Srinivasan
2016-07-21 10:36 ` Michael Ellerman
2016-07-22 5:50 ` Michael Ellerman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3rwfrf4yxkz9srZ@ozlabs.org \
--to=patch-notifications@ellerman$(echo .)id.au \
--cc=aneesh.kumar@linux$(echo .)vnet.ibm.com \
--cc=anton@samba$(echo .)org \
--cc=duwe@lst$(echo .)de \
--cc=linuxppc-dev@ozlabs$(echo .)org \
--cc=mpe@ellerman$(echo .)id.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox