Messages in this thread | | | Date | Sat, 4 Sep 2004 14:26:12 -0400 (EDT) | From | Zwane Mwaikambo <> | Subject | Re: [PATCH][8/8] Arch agnostic completely out of line locks / x86_64 |
| |
On Sat, 4 Sep 2004, Andi Kleen wrote:
> On Thu, Sep 02, 2004 at 08:03:02PM -0400, Zwane Mwaikambo wrote: > > arch/x86_64/kernel/time.c | 13 +++++++++++++ > > arch/x86_64/kernel/vmlinux.lds.S | 1 + > > include/asm-x86_64/ptrace.h | 4 ++++ > > 3 files changed, 18 insertions(+) > > > > Andi, i'm not so sure about that return address in profile_pc, i think i > > need to read a bit more. > > When frame pointers are enabled the code is correct. But you don't > even need frame pointers, because the spinlock code should not > spill any registers and in such a function the return address > is always *rsp. Same is true on i386 too.
How about the following?
000001f0 <_spin_lock_irqsave>: 1f0: 55 push %ebp 1f1: 89 e5 mov %esp,%ebp 1f3: 56 push %esi 1f4: 89 c6 mov %eax,%esi 1f6: 53 push %ebx 1f7: 51 push %ecx 1f8: 51 push %ecx 1f9: 9c pushf 1fa: 5b pop %ebx 1fb: fa cli 1fc: b8 00 e0 ff ff mov $0xffffe000,%eax 201: 21 e0 and %esp,%eax 203: 8b 50 14 mov 0x14(%eax),%edx 206: 42 inc %edx
It was a lot easier with the spin stub only out of line (the first round of patches for i386, x86_64) so there i used esp and didn't depend on frame pointers.
Thanks, Zwane
- 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/
| |