From: Ralf Baechle <ralf@linux-mips.org>
To: Alan Cooper <alcooperx@gmail.com>
Cc: Petri Gynther <pgynther@google.com>,
linux-mips@linux-mips.org, Steven Rostedt <rostedt@goodmis.org>,
cminyard@mvista.com
Subject: Re: [PATCH] MIPS: Ftrace: Fix dynamic tracing of kernel modules
Date: Thu, 7 Aug 2014 23:25:14 +0200 [thread overview]
Message-ID: <20140807212514.GD29898@linux-mips.org> (raw)
In-Reply-To: <CAOGqxeW8+cdfUuGqy8d6Ewcyy9oC7ZCsdd1p4aX_-zko38BAuA@mail.gmail.com>
On Wed, Aug 06, 2014 at 01:12:06PM -0400, Alan Cooper wrote:
> Actually , there's no reason to write the second NOP when nop'ing the
> mcount call site in a module. This was done to remove the stack adjust
> instruction which only exists at this location for internal kernel
> routines. The following diff seems like a simpler way to solve issue
> #1:
Oh?
$ mips-linux-objdump -d --reloc net/sctp/sctp.ko
[...]
00000000 <sctp_sm_lookup_event>:
0: 27bdffe8 addiu sp,sp,-24
4: afbf0014 sw ra,20(sp)
8: 3c030000 lui v1,0x0
8: R_MIPS_HI16 _mcount
c: 24630000 addiu v1,v1,0
c: R_MIPS_LO16 _mcount
10: 03e00821 move at,ra
14: 27ac0014 addiu t4,sp,20
18: 0060f809 jalr v1
1c: 27bdfff8 addiu sp,sp,-8 <====
[...]
64: 27bd0018 addiu sp,sp,24
68: 03e00008 jr ra
[...]
So the stack adjustment also exists for modules.
Or am I missunderstanding something?
Ralf
next prev parent reply other threads:[~2014-08-07 21:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-24 5:55 [PATCH] MIPS: Ftrace: Fix dynamic tracing of kernel modules Petri Gynther
2014-08-05 16:41 ` Alan Cooper
[not found] ` <CAGXr9JE7v9-hS3irmdgeaEU2iGLZHshEr_N-Do1UAsZhyzMe2g@mail.gmail.com>
2014-08-06 17:12 ` Alan Cooper
2014-08-07 21:25 ` Ralf Baechle [this message]
2014-08-08 4:11 ` Tony Wu
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=20140807212514.GD29898@linux-mips.org \
--to=ralf@linux-mips.org \
--cc=alcooperx@gmail.com \
--cc=cminyard@mvista.com \
--cc=linux-mips@linux-mips.org \
--cc=pgynther@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.