Re: suspend/resume support for PIT (time.c)

From: Andrew Morton
Date: Sat Jan 10 2004 - 17:47:37 EST


Pavel Machek <pavel@xxxxxx> wrote:
>
> +static int pit_resume(struct sys_device *dev)
> +{
> + write_seqlock_irq(&xtime_lock);
> + xtime.tv_sec = get_cmos_time() + clock_cmos_diff;
> + xtime.tv_nsec = 0;
> + write_sequnlock_irq(&xtime_lock);
> + return 0;
> +}

Have you checked the lock ranking here? get_cmos_time() takes a ton of
locks, especially if EFI is enabled. Do all those rank inside xtime_lock?

It _looks_ right, but perhaps it would be saner to move the get_coms_time()
call outside the lock?


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/