All of lore.kernel.org
 help / color / mirror / Atom feed
diff for duplicates of <20100331182518.GA30522@debian>

diff --git a/a/1.txt b/N1/1.txt
index 57da1c6..87eecf9 100644
--- a/a/1.txt
+++ b/N1/1.txt
@@ -3,3 +3,70 @@ On Tue, Mar 16, 2010 at 10:23:54AM +0000, Catalin Marinas wrote:
 > would be something like this:
 
 New patch below:
+
+>From bf828a0c069b1bb3f6bf4e68f1dceecab396c286 Mon Sep 17 00:00:00 2001
+From: Rabin Vincent <rabin@rab.in>
+Date: Sun, 14 Feb 2010 01:18:34 +0530
+Subject: [PATCH 06/10] ARM: ftrace: add Thumb-2 support
+
+Fix the mcount routines to build and run on a kernel built with the
+Thumb-2 instruction set by correcting the following errors using the
+fixes suggested by Catalin Marinas:
+
+ - Problem: The following assembler errors appear at the "adr r0,
+   ftrace_stub" instruction:
+
+   entry-common.S: Assembler messages:
+   entry-common.S:179: Error: invalid immediate for address calculation (value = 0x00000004)
+
+   Fix: The errors don't occur with a non-global symbol, so use one.
+
+ - Problem: The "mov lr, pc" does not set the lsb when storing the pc in
+   lr.  The called function returns with "bx lr", and the mode changes
+   to ARM.
+
+   Fix: Add a label on the return address and use "adr lr, BSYM(label)".
+
+We don't modify the old mcount because it won't be built when using
+Thumb-2.
+
+Cc: Catalin Marinas <catalin.marinas@arm.com>
+Signed-off-by: Rabin Vincent <rabin@rab.in>
+---
+ arch/arm/kernel/entry-common.S |    6 ++++--
+ 1 files changed, 4 insertions(+), 2 deletions(-)
+
+diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
+index c7a8c20..f5e75de 100644
+--- a/arch/arm/kernel/entry-common.S
++++ b/arch/arm/kernel/entry-common.S
+@@ -167,7 +167,7 @@ ENTRY(__gnu_mcount_nc)
+ 	stmdb	sp!, {r0-r3, lr}
+ 	ldr	r0, =ftrace_trace_function
+ 	ldr	r2, [r0]
+-	adr	r0, ftrace_stub
++	adr	r0, .Lftrace_stub
+ 	cmp	r0, r2
+ 	bne	gnu_trace
+ 	ldmia	sp!, {r0-r3, ip, lr}
+@@ -177,8 +177,9 @@ gnu_trace:
+ 	ldr	r1, [sp, #20]			@ lr of instrumented routine
+ 	mov	r0, lr
+ 	sub	r0, r0, #MCOUNT_INSN_SIZE
+-	mov	lr, pc
++	adr	lr, BSYM(1f)
+ 	mov	pc, r2
++1:
+ 	ldmia	sp!, {r0-r3, ip, lr}
+ 	mov	pc, ip
+ ENDPROC(__gnu_mcount_nc)
+@@ -213,6 +214,7 @@ ENDPROC(mcount)
+ #endif /* CONFIG_DYNAMIC_FTRACE */
+ 
+ ENTRY(ftrace_stub)
++.Lftrace_stub:
+ 	mov	pc, lr
+ ENDPROC(ftrace_stub)
+ 
+-- 
+1.7.0
diff --git a/a/content_digest b/N1/content_digest
index 1e51aad..7344728 100644
--- a/a/content_digest
+++ b/N1/content_digest
@@ -1,16 +1,90 @@
  "ref\01268462987-8271-1-git-send-email-rabin@rab.in\0"
  "ref\01268462987-8271-7-git-send-email-rabin@rab.in\0"
  "ref\0tnxsk80r2dh.fsf@e102109-lin.cambridge.arm.com\0"
- "From\0rabin@rab.in (Rabin Vincent)\0"
- "Subject\0[PATCH 06/10] ARM: ftrace: add Thumb-2 support\0"
+ "From\0Rabin Vincent <rabin@rab.in>\0"
+ "Subject\0Re: [PATCH 06/10] ARM: ftrace: add Thumb-2 support\0"
  "Date\0Wed, 31 Mar 2010 23:55:18 +0530\0"
- "To\0linux-arm-kernel@lists.infradead.org\0"
+ "To\0Catalin Marinas <catalin.marinas@arm.com>\0"
+ "Cc\0linux-kernel@vger.kernel.org"
+  Abhishek Sagar <sagar.abhishek@gmail.com>
+ " Uwe Kleine-K\303\266nig <u.kleine-koenig@pengutronix.de>"
+  Steven Rostedt <rostedt@goodmis.org>
+  Ingo Molnar <mingo@redhat.com>
+  Frederic Weisbecker <fweisbec@gmail.com>
+ " linux-arm-kernel@lists.infradead.org\0"
  "\00:1\0"
  "b\0"
  "On Tue, Mar 16, 2010 at 10:23:54AM +0000, Catalin Marinas wrote:\n"
  "> If the ftrace_stub isn't .globl, the code compiles fine. My approach\n"
  "> would be something like this:\n"
  "\n"
- New patch below:
+ "New patch below:\n"
+ "\n"
+ ">From bf828a0c069b1bb3f6bf4e68f1dceecab396c286 Mon Sep 17 00:00:00 2001\n"
+ "From: Rabin Vincent <rabin@rab.in>\n"
+ "Date: Sun, 14 Feb 2010 01:18:34 +0530\n"
+ "Subject: [PATCH 06/10] ARM: ftrace: add Thumb-2 support\n"
+ "\n"
+ "Fix the mcount routines to build and run on a kernel built with the\n"
+ "Thumb-2 instruction set by correcting the following errors using the\n"
+ "fixes suggested by Catalin Marinas:\n"
+ "\n"
+ " - Problem: The following assembler errors appear at the \"adr r0,\n"
+ "   ftrace_stub\" instruction:\n"
+ "\n"
+ "   entry-common.S: Assembler messages:\n"
+ "   entry-common.S:179: Error: invalid immediate for address calculation (value = 0x00000004)\n"
+ "\n"
+ "   Fix: The errors don't occur with a non-global symbol, so use one.\n"
+ "\n"
+ " - Problem: The \"mov lr, pc\" does not set the lsb when storing the pc in\n"
+ "   lr.  The called function returns with \"bx lr\", and the mode changes\n"
+ "   to ARM.\n"
+ "\n"
+ "   Fix: Add a label on the return address and use \"adr lr, BSYM(label)\".\n"
+ "\n"
+ "We don't modify the old mcount because it won't be built when using\n"
+ "Thumb-2.\n"
+ "\n"
+ "Cc: Catalin Marinas <catalin.marinas@arm.com>\n"
+ "Signed-off-by: Rabin Vincent <rabin@rab.in>\n"
+ "---\n"
+ " arch/arm/kernel/entry-common.S |    6 ++++--\n"
+ " 1 files changed, 4 insertions(+), 2 deletions(-)\n"
+ "\n"
+ "diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S\n"
+ "index c7a8c20..f5e75de 100644\n"
+ "--- a/arch/arm/kernel/entry-common.S\n"
+ "+++ b/arch/arm/kernel/entry-common.S\n"
+ "@@ -167,7 +167,7 @@ ENTRY(__gnu_mcount_nc)\n"
+ " \tstmdb\tsp!, {r0-r3, lr}\n"
+ " \tldr\tr0, =ftrace_trace_function\n"
+ " \tldr\tr2, [r0]\n"
+ "-\tadr\tr0, ftrace_stub\n"
+ "+\tadr\tr0, .Lftrace_stub\n"
+ " \tcmp\tr0, r2\n"
+ " \tbne\tgnu_trace\n"
+ " \tldmia\tsp!, {r0-r3, ip, lr}\n"
+ "@@ -177,8 +177,9 @@ gnu_trace:\n"
+ " \tldr\tr1, [sp, #20]\t\t\t@ lr of instrumented routine\n"
+ " \tmov\tr0, lr\n"
+ " \tsub\tr0, r0, #MCOUNT_INSN_SIZE\n"
+ "-\tmov\tlr, pc\n"
+ "+\tadr\tlr, BSYM(1f)\n"
+ " \tmov\tpc, r2\n"
+ "+1:\n"
+ " \tldmia\tsp!, {r0-r3, ip, lr}\n"
+ " \tmov\tpc, ip\n"
+ " ENDPROC(__gnu_mcount_nc)\n"
+ "@@ -213,6 +214,7 @@ ENDPROC(mcount)\n"
+ " #endif /* CONFIG_DYNAMIC_FTRACE */\n"
+ " \n"
+ " ENTRY(ftrace_stub)\n"
+ "+.Lftrace_stub:\n"
+ " \tmov\tpc, lr\n"
+ " ENDPROC(ftrace_stub)\n"
+ " \n"
+ "-- \n"
+ 1.7.0
 
-48981db7a38cf02d0fedc0d195b3f73d68723cd0d357c24840570781a294d7a3
+218ac9879f0f11572b4b4b76328a1387c8a6ca63cd8d38add7a1f064cc605bc3

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.