diff options
Diffstat (limited to 'arch/ia64/kernel/fsys.S')
-rw-r--r-- | arch/ia64/kernel/fsys.S | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/ia64/kernel/fsys.S b/arch/ia64/kernel/fsys.S index 44841971f077..c932d86e2d81 100644 --- a/arch/ia64/kernel/fsys.S +++ b/arch/ia64/kernel/fsys.S | |||
@@ -660,7 +660,11 @@ GLOBAL_ENTRY(fsys_bubble_down) | |||
660 | nop.i 0 | 660 | nop.i 0 |
661 | ;; | 661 | ;; |
662 | mov ar.rsc=0 // M2 set enforced lazy mode, pl 0, LE, loadrs=0 | 662 | mov ar.rsc=0 // M2 set enforced lazy mode, pl 0, LE, loadrs=0 |
663 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
664 | mov.m r30=ar.itc // M get cycle for accounting | ||
665 | #else | ||
663 | nop.m 0 | 666 | nop.m 0 |
667 | #endif | ||
664 | nop.i 0 | 668 | nop.i 0 |
665 | ;; | 669 | ;; |
666 | mov r23=ar.bspstore // M2 (12 cyc) save ar.bspstore | 670 | mov r23=ar.bspstore // M2 (12 cyc) save ar.bspstore |
@@ -682,6 +686,28 @@ GLOBAL_ENTRY(fsys_bubble_down) | |||
682 | cmp.ne pKStk,pUStk=r0,r0 // A set pKStk <- 0, pUStk <- 1 | 686 | cmp.ne pKStk,pUStk=r0,r0 // A set pKStk <- 0, pUStk <- 1 |
683 | br.call.sptk.many b7=ia64_syscall_setup // B | 687 | br.call.sptk.many b7=ia64_syscall_setup // B |
684 | ;; | 688 | ;; |
689 | #ifdef CONFIG_VIRT_CPU_ACCOUNTING | ||
690 | // mov.m r30=ar.itc is called in advance | ||
691 | add r16=TI_AC_STAMP+IA64_TASK_SIZE,r2 | ||
692 | add r17=TI_AC_LEAVE+IA64_TASK_SIZE,r2 | ||
693 | ;; | ||
694 | ld8 r18=[r16],TI_AC_STIME-TI_AC_STAMP // time at last check in kernel | ||
695 | ld8 r19=[r17],TI_AC_UTIME-TI_AC_LEAVE // time at leave kernel | ||
696 | ;; | ||
697 | ld8 r20=[r16],TI_AC_STAMP-TI_AC_STIME // cumulated stime | ||
698 | ld8 r21=[r17] // cumulated utime | ||
699 | sub r22=r19,r18 // stime before leave kernel | ||
700 | ;; | ||
701 | st8 [r16]=r30,TI_AC_STIME-TI_AC_STAMP // update stamp | ||
702 | sub r18=r30,r19 // elapsed time in user mode | ||
703 | ;; | ||
704 | add r20=r20,r22 // sum stime | ||
705 | add r21=r21,r18 // sum utime | ||
706 | ;; | ||
707 | st8 [r16]=r20 // update stime | ||
708 | st8 [r17]=r21 // update utime | ||
709 | ;; | ||
710 | #endif | ||
685 | mov ar.rsc=0x3 // M2 set eager mode, pl 0, LE, loadrs=0 | 711 | mov ar.rsc=0x3 // M2 set eager mode, pl 0, LE, loadrs=0 |
686 | mov rp=r14 // I0 set the real return addr | 712 | mov rp=r14 // I0 set the real return addr |
687 | and r3=_TIF_SYSCALL_TRACEAUDIT,r3 // A | 713 | and r3=_TIF_SYSCALL_TRACEAUDIT,r3 // A |