lkml.org 
[lkml]   [2008]   [Aug]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: ftrace introduces instability into kernel 2.6.27(-rc2,-rc3)
    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. Why stwu with an offset of
    zero, BTW?

    %1 also needs to be an early clobber.

    -Scott


    \
     
     \ /
      Last update: 2008-08-18 19:55    [W:0.026 / U:30.540 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site