Alpha:
unsigned int x;
asm volatile ("rpcc %0" : "=r"(x));
Yes, the (active) part of the counter is only 32-bit wide. Yes that
does mean overflow in 8.1 seconds on a 500Mhz box. This traded for
the ability to get virtual cycle counts:
unsigned long x;
asm volatile ("rpcc %0" : "=r"(x));
x = (unsigned int)x + (unsigned int)(x >> 32);
I'm not sure it was worth it, personally.
UltraSparc:
unsigned long x;
asm volatile ("rd %tick, %0" : "=r"(x));
Earlier Sparcs do not have this feature.
r~
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html