public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: kapm-idled Funny in 2.4.10-ac12
@ 2001-10-12 18:52 Thomas Hood
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Hood @ 2001-10-12 18:52 UTC (permalink / raw)
  To: linux-kernel

> I've been reading throught the APM spec and code a bit further.
> The more I read the more I wonder quite how our idle code is
> meant to work and what kind of beer was overconsumed during
> its writing.

If you have the chance to clean up the whole driver to make it more
comprehensible, I'd welcome that.  I have struggled to understand
that code in the past.

Thomas


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: kapm-idled Funny in 2.4.10-ac12
@ 2001-10-12 19:40 Thomas Hood
  2001-10-12 20:12 ` Alan Cox
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Hood @ 2001-10-12 19:40 UTC (permalink / raw)
  To: linux-kernel

Just taking a walk through apm.c ...

I notice that set_time() calls get_cmos_time() with interrupts
disabled, whereas get_time_diff calls it with interrupts
enabled.

get_cmos_time is in time.c .  It does a bunch of CMOS_READs
without taking rtc_lock.

Methinks that the
    save_flags(flags); ...; cli(); ...; restore_flags(flags);
constructs in apm.c need some attention.

Thomas


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: kapm-idled Funny in 2.4.10-ac12
  2001-10-12 19:40 Thomas Hood
@ 2001-10-12 20:12 ` Alan Cox
  0 siblings, 0 replies; 3+ messages in thread
From: Alan Cox @ 2001-10-12 20:12 UTC (permalink / raw)
  To: Thomas Hood; +Cc: linux-kernel

> get_cmos_time is in time.c .  It does a bunch of CMOS_READs
> without taking rtc_lock.
> 
> Methinks that the
>     save_flags(flags); ...; cli(); ...; restore_flags(flags);
> constructs in apm.c need some attention.

Well spotted. Yes the CMOS handling does still seem a bit random in places

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-10-12 20:06 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-10-12 18:52 kapm-idled Funny in 2.4.10-ac12 Thomas Hood
  -- strict thread matches above, loose matches on Subject: below --
2001-10-12 19:40 Thomas Hood
2001-10-12 20:12 ` Alan Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox