Re: [PATCH 02/02] clocksource: Start CMT at clocksource resume

From: Magnus Damm
Date: Mon Nov 30 2009 - 06:19:42 EST


Hi Thomas,

On Sat, Nov 28, 2009 at 11:00 PM, Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
> On Wed, 25 Nov 2009, Magnus Damm wrote:
>
>> From: Magnus Damm <damm@xxxxxxxxxxxxx>
>>
>> Add code to start the CMT timer on clocksource resume.
>>
>> This makes sure the timer is started during sysdev_resume().
>> Without this patch the clocksource may be read as suspended,
>> this after sysdev resume but before platform device resume.
>
> Hmm, don't you have the same situation on suspend ?
>
> platform device suspend stops the clock, but the generic code expects
> it to be running until sysdev shutdown.

You are correct, the same situation exists on suspend.

> Another thing is that you now run both, the sysdev and the platform
> resume. Is that by design or accident ?

By incorrect design. =)

To fix this properly I was thinking of adding a clocksource suspend()
callback and ditch the platform ops all together. If you don't mind
then I'll post a patch for that tomorrow!

Thank you!

/ magnus
--
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/