#endif /* NCPUS > 1 */
#include <sys/kdebug.h>
-struct ppc_saved_state * interrupt(
+struct savearea * interrupt(
int type,
- struct ppc_saved_state *ssp,
+ struct savearea *ssp,
unsigned int dsisr,
unsigned int dar)
{
int current_cpu, tmpr, targtemp;
unsigned int throttle;
- AbsoluteTime now;
+ uint64_t now;
thread_act_t act;
disable_preemption();
+#if 0
+ {
+ extern void fctx_text(void);
+ fctx_test();
+ }
+#endif
+
+
current_cpu = cpu_number();
switch (type) {
case T_DECREMENTER:
KERNEL_DEBUG_CONSTANT(MACHDBG_CODE(DBG_MACH_EXCP_DECI, 0) | DBG_FUNC_NONE,
- isync_mfdec(), ((savearea *)ssp)->save_srr0, 0, 0, 0);
+ isync_mfdec(), ssp->save_srr0, 0, 0, 0);
#if 0
if (pcsample_enable) {
#endif
act = current_act(); /* Find ourselves */
- if(act->mact.qactTimer.hi | act->mact.qactTimer.lo) { /* Is the timer set? */
+ if(act->mact.qactTimer != 0) { /* Is the timer set? */
clock_get_uptime(&now); /* Find out what time it is */
- if (CMP_ABSOLUTETIME(&act->mact.qactTimer, &now) <= 0) { /* It is set, has it popped? */
- act->mact.qactTimer.hi = 0; /* Clear single shot timer */
- act->mact.qactTimer.lo = 0; /* and the other half */
+ if (act->mact.qactTimer <= now) { /* It is set, has it popped? */
+ act->mact.qactTimer = 0; /* Clear single shot timer */
if((unsigned int)act->mact.vmmControl & 0xFFFFFFFE) { /* Are there any virtual machines? */
vmm_timer_pop(act); /* Yes, check out them out... */
}
counter_always(c_incoming_interrupts++);
KERNEL_DEBUG_CONSTANT(MACHDBG_CODE(DBG_MACH_EXCP_INTR, 0) | DBG_FUNC_START,
- current_cpu, ((savearea *)ssp)->save_srr0, 0, 0, 0);
+ current_cpu, ssp->save_srr0, 0, 0, 0);
per_proc_info[current_cpu].interrupt_handler(
per_proc_info[current_cpu].interrupt_target,