[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] x86/time: cpuid_time_leaf() cleanup



commit 4e97214b0a60e0c29348d1435341ad7e83c87398
Author:     Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
AuthorDate: Tue May 6 13:33:46 2014 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Tue May 6 13:33:46 2014 +0200

    x86/time: cpuid_time_leaf() cleanup
    
    * Don't mix uint32_t and unsigned int between prototype and definition
    * Don't bitwise or with 0
    
    Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
---
 xen/arch/x86/time.c        |    7 +++----
 xen/include/asm-x86/time.h |    4 ++--
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/xen/arch/x86/time.c b/xen/arch/x86/time.c
index fc5c777..f8c20f8 100644
--- a/xen/arch/x86/time.c
+++ b/xen/arch/x86/time.c
@@ -1754,10 +1754,9 @@ void cpuid_time_leaf(uint32_t sub_idx, uint32_t *eax, 
uint32_t *ebx,
     switch ( sub_idx )
     {
     case 0: /* features */
-        *eax = ( ( (!!d->arch.vtsc) << 0 ) |
-                 ( (!!host_tsc_is_safe()) << 1 ) |
-                 ( (!!boot_cpu_has(X86_FEATURE_RDTSCP)) << 2 ) |
-               0 );
+        *eax = (!!d->arch.vtsc << 0) |
+               (!!host_tsc_is_safe() << 1) |
+               (!!boot_cpu_has(X86_FEATURE_RDTSCP) << 2);
         *ebx = d->arch.tsc_mode;
         *ecx = d->arch.tsc_khz;
         *edx = d->arch.incarnation;
diff --git a/xen/include/asm-x86/time.h b/xen/include/asm-x86/time.h
index 0631baa..420620e 100644
--- a/xen/include/asm-x86/time.h
+++ b/xen/include/asm-x86/time.h
@@ -71,8 +71,8 @@ void tsc_get_info(struct domain *d, uint32_t *tsc_mode, 
uint64_t *elapsed_nsec,
 void force_update_vcpu_system_time(struct vcpu *v);
 
 int host_tsc_is_safe(void);
-void cpuid_time_leaf(uint32_t sub_idx, unsigned int *eax, unsigned int *ebx,
-                      unsigned int *ecx, unsigned int *edx);
+void cpuid_time_leaf(uint32_t sub_idx, uint32_t *eax, uint32_t *ebx,
+                     uint32_t *ecx, uint32_t *edx);
 
 u64 stime2tsc(s_time_t stime);
 
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.