Merge tag 'r8169-20060920-00' of git://electric-eye.fr.zoreil.com/home/romieu/linux...
[pandora-kernel.git] / arch / i386 / kernel / time.c
index 316421a..edd00f6 100644 (file)
@@ -135,7 +135,7 @@ unsigned long profile_pc(struct pt_regs *regs)
 {
        unsigned long pc = instruction_pointer(regs);
 
-       if (in_lock_functions(pc))
+       if (!user_mode_vm(regs) && in_lock_functions(pc))
                return *(unsigned long *)(regs->ebp + 4);
 
        return pc;
@@ -206,15 +206,16 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 unsigned long get_cmos_time(void)
 {
        unsigned long retval;
+       unsigned long flags;
 
-       spin_lock(&rtc_lock);
+       spin_lock_irqsave(&rtc_lock, flags);
 
        if (efi_enabled)
                retval = efi_get_time();
        else
                retval = mach_get_cmos_time();
 
-       spin_unlock(&rtc_lock);
+       spin_unlock_irqrestore(&rtc_lock, flags);
 
        return retval;
 }