Advertisement
Guest User

Untitled

a guest
Aug 15th, 2012
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. static inline unsigned ccnt_read(void) {
  2. unsigned cc;
  3. __asm__ volatile ("mrc p15, 0, %0, c15, c12, 1" : "=r"(cc));
  4. return cc;
  5. }
  6.  
  7. unsigned int lastx = 0;
  8. void poke(unsigned long arg) {
  9. unsigned x = ccnt_read();
  10. printk(KERN_ALERT "tick %u %d\n",x,(x - lastx));
  11. lastx = x;
  12. timer.expires = jiffies + (HZ/FREQ);
  13. add_timer(&timer);
  14. }
  15.  
  16. [ 875.070623] tick 49848138 49848138
  17. [ 876.070637] tick 97284866 47436728
  18. [ 877.070660] tick 141050351 43765485
  19. [ 878.070671] tick 346197125 205146774
  20. [ 879.070687] tick 389887770 43690645
  21. [ 880.070702] tick 433868979 43981209
  22. [ 881.070717] tick 479485250 45616271
  23. [ 882.070734] tick 526325449 46840199
  24. [ 883.070750] tick 652657918 126332469
  25. [ 884.070768] tick 780097755 127439837
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement