]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/ppc/interrupt.c
xnu-792.6.22.tar.gz
[apple/xnu.git] / osfmk / ppc / interrupt.c
index 170ad22272d644163e384ab7cfafb477cc3bc712..aba525045e714972128303b0e9b826a240f6f831 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
+ * Copyright (c) 2000-2005 Apple Computer, Inc. All rights reserved.
  *
  * @APPLE_LICENSE_HEADER_START@
  * 
@@ -86,9 +86,15 @@ struct savearea * interrupt(
                        }
 #endif
 
+                       now = mach_absolute_time();                             /* Find out what time it is */
+                       
+                       if(now >= proc_info->pms.pmsPop) {              /* Is it time for power management state change? */
+                               pmsStep(1);                                                     /* Yes, advance step */
+                               now = mach_absolute_time();                     /* Get the time again since we ran a bit */
+                       }
+
                        thread = current_thread();                                      /* Find ourselves */
                        if(thread->machine.qactTimer != 0) {    /* Is the timer set? */
-                               clock_get_uptime(&now);                         /* Find out what time it is */
                                if (thread->machine.qactTimer <= now) { /* It is set, has it popped? */
                                        thread->machine.qactTimer = 0;          /* Clear single shot timer */
                                        if((unsigned int)thread->machine.vmmControl & 0xFFFFFFFE) {     /* Are there any virtual machines? */
@@ -97,7 +103,7 @@ struct savearea * interrupt(
                                }
                        }
 
-                       rtclock_intr(0, ssp, 0);
+                       rtclock_intr(ssp);
                        break;
        
                case T_INTERRUPT:
@@ -130,10 +136,8 @@ struct savearea * interrupt(
        
                                
                default:
-#if     MACH_KDP || MACH_KDB
-                        if (!Call_Debugger(type, ssp))
-#endif
-                        unresolved_kernel_trap(type, ssp, dsisr, dar, NULL);
+                       if (!Call_Debugger(type, ssp))
+                               unresolved_kernel_trap(type, ssp, dsisr, dar, NULL);
                        break;
        }