Re: [PATCH] dumpstack: x86: various small unification steps

From: Alexander van Heukelum
Date: Sun Oct 05 2008 - 06:42:27 EST


After "dumpstack: x86: various small unification steps", the
assembler gives the following compile error. The error is in
dumpstack_64.c.

{standard input}: Assembler messages:
{standard input}:720: Error: Incorrect register `%rbx' used with `l' suffix
{standard input}:1340: Error: Incorrect register `%r12' used with `l' suffix

Indeed the suffix in get_bp() was wrong.

Signed-off-by: Alexander van Heukelum <heukelum@xxxxxxxxxxx>

---

On Sun, Oct 05, 2008 at 11:46:15AM +0200, Ingo Molnar wrote:
> * Ingo Molnar <mingo@xxxxxxx> wrote:
>
> > great - i've created tip/x86/dumpstack for this and applied your
> > patches there. (that branch embedds tip/x86/core which already embedds
> > tip/x86/traps)
>
> -tip testing found a 64-bit build failure:
>
> {standard input}: Assembler messages:
> {standard input}:720: Error: Incorrect register `%rbx' used with `l' suffix
> {standard input}:1340: Error: Incorrect register `%r12' used with `l' suffix
>
> reproducer config attached.
>
> Ingo

Hi Ingo,

"dumpstack: x86: various small unification steps" contained
another copy/paste/forgot-to-edit bug. I should have gone
to bed instead of rushing the patch set out.

Greetings,
Alexander

diff --git a/arch/x86/kernel/dumpstack_64.c b/arch/x86/kernel/dumpstack_64.c
index 13379a9..086cc81 100644
--- a/arch/x86/kernel/dumpstack_64.c
+++ b/arch/x86/kernel/dumpstack_64.c
@@ -17,7 +17,7 @@
#include <asm/stacktrace.h>

#define STACKSLOTS_PER_LINE 4
-#define get_bp(bp) asm("movl %%rbp, %0" : "=r" (bp) :)
+#define get_bp(bp) asm("movq %%rbp, %0" : "=r" (bp) :)

int panic_on_unrecovered_nmi;
int kstack_depth_to_print = 3 * STACKSLOTS_PER_LINE;
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/