From: Russell King - ARM Linux <linux@armlinux.org.uk>
To: Abel Vesa <abelvesa@gmail.com>
Cc: Nicolai Stange <nicstange@gmail.com>,
Abel Vesa <abelvesa@linux.com>,
robin.murphy@arm.com, jjhiblot@traphandler.com,
Steven Rostedt <rostedt@goodmis.org>,
Ingo Molnar <mingo@redhat.com>,
pmladek@suse.com, mhiramat@kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCHv4] arm: ftrace: Adds support for CONFIG_DYNAMIC_FTRACE_WITH_REGS
Date: Thu, 2 Mar 2017 23:03:32 +0000 [thread overview]
Message-ID: <20170302230332.GN21222@n2100.armlinux.org.uk> (raw)
In-Reply-To: <20170302210124.GA9391@nuc>
On Thu, Mar 02, 2017 at 09:01:24PM +0000, Abel Vesa wrote:
> On Tue, Feb 28, 2017 at 11:54:29AM +0000, Abel Vesa wrote:
> > On Tue, Feb 28, 2017 at 11:46:38AM +0000, Russell King - ARM Linux wrote:
> > > On Tue, Feb 28, 2017 at 11:22:27AM +0000, Abel Vesa wrote:
> > > > On Tue, Feb 28, 2017 at 11:58:49AM +0100, Nicolai Stange wrote:
> > > > > Hi Abel,
> > > > >
> > > > > On Tue, Feb 28 2017, Abel Vesa wrote:
> > > > >
> > > > > > On Mon, Feb 27, 2017 at 04:52:06PM +0100, Nicolai Stange wrote:
> > > > > >> On Fri, Feb 24 2017, Abel Vesa wrote:
> > > > > >> Wouldn't it be better (and more consistent with other archs) to have
> > > > > >>
> > > > > >> pt_regs->ARM_lr = original lr
> > > > > >> pt_refs->ARM_pc = current lr
> > > > > >>
> > > > > >> instead?
> > > > >
> > > > > The stack would look like this then
> > > > >
> > > > > @ ... | ARM_ip | ARM_sp | ARM_lr | ARM_pc | ... |
> > > > > @ 0 4 48 52 56 60 64 68 72
> > > > > @ R0 | R1 | ... | LR | SP + 4 | original LR | original PC | PSR | OLD_R0 | original LR |
> Just to make sure we're on the same page. If we are replacing the LR
> with the original_LR is it worth keeping around the one pushed before
> the ftrace_regs_caller is called?
>
> Another thing, PC needs to be new_LR and then we can restore all
> regs r0 through r15 like this:
>
> ldmia sp, {r0-r15}
That's the intention - the point is to save the state as it was at the
point that the function was entered, not at the point when the ftrace
code was entered. What we don't want is the implementation details of
GCC's mcount or ftrace's adaption of mcount being exposed via ftrace.
--
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.
prev parent reply other threads:[~2017-03-02 23:54 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-24 22:58 Abel Vesa
2017-02-27 15:52 ` Nicolai Stange
2017-02-28 0:56 ` Abel Vesa
2017-02-28 10:58 ` Nicolai Stange
2017-02-28 11:22 ` Abel Vesa
2017-02-28 11:46 ` Russell King - ARM Linux
2017-02-28 11:54 ` Abel Vesa
2017-03-02 21:01 ` Abel Vesa
2017-03-02 23:03 ` Russell King - ARM Linux [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=20170302230332.GN21222@n2100.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=abelvesa@gmail.com \
--cc=abelvesa@linux.com \
--cc=jjhiblot@traphandler.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mhiramat@kernel.org \
--cc=mingo@redhat.com \
--cc=nicstange@gmail.com \
--cc=pmladek@suse.com \
--cc=robin.murphy@arm.com \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
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
all inboxes | Powered by JetHome®