Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=b8d1fae7dbde6a1227fa142acecb48dc3dd63817
Commit:     b8d1fae7dbde6a1227fa142acecb48dc3dd63817
Parent:     8f12dea6135d0a55b151dcb4c6bbe211f5f8d35d
Author:     Glauber de Oliveira Costa <[EMAIL PROTECTED]>
AuthorDate: Wed Jan 30 13:31:07 2008 +0100
Committer:  Ingo Molnar <[EMAIL PROTECTED]>
CommitDate: Wed Jan 30 13:31:07 2008 +0100

    x86: change rdpmc interface
    
    the rdpmc instruction gets a counter argument in rcx. However,
    the i386 version was ignoring it. To make both x86_64 and i386 versions
    the same, as well as to comply with the instruction semantics, this
    parameter is added in the i386 version
    
    Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]>
    Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]>
    Signed-off-by: Thomas Gleixner <[EMAIL PROTECTED]>
---
 include/asm-x86/msr.h      |    6 +++---
 include/asm-x86/paravirt.h |    2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/include/asm-x86/msr.h b/include/asm-x86/msr.h
index b6262e9..effb731 100644
--- a/include/asm-x86/msr.h
+++ b/include/asm-x86/msr.h
@@ -94,10 +94,10 @@ static inline unsigned long long native_read_tsc(void)
        return val;
 }
 
-static inline unsigned long long native_read_pmc(void)
+static inline unsigned long long native_read_pmc(int counter)
 {
        unsigned long long val;
-       asm volatile("rdpmc" : "=A" (val));
+       asm volatile("rdpmc" : "=A" (val) : "c" (counter));
        return val;
 }
 
@@ -154,7 +154,7 @@ static inline int wrmsr_safe(u32 __msr, u32 __low, u32 
__high)
 
 #define rdpmc(counter,low,high)                                        \
        do {                                                    \
-               u64 _l = native_read_pmc();                     \
+               u64 _l = native_read_pmc(counter);              \
                (low)  = (u32)_l;                               \
                (high) = (u32)(_l >> 32);                       \
        } while(0)
diff --git a/include/asm-x86/paravirt.h b/include/asm-x86/paravirt.h
index d1780e3..4782be6 100644
--- a/include/asm-x86/paravirt.h
+++ b/include/asm-x86/paravirt.h
@@ -118,7 +118,7 @@ struct pv_cpu_ops {
        int (*write_msr)(unsigned int msr, u64 val);
 
        u64 (*read_tsc)(void);
-       u64 (*read_pmc)(void);
+       u64 (*read_pmc)(int counter);
 
        /* These two are jmp to, not actually called. */
        void (*irq_enable_syscall_ret)(void);
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to