X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fi386%2Fkernel%2Ftime.c;h=a9711fc3500eec5f3dea4cd31dd35e15dad494ff;hb=c7b5ebbddf7bcd3651947760f423e3783bbe6573;hp=f8dcf5d687650dc26af16b999d33de5adedf7ab2;hpb=a2c21200f1c81b08cb55e417b68150bba439b646;p=linux-2.6.git diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c index f8dcf5d68..a9711fc35 100644 --- a/arch/i386/kernel/time.c +++ b/arch/i386/kernel/time.c @@ -200,6 +200,18 @@ unsigned long long monotonic_clock(void) } EXPORT_SYMBOL(monotonic_clock); +#if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER) +unsigned long profile_pc(struct pt_regs *regs) +{ + unsigned long pc = instruction_pointer(regs); + + if (in_lock_functions(pc)) + return *(unsigned long *)(regs->ebp + 4); + + return pc; +} +EXPORT_SYMBOL(profile_pc); +#endif /* * timer_interrupt() needs to keep up the real-time clock, @@ -321,11 +333,12 @@ static int time_suspend(struct sys_device *dev, u32 state) static int time_resume(struct sys_device *dev) { + unsigned long flags; unsigned long sec = get_cmos_time() + clock_cmos_diff; - write_seqlock_irq(&xtime_lock); + write_seqlock_irqsave(&xtime_lock, flags); xtime.tv_sec = sec; xtime.tv_nsec = 0; - write_sequnlock_irq(&xtime_lock); + write_sequnlock_irqrestore(&xtime_lock, flags); return 0; }