OLD | NEW |
(Empty) | |
| 1 diff -Naur misc.c misc.c |
| 2 --- misc.c 2008-08-07 09:50:29.000000000 -0700 |
| 3 +++ misc.c 2010-04-05 12:06:14.000000000 -0700 |
| 4 @@ -96,8 +96,11 @@ |
| 5 rdtsc(int argc, const char *argv[], const struct cmd_info *info) |
| 6 { |
| 7 unsigned long long tsc; |
| 8 - |
| 9 +#ifdef __arm__ |
| 10 + tsc = 0; |
| 11 +#else |
| 12 rdtscll(tsc); |
| 13 +#endif |
| 14 printf("0x%016llx\n", tsc); |
| 15 |
| 16 return 0; |
| 17 @@ -110,14 +113,16 @@ |
| 18 if (set_cpu_affinity(cpu) < 0) { |
| 19 return -1; |
| 20 } |
| 21 - |
| 22 +#ifdef __arm__ |
| 23 + return -1; |
| 24 +#else |
| 25 asm volatile ( |
| 26 "cpuid\n\t" |
| 27 : "=a" (data[0]), "=b" (data[1]), "=c" (data[2]), "=d" (data[3]) |
| 28 : "0" (function), "2" (index) |
| 29 : "memory" |
| 30 ); |
| 31 - |
| 32 +#endif |
| 33 return 0; |
| 34 } |
| 35 |
OLD | NEW |