Actually it is timer interrupts that never happen again, and not a
missing sti() -- MvS dug into this a bit on an old(er?) Jensen board
and found that this is what happens. It is not the ioctl() but rather
the disabling of periodic interrupts from the RTC that is implicit
upon a close. You can try changing close(fd); to kill(getpid(), SIGSTOP);
to check this.
On the i386, you have timer interrupt events from the 8253 Programmable
Interrupt Timer @ 0x40/IRQ=1 and that is entirely independent of the
mc146818 RTC @ 0x70/IRQ=8. But on the Alpha, the 8253 is not used for
timer interrupts, but rather the RTC is (according to arch/alpha/irq.c).
Don't ask me why the 8253 isn't used -- I don't know enough about what
capabilities the various Alpha boxes have or don't have to comment.
So the RTC driver thinks it is free to meddle with the interrupt generation
and IRQ rate, as it has no idea the kernel is using it. You close the
device and your timer interrupt goes bye-bye.
The fix? To arch/alpha/irq.c do a:
- #define IS_RESERVED_IRQ(irq) ((irq)==2) /* IRQ 2 used by hw cascade */
+ /* IRQ 2 used by hw cascade, IRQ 8 is RTC, used by kernel for timer */
+ #define IS_RESERVED_IRQ(irq) ((irq)==2 || (irq)==8)
That will stop the RTC driver from a successful init, and hence stop you
from shooting yourself in the foot by trying to use it for 2 things at once.
-- To unsubscribe: send e-mail to email@example.com with 'unsubscribe' as the subject. Do not send it to firstname.lastname@example.org
Copyright © 1995-1997 Red Hat Software. Legal notices