]> git.saurik.com Git - apple/xnu.git/blobdiff - osfmk/ppc/mcount.s
xnu-792.6.61.tar.gz
[apple/xnu.git] / osfmk / ppc / mcount.s
index b05860953884e640a34c8625b3beead658029064..38a4d9153b86927b0dcdd8a285440c37200627f2 100644 (file)
@@ -21,7 +21,6 @@
  */
 #include <ppc/asm.h>
 #include <ppc/proc_reg.h>
-#include <cpus.h>
 #include <assym.s>
 #include <debug.h>
 #include <mach/ppc/vm_param.h>
@@ -50,7 +49,8 @@ mcount:
                rlwinm  r8,r9,0,MSR_EE_BIT+1,MSR_EE_BIT-1       ; Turn off interruptions
                mtmsr   r8                                                                      ; Update msr    
                isync           
-               mfsprg  r7,0                                                            ; Get per_proc
+               mfsprg  r7,1                                                            ; Get the current activation
+               lwz             r7,ACT_PER_PROC(r7)                                     ; Get the per_proc block
                lhz             r6,PP_CPU_FLAGS(r7)                                     ; Get  cpu flags 
                ori             r5,r6,mcountOff                                         ; 
                cmplw   r5,r6                                                           ; is mount off
@@ -60,7 +60,8 @@ mcount:
                mr r4, r0
                bl      _mcount                                                                 ; Call the C routine
                lwz     r9,FM_ARG0(r1)
-               mfsprg  r7,0                                                            ; Get per-proc block
+               mfsprg  r7,1                                                            ; Get the current activation
+               lwz             r7,ACT_PER_PROC(r7)                                     ; Get the per_proc block
                lhz             r6,PP_CPU_FLAGS(r7)                                     ; Get CPU number 
                li              r5,mcountOff                                            ; 
                andc            r6,r6,r5                                                ; Clear mcount_off