ia64/xen-unstable

changeset 8724:a3fbce644bcc

fix compilation breaking when compiling time.c with FRAME_POINTER on x86_64

Signed-off-by: Vincent Hanquez <vincent@xensource.com>
author cl349@firebug.cl.cam.ac.uk
date Wed Feb 01 13:46:15 2006 +0000 (2006-02-01)
parents 61e7afb7344b
children a12e08eb0209
files linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c	Wed Feb 01 00:56:19 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/i386/kernel/time-xen.c	Wed Feb 01 13:46:15 2006 +0000
     1.3 @@ -541,16 +541,22 @@ unsigned long long sched_clock(void)
     1.4  }
     1.5  
     1.6  #if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER)
     1.7 +#ifdef __x86_64__
     1.8 +#define REG_BP rbp
     1.9 +#else
    1.10 +#define REG_BP ebp
    1.11 +#endif
    1.12  unsigned long profile_pc(struct pt_regs *regs)
    1.13  {
    1.14  	unsigned long pc = instruction_pointer(regs);
    1.15  
    1.16  	if (in_lock_functions(pc))
    1.17 -		return *(unsigned long *)(regs->ebp + 4);
    1.18 +		return *(unsigned long *)(regs->REG_BP + 4);
    1.19  
    1.20  	return pc;
    1.21  }
    1.22  EXPORT_SYMBOL(profile_pc);
    1.23 +#undef REG_BP
    1.24  #endif
    1.25  
    1.26  irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)