Tuesday, March 16, 2010

linux.kernel - 25 new messages in 15 topics - digest

linux.kernel
http://groups.google.com/group/linux.kernel?hl=en

linux.kernel@googlegroups.com

Today's topics:

* ARM: ftrace: add Thumb-2 support - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/84ad09701fcec124?hl=en
* Enhance perf to collect KVM guest os statistics from host side - 4 messages,
2 authors
http://groups.google.com/group/linux.kernel/t/728080d27436ebc6?hl=en
* fix callgraphs of 32-bit processes on 64-bit kernels. - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/87700481112722d5?hl=en
* [RF C/T/D] Unmapped page cache control - via boot parameter - 4 messages, 2
authors
http://groups.google.com/group/linux.kernel/t/a394e4b96262b225?hl=en
* 2.6.34-rc1: rcu lockdep bug? - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/20ae452eb2399ce9?hl=en
* Timekeeping: Fix dead lock in update_wall_time by correct shift convertion. -
1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/a763753b30f77dff?hl=en
* Please pull bjdooks' for-linus/samsung-fixes - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/e1c8a6872f54ded7?hl=en
* microblaze: Fix Makefile to delete build generated files - 3 messages, 3
authors
http://groups.google.com/group/linux.kernel/t/87865c3ec0437f54?hl=en
* iio: test for failed allocation - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/58c5a89bb41654ba?hl=en
* trace power_frequency events on the correct cpu (for Intel x86 CPUs) - 1
messages, 1 author
http://groups.google.com/group/linux.kernel/t/b263a83b224def1d?hl=en
* rcu: local_irq_disable() also delimits RCU_SCHED read-site critical sections
- 2 messages, 2 authors
http://groups.google.com/group/linux.kernel/t/f3ccf3e04829a28c?hl=en
* V4L/DVB: mx1-camera: compile fix - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/a97df7cb32a1bed5?hl=en
* sys_umount() returns EBUSY when doing: sh -c "mount /dev/sdc1 /mnt; umount /
mnt" - 1 messages, 1 author
http://groups.google.com/group/linux.kernel/t/8b70d310f6c8b3f6?hl=en
* rcu: Fix holdoff for accelerated GPs for last non-dynticked CPU - 2 messages,
1 author
http://groups.google.com/group/linux.kernel/t/c78d0afc145c64ac?hl=en
* AIO: Fix reference counting in io_cancel and aio_cancel_all - 1 messages, 1
author
http://groups.google.com/group/linux.kernel/t/70ceca4292244b02?hl=en

==============================================================================
TOPIC: ARM: ftrace: add Thumb-2 support
http://groups.google.com/group/linux.kernel/t/84ad09701fcec124?hl=en
==============================================================================

== 1 of 1 ==
Date: Tues, Mar 16 2010 3:30 am
From: Catalin Marinas


Hi Rabin,

Rabin Vincent <rabin@rab.in> wrote:
> Fix the mcount routines to build and run on a kernel built with the
> Thumb-2 instruction set:
>
> - Without the BSYM, the following assembler errors appear:
>
> entry-common.S: Assembler messages:
> entry-common.S:179: Error: invalid immediate for address calculation (value = 0x00000004)

I'm still confused by this. I think that's a compiler problem but need
to get some feedback from toolchain people.

> --- a/arch/arm/kernel/entry-common.S
> +++ b/arch/arm/kernel/entry-common.S
> @@ -167,7 +167,8 @@ ENTRY(__gnu_mcount_nc)
> stmdb sp!, {r0-r3, lr}
> ldr r0, =ftrace_trace_function
> ldr r2, [r0]
> - adr r0, ftrace_stub
> + THUMB( orr r2, r2, #1 )
> + adr r0, BSYM(ftrace_stub)

If the ftrace_stub isn't .globl, the code compiles fine. My approach
would be something like this:

diff --git a/arch/arm/kernel/entry-common.S b/arch/arm/kernel/entry-common.S
index d085033..5f5aef6 100644
--- a/arch/arm/kernel/entry-common.S
+++ b/arch/arm/kernel/entry-common.S
@@ -122,7 +122,7 @@ ENTRY(__gnu_mcount_nc)
stmdb sp!, {r0-r3, lr}
ldr r0, =ftrace_trace_function
ldr r2, [r0]
- adr r0, ftrace_stub
+ adr r0, 1f
cmp r0, r2
bne gnu_trace
ldmia sp!, {r0-r3, ip, lr}
@@ -132,8 +132,9 @@ gnu_trace:
ldr r1, [sp, #20] @ lr of instrumented routine
mov r0, lr
sub r0, r0, #MCOUNT_INSN_SIZE
- mov lr, pc
+ adr lr, BSYM(2f)
mov pc, r2
+2:
ldmia sp!, {r0-r3, ip, lr}
mov pc, ip

@@ -141,7 +142,7 @@ ENTRY(mcount)
stmdb sp!, {r0-r3, lr}
ldr r0, =ftrace_trace_function
ldr r2, [r0]
- adr r0, ftrace_stub
+ adr r0, 1f
cmp r0, r2
bne trace
ldr lr, [fp, #-4] @ restore lr
@@ -160,6 +161,7 @@ trace:

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

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate