linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Michal Simek <monstr@monstr.eu>, Li Hong <lihong.hi@gmail.com>,
	Wu Zhangjin <wuzhangjin@gmail.com>
Subject: linux-next: manual merge of the mips tree with Linus' tree
Date: Tue, 15 Dec 2009 10:20:46 +1100	[thread overview]
Message-ID: <20091215102046.6fc8faa8.sfr@canb.auug.org.au> (raw)

Hi Ralf,

Today's linux-next merge of the mips tree got a conflict in
scripts/recordmcount.pl between commits
e2d753fac5b3954a3b6001f98479f0435fe7c868 ("tracing: Correct the check for
number of arguments in recordmcount.pl") and
7d241ff0567b9503d79ee775c40927d09b509f83 ("microblaze: ftrace: Add
dynamic trace support") from Linus' tree and commits
84bc2d35f211a83e806711c94f78a227c4810848 ("MIPS: Tracing: Add an endian
argument to scripts/recordmcount.pl") and
b2b11a5cb24b8f234bc4746dc40722b01fa45a43 ("MIPS: Tracing: Add dynamic
function tracer support") from the mips tree.

These conflicts are now between Linus' tree and the mips tree so, Ralf,
you should be able to fix them up by merging with Linus' tree.

I have fixed them up (see below) (for the first pair of commits above, I
used the mips tree version) and can carry the fix for a while.
-- 
Cheers,
Stephen Rothwell                    sfr@canb.auug.org.au

diff --cc scripts/recordmcount.pl
index 9cf0a6f,d016c71..0000000
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@@ -295,9 -245,60 +295,63 @@@ if ($arch eq "x86_64") 
      $ld .= " -m elf64_sparc";
      $cc .= " -m64";
      $objcopy .= " -O elf64-sparc";
 +} elsif ($arch eq "microblaze") {
 +    # Microblaze calls '_mcount' instead of plain 'mcount'.
 +    $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s_mcount\$";
+ 
+ } elsif ($arch eq "mips") {
+     # To enable module support, we need to enable the -mlong-calls option
+     # of gcc for module, after using this option, we can not get the real
+     # offset of the calling to _mcount, but the offset of the lui
+     # instruction or the addiu one. herein, we record the address of the
+     # first one, and then we can replace this instruction by a branch
+     # instruction to jump over the profiling function to filter the
+     # indicated functions, or swith back to the lui instruction to trace
+     # them, which means dynamic tracing.
+     #
+     #       c:	3c030000 	lui	v1,0x0
+     #			c: R_MIPS_HI16	_mcount
+     #			c: R_MIPS_NONE	*ABS*
+     #			c: R_MIPS_NONE	*ABS*
+     #      10:	64630000 	daddiu	v1,v1,0
+     #			10: R_MIPS_LO16	_mcount
+     #			10: R_MIPS_NONE	*ABS*
+     #			10: R_MIPS_NONE	*ABS*
+     #      14:	03e0082d 	move	at,ra
+     #      18:	0060f809 	jalr	v1
+     #
+     # for the kernel:
+     #
+     #     10:   03e0082d        move    at,ra
+     #	  14:   0c000000        jal     0 <loongson_halt>
+     #                    14: R_MIPS_26   _mcount
+     #                    14: R_MIPS_NONE *ABS*
+     #                    14: R_MIPS_NONE *ABS*
+     #	 18:   00020021        nop
+     if ($is_module eq "0") {
+ 	    $mcount_regex = "^\\s*([0-9a-fA-F]+):.*\\s_mcount\$";
+     } else {
+ 	    $mcount_regex = "^\\s*([0-9a-fA-F]+): R_MIPS_HI16\\s+_mcount\$";
+     }
+     $objdump .= " -Melf-trad".$endian."mips ";
+ 
+     if ($endian eq "big") {
+ 	    $endian = " -EB ";
+ 	    $ld .= " -melf".$bits."btsmip";
+     } else {
+ 	    $endian = " -EL ";
+ 	    $ld .= " -melf".$bits."ltsmip";
+     }
+ 
+     $cc .= " -mno-abicalls -fno-pic -mabi=" . $bits . $endian;
+     $ld .= $endian;
+ 
+     if ($bits == 64) {
+ 	    $function_regex =
+ 		"^([0-9a-fA-F]+)\\s+<(.|[^\$]L.*?|\$[^L].*?|[^\$][^L].*?)>:";
+ 	    $type = ".dword";
+     }
+ 
  } else {
      die "Arch $arch is not supported with CONFIG_FTRACE_MCOUNT_RECORD";
  }

             reply	other threads:[~2009-12-14 23:20 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-12-14 23:20 Stephen Rothwell [this message]
2009-12-15  7:26 ` linux-next: manual merge of the mips tree with Linus' tree Michal Simek
2009-12-15 19:27   ` Ralf Baechle
  -- strict thread matches above, loose matches on Subject: below --
2020-05-25  0:05 Stephen Rothwell
2019-09-18 11:33 Mark Brown
2019-08-11 23:19 Stephen Rothwell
2019-08-07  0:25 Stephen Rothwell
2019-08-07  7:42 ` Arnd Bergmann
2019-05-12 23:47 Stephen Rothwell
2018-08-23 22:37 Stephen Rothwell
2017-07-11  0:04 Stephen Rothwell
2017-01-03  0:26 Stephen Rothwell
2016-01-24 22:25 Stephen Rothwell
2016-01-25  7:42 ` Ralf Baechle
2015-10-01  1:13 Stephen Rothwell
2015-02-22  0:22 Stephen Rothwell
2015-02-22  0:15 Stephen Rothwell
2015-02-13  0:11 Stephen Rothwell
2015-02-13 10:28 ` Ralf Baechle
2014-06-03  0:50 Stephen Rothwell
2012-10-04  0:35 Stephen Rothwell
2012-10-01  3:58 Stephen Rothwell
2011-11-07  0:04 Stephen Rothwell
2011-11-07  0:04 Stephen Rothwell
2011-11-07 10:18 ` Ralf Baechle
2009-08-18  8:23 Stephen Rothwell

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=20091215102046.6fc8faa8.sfr@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=lihong.hi@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=monstr@monstr.eu \
    --cc=ralf@linux-mips.org \
    --cc=wuzhangjin@gmail.com \
    /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;
as well as URLs for NNTP newsgroup(s).