Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

x86/xen/time: cleanup xen_tsc_safe_clocksource

Modifies xen_tsc_safe_clocksource() to use newly defined constants from
arch/x86/include/asm/xen/cpuid.h. This replaces a numeric value with
XEN_CPUID_TSC_MODE_NEVER_EMULATE, and deletes a comment that is now self
explanatory.

There should be no change in the function's behavior.

Signed-off-by: Krister Johansen <kjlx@templeofstupid.com>
Reviewed-by: Juergen Gross <jgross@suse.com>
Link: https://lore.kernel.org/r/a69ca370fecf85d312d2db633d9438ace2af6e5b.1677038165.git.kjlx@templeofstupid.com
Signed-off-by: Juergen Gross <jgross@suse.com>

authored by

Krister Johansen and committed by
Juergen Gross
99a7bcaf 5f6e839e

+2 -5
+2 -5
arch/x86/xen/time.c
··· 20 20 #include <asm/pvclock.h> 21 21 #include <asm/xen/hypervisor.h> 22 22 #include <asm/xen/hypercall.h> 23 + #include <asm/xen/cpuid.h> 23 24 24 25 #include <xen/events.h> 25 26 #include <xen/features.h> ··· 496 495 /* Leaf 4, sub-leaf 0 (0x40000x03) */ 497 496 cpuid_count(xen_cpuid_base() + 3, 0, &eax, &ebx, &ecx, &edx); 498 497 499 - /* tsc_mode = no_emulate (2) */ 500 - if (ebx != 2) 501 - return 0; 502 - 503 - return 1; 498 + return ebx == XEN_CPUID_TSC_MODE_NEVER_EMULATE; 504 499 } 505 500 506 501 static void __init xen_time_init(void)