mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
x86: Add rdpmcl()
Add a version of rdpmc() that directly reads into a u64 Signed-off-by: Andi Kleen <[email protected]> Signed-off-by: Peter Zijlstra <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
parent
1c2ac3fde3
commit
1ff4d58a19
2 changed files with 4 additions and 0 deletions
|
|
@ -237,6 +237,8 @@ do { \
|
|||
(high) = (u32)(_l >> 32); \
|
||||
} while (0)
|
||||
|
||||
#define rdpmcl(counter, val) ((val) = native_read_pmc(counter))
|
||||
|
||||
#define rdtscp(low, high, aux) \
|
||||
do { \
|
||||
unsigned long long _val = native_read_tscp(&(aux)); \
|
||||
|
|
|
|||
|
|
@ -252,6 +252,8 @@ do { \
|
|||
high = _l >> 32; \
|
||||
} while (0)
|
||||
|
||||
#define rdpmcl(counter, val) ((val) = paravirt_read_pmc(counter))
|
||||
|
||||
static inline unsigned long long paravirt_rdtscp(unsigned int *aux)
|
||||
{
|
||||
return PVOP_CALL1(u64, pv_cpu_ops.read_tscp, aux);
|
||||
|
|
|
|||
Loading…
Reference in a new issue