* Timer interrupts
@ 2005-12-16 15:34 madprops
2005-12-16 16:55 ` Dominic Sweetman
0 siblings, 1 reply; 2+ messages in thread
From: madprops @ 2005-12-16 15:34 UTC (permalink / raw)
To: linux-mips
Hi,
i'm using CP0_Count/CP0_Compare to get timer interrupts. They should be
turned off while being in kernel mode (performing syscalls / handling
tlb-misses etc) and enabled in user mode.
Whenever a timer interrupt happens in kernel mode, the exception should be
delayed until it is switched back to the user. Up to now I set
CP0_Status(IE) to zero when entering the kernel. Does this allow pending
interrupts or are incoming interrupts totally ignored then ??
The problem that might arise (in the second case) is that CP0_Count reaches
and passes CP0_Compare while interrupts are turned off. Back in user mode,
the running user process would get an unacceptable excessive time slice.
Thanks,
Thomas
--
Telefonieren Sie schon oder sparen Sie noch?
NEU: GMX Phone_Flat http://www.gmx.net/de/go/telefonie
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Timer interrupts
2005-12-16 15:34 Timer interrupts madprops
@ 2005-12-16 16:55 ` Dominic Sweetman
0 siblings, 0 replies; 2+ messages in thread
From: Dominic Sweetman @ 2005-12-16 16:55 UTC (permalink / raw)
To: madprops; +Cc: linux-mips
> i'm using CP0_Count/CP0_Compare to get timer interrupts. They should be
> turned off while being in kernel mode (performing syscalls / handling
> tlb-misses etc) and enabled in user mode.
This isn't going to work. The hardware does nothing to inhibit
interrupts in kernel mode, and the system depends on them (performance
would be truly dreadful if no interrupt could be taken in kernel mode).
The kernel is already using CP0_Status and Count/Compare for its own
purposes, which you will be breaking...
Whatever it is you were trying to do, you need to do some other way!
--
Dominic Sweetman
MIPS Technologies
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-12-16 16:55 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-12-16 15:34 Timer interrupts madprops
2005-12-16 16:55 ` Dominic Sweetman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox