lkml.org 
[lkml]   [2010]   [Mar]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 01/10] ARM: ftrace: clean up mcount assembly indentation
    Date
    The mcount implementation currently uses a different indentation style
    from the rest of the file (and the rest of the ARM assembly in the
    kernel). Clean it up.

    Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Acked-by: Frederic Weisbecker <fweisbec@gmail.com>
    Signed-off-by: Rabin Vincent <rabin@rab.in>
    ---
    arch/arm/kernel/entry-common.S | 88 ++++++++++++++++++++--------------------
    1 files changed, 44 insertions(+), 44 deletions(-)

    diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
    index 2c1db77..0b042bd 100644
    --- a/arch/arm/kernel/entry-common.S
    +++ b/arch/arm/kernel/entry-common.S
    @@ -94,73 +94,73 @@ ENDPROC(ret_from_fork)
    #ifdef CONFIG_FUNCTION_TRACER
    #ifdef CONFIG_DYNAMIC_FTRACE
    ENTRY(mcount)
    - stmdb sp!, {r0-r3, lr}
    - mov r0, lr
    - sub r0, r0, #MCOUNT_INSN_SIZE
    + stmdb sp!, {r0-r3, lr}
    + mov r0, lr
    + sub r0, r0, #MCOUNT_INSN_SIZE

    .globl mcount_call
    mcount_call:
    - bl ftrace_stub
    - ldr lr, [fp, #-4] @ restore lr
    - ldmia sp!, {r0-r3, pc}
    + bl ftrace_stub
    + ldr lr, [fp, #-4] @ restore lr
    + ldmia sp!, {r0-r3, pc}

    ENTRY(ftrace_caller)
    - stmdb sp!, {r0-r3, lr}
    - ldr r1, [fp, #-4]
    - mov r0, lr
    - sub r0, r0, #MCOUNT_INSN_SIZE
    + stmdb sp!, {r0-r3, lr}
    + ldr r1, [fp, #-4]
    + mov r0, lr
    + sub r0, r0, #MCOUNT_INSN_SIZE

    .globl ftrace_call
    ftrace_call:
    - bl ftrace_stub
    - ldr lr, [fp, #-4] @ restore lr
    - ldmia sp!, {r0-r3, pc}
    + bl ftrace_stub
    + ldr lr, [fp, #-4] @ restore lr
    + ldmia sp!, {r0-r3, pc}

    #else

    ENTRY(__gnu_mcount_nc)
    - stmdb sp!, {r0-r3, lr}
    - ldr r0, =ftrace_trace_function
    - ldr r2, [r0]
    - adr r0, ftrace_stub
    - cmp r0, r2
    - bne gnu_trace
    - ldmia sp!, {r0-r3, ip, lr}
    - mov pc, ip
    + stmdb sp!, {r0-r3, lr}
    + ldr r0, =ftrace_trace_function
    + ldr r2, [r0]
    + adr r0, ftrace_stub
    + cmp r0, r2
    + bne gnu_trace
    + ldmia sp!, {r0-r3, ip, lr}
    + mov pc, ip

    gnu_trace:
    - ldr r1, [sp, #20] @ lr of instrumented routine
    - mov r0, lr
    - sub r0, r0, #MCOUNT_INSN_SIZE
    - mov lr, pc
    - mov pc, r2
    - ldmia sp!, {r0-r3, ip, lr}
    - mov pc, ip
    + ldr r1, [sp, #20] @ lr of instrumented routine
    + mov r0, lr
    + sub r0, r0, #MCOUNT_INSN_SIZE
    + mov lr, pc
    + mov pc, r2
    + ldmia sp!, {r0-r3, ip, lr}
    + mov pc, ip

    ENTRY(mcount)
    - stmdb sp!, {r0-r3, lr}
    - ldr r0, =ftrace_trace_function
    - ldr r2, [r0]
    - adr r0, ftrace_stub
    - cmp r0, r2
    - bne trace
    - ldr lr, [fp, #-4] @ restore lr
    - ldmia sp!, {r0-r3, pc}
    + stmdb sp!, {r0-r3, lr}
    + ldr r0, =ftrace_trace_function
    + ldr r2, [r0]
    + adr r0, ftrace_stub
    + cmp r0, r2
    + bne trace
    + ldr lr, [fp, #-4] @ restore lr
    + ldmia sp!, {r0-r3, pc}

    trace:
    - ldr r1, [fp, #-4] @ lr of instrumented routine
    - mov r0, lr
    - sub r0, r0, #MCOUNT_INSN_SIZE
    - mov lr, pc
    - mov pc, r2
    - ldr lr, [fp, #-4] @ restore lr
    - ldmia sp!, {r0-r3, pc}
    + ldr r1, [fp, #-4] @ lr of instrumented routine
    + mov r0, lr
    + sub r0, r0, #MCOUNT_INSN_SIZE
    + mov lr, pc
    + mov pc, r2
    + ldr lr, [fp, #-4] @ restore lr
    + ldmia sp!, {r0-r3, pc}

    #endif /* CONFIG_DYNAMIC_FTRACE */

    .globl ftrace_stub
    ftrace_stub:
    - mov pc, lr
    + mov pc, lr

    #endif /* CONFIG_FUNCTION_TRACER */

    --
    1.7.0
    --
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2010-03-13 07:59    [W:0.025 / U:150.228 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site