[PATCH 01/10] ARM: ftrace: clean up mcount assembly indentation

Frederic Weisbecker fweisbec at gmail.com
Mon Feb 22 13:36:48 EST 2010


On Sun, Feb 14, 2010 at 01:18:29AM +0530, Rabin Vincent wrote:
> 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.
> 
> Signed-off-by: Rabin Vincent <rabin at rab.in>
> ---


Acked-by: Frederic Weisbecker <fweisbec at gmail.com>



>  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.6.6
> 




More information about the linux-arm-kernel mailing list