x86/time: cpuid_time_leaf() cleanup
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 6 May 2014 11:33:46 +0000 (13:33 +0200)
committerJan Beulich <jbeulich@suse.com>
Tue, 6 May 2014 11:33:46 +0000 (13:33 +0200)
* 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@citrix.com>
xen/arch/x86/time.c
xen/include/asm-x86/time.h

index fc5c777ec11ab70538ffc463c8f622e1aff46f66..f8c20f898a7047c2ab13dc5cf3e406c50c13e86e 100644 (file)
@@ -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;
index 0631baaf43f29f21b1fba3aea114d295a4f77db5..420620e10da03ce0a7fa1622c3f2a42fd514f463 100644 (file)
@@ -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);