[lkml]   [1996]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: RTC driver bug in 1.3.91
Ulrich Windl (
Mon, 29 Apr 1996 08:01:31 +0200

> I had enabled periodic interrupts for a never ending loop.
> Unfortunately I had a programming error in the program that made me
> hit ^C. The program really stopped, but I wasn't able to successfully
> start it again. Although I checked the error codes in my program, no
> errors were signalled. I just seemed that no interrupts are delivered
> to the program (i.e. read() from /dev/rtc lasts forever).
> "ps -l" indicates that the process is blocked on "rtc_interrupt".

To check that your application is not buggy, check /proc/rtc to
ensure you have enabled periodic interrupts, and that the frequency is
correct. Otherwise you can expect your read to be stuck in a blocked state.

> Roughly browsing the code showed that there's one pair with
> save_flags/restore_flags, but without cli() between. Maybe it's
> related, maybe it's not.

Not related, as that is only in the path of reading /proc/rtc but thanks
anyway for the report.

> In fact I assume that upon termination of a process the open files
> are closed (such as /dev/rtc). Maybe there's some code missing that
> does a proper cleanup.

Upon closure, it turns off all interrupt generation sources, and clears
any interrupt data that has not yet been read. Re-enabling interrupt
generation upon a subsequent open will read/clear the IRQ status byte so
that should be fine as well. I have tried ^C multiple times to apps using
/dev/rtc in an attempt to reproduce your problem but was not sucessful.

There will be some minor updates to the rtc driver in 1.3.98, which I
will also mail to you now. If it turns out that your problem is not a
bug in your application, then please let me know, and I'll see what I
can do with it.


 \ /
  Last update: 2005-03-22 13:37    [W:0.022 / U:1.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site