Re: ftrace introduces instability into kernel 2.6.27(-rc2,-rc3)

From: Steven Rostedt
Date: Mon Aug 18 2008 - 14:47:59 EST



On Mon, 18 Aug 2008, Scott Wood wrote:

> Mathieu Desnoyers wrote:
> > asm volatile (
> > "1: lwz %1, 0(%2)\n"
> > " cmpw %1, %5\n"
> > " bne 2f\n"
> > " stwu %3, 0(%2)\n"
> > "2:\n"
> > ".section .fixup, \"ax\"\n"
> > "3: li %0, 1\n"
> > " b 2b\n"
> > ".previous\n"
> > ".section __ex_table,\"a\"\n"
> > _ASM_ALIGN "\n"
> > _ASM_PTR "1b, 3b\n"
> > ".previous"
> > : "=r"(faulted), "=r"(replaced)
> > : "r"(ip), "r"(new),
> > "0"(faulted), "r"(old)
> > : "memory");
>
> Some (most likely unrelated) nits in the above inline asm:
>
> Should use a "b" constraint for %2, or you could get r0. Or, use an "m"
> constraint with %U2%X2 after the lwz/stw.

What syntax to do that with?

lwz %1,0(%U2)
stu %3, 0(%X2)

I'm new to those. (and the above does not compile)

> Why stwu with an offset of zero,

How else to do it? stwu %3, (%2) does not compile for me.

-- Steve

--
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/